azure_mgmt_container_instance 0.17.1 → 0.17.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +14 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +16 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/operations.rb +2 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/start_container.rb +2 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_groups.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_logs.rb +2 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/start_container.rb +2 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_group_usage.rb +2 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb +241 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_operations.rb +4 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/operations.rb +2 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance.rb +74 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_group_usage.rb +115 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_groups.rb +1225 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +145 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_operations.rb +262 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group.rb +242 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/event.rb +101 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/ip_address.rb +101 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +88 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/operations.rb +109 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance.rb +86 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_group_usage.rb +115 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_groups.rb +1354 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +344 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_operations.rb +262 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/cached_images.rb +68 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb +66 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities.rb +108 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb +71 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb +66 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group.rb +268 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_identity.rb +102 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_identity_user_assigned_identities_value.rb +61 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/dns_configuration.rb +77 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/event.rb +101 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/gpu_resource.rb +58 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/gpu_sku.rb +17 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/ip_address.rb +102 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +88 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operation.rb +81 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_identity_type.rb +18 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +69 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +69 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/operations.rb +109 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/service_association_link.rb +121 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance.rb +90 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/container_groups.rb +1404 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +145 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/containers.rb +262 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/location.rb +552 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/cached_images.rb +57 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb +98 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities.rb +108 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb +71 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb +98 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group.rb +314 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity.rb +102 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity_user_assigned_identities_value.rb +61 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_group_sku.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/container_state.rb +99 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/dns_configuration.rb +77 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/encryption_properties.rb +68 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/event.rb +107 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/gpu_resource.rb +58 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/gpu_sku.rb +17 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/init_container_definition.rb +133 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/init_container_properties_definition_instance_view.rb +96 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/ip_address.rb +102 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +88 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation.rb +81 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +99 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_identity_type.rb +18 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +69 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +69 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/scheme.rb +16 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/operations.rb +219 -0
- data/lib/azure_mgmt_container_instance.rb +5 -2
- data/lib/profiles/latest/modules/containerinstance_profile_module.rb +183 -107
- data/lib/version.rb +1 -1
- metadata +183 -5
@@ -0,0 +1,90 @@
|
|
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 '2019-12-01/generated/azure_mgmt_container_instance/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ContainerInstance::Mgmt::V2019_12_01
|
23
|
+
autoload :ContainerGroups, '2019-12-01/generated/azure_mgmt_container_instance/container_groups.rb'
|
24
|
+
autoload :Operations, '2019-12-01/generated/azure_mgmt_container_instance/operations.rb'
|
25
|
+
autoload :Location, '2019-12-01/generated/azure_mgmt_container_instance/location.rb'
|
26
|
+
autoload :Containers, '2019-12-01/generated/azure_mgmt_container_instance/containers.rb'
|
27
|
+
autoload :ContainerInstanceManagementClient, '2019-12-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb'
|
28
|
+
|
29
|
+
module Models
|
30
|
+
autoload :ContainerGroupDiagnostics, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb'
|
31
|
+
autoload :ContainerGroupNetworkProfile, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb'
|
32
|
+
autoload :EnvironmentVariable, '2019-12-01/generated/azure_mgmt_container_instance/models/environment_variable.rb'
|
33
|
+
autoload :DnsConfiguration, '2019-12-01/generated/azure_mgmt_container_instance/models/dns_configuration.rb'
|
34
|
+
autoload :Event, '2019-12-01/generated/azure_mgmt_container_instance/models/event.rb'
|
35
|
+
autoload :EncryptionProperties, '2019-12-01/generated/azure_mgmt_container_instance/models/encryption_properties.rb'
|
36
|
+
autoload :GpuResource, '2019-12-01/generated/azure_mgmt_container_instance/models/gpu_resource.rb'
|
37
|
+
autoload :InitContainerPropertiesDefinitionInstanceView, '2019-12-01/generated/azure_mgmt_container_instance/models/init_container_properties_definition_instance_view.rb'
|
38
|
+
autoload :ResourceLimits, '2019-12-01/generated/azure_mgmt_container_instance/models/resource_limits.rb'
|
39
|
+
autoload :InitContainerDefinition, '2019-12-01/generated/azure_mgmt_container_instance/models/init_container_definition.rb'
|
40
|
+
autoload :VolumeMount, '2019-12-01/generated/azure_mgmt_container_instance/models/volume_mount.rb'
|
41
|
+
autoload :ContainerExec, '2019-12-01/generated/azure_mgmt_container_instance/models/container_exec.rb'
|
42
|
+
autoload :ContainerProbe, '2019-12-01/generated/azure_mgmt_container_instance/models/container_probe.rb'
|
43
|
+
autoload :OperationDisplay, '2019-12-01/generated/azure_mgmt_container_instance/models/operation_display.rb'
|
44
|
+
autoload :AzureFileVolume, '2019-12-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb'
|
45
|
+
autoload :Operation, '2019-12-01/generated/azure_mgmt_container_instance/models/operation.rb'
|
46
|
+
autoload :Volume, '2019-12-01/generated/azure_mgmt_container_instance/models/volume.rb'
|
47
|
+
autoload :OperationListResult, '2019-12-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb'
|
48
|
+
autoload :ContainerGroupIdentity, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity.rb'
|
49
|
+
autoload :UsageName, '2019-12-01/generated/azure_mgmt_container_instance/models/usage_name.rb'
|
50
|
+
autoload :Port, '2019-12-01/generated/azure_mgmt_container_instance/models/port.rb'
|
51
|
+
autoload :Usage, '2019-12-01/generated/azure_mgmt_container_instance/models/usage.rb'
|
52
|
+
autoload :ContainerGroupPropertiesInstanceView, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb'
|
53
|
+
autoload :UsageListResult, '2019-12-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb'
|
54
|
+
autoload :ContainerPort, '2019-12-01/generated/azure_mgmt_container_instance/models/container_port.rb'
|
55
|
+
autoload :ContainerGroupListResult, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb'
|
56
|
+
autoload :ContainerPropertiesInstanceView, '2019-12-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb'
|
57
|
+
autoload :Logs, '2019-12-01/generated/azure_mgmt_container_instance/models/logs.rb'
|
58
|
+
autoload :ResourceRequirements, '2019-12-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb'
|
59
|
+
autoload :ContainerExecRequestTerminalSize, '2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb'
|
60
|
+
autoload :Container, '2019-12-01/generated/azure_mgmt_container_instance/models/container.rb'
|
61
|
+
autoload :ContainerExecRequest, '2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb'
|
62
|
+
autoload :ContainerGroupIdentityUserAssignedIdentitiesValue, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_identity_user_assigned_identities_value.rb'
|
63
|
+
autoload :ContainerExecResponse, '2019-12-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb'
|
64
|
+
autoload :IpAddress, '2019-12-01/generated/azure_mgmt_container_instance/models/ip_address.rb'
|
65
|
+
autoload :Resource, '2019-12-01/generated/azure_mgmt_container_instance/models/resource.rb'
|
66
|
+
autoload :ContainerState, '2019-12-01/generated/azure_mgmt_container_instance/models/container_state.rb'
|
67
|
+
autoload :CachedImages, '2019-12-01/generated/azure_mgmt_container_instance/models/cached_images.rb'
|
68
|
+
autoload :ContainerHttpGet, '2019-12-01/generated/azure_mgmt_container_instance/models/container_http_get.rb'
|
69
|
+
autoload :CachedImagesListResult, '2019-12-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb'
|
70
|
+
autoload :ImageRegistryCredential, '2019-12-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb'
|
71
|
+
autoload :CapabilitiesCapabilities, '2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb'
|
72
|
+
autoload :ResourceRequests, '2019-12-01/generated/azure_mgmt_container_instance/models/resource_requests.rb'
|
73
|
+
autoload :Capabilities, '2019-12-01/generated/azure_mgmt_container_instance/models/capabilities.rb'
|
74
|
+
autoload :LogAnalytics, '2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics.rb'
|
75
|
+
autoload :CapabilitiesListResult, '2019-12-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb'
|
76
|
+
autoload :GitRepoVolume, '2019-12-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb'
|
77
|
+
autoload :ContainerGroup, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group.rb'
|
78
|
+
autoload :ContainerNetworkProtocol, '2019-12-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb'
|
79
|
+
autoload :GpuSku, '2019-12-01/generated/azure_mgmt_container_instance/models/gpu_sku.rb'
|
80
|
+
autoload :Scheme, '2019-12-01/generated/azure_mgmt_container_instance/models/scheme.rb'
|
81
|
+
autoload :ResourceIdentityType, '2019-12-01/generated/azure_mgmt_container_instance/models/resource_identity_type.rb'
|
82
|
+
autoload :ContainerGroupRestartPolicy, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb'
|
83
|
+
autoload :ContainerGroupNetworkProtocol, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb'
|
84
|
+
autoload :ContainerGroupIpAddressType, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb'
|
85
|
+
autoload :OperatingSystemTypes, '2019-12-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb'
|
86
|
+
autoload :LogAnalyticsLogType, '2019-12-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb'
|
87
|
+
autoload :ContainerGroupSku, '2019-12-01/generated/azure_mgmt_container_instance/models/container_group_sku.rb'
|
88
|
+
autoload :ContainerInstanceOperationsOrigin, '2019-12-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb'
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,1404 @@
|
|
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::V2019_12_01
|
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
|
+
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?
|
108
|
+
# Deserialize Response
|
109
|
+
if status_code == 200
|
110
|
+
begin
|
111
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
112
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroupListResult.mapper()
|
113
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
114
|
+
rescue Exception => e
|
115
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
result
|
120
|
+
end
|
121
|
+
|
122
|
+
promise.execute
|
123
|
+
end
|
124
|
+
|
125
|
+
#
|
126
|
+
# Get a list of container groups in the specified subscription and resource
|
127
|
+
# group.
|
128
|
+
#
|
129
|
+
# Get a list of container groups in a specified subscription and resource
|
130
|
+
# group. This operation returns properties of each container group including
|
131
|
+
# containers, image registry credentials, restart policy, IP address type, OS
|
132
|
+
# type, state, and volumes.
|
133
|
+
#
|
134
|
+
# @param resource_group_name [String] The name of the resource group.
|
135
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
136
|
+
# will be added to the HTTP request.
|
137
|
+
#
|
138
|
+
# @return [Array<ContainerGroup>] operation results.
|
139
|
+
#
|
140
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
141
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
|
142
|
+
first_page.get_all_items
|
143
|
+
end
|
144
|
+
|
145
|
+
#
|
146
|
+
# Get a list of container groups in the specified subscription and resource
|
147
|
+
# group.
|
148
|
+
#
|
149
|
+
# Get a list of container groups in a specified subscription and resource
|
150
|
+
# group. This operation returns properties of each container group including
|
151
|
+
# containers, image registry credentials, restart policy, IP address type, OS
|
152
|
+
# type, state, and volumes.
|
153
|
+
#
|
154
|
+
# @param resource_group_name [String] The name of the resource group.
|
155
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
156
|
+
# will be added to the HTTP request.
|
157
|
+
#
|
158
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
159
|
+
#
|
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!
|
162
|
+
end
|
163
|
+
|
164
|
+
#
|
165
|
+
# Get a list of container groups in the specified subscription and resource
|
166
|
+
# group.
|
167
|
+
#
|
168
|
+
# Get a list of container groups in a specified subscription and resource
|
169
|
+
# group. This operation returns properties of each container group including
|
170
|
+
# containers, image registry credentials, restart policy, IP address type, OS
|
171
|
+
# type, state, and volumes.
|
172
|
+
#
|
173
|
+
# @param resource_group_name [String] The name of the resource group.
|
174
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
175
|
+
# to the HTTP request.
|
176
|
+
#
|
177
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
178
|
+
#
|
179
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
180
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
181
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
182
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
183
|
+
|
184
|
+
|
185
|
+
request_headers = {}
|
186
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
187
|
+
|
188
|
+
# Set Headers
|
189
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
190
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
191
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups'
|
192
|
+
|
193
|
+
request_url = @base_url || @client.base_url
|
194
|
+
|
195
|
+
options = {
|
196
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
197
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
198
|
+
query_params: {'api-version' => @client.api_version},
|
199
|
+
headers: request_headers.merge(custom_headers || {}),
|
200
|
+
base_url: request_url
|
201
|
+
}
|
202
|
+
promise = @client.make_request_async(:get, path_template, options)
|
203
|
+
|
204
|
+
promise = promise.then do |result|
|
205
|
+
http_response = result.response
|
206
|
+
status_code = http_response.status
|
207
|
+
response_content = http_response.body
|
208
|
+
unless status_code == 200
|
209
|
+
error_model = JSON.load(response_content)
|
210
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
211
|
+
end
|
212
|
+
|
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?
|
216
|
+
# Deserialize Response
|
217
|
+
if status_code == 200
|
218
|
+
begin
|
219
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
220
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroupListResult.mapper()
|
221
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
222
|
+
rescue Exception => e
|
223
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
result
|
228
|
+
end
|
229
|
+
|
230
|
+
promise.execute
|
231
|
+
end
|
232
|
+
|
233
|
+
#
|
234
|
+
# Get the properties of the specified container group.
|
235
|
+
#
|
236
|
+
# Gets the properties of the specified container group in the specified
|
237
|
+
# subscription and resource group. The operation returns the properties of each
|
238
|
+
# container group including containers, image registry credentials, restart
|
239
|
+
# policy, IP address type, OS type, state, and volumes.
|
240
|
+
#
|
241
|
+
# @param resource_group_name [String] The name of the resource group.
|
242
|
+
# @param container_group_name [String] The name of the container group.
|
243
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
244
|
+
# will be added to the HTTP request.
|
245
|
+
#
|
246
|
+
# @return [ContainerGroup] operation results.
|
247
|
+
#
|
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!
|
250
|
+
response.body unless response.nil?
|
251
|
+
end
|
252
|
+
|
253
|
+
#
|
254
|
+
# Get the properties of the specified container group.
|
255
|
+
#
|
256
|
+
# Gets the properties of the specified container group in the specified
|
257
|
+
# subscription and resource group. The operation returns the properties of each
|
258
|
+
# container group including containers, image registry credentials, restart
|
259
|
+
# policy, IP address type, OS type, state, and volumes.
|
260
|
+
#
|
261
|
+
# @param resource_group_name [String] The name of the resource group.
|
262
|
+
# @param container_group_name [String] The name of the container group.
|
263
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
264
|
+
# will be added to the HTTP request.
|
265
|
+
#
|
266
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
267
|
+
#
|
268
|
+
def get_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
269
|
+
get_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
270
|
+
end
|
271
|
+
|
272
|
+
#
|
273
|
+
# Get the properties of the specified container group.
|
274
|
+
#
|
275
|
+
# Gets the properties of the specified container group in the specified
|
276
|
+
# subscription and resource group. The operation returns the properties of each
|
277
|
+
# container group including containers, image registry credentials, restart
|
278
|
+
# policy, IP address type, OS type, state, and volumes.
|
279
|
+
#
|
280
|
+
# @param resource_group_name [String] The name of the resource group.
|
281
|
+
# @param container_group_name [String] The name of the container group.
|
282
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
283
|
+
# to the HTTP request.
|
284
|
+
#
|
285
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
286
|
+
#
|
287
|
+
def get_async(resource_group_name, container_group_name, custom_headers:nil)
|
288
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
289
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
290
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
291
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
292
|
+
|
293
|
+
|
294
|
+
request_headers = {}
|
295
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
296
|
+
|
297
|
+
# Set Headers
|
298
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
299
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
300
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
|
301
|
+
|
302
|
+
request_url = @base_url || @client.base_url
|
303
|
+
|
304
|
+
options = {
|
305
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
306
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
307
|
+
query_params: {'api-version' => @client.api_version},
|
308
|
+
headers: request_headers.merge(custom_headers || {}),
|
309
|
+
base_url: request_url
|
310
|
+
}
|
311
|
+
promise = @client.make_request_async(:get, path_template, options)
|
312
|
+
|
313
|
+
promise = promise.then do |result|
|
314
|
+
http_response = result.response
|
315
|
+
status_code = http_response.status
|
316
|
+
response_content = http_response.body
|
317
|
+
unless status_code == 200
|
318
|
+
error_model = JSON.load(response_content)
|
319
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
320
|
+
end
|
321
|
+
|
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?
|
325
|
+
# Deserialize Response
|
326
|
+
if status_code == 200
|
327
|
+
begin
|
328
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
329
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
330
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
331
|
+
rescue Exception => e
|
332
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
result
|
337
|
+
end
|
338
|
+
|
339
|
+
promise.execute
|
340
|
+
end
|
341
|
+
|
342
|
+
#
|
343
|
+
# Create or update container groups.
|
344
|
+
#
|
345
|
+
# Create or update container groups with specified configurations.
|
346
|
+
#
|
347
|
+
# @param resource_group_name [String] The name of the resource group.
|
348
|
+
# @param container_group_name [String] The name of the container group.
|
349
|
+
# @param container_group [ContainerGroup] The properties of the container group
|
350
|
+
# to be created or updated.
|
351
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
352
|
+
# will be added to the HTTP request.
|
353
|
+
#
|
354
|
+
# @return [ContainerGroup] operation results.
|
355
|
+
#
|
356
|
+
def create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
357
|
+
response = create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
|
358
|
+
response.body unless response.nil?
|
359
|
+
end
|
360
|
+
|
361
|
+
#
|
362
|
+
# @param resource_group_name [String] The name of the resource group.
|
363
|
+
# @param container_group_name [String] The name of the container group.
|
364
|
+
# @param container_group [ContainerGroup] The properties of the container group
|
365
|
+
# to be created or updated.
|
366
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
367
|
+
# will be added to the HTTP request.
|
368
|
+
#
|
369
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
370
|
+
# response.
|
371
|
+
#
|
372
|
+
def create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
373
|
+
# Send request
|
374
|
+
promise = begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers)
|
375
|
+
|
376
|
+
promise = promise.then do |response|
|
377
|
+
# Defining deserialization method.
|
378
|
+
deserialize_method = lambda do |parsed_response|
|
379
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
380
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
381
|
+
end
|
382
|
+
|
383
|
+
# Waiting for response.
|
384
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
385
|
+
end
|
386
|
+
|
387
|
+
promise
|
388
|
+
end
|
389
|
+
|
390
|
+
#
|
391
|
+
# Update container groups.
|
392
|
+
#
|
393
|
+
# Updates container group tags with specified values.
|
394
|
+
#
|
395
|
+
# @param resource_group_name [String] The name of the resource group.
|
396
|
+
# @param container_group_name [String] The name of the container group.
|
397
|
+
# @param resource [Resource] The container group resource with just the tags to
|
398
|
+
# be updated.
|
399
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
400
|
+
# will be added to the HTTP request.
|
401
|
+
#
|
402
|
+
# @return [ContainerGroup] operation results.
|
403
|
+
#
|
404
|
+
def update(resource_group_name, container_group_name, resource, custom_headers:nil)
|
405
|
+
response = update_async(resource_group_name, container_group_name, resource, custom_headers:custom_headers).value!
|
406
|
+
response.body unless response.nil?
|
407
|
+
end
|
408
|
+
|
409
|
+
#
|
410
|
+
# Update container groups.
|
411
|
+
#
|
412
|
+
# Updates container group tags with specified values.
|
413
|
+
#
|
414
|
+
# @param resource_group_name [String] The name of the resource group.
|
415
|
+
# @param container_group_name [String] The name of the container group.
|
416
|
+
# @param resource [Resource] The container group resource with just the tags to
|
417
|
+
# be updated.
|
418
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
419
|
+
# will be added to the HTTP request.
|
420
|
+
#
|
421
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
422
|
+
#
|
423
|
+
def update_with_http_info(resource_group_name, container_group_name, resource, custom_headers:nil)
|
424
|
+
update_async(resource_group_name, container_group_name, resource, custom_headers:custom_headers).value!
|
425
|
+
end
|
426
|
+
|
427
|
+
#
|
428
|
+
# Update container groups.
|
429
|
+
#
|
430
|
+
# Updates container group tags with specified values.
|
431
|
+
#
|
432
|
+
# @param resource_group_name [String] The name of the resource group.
|
433
|
+
# @param container_group_name [String] The name of the container group.
|
434
|
+
# @param resource [Resource] The container group resource with just the tags to
|
435
|
+
# be updated.
|
436
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
437
|
+
# to the HTTP request.
|
438
|
+
#
|
439
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
440
|
+
#
|
441
|
+
def update_async(resource_group_name, container_group_name, resource, custom_headers:nil)
|
442
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
443
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
444
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
445
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
446
|
+
fail ArgumentError, 'resource is nil' if resource.nil?
|
447
|
+
|
448
|
+
|
449
|
+
request_headers = {}
|
450
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
451
|
+
|
452
|
+
# Set Headers
|
453
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
454
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
455
|
+
|
456
|
+
# Serialize Request
|
457
|
+
request_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::Resource.mapper()
|
458
|
+
request_content = @client.serialize(request_mapper, resource)
|
459
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
460
|
+
|
461
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
|
462
|
+
|
463
|
+
request_url = @base_url || @client.base_url
|
464
|
+
|
465
|
+
options = {
|
466
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
467
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
468
|
+
query_params: {'api-version' => @client.api_version},
|
469
|
+
body: request_content,
|
470
|
+
headers: request_headers.merge(custom_headers || {}),
|
471
|
+
base_url: request_url
|
472
|
+
}
|
473
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
474
|
+
|
475
|
+
promise = promise.then do |result|
|
476
|
+
http_response = result.response
|
477
|
+
status_code = http_response.status
|
478
|
+
response_content = http_response.body
|
479
|
+
unless status_code == 200
|
480
|
+
error_model = JSON.load(response_content)
|
481
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
482
|
+
end
|
483
|
+
|
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?
|
487
|
+
# Deserialize Response
|
488
|
+
if status_code == 200
|
489
|
+
begin
|
490
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
491
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
492
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
493
|
+
rescue Exception => e
|
494
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
495
|
+
end
|
496
|
+
end
|
497
|
+
|
498
|
+
result
|
499
|
+
end
|
500
|
+
|
501
|
+
promise.execute
|
502
|
+
end
|
503
|
+
|
504
|
+
#
|
505
|
+
# Delete the specified container group.
|
506
|
+
#
|
507
|
+
# Delete the specified container group in the specified subscription and
|
508
|
+
# resource group. The operation does not delete other resources provided by the
|
509
|
+
# user, such as volumes.
|
510
|
+
#
|
511
|
+
# @param resource_group_name [String] The name of the resource group.
|
512
|
+
# @param container_group_name [String] The name of the container group.
|
513
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
514
|
+
# will be added to the HTTP request.
|
515
|
+
#
|
516
|
+
# @return [ContainerGroup] operation results.
|
517
|
+
#
|
518
|
+
def delete(resource_group_name, container_group_name, custom_headers:nil)
|
519
|
+
response = delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
520
|
+
response.body unless response.nil?
|
521
|
+
end
|
522
|
+
|
523
|
+
#
|
524
|
+
# @param resource_group_name [String] The name of the resource group.
|
525
|
+
# @param container_group_name [String] The name of the container group.
|
526
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
527
|
+
# will be added to the HTTP request.
|
528
|
+
#
|
529
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
530
|
+
# response.
|
531
|
+
#
|
532
|
+
def delete_async(resource_group_name, container_group_name, custom_headers:nil)
|
533
|
+
# Send request
|
534
|
+
promise = begin_delete_async(resource_group_name, container_group_name, custom_headers:custom_headers)
|
535
|
+
|
536
|
+
promise = promise.then do |response|
|
537
|
+
# Defining deserialization method.
|
538
|
+
deserialize_method = lambda do |parsed_response|
|
539
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
540
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
541
|
+
end
|
542
|
+
|
543
|
+
# Waiting for response.
|
544
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
545
|
+
end
|
546
|
+
|
547
|
+
promise
|
548
|
+
end
|
549
|
+
|
550
|
+
#
|
551
|
+
# Restarts all containers in a container group.
|
552
|
+
#
|
553
|
+
# Restarts all containers in a container group in place. If container image has
|
554
|
+
# updates, new image will be downloaded.
|
555
|
+
#
|
556
|
+
# @param resource_group_name [String] The name of the resource group.
|
557
|
+
# @param container_group_name [String] The name of the container group.
|
558
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
559
|
+
# will be added to the HTTP request.
|
560
|
+
#
|
561
|
+
def restart(resource_group_name, container_group_name, custom_headers:nil)
|
562
|
+
response = restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
563
|
+
nil
|
564
|
+
end
|
565
|
+
|
566
|
+
#
|
567
|
+
# @param resource_group_name [String] The name of the resource group.
|
568
|
+
# @param container_group_name [String] The name of the container group.
|
569
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
570
|
+
# will be added to the HTTP request.
|
571
|
+
#
|
572
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
573
|
+
# response.
|
574
|
+
#
|
575
|
+
def restart_async(resource_group_name, container_group_name, custom_headers:nil)
|
576
|
+
# Send request
|
577
|
+
promise = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers)
|
578
|
+
|
579
|
+
promise = promise.then do |response|
|
580
|
+
# Defining deserialization method.
|
581
|
+
deserialize_method = lambda do |parsed_response|
|
582
|
+
end
|
583
|
+
|
584
|
+
# Waiting for response.
|
585
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
586
|
+
end
|
587
|
+
|
588
|
+
promise
|
589
|
+
end
|
590
|
+
|
591
|
+
#
|
592
|
+
# Stops all containers in a container group.
|
593
|
+
#
|
594
|
+
# Stops all containers in a container group. Compute resources will be
|
595
|
+
# deallocated and billing will stop.
|
596
|
+
#
|
597
|
+
# @param resource_group_name [String] The name of the resource group.
|
598
|
+
# @param container_group_name [String] The name of the container group.
|
599
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
600
|
+
# will be added to the HTTP request.
|
601
|
+
#
|
602
|
+
#
|
603
|
+
def stop(resource_group_name, container_group_name, custom_headers:nil)
|
604
|
+
response = stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
605
|
+
nil
|
606
|
+
end
|
607
|
+
|
608
|
+
#
|
609
|
+
# Stops all containers in a container group.
|
610
|
+
#
|
611
|
+
# Stops all containers in a container group. Compute resources will be
|
612
|
+
# deallocated and billing will stop.
|
613
|
+
#
|
614
|
+
# @param resource_group_name [String] The name of the resource group.
|
615
|
+
# @param container_group_name [String] The name of the container group.
|
616
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
617
|
+
# will be added to the HTTP request.
|
618
|
+
#
|
619
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
620
|
+
#
|
621
|
+
def stop_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
622
|
+
stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
623
|
+
end
|
624
|
+
|
625
|
+
#
|
626
|
+
# Stops all containers in a container group.
|
627
|
+
#
|
628
|
+
# Stops all containers in a container group. Compute resources will be
|
629
|
+
# deallocated and billing will stop.
|
630
|
+
#
|
631
|
+
# @param resource_group_name [String] The name of the resource group.
|
632
|
+
# @param container_group_name [String] The name of the container group.
|
633
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
634
|
+
# to the HTTP request.
|
635
|
+
#
|
636
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
637
|
+
#
|
638
|
+
def stop_async(resource_group_name, container_group_name, custom_headers:nil)
|
639
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
640
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
641
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
642
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
643
|
+
|
644
|
+
|
645
|
+
request_headers = {}
|
646
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
647
|
+
|
648
|
+
# Set Headers
|
649
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
650
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
651
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop'
|
652
|
+
|
653
|
+
request_url = @base_url || @client.base_url
|
654
|
+
|
655
|
+
options = {
|
656
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
657
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
658
|
+
query_params: {'api-version' => @client.api_version},
|
659
|
+
headers: request_headers.merge(custom_headers || {}),
|
660
|
+
base_url: request_url
|
661
|
+
}
|
662
|
+
promise = @client.make_request_async(:post, path_template, options)
|
663
|
+
|
664
|
+
promise = promise.then do |result|
|
665
|
+
http_response = result.response
|
666
|
+
status_code = http_response.status
|
667
|
+
response_content = http_response.body
|
668
|
+
unless status_code == 204
|
669
|
+
error_model = JSON.load(response_content)
|
670
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
671
|
+
end
|
672
|
+
|
673
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
674
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
675
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
676
|
+
|
677
|
+
result
|
678
|
+
end
|
679
|
+
|
680
|
+
promise.execute
|
681
|
+
end
|
682
|
+
|
683
|
+
#
|
684
|
+
# Starts all containers in a container group.
|
685
|
+
#
|
686
|
+
# Starts all containers in a container group. Compute resources will be
|
687
|
+
# allocated and billing will start.
|
688
|
+
#
|
689
|
+
# @param resource_group_name [String] The name of the resource group.
|
690
|
+
# @param container_group_name [String] The name of the container group.
|
691
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
692
|
+
# will be added to the HTTP request.
|
693
|
+
#
|
694
|
+
def start(resource_group_name, container_group_name, custom_headers:nil)
|
695
|
+
response = start_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
696
|
+
nil
|
697
|
+
end
|
698
|
+
|
699
|
+
#
|
700
|
+
# @param resource_group_name [String] The name of the resource group.
|
701
|
+
# @param container_group_name [String] The name of the container group.
|
702
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
703
|
+
# will be added to the HTTP request.
|
704
|
+
#
|
705
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
706
|
+
# response.
|
707
|
+
#
|
708
|
+
def start_async(resource_group_name, container_group_name, custom_headers:nil)
|
709
|
+
# Send request
|
710
|
+
promise = begin_start_async(resource_group_name, container_group_name, custom_headers:custom_headers)
|
711
|
+
|
712
|
+
promise = promise.then do |response|
|
713
|
+
# Defining deserialization method.
|
714
|
+
deserialize_method = lambda do |parsed_response|
|
715
|
+
end
|
716
|
+
|
717
|
+
# Waiting for response.
|
718
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
719
|
+
end
|
720
|
+
|
721
|
+
promise
|
722
|
+
end
|
723
|
+
|
724
|
+
#
|
725
|
+
# Create or update container groups.
|
726
|
+
#
|
727
|
+
# Create or update container groups with specified configurations.
|
728
|
+
#
|
729
|
+
# @param resource_group_name [String] The name of the resource group.
|
730
|
+
# @param container_group_name [String] The name of the container group.
|
731
|
+
# @param container_group [ContainerGroup] The properties of the container group
|
732
|
+
# to be created or updated.
|
733
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
734
|
+
# will be added to the HTTP request.
|
735
|
+
#
|
736
|
+
# @return [ContainerGroup] operation results.
|
737
|
+
#
|
738
|
+
def begin_create_or_update(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
739
|
+
response = begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
|
740
|
+
response.body unless response.nil?
|
741
|
+
end
|
742
|
+
|
743
|
+
#
|
744
|
+
# Create or update container groups.
|
745
|
+
#
|
746
|
+
# Create or update container groups with specified configurations.
|
747
|
+
#
|
748
|
+
# @param resource_group_name [String] The name of the resource group.
|
749
|
+
# @param container_group_name [String] The name of the container group.
|
750
|
+
# @param container_group [ContainerGroup] The properties of the container group
|
751
|
+
# to be created or updated.
|
752
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
753
|
+
# will be added to the HTTP request.
|
754
|
+
#
|
755
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
756
|
+
#
|
757
|
+
def begin_create_or_update_with_http_info(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
758
|
+
begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:custom_headers).value!
|
759
|
+
end
|
760
|
+
|
761
|
+
#
|
762
|
+
# Create or update container groups.
|
763
|
+
#
|
764
|
+
# Create or update container groups with specified configurations.
|
765
|
+
#
|
766
|
+
# @param resource_group_name [String] The name of the resource group.
|
767
|
+
# @param container_group_name [String] The name of the container group.
|
768
|
+
# @param container_group [ContainerGroup] The properties of the container group
|
769
|
+
# to be created or updated.
|
770
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
771
|
+
# to the HTTP request.
|
772
|
+
#
|
773
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
774
|
+
#
|
775
|
+
def begin_create_or_update_async(resource_group_name, container_group_name, container_group, custom_headers:nil)
|
776
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
777
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
778
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
779
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
780
|
+
fail ArgumentError, 'container_group is nil' if container_group.nil?
|
781
|
+
|
782
|
+
|
783
|
+
request_headers = {}
|
784
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
785
|
+
|
786
|
+
# Set Headers
|
787
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
788
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
789
|
+
|
790
|
+
# Serialize Request
|
791
|
+
request_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
792
|
+
request_content = @client.serialize(request_mapper, container_group)
|
793
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
794
|
+
|
795
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
|
796
|
+
|
797
|
+
request_url = @base_url || @client.base_url
|
798
|
+
|
799
|
+
options = {
|
800
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
801
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
802
|
+
query_params: {'api-version' => @client.api_version},
|
803
|
+
body: request_content,
|
804
|
+
headers: request_headers.merge(custom_headers || {}),
|
805
|
+
base_url: request_url
|
806
|
+
}
|
807
|
+
promise = @client.make_request_async(:put, path_template, options)
|
808
|
+
|
809
|
+
promise = promise.then do |result|
|
810
|
+
http_response = result.response
|
811
|
+
status_code = http_response.status
|
812
|
+
response_content = http_response.body
|
813
|
+
unless status_code == 200 || status_code == 201
|
814
|
+
error_model = JSON.load(response_content)
|
815
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
816
|
+
end
|
817
|
+
|
818
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
819
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
820
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
821
|
+
# Deserialize Response
|
822
|
+
if status_code == 200
|
823
|
+
begin
|
824
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
825
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
826
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
827
|
+
rescue Exception => e
|
828
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
829
|
+
end
|
830
|
+
end
|
831
|
+
# Deserialize Response
|
832
|
+
if status_code == 201
|
833
|
+
begin
|
834
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
835
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
836
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
837
|
+
rescue Exception => e
|
838
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
839
|
+
end
|
840
|
+
end
|
841
|
+
|
842
|
+
result
|
843
|
+
end
|
844
|
+
|
845
|
+
promise.execute
|
846
|
+
end
|
847
|
+
|
848
|
+
#
|
849
|
+
# Delete the specified container group.
|
850
|
+
#
|
851
|
+
# Delete the specified container group in the specified subscription and
|
852
|
+
# resource group. The operation does not delete other resources provided by the
|
853
|
+
# user, such as volumes.
|
854
|
+
#
|
855
|
+
# @param resource_group_name [String] The name of the resource group.
|
856
|
+
# @param container_group_name [String] The name of the container group.
|
857
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
858
|
+
# will be added to the HTTP request.
|
859
|
+
#
|
860
|
+
# @return [ContainerGroup] operation results.
|
861
|
+
#
|
862
|
+
def begin_delete(resource_group_name, container_group_name, custom_headers:nil)
|
863
|
+
response = begin_delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
864
|
+
response.body unless response.nil?
|
865
|
+
end
|
866
|
+
|
867
|
+
#
|
868
|
+
# Delete the specified container group.
|
869
|
+
#
|
870
|
+
# Delete the specified container group in the specified subscription and
|
871
|
+
# resource group. The operation does not delete other resources provided by the
|
872
|
+
# user, such as volumes.
|
873
|
+
#
|
874
|
+
# @param resource_group_name [String] The name of the resource group.
|
875
|
+
# @param container_group_name [String] The name of the container group.
|
876
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
877
|
+
# will be added to the HTTP request.
|
878
|
+
#
|
879
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
880
|
+
#
|
881
|
+
def begin_delete_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
882
|
+
begin_delete_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
883
|
+
end
|
884
|
+
|
885
|
+
#
|
886
|
+
# Delete the specified container group.
|
887
|
+
#
|
888
|
+
# Delete the specified container group in the specified subscription and
|
889
|
+
# resource group. The operation does not delete other resources provided by the
|
890
|
+
# user, such as volumes.
|
891
|
+
#
|
892
|
+
# @param resource_group_name [String] The name of the resource group.
|
893
|
+
# @param container_group_name [String] The name of the container group.
|
894
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
895
|
+
# to the HTTP request.
|
896
|
+
#
|
897
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
898
|
+
#
|
899
|
+
def begin_delete_async(resource_group_name, container_group_name, custom_headers:nil)
|
900
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
901
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
902
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
903
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
904
|
+
|
905
|
+
|
906
|
+
request_headers = {}
|
907
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
908
|
+
|
909
|
+
# Set Headers
|
910
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
911
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
912
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'
|
913
|
+
|
914
|
+
request_url = @base_url || @client.base_url
|
915
|
+
|
916
|
+
options = {
|
917
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
918
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
919
|
+
query_params: {'api-version' => @client.api_version},
|
920
|
+
headers: request_headers.merge(custom_headers || {}),
|
921
|
+
base_url: request_url
|
922
|
+
}
|
923
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
924
|
+
|
925
|
+
promise = promise.then do |result|
|
926
|
+
http_response = result.response
|
927
|
+
status_code = http_response.status
|
928
|
+
response_content = http_response.body
|
929
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
930
|
+
error_model = JSON.load(response_content)
|
931
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
932
|
+
end
|
933
|
+
|
934
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
935
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
936
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
937
|
+
# Deserialize Response
|
938
|
+
if status_code == 200
|
939
|
+
begin
|
940
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
941
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroup.mapper()
|
942
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
943
|
+
rescue Exception => e
|
944
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
945
|
+
end
|
946
|
+
end
|
947
|
+
|
948
|
+
result
|
949
|
+
end
|
950
|
+
|
951
|
+
promise.execute
|
952
|
+
end
|
953
|
+
|
954
|
+
#
|
955
|
+
# Restarts all containers in a container group.
|
956
|
+
#
|
957
|
+
# Restarts all containers in a container group in place. If container image has
|
958
|
+
# updates, new image will be downloaded.
|
959
|
+
#
|
960
|
+
# @param resource_group_name [String] The name of the resource group.
|
961
|
+
# @param container_group_name [String] The name of the container group.
|
962
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
963
|
+
# will be added to the HTTP request.
|
964
|
+
#
|
965
|
+
#
|
966
|
+
def begin_restart(resource_group_name, container_group_name, custom_headers:nil)
|
967
|
+
response = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
968
|
+
nil
|
969
|
+
end
|
970
|
+
|
971
|
+
#
|
972
|
+
# Restarts all containers in a container group.
|
973
|
+
#
|
974
|
+
# Restarts all containers in a container group in place. If container image has
|
975
|
+
# updates, new image will be downloaded.
|
976
|
+
#
|
977
|
+
# @param resource_group_name [String] The name of the resource group.
|
978
|
+
# @param container_group_name [String] The name of the container group.
|
979
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
980
|
+
# will be added to the HTTP request.
|
981
|
+
#
|
982
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
983
|
+
#
|
984
|
+
def begin_restart_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
985
|
+
begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
986
|
+
end
|
987
|
+
|
988
|
+
#
|
989
|
+
# Restarts all containers in a container group.
|
990
|
+
#
|
991
|
+
# Restarts all containers in a container group in place. If container image has
|
992
|
+
# updates, new image will be downloaded.
|
993
|
+
#
|
994
|
+
# @param resource_group_name [String] The name of the resource group.
|
995
|
+
# @param container_group_name [String] The name of the container group.
|
996
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
997
|
+
# to the HTTP request.
|
998
|
+
#
|
999
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1000
|
+
#
|
1001
|
+
def begin_restart_async(resource_group_name, container_group_name, custom_headers:nil)
|
1002
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1003
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1004
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1005
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
1006
|
+
|
1007
|
+
|
1008
|
+
request_headers = {}
|
1009
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1010
|
+
|
1011
|
+
# Set Headers
|
1012
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1013
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1014
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart'
|
1015
|
+
|
1016
|
+
request_url = @base_url || @client.base_url
|
1017
|
+
|
1018
|
+
options = {
|
1019
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1020
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
1021
|
+
query_params: {'api-version' => @client.api_version},
|
1022
|
+
headers: request_headers.merge(custom_headers || {}),
|
1023
|
+
base_url: request_url
|
1024
|
+
}
|
1025
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1026
|
+
|
1027
|
+
promise = promise.then do |result|
|
1028
|
+
http_response = result.response
|
1029
|
+
status_code = http_response.status
|
1030
|
+
response_content = http_response.body
|
1031
|
+
unless status_code == 204
|
1032
|
+
error_model = JSON.load(response_content)
|
1033
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1037
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1038
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1039
|
+
|
1040
|
+
result
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
promise.execute
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
#
|
1047
|
+
# Starts all containers in a container group.
|
1048
|
+
#
|
1049
|
+
# Starts all containers in a container group. Compute resources will be
|
1050
|
+
# allocated and billing will start.
|
1051
|
+
#
|
1052
|
+
# @param resource_group_name [String] The name of the resource group.
|
1053
|
+
# @param container_group_name [String] The name of the container group.
|
1054
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1055
|
+
# will be added to the HTTP request.
|
1056
|
+
#
|
1057
|
+
#
|
1058
|
+
def begin_start(resource_group_name, container_group_name, custom_headers:nil)
|
1059
|
+
response = begin_start_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
1060
|
+
nil
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
#
|
1064
|
+
# Starts all containers in a container group.
|
1065
|
+
#
|
1066
|
+
# Starts all containers in a container group. Compute resources will be
|
1067
|
+
# allocated and billing will start.
|
1068
|
+
#
|
1069
|
+
# @param resource_group_name [String] The name of the resource group.
|
1070
|
+
# @param container_group_name [String] The name of the container group.
|
1071
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1072
|
+
# will be added to the HTTP request.
|
1073
|
+
#
|
1074
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1075
|
+
#
|
1076
|
+
def begin_start_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
1077
|
+
begin_start_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
#
|
1081
|
+
# Starts all containers in a container group.
|
1082
|
+
#
|
1083
|
+
# Starts all containers in a container group. Compute resources will be
|
1084
|
+
# allocated and billing will start.
|
1085
|
+
#
|
1086
|
+
# @param resource_group_name [String] The name of the resource group.
|
1087
|
+
# @param container_group_name [String] The name of the container group.
|
1088
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1089
|
+
# to the HTTP request.
|
1090
|
+
#
|
1091
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1092
|
+
#
|
1093
|
+
def begin_start_async(resource_group_name, container_group_name, custom_headers:nil)
|
1094
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1095
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1096
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1097
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
1098
|
+
|
1099
|
+
|
1100
|
+
request_headers = {}
|
1101
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1102
|
+
|
1103
|
+
# Set Headers
|
1104
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1105
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1106
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/start'
|
1107
|
+
|
1108
|
+
request_url = @base_url || @client.base_url
|
1109
|
+
|
1110
|
+
options = {
|
1111
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1112
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
1113
|
+
query_params: {'api-version' => @client.api_version},
|
1114
|
+
headers: request_headers.merge(custom_headers || {}),
|
1115
|
+
base_url: request_url
|
1116
|
+
}
|
1117
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1118
|
+
|
1119
|
+
promise = promise.then do |result|
|
1120
|
+
http_response = result.response
|
1121
|
+
status_code = http_response.status
|
1122
|
+
response_content = http_response.body
|
1123
|
+
unless status_code == 204
|
1124
|
+
error_model = JSON.load(response_content)
|
1125
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1126
|
+
end
|
1127
|
+
|
1128
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1129
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1130
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1131
|
+
|
1132
|
+
result
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
promise.execute
|
1136
|
+
end
|
1137
|
+
|
1138
|
+
#
|
1139
|
+
# Get a list of container groups in the specified subscription.
|
1140
|
+
#
|
1141
|
+
# Get a list of container groups in the specified subscription. This operation
|
1142
|
+
# returns properties of each container group including containers, image
|
1143
|
+
# registry credentials, restart policy, IP address type, OS type, state, and
|
1144
|
+
# volumes.
|
1145
|
+
#
|
1146
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1147
|
+
# to List operation.
|
1148
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1149
|
+
# will be added to the HTTP request.
|
1150
|
+
#
|
1151
|
+
# @return [ContainerGroupListResult] operation results.
|
1152
|
+
#
|
1153
|
+
def list_next(next_page_link, custom_headers:nil)
|
1154
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
1155
|
+
response.body unless response.nil?
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
#
|
1159
|
+
# Get a list of container groups in the specified subscription.
|
1160
|
+
#
|
1161
|
+
# Get a list of container groups in the specified subscription. This operation
|
1162
|
+
# returns properties of each container group including containers, image
|
1163
|
+
# registry credentials, restart policy, IP address type, OS type, state, and
|
1164
|
+
# volumes.
|
1165
|
+
#
|
1166
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1167
|
+
# to List operation.
|
1168
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1169
|
+
# will be added to the HTTP request.
|
1170
|
+
#
|
1171
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1172
|
+
#
|
1173
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
1174
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
#
|
1178
|
+
# Get a list of container groups in the specified subscription.
|
1179
|
+
#
|
1180
|
+
# Get a list of container groups in the specified subscription. This operation
|
1181
|
+
# returns properties of each container group including containers, image
|
1182
|
+
# registry credentials, restart policy, IP address type, OS type, state, and
|
1183
|
+
# volumes.
|
1184
|
+
#
|
1185
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1186
|
+
# to List operation.
|
1187
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1188
|
+
# to the HTTP request.
|
1189
|
+
#
|
1190
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1191
|
+
#
|
1192
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
1193
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1194
|
+
|
1195
|
+
|
1196
|
+
request_headers = {}
|
1197
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1198
|
+
|
1199
|
+
# Set Headers
|
1200
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1201
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1202
|
+
path_template = '{nextLink}'
|
1203
|
+
|
1204
|
+
request_url = @base_url || @client.base_url
|
1205
|
+
|
1206
|
+
options = {
|
1207
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1208
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1209
|
+
headers: request_headers.merge(custom_headers || {}),
|
1210
|
+
base_url: request_url
|
1211
|
+
}
|
1212
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1213
|
+
|
1214
|
+
promise = promise.then do |result|
|
1215
|
+
http_response = result.response
|
1216
|
+
status_code = http_response.status
|
1217
|
+
response_content = http_response.body
|
1218
|
+
unless status_code == 200
|
1219
|
+
error_model = JSON.load(response_content)
|
1220
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1221
|
+
end
|
1222
|
+
|
1223
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1224
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1225
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1226
|
+
# Deserialize Response
|
1227
|
+
if status_code == 200
|
1228
|
+
begin
|
1229
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1230
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroupListResult.mapper()
|
1231
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1232
|
+
rescue Exception => e
|
1233
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1234
|
+
end
|
1235
|
+
end
|
1236
|
+
|
1237
|
+
result
|
1238
|
+
end
|
1239
|
+
|
1240
|
+
promise.execute
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
#
|
1244
|
+
# Get a list of container groups in the specified subscription and resource
|
1245
|
+
# group.
|
1246
|
+
#
|
1247
|
+
# Get a list of container groups in a specified subscription and resource
|
1248
|
+
# group. This operation returns properties of each container group including
|
1249
|
+
# containers, image registry credentials, restart policy, IP address type, OS
|
1250
|
+
# type, state, and volumes.
|
1251
|
+
#
|
1252
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1253
|
+
# to List operation.
|
1254
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1255
|
+
# will be added to the HTTP request.
|
1256
|
+
#
|
1257
|
+
# @return [ContainerGroupListResult] operation results.
|
1258
|
+
#
|
1259
|
+
def list_by_resource_group_next(next_page_link, custom_headers:nil)
|
1260
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
1261
|
+
response.body unless response.nil?
|
1262
|
+
end
|
1263
|
+
|
1264
|
+
#
|
1265
|
+
# Get a list of container groups in the specified subscription and resource
|
1266
|
+
# group.
|
1267
|
+
#
|
1268
|
+
# Get a list of container groups in a specified subscription and resource
|
1269
|
+
# group. This operation returns properties of each container group including
|
1270
|
+
# containers, image registry credentials, restart policy, IP address type, OS
|
1271
|
+
# type, state, and volumes.
|
1272
|
+
#
|
1273
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1274
|
+
# to List operation.
|
1275
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1276
|
+
# will be added to the HTTP request.
|
1277
|
+
#
|
1278
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1279
|
+
#
|
1280
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
|
1281
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
|
1282
|
+
end
|
1283
|
+
|
1284
|
+
#
|
1285
|
+
# Get a list of container groups in the specified subscription and resource
|
1286
|
+
# group.
|
1287
|
+
#
|
1288
|
+
# Get a list of container groups in a specified subscription and resource
|
1289
|
+
# group. This operation returns properties of each container group including
|
1290
|
+
# containers, image registry credentials, restart policy, IP address type, OS
|
1291
|
+
# type, state, and volumes.
|
1292
|
+
#
|
1293
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1294
|
+
# to List operation.
|
1295
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1296
|
+
# to the HTTP request.
|
1297
|
+
#
|
1298
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1299
|
+
#
|
1300
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
|
1301
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1302
|
+
|
1303
|
+
|
1304
|
+
request_headers = {}
|
1305
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1306
|
+
|
1307
|
+
# Set Headers
|
1308
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1309
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1310
|
+
path_template = '{nextLink}'
|
1311
|
+
|
1312
|
+
request_url = @base_url || @client.base_url
|
1313
|
+
|
1314
|
+
options = {
|
1315
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1316
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1317
|
+
headers: request_headers.merge(custom_headers || {}),
|
1318
|
+
base_url: request_url
|
1319
|
+
}
|
1320
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1321
|
+
|
1322
|
+
promise = promise.then do |result|
|
1323
|
+
http_response = result.response
|
1324
|
+
status_code = http_response.status
|
1325
|
+
response_content = http_response.body
|
1326
|
+
unless status_code == 200
|
1327
|
+
error_model = JSON.load(response_content)
|
1328
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1329
|
+
end
|
1330
|
+
|
1331
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1332
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1333
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1334
|
+
# Deserialize Response
|
1335
|
+
if status_code == 200
|
1336
|
+
begin
|
1337
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1338
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2019_12_01::Models::ContainerGroupListResult.mapper()
|
1339
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1340
|
+
rescue Exception => e
|
1341
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1342
|
+
end
|
1343
|
+
end
|
1344
|
+
|
1345
|
+
result
|
1346
|
+
end
|
1347
|
+
|
1348
|
+
promise.execute
|
1349
|
+
end
|
1350
|
+
|
1351
|
+
#
|
1352
|
+
# Get a list of container groups in the specified subscription.
|
1353
|
+
#
|
1354
|
+
# Get a list of container groups in the specified subscription. This operation
|
1355
|
+
# returns properties of each container group including containers, image
|
1356
|
+
# registry credentials, restart policy, IP address type, OS type, state, and
|
1357
|
+
# volumes.
|
1358
|
+
#
|
1359
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1360
|
+
# will be added to the HTTP request.
|
1361
|
+
#
|
1362
|
+
# @return [ContainerGroupListResult] which provide lazy access to pages of the
|
1363
|
+
# response.
|
1364
|
+
#
|
1365
|
+
def list_as_lazy(custom_headers:nil)
|
1366
|
+
response = list_async(custom_headers:custom_headers).value!
|
1367
|
+
unless response.nil?
|
1368
|
+
page = response.body
|
1369
|
+
page.next_method = Proc.new do |next_page_link|
|
1370
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
1371
|
+
end
|
1372
|
+
page
|
1373
|
+
end
|
1374
|
+
end
|
1375
|
+
|
1376
|
+
#
|
1377
|
+
# Get a list of container groups in the specified subscription and resource
|
1378
|
+
# group.
|
1379
|
+
#
|
1380
|
+
# Get a list of container groups in a specified subscription and resource
|
1381
|
+
# group. This operation returns properties of each container group including
|
1382
|
+
# containers, image registry credentials, restart policy, IP address type, OS
|
1383
|
+
# type, state, and volumes.
|
1384
|
+
#
|
1385
|
+
# @param resource_group_name [String] The name of the resource group.
|
1386
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1387
|
+
# will be added to the HTTP request.
|
1388
|
+
#
|
1389
|
+
# @return [ContainerGroupListResult] which provide lazy access to pages of the
|
1390
|
+
# response.
|
1391
|
+
#
|
1392
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
|
1393
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
1394
|
+
unless response.nil?
|
1395
|
+
page = response.body
|
1396
|
+
page.next_method = Proc.new do |next_page_link|
|
1397
|
+
list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
|
1398
|
+
end
|
1399
|
+
page
|
1400
|
+
end
|
1401
|
+
end
|
1402
|
+
|
1403
|
+
end
|
1404
|
+
end
|