azure_mgmt_container_instance 0.15.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +48 -43
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +4 -1
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +6 -5
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance.rb +58 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +824 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +140 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +139 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container.rb +168 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group.rb +216 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/environment_variable.rb +57 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/event.rb +101 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/ip_address.rb +80 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation_list_result.rb +56 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/volume.rb +69 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/operations.rb +107 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +113 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +824 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +144 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +139 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container.rb +168 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group.rb +216 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/environment_variable.rb +57 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/event.rb +101 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/ip_address.rb +80 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/operations.rb +107 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance.rb +63 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +113 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +935 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +144 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +139 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container.rb +168 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group.rb +216 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/environment_variable.rb +57 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/event.rb +101 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/ip_address.rb +103 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/operations.rb +107 -0
- data/lib/azure_mgmt_container_instance.rb +3 -0
- data/lib/profiles/latest/containerinstance_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/containerinstance_module_definition.rb +0 -1
- data/lib/profiles/latest/modules/containerinstance_profile_module.rb +164 -101
- data/lib/version.rb +1 -1
- metadata +114 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cba325d685f7781cf1b339f9736afb982ed53d8
|
4
|
+
data.tar.gz: fef5d615bb97c62836f445abc4375ff419bbe2df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a22a708221afb68ee3131d1fb841261ee2190172986dcb3f352984443ff32a7382fd1aa5c4874062b289e20cd8b049ee695b7efca0b41884f01b62432d8f91d
|
7
|
+
data.tar.gz: 472fb2adc50d1a5f0d676ed48cd94cd6114558601dbb93cbb3e3cfc4abe6e57ebc5e617a9f3ce06acfeec4a9fb0ea07162bd1dac2beebc5e853c932764900401
|
@@ -34,8 +34,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
34
34
|
#
|
35
35
|
# @return [Array<ContainerGroup>] operation results.
|
36
36
|
#
|
37
|
-
def list(custom_headers
|
38
|
-
first_page = list_as_lazy(custom_headers)
|
37
|
+
def list(custom_headers:nil)
|
38
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
39
39
|
first_page.get_all_items
|
40
40
|
end
|
41
41
|
|
@@ -52,8 +52,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
52
52
|
#
|
53
53
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
54
|
#
|
55
|
-
def list_with_http_info(custom_headers
|
56
|
-
list_async(custom_headers).value!
|
55
|
+
def list_with_http_info(custom_headers:nil)
|
56
|
+
list_async(custom_headers:custom_headers).value!
|
57
57
|
end
|
58
58
|
|
59
59
|
#
|
@@ -69,12 +69,13 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
69
69
|
#
|
70
70
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
71
|
#
|
72
|
-
def list_async(custom_headers
|
72
|
+
def list_async(custom_headers:nil)
|
73
73
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
74
74
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
75
75
|
|
76
76
|
|
77
77
|
request_headers = {}
|
78
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
78
79
|
|
79
80
|
# Set Headers
|
80
81
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -135,8 +136,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
135
136
|
#
|
136
137
|
# @return [Array<ContainerGroup>] operation results.
|
137
138
|
#
|
138
|
-
def list_by_resource_group(resource_group_name, custom_headers
|
139
|
-
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
|
139
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
140
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
|
140
141
|
first_page.get_all_items
|
141
142
|
end
|
142
143
|
|
@@ -156,8 +157,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
156
157
|
#
|
157
158
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
158
159
|
#
|
159
|
-
def list_by_resource_group_with_http_info(resource_group_name, custom_headers
|
160
|
-
list_by_resource_group_async(resource_group_name, custom_headers).value!
|
160
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
161
|
+
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
161
162
|
end
|
162
163
|
|
163
164
|
#
|
@@ -176,13 +177,14 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
176
177
|
#
|
177
178
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
178
179
|
#
|
179
|
-
def list_by_resource_group_async(resource_group_name, custom_headers
|
180
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
180
181
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
181
182
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
182
183
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
183
184
|
|
184
185
|
|
185
186
|
request_headers = {}
|
187
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
186
188
|
|
187
189
|
# Set Headers
|
188
190
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -243,8 +245,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
243
245
|
#
|
244
246
|
# @return [ContainerGroup] operation results.
|
245
247
|
#
|
246
|
-
def get(resource_group_name, container_group_name, custom_headers
|
247
|
-
response = get_async(resource_group_name, container_group_name, custom_headers).value!
|
248
|
+
def get(resource_group_name, container_group_name, custom_headers:nil)
|
249
|
+
response = get_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
248
250
|
response.body unless response.nil?
|
249
251
|
end
|
250
252
|
|
@@ -264,8 +266,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
264
266
|
#
|
265
267
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
266
268
|
#
|
267
|
-
def get_with_http_info(resource_group_name, container_group_name, custom_headers
|
268
|
-
get_async(resource_group_name, container_group_name, custom_headers).value!
|
269
|
+
def get_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
270
|
+
get_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
269
271
|
end
|
270
272
|
|
271
273
|
#
|
@@ -284,7 +286,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
284
286
|
#
|
285
287
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
286
288
|
#
|
287
|
-
def get_async(resource_group_name, container_group_name, custom_headers
|
289
|
+
def get_async(resource_group_name, container_group_name, custom_headers:nil)
|
288
290
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
289
291
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
290
292
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
@@ -292,6 +294,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
292
294
|
|
293
295
|
|
294
296
|
request_headers = {}
|
297
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
295
298
|
|
296
299
|
# Set Headers
|
297
300
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -352,8 +355,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
352
355
|
#
|
353
356
|
# @return [ContainerGroup] operation results.
|
354
357
|
#
|
355
|
-
def create_or_update(resource_group_name, container_group_name, container_group, custom_headers
|
356
|
-
response = create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers).value!
|
358
|
+
def create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
359
|
+
response = create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
|
357
360
|
response.body unless response.nil?
|
358
361
|
end
|
359
362
|
|
@@ -373,8 +376,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
373
376
|
#
|
374
377
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
375
378
|
#
|
376
|
-
def create_or_update_with_http_info(resource_group_name, container_group_name, container_group, custom_headers
|
377
|
-
create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers).value!
|
379
|
+
def create_or_update_with_http_info(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
380
|
+
create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
|
378
381
|
end
|
379
382
|
|
380
383
|
#
|
@@ -393,7 +396,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
393
396
|
#
|
394
397
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
395
398
|
#
|
396
|
-
def create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers
|
399
|
+
def create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
397
400
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
398
401
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
399
402
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
@@ -402,13 +405,12 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
402
405
|
|
403
406
|
|
404
407
|
request_headers = {}
|
408
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
405
409
|
|
406
410
|
# Set Headers
|
407
411
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
408
412
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
409
413
|
|
410
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
411
|
-
|
412
414
|
# Serialize Request
|
413
415
|
request_mapper = Azure::ContainerInstance::Mgmt::V2017_08_01_preview::Models::ContainerGroup.mapper()
|
414
416
|
request_content = @client.serialize(request_mapper, container_group)
|
@@ -481,8 +483,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
481
483
|
#
|
482
484
|
# @return [ContainerGroup] operation results.
|
483
485
|
#
|
484
|
-
def delete(resource_group_name, container_group_name, custom_headers
|
485
|
-
response = delete_async(resource_group_name, container_group_name, custom_headers).value!
|
486
|
+
def delete(resource_group_name, container_group_name, custom_headers:nil)
|
487
|
+
response = delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
486
488
|
response.body unless response.nil?
|
487
489
|
end
|
488
490
|
|
@@ -502,8 +504,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
502
504
|
#
|
503
505
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
504
506
|
#
|
505
|
-
def delete_with_http_info(resource_group_name, container_group_name, custom_headers
|
506
|
-
delete_async(resource_group_name, container_group_name, custom_headers).value!
|
507
|
+
def delete_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
508
|
+
delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
507
509
|
end
|
508
510
|
|
509
511
|
#
|
@@ -522,7 +524,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
522
524
|
#
|
523
525
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
524
526
|
#
|
525
|
-
def delete_async(resource_group_name, container_group_name, custom_headers
|
527
|
+
def delete_async(resource_group_name, container_group_name, custom_headers:nil)
|
526
528
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
527
529
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
528
530
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
@@ -530,6 +532,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
530
532
|
|
531
533
|
|
532
534
|
request_headers = {}
|
535
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
533
536
|
|
534
537
|
# Set Headers
|
535
538
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -589,8 +592,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
589
592
|
#
|
590
593
|
# @return [ContainerGroupListResult] operation results.
|
591
594
|
#
|
592
|
-
def list_next(next_page_link, custom_headers
|
593
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
595
|
+
def list_next(next_page_link, custom_headers:nil)
|
596
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
594
597
|
response.body unless response.nil?
|
595
598
|
end
|
596
599
|
|
@@ -609,8 +612,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
609
612
|
#
|
610
613
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
611
614
|
#
|
612
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
613
|
-
list_next_async(next_page_link, custom_headers).value!
|
615
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
616
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
614
617
|
end
|
615
618
|
|
616
619
|
#
|
@@ -628,11 +631,12 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
628
631
|
#
|
629
632
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
630
633
|
#
|
631
|
-
def list_next_async(next_page_link, custom_headers
|
634
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
632
635
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
633
636
|
|
634
637
|
|
635
638
|
request_headers = {}
|
639
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
636
640
|
|
637
641
|
# Set Headers
|
638
642
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -692,8 +696,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
692
696
|
#
|
693
697
|
# @return [ContainerGroupListResult] operation results.
|
694
698
|
#
|
695
|
-
def list_by_resource_group_next(next_page_link, custom_headers
|
696
|
-
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
699
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
700
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
697
701
|
response.body unless response.nil?
|
698
702
|
end
|
699
703
|
|
@@ -713,8 +717,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
713
717
|
#
|
714
718
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
715
719
|
#
|
716
|
-
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers
|
717
|
-
list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
720
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
721
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
718
722
|
end
|
719
723
|
|
720
724
|
#
|
@@ -733,11 +737,12 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
733
737
|
#
|
734
738
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
735
739
|
#
|
736
|
-
def list_by_resource_group_next_async(next_page_link, custom_headers
|
740
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
737
741
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
738
742
|
|
739
743
|
|
740
744
|
request_headers = {}
|
745
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
741
746
|
|
742
747
|
# Set Headers
|
743
748
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -795,12 +800,12 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
795
800
|
# @return [ContainerGroupListResult] which provide lazy access to pages of the
|
796
801
|
# response.
|
797
802
|
#
|
798
|
-
def list_as_lazy(custom_headers
|
799
|
-
response = list_async(custom_headers).value!
|
803
|
+
def list_as_lazy(custom_headers:nil)
|
804
|
+
response = list_async(custom_headers:custom_headers).value!
|
800
805
|
unless response.nil?
|
801
806
|
page = response.body
|
802
807
|
page.next_method = Proc.new do |next_page_link|
|
803
|
-
list_next_async(next_page_link, custom_headers)
|
808
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
804
809
|
end
|
805
810
|
page
|
806
811
|
end
|
@@ -823,12 +828,12 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
823
828
|
# @return [ContainerGroupListResult] which provide lazy access to pages of the
|
824
829
|
# response.
|
825
830
|
#
|
826
|
-
def list_by_resource_group_as_lazy(resource_group_name, custom_headers
|
827
|
-
response = list_by_resource_group_async(resource_group_name, custom_headers).value!
|
831
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
|
832
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
828
833
|
unless response.nil?
|
829
834
|
page = response.body
|
830
835
|
page.next_method = Proc.new do |next_page_link|
|
831
|
-
list_by_resource_group_next_async(next_page_link, custom_headers)
|
836
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
832
837
|
end
|
833
838
|
page
|
834
839
|
end
|
@@ -110,6 +110,9 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
110
110
|
fail ArgumentError, 'path is nil' if path.nil?
|
111
111
|
|
112
112
|
request_url = options[:base_url] || @base_url
|
113
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
114
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
115
|
+
end
|
113
116
|
|
114
117
|
request_headers = @request_headers
|
115
118
|
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
@@ -126,7 +129,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
126
129
|
#
|
127
130
|
def add_telemetry
|
128
131
|
sdk_information = 'azure_mgmt_container_instance'
|
129
|
-
sdk_information = "#{sdk_information}/0.
|
132
|
+
sdk_information = "#{sdk_information}/0.16.0"
|
130
133
|
add_user_agent_information(sdk_information)
|
131
134
|
end
|
132
135
|
end
|
@@ -40,8 +40,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
40
40
|
#
|
41
41
|
# @return [Logs] operation results.
|
42
42
|
#
|
43
|
-
def list(resource_group_name, container_name, container_group_name, tail
|
44
|
-
response = list_async(resource_group_name, container_name, container_group_name, tail, custom_headers).value!
|
43
|
+
def list(resource_group_name, container_name, container_group_name, tail:nil, custom_headers:nil)
|
44
|
+
response = list_async(resource_group_name, container_name, container_group_name, tail:tail, custom_headers:custom_headers).value!
|
45
45
|
response.body unless response.nil?
|
46
46
|
end
|
47
47
|
|
@@ -64,8 +64,8 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
64
64
|
#
|
65
65
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
66
66
|
#
|
67
|
-
def list_with_http_info(resource_group_name, container_name, container_group_name, tail
|
68
|
-
list_async(resource_group_name, container_name, container_group_name, tail, custom_headers).value!
|
67
|
+
def list_with_http_info(resource_group_name, container_name, container_group_name, tail:nil, custom_headers:nil)
|
68
|
+
list_async(resource_group_name, container_name, container_group_name, tail:tail, custom_headers:custom_headers).value!
|
69
69
|
end
|
70
70
|
|
71
71
|
#
|
@@ -87,7 +87,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
87
87
|
#
|
88
88
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
89
89
|
#
|
90
|
-
def list_async(resource_group_name, container_name, container_group_name, tail
|
90
|
+
def list_async(resource_group_name, container_name, container_group_name, tail:nil, custom_headers:nil)
|
91
91
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
92
92
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
93
93
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
@@ -96,6 +96,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
96
96
|
|
97
97
|
|
98
98
|
request_headers = {}
|
99
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
99
100
|
|
100
101
|
# Set Headers
|
101
102
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -0,0 +1,58 @@
|
|
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
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2017-10-01-preview/generated/azure_mgmt_container_instance/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ContainerInstance::Mgmt::V2017_10_01_preview
|
23
|
+
autoload :ContainerGroups, '2017-10-01-preview/generated/azure_mgmt_container_instance/container_groups.rb'
|
24
|
+
autoload :Operations, '2017-10-01-preview/generated/azure_mgmt_container_instance/operations.rb'
|
25
|
+
autoload :ContainerLogs, '2017-10-01-preview/generated/azure_mgmt_container_instance/container_logs.rb'
|
26
|
+
autoload :ContainerInstanceManagementClient, '2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :Volume, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/volume.rb'
|
30
|
+
autoload :ImageRegistryCredential, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/image_registry_credential.rb'
|
31
|
+
autoload :EnvironmentVariable, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/environment_variable.rb'
|
32
|
+
autoload :Port, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/port.rb'
|
33
|
+
autoload :Event, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/event.rb'
|
34
|
+
autoload :IpAddress, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/ip_address.rb'
|
35
|
+
autoload :ResourceRequests, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_requests.rb'
|
36
|
+
autoload :ContainerGroupPropertiesInstanceView, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb'
|
37
|
+
autoload :ResourceRequirements, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_requirements.rb'
|
38
|
+
autoload :VolumeMount, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/volume_mount.rb'
|
39
|
+
autoload :AzureFileVolume, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/azure_file_volume.rb'
|
40
|
+
autoload :OperationDisplay, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation_display.rb'
|
41
|
+
autoload :ContainerState, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_state.rb'
|
42
|
+
autoload :Operation, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation.rb'
|
43
|
+
autoload :ResourceLimits, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource_limits.rb'
|
44
|
+
autoload :OperationListResult, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/operation_list_result.rb'
|
45
|
+
autoload :ContainerPort, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_port.rb'
|
46
|
+
autoload :ContainerGroupListResult, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb'
|
47
|
+
autoload :Container, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container.rb'
|
48
|
+
autoload :Logs, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/logs.rb'
|
49
|
+
autoload :ContainerPropertiesInstanceView, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb'
|
50
|
+
autoload :Resource, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/resource.rb'
|
51
|
+
autoload :ContainerGroup, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group.rb'
|
52
|
+
autoload :ContainerNetworkProtocol, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_network_protocol.rb'
|
53
|
+
autoload :ContainerGroupRestartPolicy, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb'
|
54
|
+
autoload :ContainerGroupNetworkProtocol, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb'
|
55
|
+
autoload :OperatingSystemTypes, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/operating_system_types.rb'
|
56
|
+
autoload :ContainerInstanceOperationsOrigin, '2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb'
|
57
|
+
end
|
58
|
+
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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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_10_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
|