azure_mgmt_container_instance 0.15.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +48 -43
  3. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +4 -1
  4. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +6 -5
  5. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance.rb +58 -0
  6. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +824 -0
  7. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +140 -0
  8. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +139 -0
  9. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
  10. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container.rb +168 -0
  11. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group.rb +216 -0
  12. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
  13. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
  14. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
  15. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
  16. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
  17. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
  18. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
  19. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
  20. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
  21. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/environment_variable.rb +57 -0
  22. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/event.rb +101 -0
  23. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
  24. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/ip_address.rb +80 -0
  25. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
  26. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
  27. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
  28. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
  29. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation_list_result.rb +56 -0
  30. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/port.rb +58 -0
  31. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
  32. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
  33. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
  34. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
  35. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/volume.rb +69 -0
  36. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
  37. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
  38. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/operations.rb +107 -0
  39. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance.rb +63 -0
  40. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +113 -0
  41. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +824 -0
  42. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +144 -0
  43. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +139 -0
  44. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
  45. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container.rb +168 -0
  46. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group.rb +216 -0
  47. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
  48. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
  49. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
  50. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
  51. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
  52. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
  53. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
  54. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
  55. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
  56. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/environment_variable.rb +57 -0
  57. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/event.rb +101 -0
  58. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
  59. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
  60. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/ip_address.rb +80 -0
  61. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
  62. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
  63. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
  64. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
  65. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
  66. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/port.rb +58 -0
  67. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
  68. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
  69. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
  70. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
  71. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
  72. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
  73. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
  74. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
  75. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
  76. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
  77. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/operations.rb +107 -0
  78. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance.rb +63 -0
  79. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +113 -0
  80. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +935 -0
  81. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +144 -0
  82. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +139 -0
  83. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
  84. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container.rb +168 -0
  85. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group.rb +216 -0
  86. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
  87. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
  88. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
  89. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
  90. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
  91. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
  92. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
  93. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
  94. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
  95. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/environment_variable.rb +57 -0
  96. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/event.rb +101 -0
  97. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
  98. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
  99. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/ip_address.rb +103 -0
  100. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
  101. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
  102. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
  103. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
  104. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
  105. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/port.rb +58 -0
  106. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
  107. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
  108. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
  109. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
  110. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
  111. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
  112. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
  113. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
  114. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
  115. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
  116. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/operations.rb +107 -0
  117. data/lib/azure_mgmt_container_instance.rb +3 -0
  118. data/lib/profiles/latest/containerinstance_latest_profile_client.rb +28 -9
  119. data/lib/profiles/latest/containerinstance_module_definition.rb +0 -1
  120. data/lib/profiles/latest/modules/containerinstance_profile_module.rb +164 -101
  121. data/lib/version.rb +1 -1
  122. metadata +114 -2
@@ -0,0 +1,113 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerInstance::Mgmt::V2017_12_01_preview
7
+ #
8
+ # ContainerGroupUsage
9
+ #
10
+ class ContainerGroupUsage
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ContainerGroupUsage class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerInstanceManagementClient] reference to the ContainerInstanceManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get the usage for a subscription
26
+ #
27
+ # @param location [String] The identifier for the physical azure location.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [UsageListResult] operation results.
32
+ #
33
+ def list(location, custom_headers:nil)
34
+ response = list_async(location, custom_headers:custom_headers).value!
35
+ response.body unless response.nil?
36
+ end
37
+
38
+ #
39
+ # Get the usage for a subscription
40
+ #
41
+ # @param location [String] The identifier for the physical azure location.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(location, custom_headers:nil)
48
+ list_async(location, custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Get the usage for a subscription
53
+ #
54
+ # @param location [String] The identifier for the physical azure location.
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(location, custom_headers:nil)
61
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
62
+ fail ArgumentError, 'location is nil' if location.nil?
63
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
64
+
65
+
66
+ request_headers = {}
67
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
68
+
69
+ # Set Headers
70
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
71
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
72
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages'
73
+
74
+ request_url = @base_url || @client.base_url
75
+
76
+ options = {
77
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
78
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::UsageListResult.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ end
113
+ end
@@ -0,0 +1,824 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerInstance::Mgmt::V2017_12_01_preview
7
+ #
8
+ # ContainerGroups
9
+ #
10
+ class ContainerGroups
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ContainerGroups class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerInstanceManagementClient] reference to the ContainerInstanceManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Get a list of container groups in the specified subscription.
26
+ #
27
+ # Get a list of container groups in the specified subscription. This operation
28
+ # returns properties of each container group including containers, image
29
+ # registry credentials, restart policy, IP address type, OS type, state, and
30
+ # volumes.
31
+ #
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<ContainerGroup>] operation results.
36
+ #
37
+ def list(custom_headers:nil)
38
+ first_page = list_as_lazy(custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Get a list of container groups in the specified subscription.
44
+ #
45
+ # Get a list of container groups in the specified subscription. This operation
46
+ # returns properties of each container group including containers, image
47
+ # registry credentials, restart policy, IP address type, OS type, state, and
48
+ # volumes.
49
+ #
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(custom_headers:nil)
56
+ list_async(custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Get a list of container groups in the specified subscription.
61
+ #
62
+ # Get a list of container groups in the specified subscription. This operation
63
+ # returns properties of each container group including containers, image
64
+ # registry credentials, restart policy, IP address type, OS type, state, and
65
+ # volumes.
66
+ #
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(custom_headers:nil)
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+
76
+
77
+ request_headers = {}
78
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
87
+ options = {
88
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
+ path_params: {'subscriptionId' => @client.subscription_id},
90
+ query_params: {'api-version' => @client.api_version},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ # Deserialize Response
107
+ if status_code == 200
108
+ begin
109
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroupListResult.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response)
112
+ rescue Exception => e
113
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
+ end
115
+ end
116
+
117
+ result
118
+ end
119
+
120
+ promise.execute
121
+ end
122
+
123
+ #
124
+ # Get a list of container groups in the specified subscription and resource
125
+ # group.
126
+ #
127
+ # Get a list of container groups in a specified subscription and resource
128
+ # group. This operation returns properties of each container group including
129
+ # containers, image registry credentials, restart policy, IP address type, OS
130
+ # type, state, and volumes.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group.
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [Array<ContainerGroup>] operation results.
137
+ #
138
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
139
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
140
+ first_page.get_all_items
141
+ end
142
+
143
+ #
144
+ # Get a list of container groups in the specified subscription and resource
145
+ # group.
146
+ #
147
+ # Get a list of container groups in a specified subscription and resource
148
+ # group. This operation returns properties of each container group including
149
+ # containers, image registry credentials, restart policy, IP address type, OS
150
+ # type, state, and volumes.
151
+ #
152
+ # @param resource_group_name [String] The name of the resource group.
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
+ #
158
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
159
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
160
+ end
161
+
162
+ #
163
+ # Get a list of container groups in the specified subscription and resource
164
+ # group.
165
+ #
166
+ # Get a list of container groups in a specified subscription and resource
167
+ # group. This operation returns properties of each container group including
168
+ # containers, image registry credentials, restart policy, IP address type, OS
169
+ # type, state, and volumes.
170
+ #
171
+ # @param resource_group_name [String] The name of the resource group.
172
+ # @param [Hash{String => String}] A hash of custom headers that will be added
173
+ # to the HTTP request.
174
+ #
175
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
176
+ #
177
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
178
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
179
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
180
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
181
+
182
+
183
+ request_headers = {}
184
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
185
+
186
+ # Set Headers
187
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
188
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
189
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups'
190
+
191
+ request_url = @base_url || @client.base_url
192
+
193
+ options = {
194
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
195
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
196
+ query_params: {'api-version' => @client.api_version},
197
+ headers: request_headers.merge(custom_headers || {}),
198
+ base_url: request_url
199
+ }
200
+ promise = @client.make_request_async(:get, path_template, options)
201
+
202
+ promise = promise.then do |result|
203
+ http_response = result.response
204
+ status_code = http_response.status
205
+ response_content = http_response.body
206
+ unless status_code == 200
207
+ error_model = JSON.load(response_content)
208
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
209
+ end
210
+
211
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
212
+ # Deserialize Response
213
+ if status_code == 200
214
+ begin
215
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
216
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroupListResult.mapper()
217
+ result.body = @client.deserialize(result_mapper, parsed_response)
218
+ rescue Exception => e
219
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
220
+ end
221
+ end
222
+
223
+ result
224
+ end
225
+
226
+ promise.execute
227
+ end
228
+
229
+ #
230
+ # Get the properties of the specified container group.
231
+ #
232
+ # Gets the properties of the specified container group in the specified
233
+ # subscription and resource group. The operation returns the properties of each
234
+ # container group including containers, image registry credentials, restart
235
+ # policy, IP address type, OS type, state, and volumes.
236
+ #
237
+ # @param resource_group_name [String] The name of the resource group.
238
+ # @param container_group_name [String] The name of the container group.
239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
240
+ # will be added to the HTTP request.
241
+ #
242
+ # @return [ContainerGroup] operation results.
243
+ #
244
+ def get(resource_group_name, container_group_name, custom_headers:nil)
245
+ response = get_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
246
+ response.body unless response.nil?
247
+ end
248
+
249
+ #
250
+ # Get the properties of the specified container group.
251
+ #
252
+ # Gets the properties of the specified container group in the specified
253
+ # subscription and resource group. The operation returns the properties of each
254
+ # container group including containers, image registry credentials, restart
255
+ # policy, IP address type, OS type, state, and volumes.
256
+ #
257
+ # @param resource_group_name [String] The name of the resource group.
258
+ # @param container_group_name [String] The name of the container group.
259
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
260
+ # will be added to the HTTP request.
261
+ #
262
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
263
+ #
264
+ def get_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
265
+ get_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
266
+ end
267
+
268
+ #
269
+ # Get the properties of the specified container group.
270
+ #
271
+ # Gets the properties of the specified container group in the specified
272
+ # subscription and resource group. The operation returns the properties of each
273
+ # container group including containers, image registry credentials, restart
274
+ # policy, IP address type, OS type, state, and volumes.
275
+ #
276
+ # @param resource_group_name [String] The name of the resource group.
277
+ # @param container_group_name [String] The name of the container group.
278
+ # @param [Hash{String => String}] A hash of custom headers that will be added
279
+ # to the HTTP request.
280
+ #
281
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
282
+ #
283
+ def get_async(resource_group_name, container_group_name, custom_headers:nil)
284
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
285
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
286
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
287
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
288
+
289
+
290
+ request_headers = {}
291
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
292
+
293
+ # Set Headers
294
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
295
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
296
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
297
+
298
+ request_url = @base_url || @client.base_url
299
+
300
+ options = {
301
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
302
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
303
+ query_params: {'api-version' => @client.api_version},
304
+ headers: request_headers.merge(custom_headers || {}),
305
+ base_url: request_url
306
+ }
307
+ promise = @client.make_request_async(:get, path_template, options)
308
+
309
+ promise = promise.then do |result|
310
+ http_response = result.response
311
+ status_code = http_response.status
312
+ response_content = http_response.body
313
+ unless status_code == 200
314
+ error_model = JSON.load(response_content)
315
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
316
+ end
317
+
318
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
319
+ # Deserialize Response
320
+ if status_code == 200
321
+ begin
322
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
323
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroup.mapper()
324
+ result.body = @client.deserialize(result_mapper, parsed_response)
325
+ rescue Exception => e
326
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
327
+ end
328
+ end
329
+
330
+ result
331
+ end
332
+
333
+ promise.execute
334
+ end
335
+
336
+ #
337
+ # Create or update container groups.
338
+ #
339
+ # Create or update container groups with specified configurations.
340
+ #
341
+ # @param resource_group_name [String] The name of the resource group.
342
+ # @param container_group_name [String] The name of the container group.
343
+ # @param container_group [ContainerGroup] The properties of the container group
344
+ # to be created or updated.
345
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
346
+ # will be added to the HTTP request.
347
+ #
348
+ # @return [ContainerGroup] operation results.
349
+ #
350
+ def create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil)
351
+ response = create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
352
+ response.body unless response.nil?
353
+ end
354
+
355
+ #
356
+ # Create or update container groups.
357
+ #
358
+ # Create or update container groups with specified configurations.
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group.
361
+ # @param container_group_name [String] The name of the container group.
362
+ # @param container_group [ContainerGroup] The properties of the container group
363
+ # to be created or updated.
364
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
365
+ # will be added to the HTTP request.
366
+ #
367
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
368
+ #
369
+ def create_or_update_with_http_info(resource_group_name, container_group_name, container_group, custom_headers:nil)
370
+ create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
371
+ end
372
+
373
+ #
374
+ # Create or update container groups.
375
+ #
376
+ # Create or update container groups with specified configurations.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group.
379
+ # @param container_group_name [String] The name of the container group.
380
+ # @param container_group [ContainerGroup] The properties of the container group
381
+ # to be created or updated.
382
+ # @param [Hash{String => String}] A hash of custom headers that will be added
383
+ # to the HTTP request.
384
+ #
385
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
386
+ #
387
+ def create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:nil)
388
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
389
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
390
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
391
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
392
+ fail ArgumentError, 'container_group is nil' if container_group.nil?
393
+
394
+
395
+ request_headers = {}
396
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
397
+
398
+ # Set Headers
399
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
400
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
401
+
402
+ # Serialize Request
403
+ request_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroup.mapper()
404
+ request_content = @client.serialize(request_mapper, container_group)
405
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
406
+
407
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
408
+
409
+ request_url = @base_url || @client.base_url
410
+
411
+ options = {
412
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
413
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
414
+ query_params: {'api-version' => @client.api_version},
415
+ body: request_content,
416
+ headers: request_headers.merge(custom_headers || {}),
417
+ base_url: request_url
418
+ }
419
+ promise = @client.make_request_async(:put, path_template, options)
420
+
421
+ promise = promise.then do |result|
422
+ http_response = result.response
423
+ status_code = http_response.status
424
+ response_content = http_response.body
425
+ unless status_code == 200 || status_code == 201
426
+ error_model = JSON.load(response_content)
427
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
428
+ end
429
+
430
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
431
+ # Deserialize Response
432
+ if status_code == 200
433
+ begin
434
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
435
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroup.mapper()
436
+ result.body = @client.deserialize(result_mapper, parsed_response)
437
+ rescue Exception => e
438
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
439
+ end
440
+ end
441
+ # Deserialize Response
442
+ if status_code == 201
443
+ begin
444
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
445
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroup.mapper()
446
+ result.body = @client.deserialize(result_mapper, parsed_response)
447
+ rescue Exception => e
448
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
449
+ end
450
+ end
451
+
452
+ result
453
+ end
454
+
455
+ promise.execute
456
+ end
457
+
458
+ #
459
+ # Delete the specified container group.
460
+ #
461
+ # Delete the specified container group in the specified subscription and
462
+ # resource group. The operation does not delete other resources provided by the
463
+ # user, such as volumes.
464
+ #
465
+ # @param resource_group_name [String] The name of the resource group.
466
+ # @param container_group_name [String] The name of the container group.
467
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
468
+ # will be added to the HTTP request.
469
+ #
470
+ # @return [ContainerGroup] operation results.
471
+ #
472
+ def delete(resource_group_name, container_group_name, custom_headers:nil)
473
+ response = delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
474
+ response.body unless response.nil?
475
+ end
476
+
477
+ #
478
+ # Delete the specified container group.
479
+ #
480
+ # Delete the specified container group in the specified subscription and
481
+ # resource group. The operation does not delete other resources provided by the
482
+ # user, such as volumes.
483
+ #
484
+ # @param resource_group_name [String] The name of the resource group.
485
+ # @param container_group_name [String] The name of the container group.
486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
487
+ # will be added to the HTTP request.
488
+ #
489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
490
+ #
491
+ def delete_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
492
+ delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
493
+ end
494
+
495
+ #
496
+ # Delete the specified container group.
497
+ #
498
+ # Delete the specified container group in the specified subscription and
499
+ # resource group. The operation does not delete other resources provided by the
500
+ # user, such as volumes.
501
+ #
502
+ # @param resource_group_name [String] The name of the resource group.
503
+ # @param container_group_name [String] The name of the container group.
504
+ # @param [Hash{String => String}] A hash of custom headers that will be added
505
+ # to the HTTP request.
506
+ #
507
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
508
+ #
509
+ def delete_async(resource_group_name, container_group_name, custom_headers:nil)
510
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
511
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
512
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
513
+ fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
514
+
515
+
516
+ request_headers = {}
517
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
518
+
519
+ # Set Headers
520
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
521
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
522
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
523
+
524
+ request_url = @base_url || @client.base_url
525
+
526
+ options = {
527
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
528
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
529
+ query_params: {'api-version' => @client.api_version},
530
+ headers: request_headers.merge(custom_headers || {}),
531
+ base_url: request_url
532
+ }
533
+ promise = @client.make_request_async(:delete, path_template, options)
534
+
535
+ promise = promise.then do |result|
536
+ http_response = result.response
537
+ status_code = http_response.status
538
+ response_content = http_response.body
539
+ unless status_code == 200 || status_code == 204
540
+ error_model = JSON.load(response_content)
541
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
542
+ end
543
+
544
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
545
+ # Deserialize Response
546
+ if status_code == 200
547
+ begin
548
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
549
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroup.mapper()
550
+ result.body = @client.deserialize(result_mapper, parsed_response)
551
+ rescue Exception => e
552
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
553
+ end
554
+ end
555
+
556
+ result
557
+ end
558
+
559
+ promise.execute
560
+ end
561
+
562
+ #
563
+ # Get a list of container groups in the specified subscription.
564
+ #
565
+ # Get a list of container groups in the specified subscription. This operation
566
+ # returns properties of each container group including containers, image
567
+ # registry credentials, restart policy, IP address type, OS type, state, and
568
+ # volumes.
569
+ #
570
+ # @param next_page_link [String] The NextLink from the previous successful call
571
+ # to List operation.
572
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
573
+ # will be added to the HTTP request.
574
+ #
575
+ # @return [ContainerGroupListResult] operation results.
576
+ #
577
+ def list_next(next_page_link, custom_headers:nil)
578
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
579
+ response.body unless response.nil?
580
+ end
581
+
582
+ #
583
+ # Get a list of container groups in the specified subscription.
584
+ #
585
+ # Get a list of container groups in the specified subscription. This operation
586
+ # returns properties of each container group including containers, image
587
+ # registry credentials, restart policy, IP address type, OS type, state, and
588
+ # volumes.
589
+ #
590
+ # @param next_page_link [String] The NextLink from the previous successful call
591
+ # to List operation.
592
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
593
+ # will be added to the HTTP request.
594
+ #
595
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
596
+ #
597
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
598
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
599
+ end
600
+
601
+ #
602
+ # Get a list of container groups in the specified subscription.
603
+ #
604
+ # Get a list of container groups in the specified subscription. This operation
605
+ # returns properties of each container group including containers, image
606
+ # registry credentials, restart policy, IP address type, OS type, state, and
607
+ # volumes.
608
+ #
609
+ # @param next_page_link [String] The NextLink from the previous successful call
610
+ # to List operation.
611
+ # @param [Hash{String => String}] A hash of custom headers that will be added
612
+ # to the HTTP request.
613
+ #
614
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
615
+ #
616
+ def list_next_async(next_page_link, custom_headers:nil)
617
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
618
+
619
+
620
+ request_headers = {}
621
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
622
+
623
+ # Set Headers
624
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
625
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
626
+ path_template = '{nextLink}'
627
+
628
+ request_url = @base_url || @client.base_url
629
+
630
+ options = {
631
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
632
+ skip_encoding_path_params: {'nextLink' => next_page_link},
633
+ headers: request_headers.merge(custom_headers || {}),
634
+ base_url: request_url
635
+ }
636
+ promise = @client.make_request_async(:get, path_template, options)
637
+
638
+ promise = promise.then do |result|
639
+ http_response = result.response
640
+ status_code = http_response.status
641
+ response_content = http_response.body
642
+ unless status_code == 200
643
+ error_model = JSON.load(response_content)
644
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
645
+ end
646
+
647
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
648
+ # Deserialize Response
649
+ if status_code == 200
650
+ begin
651
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
652
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroupListResult.mapper()
653
+ result.body = @client.deserialize(result_mapper, parsed_response)
654
+ rescue Exception => e
655
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
656
+ end
657
+ end
658
+
659
+ result
660
+ end
661
+
662
+ promise.execute
663
+ end
664
+
665
+ #
666
+ # Get a list of container groups in the specified subscription and resource
667
+ # group.
668
+ #
669
+ # Get a list of container groups in a specified subscription and resource
670
+ # group. This operation returns properties of each container group including
671
+ # containers, image registry credentials, restart policy, IP address type, OS
672
+ # type, state, and volumes.
673
+ #
674
+ # @param next_page_link [String] The NextLink from the previous successful call
675
+ # to List operation.
676
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
677
+ # will be added to the HTTP request.
678
+ #
679
+ # @return [ContainerGroupListResult] operation results.
680
+ #
681
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
682
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
683
+ response.body unless response.nil?
684
+ end
685
+
686
+ #
687
+ # Get a list of container groups in the specified subscription and resource
688
+ # group.
689
+ #
690
+ # Get a list of container groups in a specified subscription and resource
691
+ # group. This operation returns properties of each container group including
692
+ # containers, image registry credentials, restart policy, IP address type, OS
693
+ # type, state, and volumes.
694
+ #
695
+ # @param next_page_link [String] The NextLink from the previous successful call
696
+ # to List operation.
697
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
698
+ # will be added to the HTTP request.
699
+ #
700
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
701
+ #
702
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
703
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
704
+ end
705
+
706
+ #
707
+ # Get a list of container groups in the specified subscription and resource
708
+ # group.
709
+ #
710
+ # Get a list of container groups in a specified subscription and resource
711
+ # group. This operation returns properties of each container group including
712
+ # containers, image registry credentials, restart policy, IP address type, OS
713
+ # type, state, and volumes.
714
+ #
715
+ # @param next_page_link [String] The NextLink from the previous successful call
716
+ # to List operation.
717
+ # @param [Hash{String => String}] A hash of custom headers that will be added
718
+ # to the HTTP request.
719
+ #
720
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
721
+ #
722
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
723
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
724
+
725
+
726
+ request_headers = {}
727
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
728
+
729
+ # Set Headers
730
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
731
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
732
+ path_template = '{nextLink}'
733
+
734
+ request_url = @base_url || @client.base_url
735
+
736
+ options = {
737
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
738
+ skip_encoding_path_params: {'nextLink' => next_page_link},
739
+ headers: request_headers.merge(custom_headers || {}),
740
+ base_url: request_url
741
+ }
742
+ promise = @client.make_request_async(:get, path_template, options)
743
+
744
+ promise = promise.then do |result|
745
+ http_response = result.response
746
+ status_code = http_response.status
747
+ response_content = http_response.body
748
+ unless status_code == 200
749
+ error_model = JSON.load(response_content)
750
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
751
+ end
752
+
753
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
754
+ # Deserialize Response
755
+ if status_code == 200
756
+ begin
757
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
758
+ result_mapper = Azure::ContainerInstance::Mgmt::V2017_12_01_preview::Models::ContainerGroupListResult.mapper()
759
+ result.body = @client.deserialize(result_mapper, parsed_response)
760
+ rescue Exception => e
761
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
762
+ end
763
+ end
764
+
765
+ result
766
+ end
767
+
768
+ promise.execute
769
+ end
770
+
771
+ #
772
+ # Get a list of container groups in the specified subscription.
773
+ #
774
+ # Get a list of container groups in the specified subscription. This operation
775
+ # returns properties of each container group including containers, image
776
+ # registry credentials, restart policy, IP address type, OS type, state, and
777
+ # volumes.
778
+ #
779
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
780
+ # will be added to the HTTP request.
781
+ #
782
+ # @return [ContainerGroupListResult] which provide lazy access to pages of the
783
+ # response.
784
+ #
785
+ def list_as_lazy(custom_headers:nil)
786
+ response = list_async(custom_headers:custom_headers).value!
787
+ unless response.nil?
788
+ page = response.body
789
+ page.next_method = Proc.new do |next_page_link|
790
+ list_next_async(next_page_link, custom_headers:custom_headers)
791
+ end
792
+ page
793
+ end
794
+ end
795
+
796
+ #
797
+ # Get a list of container groups in the specified subscription and resource
798
+ # group.
799
+ #
800
+ # Get a list of container groups in a specified subscription and resource
801
+ # group. This operation returns properties of each container group including
802
+ # containers, image registry credentials, restart policy, IP address type, OS
803
+ # type, state, and volumes.
804
+ #
805
+ # @param resource_group_name [String] The name of the resource group.
806
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
807
+ # will be added to the HTTP request.
808
+ #
809
+ # @return [ContainerGroupListResult] which provide lazy access to pages of the
810
+ # response.
811
+ #
812
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
813
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
814
+ unless response.nil?
815
+ page = response.body
816
+ page.next_method = Proc.new do |next_page_link|
817
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
818
+ end
819
+ page
820
+ end
821
+ end
822
+
823
+ end
824
+ end