azure_mgmt_container_instance 0.17.5 → 0.17.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
  3. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  4. data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  5. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
  6. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  7. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  8. data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
  9. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  10. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
  11. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  12. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  13. data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
  14. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  15. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +16 -0
  16. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  17. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  18. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
  19. data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/start_container.rb +2 -0
  20. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  21. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_groups.rb +16 -0
  22. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  23. data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
  24. data/lib/2018-04-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
  25. data/lib/2018-04-01/generated/azure_mgmt_container_instance/start_container.rb +2 -0
  26. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  27. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb +27 -7
  28. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  29. data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_operations.rb +4 -0
  30. data/lib/2018-06-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
  31. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  32. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_groups.rb +20 -0
  33. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
  34. data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_operations.rb +4 -0
  35. data/lib/2018-09-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
  36. data/lib/2018-10-01/generated/azure_mgmt_container_instance.rb +26 -21
  37. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
  38. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_groups.rb +22 -0
  39. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +196 -1
  40. data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_operations.rb +4 -0
  41. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/cached_images.rb +68 -0
  42. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb +66 -0
  43. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities.rb +108 -0
  44. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb +71 -0
  45. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb +66 -0
  46. data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operation.rb +11 -0
  47. data/lib/2018-10-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
  48. data/lib/2018-10-01/generated/azure_mgmt_container_instance/service_association_link.rb +2 -0
  49. data/lib/2019-12-01/generated/azure_mgmt_container_instance.rb +90 -0
  50. data/lib/2019-12-01/generated/azure_mgmt_container_instance/container_groups.rb +1404 -0
  51. data/lib/2019-12-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +145 -0
  52. data/lib/2019-12-01/generated/azure_mgmt_container_instance/containers.rb +262 -0
  53. data/lib/2019-12-01/generated/azure_mgmt_container_instance/location.rb +552 -0
  54. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
  55. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/cached_images.rb +57 -0
  56. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb +98 -0
  57. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities.rb +108 -0
  58. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb +71 -0
  59. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb +98 -0
  60. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
  61. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
  62. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
  63. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
  64. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
  65. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group.rb +314 -0
  66. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
  67. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity.rb +102 -0
  68. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity_user_assigned_identities_value.rb +61 -0
  69. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
  70. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
  71. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
  72. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
  73. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
  74. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
  75. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_sku.rb +16 -0
  76. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
  77. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
  78. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
  79. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
  80. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
  81. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
  82. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_state.rb +99 -0
  83. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/dns_configuration.rb +77 -0
  84. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/encryption_properties.rb +68 -0
  85. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
  86. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/event.rb +107 -0
  87. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
  88. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/gpu_resource.rb +58 -0
  89. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/gpu_sku.rb +17 -0
  90. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
  91. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/init_container_definition.rb +133 -0
  92. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/init_container_properties_definition_instance_view.rb +96 -0
  93. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/ip_address.rb +102 -0
  94. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +88 -0
  95. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
  96. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
  97. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
  98. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation.rb +81 -0
  99. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
  100. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +99 -0
  101. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
  102. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
  103. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_identity_type.rb +18 -0
  104. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +69 -0
  105. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +69 -0
  106. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
  107. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/scheme.rb +16 -0
  108. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
  109. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
  110. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
  111. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
  112. data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
  113. data/lib/2019-12-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
  114. data/lib/2019-12-01/generated/azure_mgmt_container_instance/operations.rb +219 -0
  115. data/lib/azure_mgmt_container_instance.rb +4 -3
  116. data/lib/profiles/latest/modules/containerinstance_profile_module.rb +174 -136
  117. data/lib/version.rb +1 -1
  118. metadata +73 -2
@@ -103,6 +103,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
103
103
  end
104
104
 
105
105
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
106
108
  # Deserialize Response
107
109
  if status_code == 200
108
110
  begin
@@ -209,6 +211,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
209
211
  end
210
212
 
211
213
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
215
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
212
216
  # Deserialize Response
213
217
  if status_code == 200
214
218
  begin
@@ -316,6 +320,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
316
320
  end
317
321
 
318
322
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
323
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
324
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
319
325
  # Deserialize Response
320
326
  if status_code == 200
321
327
  begin
@@ -476,6 +482,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
476
482
  end
477
483
 
478
484
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
485
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
486
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
479
487
  # Deserialize Response
480
488
  if status_code == 200
481
489
  begin
@@ -580,6 +588,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
580
588
  end
581
589
 
582
590
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
591
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
592
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
583
593
  # Deserialize Response
584
594
  if status_code == 200
585
595
  begin
@@ -721,6 +731,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
721
731
  end
722
732
 
723
733
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
734
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
735
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
724
736
 
725
737
  result
726
738
  end
@@ -863,6 +875,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
863
875
  end
864
876
 
865
877
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
878
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
879
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
866
880
  # Deserialize Response
867
881
  if status_code == 200
868
882
  begin
@@ -973,6 +987,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
973
987
  end
974
988
 
975
989
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
990
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
991
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
976
992
 
977
993
  result
978
994
  end
@@ -1060,6 +1076,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
1060
1076
  end
1061
1077
 
1062
1078
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1079
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1080
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1063
1081
 
1064
1082
  result
1065
1083
  end
@@ -1153,6 +1171,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
1153
1171
  end
1154
1172
 
1155
1173
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1174
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1175
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1156
1176
  # Deserialize Response
1157
1177
  if status_code == 200
1158
1178
  begin
@@ -1259,6 +1279,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
1259
1279
  end
1260
1280
 
1261
1281
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1282
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1283
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1262
1284
  # Deserialize Response
1263
1285
  if status_code == 200
1264
1286
  begin
@@ -135,6 +135,201 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
135
135
  super(request_url, method, path, options)
136
136
  end
137
137
 
138
+ #
139
+ # Get the list of cached images.
140
+ #
141
+ # Get the list of cached images on specific OS type for a subscription in a
142
+ # region.
143
+ #
144
+ # @param location [String] The identifier for the physical azure location.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [CachedImagesListResult] operation results.
149
+ #
150
+ def list_cached_images(location, custom_headers:nil)
151
+ response = list_cached_images_async(location, custom_headers:custom_headers).value!
152
+ response.body unless response.nil?
153
+ end
154
+
155
+ #
156
+ # Get the list of cached images.
157
+ #
158
+ # Get the list of cached images on specific OS type for a subscription in a
159
+ # region.
160
+ #
161
+ # @param location [String] The identifier for the physical azure location.
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
166
+ #
167
+ def list_cached_images_with_http_info(location, custom_headers:nil)
168
+ list_cached_images_async(location, custom_headers:custom_headers).value!
169
+ end
170
+
171
+ #
172
+ # Get the list of cached images.
173
+ #
174
+ # Get the list of cached images on specific OS type for a subscription in a
175
+ # region.
176
+ #
177
+ # @param location [String] The identifier for the physical azure location.
178
+ # @param [Hash{String => String}] A hash of custom headers that will be added
179
+ # to the HTTP request.
180
+ #
181
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
182
+ #
183
+ def list_cached_images_async(location, custom_headers:nil)
184
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
185
+ fail ArgumentError, 'location is nil' if location.nil?
186
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
187
+
188
+
189
+ request_headers = {}
190
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
191
+
192
+ # Set Headers
193
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
194
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
195
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages'
196
+
197
+ request_url = @base_url || self.base_url
198
+
199
+ options = {
200
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
201
+ path_params: {'subscriptionId' => subscription_id,'location' => location},
202
+ query_params: {'api-version' => api_version},
203
+ headers: request_headers.merge(custom_headers || {}),
204
+ base_url: request_url
205
+ }
206
+ promise = self.make_request_async(:get, path_template, options)
207
+
208
+ promise = promise.then do |result|
209
+ http_response = result.response
210
+ status_code = http_response.status
211
+ response_content = http_response.body
212
+ unless status_code == 200
213
+ error_model = JSON.load(response_content)
214
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
215
+ end
216
+
217
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
218
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
219
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
220
+ # Deserialize Response
221
+ if status_code == 200
222
+ begin
223
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
224
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_10_01::Models::CachedImagesListResult.mapper()
225
+ result.body = self.deserialize(result_mapper, parsed_response)
226
+ rescue Exception => e
227
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
228
+ end
229
+ end
230
+
231
+ result
232
+ end
233
+
234
+ promise.execute
235
+ end
236
+
237
+ #
238
+ # Get the list of capabilities of the location.
239
+ #
240
+ # Get the list of CPU/memory/GPU capabilities of a region.
241
+ #
242
+ # @param location [String] The identifier for the physical azure location.
243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
244
+ # will be added to the HTTP request.
245
+ #
246
+ # @return [CapabilitiesListResult] operation results.
247
+ #
248
+ def list_capabilities(location, custom_headers:nil)
249
+ response = list_capabilities_async(location, custom_headers:custom_headers).value!
250
+ response.body unless response.nil?
251
+ end
252
+
253
+ #
254
+ # Get the list of capabilities of the location.
255
+ #
256
+ # Get the list of CPU/memory/GPU capabilities of a region.
257
+ #
258
+ # @param location [String] The identifier for the physical azure location.
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 list_capabilities_with_http_info(location, custom_headers:nil)
265
+ list_capabilities_async(location, custom_headers:custom_headers).value!
266
+ end
267
+
268
+ #
269
+ # Get the list of capabilities of the location.
270
+ #
271
+ # Get the list of CPU/memory/GPU capabilities of a region.
272
+ #
273
+ # @param location [String] The identifier for the physical azure location.
274
+ # @param [Hash{String => String}] A hash of custom headers that will be added
275
+ # to the HTTP request.
276
+ #
277
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
278
+ #
279
+ def list_capabilities_async(location, custom_headers:nil)
280
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
281
+ fail ArgumentError, 'location is nil' if location.nil?
282
+ fail ArgumentError, 'api_version is nil' if api_version.nil?
283
+
284
+
285
+ request_headers = {}
286
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
287
+
288
+ # Set Headers
289
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
290
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
291
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities'
292
+
293
+ request_url = @base_url || self.base_url
294
+
295
+ options = {
296
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
297
+ path_params: {'subscriptionId' => subscription_id,'location' => location},
298
+ query_params: {'api-version' => api_version},
299
+ headers: request_headers.merge(custom_headers || {}),
300
+ base_url: request_url
301
+ }
302
+ promise = self.make_request_async(:get, path_template, options)
303
+
304
+ promise = promise.then do |result|
305
+ http_response = result.response
306
+ status_code = http_response.status
307
+ response_content = http_response.body
308
+ unless status_code == 200
309
+ error_model = JSON.load(response_content)
310
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
311
+ end
312
+
313
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
314
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
315
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
316
+ # Deserialize Response
317
+ if status_code == 200
318
+ begin
319
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
320
+ result_mapper = Azure::ContainerInstance::Mgmt::V2018_10_01::Models::CapabilitiesListResult.mapper()
321
+ result.body = self.deserialize(result_mapper, parsed_response)
322
+ rescue Exception => e
323
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
324
+ end
325
+ end
326
+
327
+ result
328
+ end
329
+
330
+ promise.execute
331
+ end
332
+
138
333
 
139
334
  private
140
335
  #
@@ -142,7 +337,7 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
142
337
  #
143
338
  def add_telemetry
144
339
  sdk_information = 'azure_mgmt_container_instance'
145
- sdk_information = "#{sdk_information}/0.17.5"
340
+ sdk_information = "#{sdk_information}/0.17.6"
146
341
  add_user_agent_information(sdk_information)
147
342
  end
148
343
  end
@@ -118,6 +118,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
118
118
  end
119
119
 
120
120
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
121
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
122
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
121
123
  # Deserialize Response
122
124
  if status_code == 200
123
125
  begin
@@ -237,6 +239,8 @@ module Azure::ContainerInstance::Mgmt::V2018_10_01
237
239
  end
238
240
 
239
241
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
242
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
243
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
240
244
  # Deserialize Response
241
245
  if status_code == 200
242
246
  begin
@@ -0,0 +1,68 @@
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::V2018_10_01
7
+ module Models
8
+ #
9
+ # The cached image and OS type.
10
+ #
11
+ class CachedImages
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The resource Id of the cached image.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The OS type of the cached image.
19
+ attr_accessor :os_type
20
+
21
+ # @return [String] The cached image name.
22
+ attr_accessor :image
23
+
24
+
25
+ #
26
+ # Mapper for CachedImages class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'cachedImages',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'CachedImages',
37
+ model_properties: {
38
+ id: {
39
+ client_side_validation: true,
40
+ required: false,
41
+ serialized_name: 'id',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ os_type: {
47
+ client_side_validation: true,
48
+ required: true,
49
+ serialized_name: 'osType',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ image: {
55
+ client_side_validation: true,
56
+ required: true,
57
+ serialized_name: 'image',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,66 @@
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::V2018_10_01
7
+ module Models
8
+ #
9
+ # The response containing cached images.
10
+ #
11
+ class CachedImagesListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<CachedImages>] The list of cached images.
16
+ attr_accessor :value
17
+
18
+ # @return [String] The URI to fetch the next page of cached images.
19
+ attr_accessor :next_link
20
+
21
+
22
+ #
23
+ # Mapper for CachedImagesListResult class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'CachedImagesListResult',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'CachedImagesListResult',
34
+ model_properties: {
35
+ value: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'value',
39
+ type: {
40
+ name: 'Sequence',
41
+ element: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'CachedImagesElementType',
45
+ type: {
46
+ name: 'Composite',
47
+ class_name: 'CachedImages'
48
+ }
49
+ }
50
+ }
51
+ },
52
+ next_link: {
53
+ client_side_validation: true,
54
+ required: false,
55
+ serialized_name: 'nextLink',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ end
64
+ end
65
+ end
66
+ end