azure_mgmt_container_instance 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2017-10-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_instance_management_client.rb +1 -1
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb +221 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- 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 +113 -0
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_groups.rb +1205 -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 +258 -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 +107 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance.rb +81 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_group_usage.rb +113 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_groups.rb +1205 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +149 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_operations.rb +258 -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/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 +70 -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 +107 -0
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/service_association_link.rb +119 -0
- data/lib/azure_mgmt_container_instance.rb +2 -0
- data/lib/profiles/latest/modules/containerinstance_profile_module.rb +139 -101
- data/lib/version.rb +1 -1
- metadata +109 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd9f9904cfe678bd4beab309bb6f0c6e6707bc14
|
4
|
+
data.tar.gz: da7411a7e75f117096f3bd6654da79cee2c77782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b77de706009f1dbe54402037f684b0f993900d513d952407d8f2ec28123f07733ab019d54d921e95f7d4e6b96160c8828bd8af62371badac60454d9e0dd61b7
|
7
|
+
data.tar.gz: b26ec2ddfbef810078d0bbb7aba280c227e4d685091220b646a31cfc69d955d968314846d363e7031dc167c0581aeb0f5d58249fa8828afb2aece307ba2e2464
|
@@ -130,7 +130,7 @@ module Azure::ContainerInstance::Mgmt::V2017_08_01_preview
|
|
130
130
|
#
|
131
131
|
def add_telemetry
|
132
132
|
sdk_information = 'azure_mgmt_container_instance'
|
133
|
-
sdk_information = "#{sdk_information}/0.17.
|
133
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
134
134
|
add_user_agent_information(sdk_information)
|
135
135
|
end
|
136
136
|
end
|
@@ -134,7 +134,7 @@ module Azure::ContainerInstance::Mgmt::V2017_10_01_preview
|
|
134
134
|
#
|
135
135
|
def add_telemetry
|
136
136
|
sdk_information = 'azure_mgmt_container_instance'
|
137
|
-
sdk_information = "#{sdk_information}/0.17.
|
137
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
138
138
|
add_user_agent_information(sdk_information)
|
139
139
|
end
|
140
140
|
end
|
@@ -138,7 +138,7 @@ module Azure::ContainerInstance::Mgmt::V2017_12_01_preview
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_container_instance'
|
141
|
-
sdk_information = "#{sdk_information}/0.17.
|
141
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -142,7 +142,7 @@ module Azure::ContainerInstance::Mgmt::V2018_02_01_preview
|
|
142
142
|
#
|
143
143
|
def add_telemetry
|
144
144
|
sdk_information = 'azure_mgmt_container_instance'
|
145
|
-
sdk_information = "#{sdk_information}/0.17.
|
145
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
146
146
|
add_user_agent_information(sdk_information)
|
147
147
|
end
|
148
148
|
end
|
data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb
CHANGED
@@ -142,7 +142,7 @@ module Azure::ContainerInstance::Mgmt::V2018_04_01
|
|
142
142
|
#
|
143
143
|
def add_telemetry
|
144
144
|
sdk_information = 'azure_mgmt_container_instance'
|
145
|
-
sdk_information = "#{sdk_information}/0.17.
|
145
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
146
146
|
add_user_agent_information(sdk_information)
|
147
147
|
end
|
148
148
|
end
|
@@ -597,6 +597,137 @@ module Azure::ContainerInstance::Mgmt::V2018_06_01
|
|
597
597
|
promise.execute
|
598
598
|
end
|
599
599
|
|
600
|
+
#
|
601
|
+
# Restarts all containers in a container group.
|
602
|
+
#
|
603
|
+
# Restarts all containers in a contaienr group in place. If container image has
|
604
|
+
# updates, new image will be downloaded.
|
605
|
+
#
|
606
|
+
# @param resource_group_name [String] The name of the resource group.
|
607
|
+
# @param container_group_name [String] The name of the container group.
|
608
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
609
|
+
# will be added to the HTTP request.
|
610
|
+
#
|
611
|
+
def restart(resource_group_name, container_group_name, custom_headers:nil)
|
612
|
+
response = restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
613
|
+
nil
|
614
|
+
end
|
615
|
+
|
616
|
+
#
|
617
|
+
# @param resource_group_name [String] The name of the resource group.
|
618
|
+
# @param container_group_name [String] The name of the container group.
|
619
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
620
|
+
# will be added to the HTTP request.
|
621
|
+
#
|
622
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
623
|
+
# response.
|
624
|
+
#
|
625
|
+
def restart_async(resource_group_name, container_group_name, custom_headers:nil)
|
626
|
+
# Send request
|
627
|
+
promise = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers)
|
628
|
+
|
629
|
+
promise = promise.then do |response|
|
630
|
+
# Defining deserialization method.
|
631
|
+
deserialize_method = lambda do |parsed_response|
|
632
|
+
end
|
633
|
+
|
634
|
+
# Waiting for response.
|
635
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
636
|
+
end
|
637
|
+
|
638
|
+
promise
|
639
|
+
end
|
640
|
+
|
641
|
+
#
|
642
|
+
# Stops all containers in a container group.
|
643
|
+
#
|
644
|
+
# Stops all containers in a contaienr group. Compute resources will be
|
645
|
+
# deallocated and billing will stop.
|
646
|
+
#
|
647
|
+
# @param resource_group_name [String] The name of the resource group.
|
648
|
+
# @param container_group_name [String] The name of the container group.
|
649
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
650
|
+
# will be added to the HTTP request.
|
651
|
+
#
|
652
|
+
#
|
653
|
+
def stop(resource_group_name, container_group_name, custom_headers:nil)
|
654
|
+
response = stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
655
|
+
nil
|
656
|
+
end
|
657
|
+
|
658
|
+
#
|
659
|
+
# Stops all containers in a container group.
|
660
|
+
#
|
661
|
+
# Stops all containers in a contaienr group. Compute resources will be
|
662
|
+
# deallocated and billing will stop.
|
663
|
+
#
|
664
|
+
# @param resource_group_name [String] The name of the resource group.
|
665
|
+
# @param container_group_name [String] The name of the container group.
|
666
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
667
|
+
# will be added to the HTTP request.
|
668
|
+
#
|
669
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
670
|
+
#
|
671
|
+
def stop_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
672
|
+
stop_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
673
|
+
end
|
674
|
+
|
675
|
+
#
|
676
|
+
# Stops all containers in a container group.
|
677
|
+
#
|
678
|
+
# Stops all containers in a contaienr group. Compute resources will be
|
679
|
+
# deallocated and billing will stop.
|
680
|
+
#
|
681
|
+
# @param resource_group_name [String] The name of the resource group.
|
682
|
+
# @param container_group_name [String] The name of the container group.
|
683
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
684
|
+
# to the HTTP request.
|
685
|
+
#
|
686
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
687
|
+
#
|
688
|
+
def stop_async(resource_group_name, container_group_name, custom_headers:nil)
|
689
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
690
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
691
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
692
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
693
|
+
|
694
|
+
|
695
|
+
request_headers = {}
|
696
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
697
|
+
|
698
|
+
# Set Headers
|
699
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
700
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
701
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop'
|
702
|
+
|
703
|
+
request_url = @base_url || @client.base_url
|
704
|
+
|
705
|
+
options = {
|
706
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
707
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
708
|
+
query_params: {'api-version' => @client.api_version},
|
709
|
+
headers: request_headers.merge(custom_headers || {}),
|
710
|
+
base_url: request_url
|
711
|
+
}
|
712
|
+
promise = @client.make_request_async(:post, path_template, options)
|
713
|
+
|
714
|
+
promise = promise.then do |result|
|
715
|
+
http_response = result.response
|
716
|
+
status_code = http_response.status
|
717
|
+
response_content = http_response.body
|
718
|
+
unless status_code == 204
|
719
|
+
error_model = JSON.load(response_content)
|
720
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
721
|
+
end
|
722
|
+
|
723
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
724
|
+
|
725
|
+
result
|
726
|
+
end
|
727
|
+
|
728
|
+
promise.execute
|
729
|
+
end
|
730
|
+
|
600
731
|
#
|
601
732
|
# Create or update container groups.
|
602
733
|
#
|
@@ -719,6 +850,96 @@ module Azure::ContainerInstance::Mgmt::V2018_06_01
|
|
719
850
|
promise.execute
|
720
851
|
end
|
721
852
|
|
853
|
+
#
|
854
|
+
# Restarts all containers in a container group.
|
855
|
+
#
|
856
|
+
# Restarts all containers in a contaienr group in place. If container image has
|
857
|
+
# updates, new image will be downloaded.
|
858
|
+
#
|
859
|
+
# @param resource_group_name [String] The name of the resource group.
|
860
|
+
# @param container_group_name [String] The name of the container group.
|
861
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
862
|
+
# will be added to the HTTP request.
|
863
|
+
#
|
864
|
+
#
|
865
|
+
def begin_restart(resource_group_name, container_group_name, custom_headers:nil)
|
866
|
+
response = begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
867
|
+
nil
|
868
|
+
end
|
869
|
+
|
870
|
+
#
|
871
|
+
# Restarts all containers in a container group.
|
872
|
+
#
|
873
|
+
# Restarts all containers in a contaienr group in place. If container image has
|
874
|
+
# updates, new image will be downloaded.
|
875
|
+
#
|
876
|
+
# @param resource_group_name [String] The name of the resource group.
|
877
|
+
# @param container_group_name [String] The name of the container group.
|
878
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
879
|
+
# will be added to the HTTP request.
|
880
|
+
#
|
881
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
882
|
+
#
|
883
|
+
def begin_restart_with_http_info(resource_group_name, container_group_name, custom_headers:nil)
|
884
|
+
begin_restart_async(resource_group_name, container_group_name, custom_headers:custom_headers).value!
|
885
|
+
end
|
886
|
+
|
887
|
+
#
|
888
|
+
# Restarts all containers in a container group.
|
889
|
+
#
|
890
|
+
# Restarts all containers in a contaienr group in place. If container image has
|
891
|
+
# updates, new image will be downloaded.
|
892
|
+
#
|
893
|
+
# @param resource_group_name [String] The name of the resource group.
|
894
|
+
# @param container_group_name [String] The name of the container group.
|
895
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
896
|
+
# to the HTTP request.
|
897
|
+
#
|
898
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
899
|
+
#
|
900
|
+
def begin_restart_async(resource_group_name, container_group_name, custom_headers:nil)
|
901
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
902
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
903
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
904
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
905
|
+
|
906
|
+
|
907
|
+
request_headers = {}
|
908
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
909
|
+
|
910
|
+
# Set Headers
|
911
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
912
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
913
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart'
|
914
|
+
|
915
|
+
request_url = @base_url || @client.base_url
|
916
|
+
|
917
|
+
options = {
|
918
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
919
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name},
|
920
|
+
query_params: {'api-version' => @client.api_version},
|
921
|
+
headers: request_headers.merge(custom_headers || {}),
|
922
|
+
base_url: request_url
|
923
|
+
}
|
924
|
+
promise = @client.make_request_async(:post, path_template, options)
|
925
|
+
|
926
|
+
promise = promise.then do |result|
|
927
|
+
http_response = result.response
|
928
|
+
status_code = http_response.status
|
929
|
+
response_content = http_response.body
|
930
|
+
unless status_code == 204
|
931
|
+
error_model = JSON.load(response_content)
|
932
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
933
|
+
end
|
934
|
+
|
935
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
936
|
+
|
937
|
+
result
|
938
|
+
end
|
939
|
+
|
940
|
+
promise.execute
|
941
|
+
end
|
942
|
+
|
722
943
|
#
|
723
944
|
# Get a list of container groups in the specified subscription.
|
724
945
|
#
|
data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb
CHANGED
@@ -138,7 +138,7 @@ module Azure::ContainerInstance::Mgmt::V2018_06_01
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_container_instance'
|
141
|
-
sdk_information = "#{sdk_information}/0.17.
|
141
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -0,0 +1,74 @@
|
|
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 '2018-09-01/generated/azure_mgmt_container_instance/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ContainerInstance::Mgmt::V2018_09_01
|
23
|
+
autoload :ContainerGroups, '2018-09-01/generated/azure_mgmt_container_instance/container_groups.rb'
|
24
|
+
autoload :Operations, '2018-09-01/generated/azure_mgmt_container_instance/operations.rb'
|
25
|
+
autoload :ContainerGroupUsage, '2018-09-01/generated/azure_mgmt_container_instance/container_group_usage.rb'
|
26
|
+
autoload :ContainerOperations, '2018-09-01/generated/azure_mgmt_container_instance/container_operations.rb'
|
27
|
+
autoload :ContainerInstanceManagementClient, '2018-09-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb'
|
28
|
+
|
29
|
+
module Models
|
30
|
+
autoload :IpAddress, '2018-09-01/generated/azure_mgmt_container_instance/models/ip_address.rb'
|
31
|
+
autoload :ContainerPort, '2018-09-01/generated/azure_mgmt_container_instance/models/container_port.rb'
|
32
|
+
autoload :ContainerGroupPropertiesInstanceView, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb'
|
33
|
+
autoload :ContainerState, '2018-09-01/generated/azure_mgmt_container_instance/models/container_state.rb'
|
34
|
+
autoload :LogAnalytics, '2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics.rb'
|
35
|
+
autoload :ContainerPropertiesInstanceView, '2018-09-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb'
|
36
|
+
autoload :ContainerGroupDiagnostics, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb'
|
37
|
+
autoload :ResourceLimits, '2018-09-01/generated/azure_mgmt_container_instance/models/resource_limits.rb'
|
38
|
+
autoload :ContainerGroupNetworkProfile, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb'
|
39
|
+
autoload :VolumeMount, '2018-09-01/generated/azure_mgmt_container_instance/models/volume_mount.rb'
|
40
|
+
autoload :ContainerExec, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec.rb'
|
41
|
+
autoload :ContainerProbe, '2018-09-01/generated/azure_mgmt_container_instance/models/container_probe.rb'
|
42
|
+
autoload :OperationDisplay, '2018-09-01/generated/azure_mgmt_container_instance/models/operation_display.rb'
|
43
|
+
autoload :AzureFileVolume, '2018-09-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb'
|
44
|
+
autoload :Operation, '2018-09-01/generated/azure_mgmt_container_instance/models/operation.rb'
|
45
|
+
autoload :Volume, '2018-09-01/generated/azure_mgmt_container_instance/models/volume.rb'
|
46
|
+
autoload :OperationListResult, '2018-09-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb'
|
47
|
+
autoload :Port, '2018-09-01/generated/azure_mgmt_container_instance/models/port.rb'
|
48
|
+
autoload :UsageName, '2018-09-01/generated/azure_mgmt_container_instance/models/usage_name.rb'
|
49
|
+
autoload :Event, '2018-09-01/generated/azure_mgmt_container_instance/models/event.rb'
|
50
|
+
autoload :Usage, '2018-09-01/generated/azure_mgmt_container_instance/models/usage.rb'
|
51
|
+
autoload :ResourceRequirements, '2018-09-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb'
|
52
|
+
autoload :UsageListResult, '2018-09-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb'
|
53
|
+
autoload :Container, '2018-09-01/generated/azure_mgmt_container_instance/models/container.rb'
|
54
|
+
autoload :ContainerGroupListResult, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb'
|
55
|
+
autoload :ImageRegistryCredential, '2018-09-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb'
|
56
|
+
autoload :Logs, '2018-09-01/generated/azure_mgmt_container_instance/models/logs.rb'
|
57
|
+
autoload :ResourceRequests, '2018-09-01/generated/azure_mgmt_container_instance/models/resource_requests.rb'
|
58
|
+
autoload :ContainerExecRequestTerminalSize, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb'
|
59
|
+
autoload :GitRepoVolume, '2018-09-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb'
|
60
|
+
autoload :ContainerExecRequest, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb'
|
61
|
+
autoload :ContainerHttpGet, '2018-09-01/generated/azure_mgmt_container_instance/models/container_http_get.rb'
|
62
|
+
autoload :ContainerExecResponse, '2018-09-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb'
|
63
|
+
autoload :EnvironmentVariable, '2018-09-01/generated/azure_mgmt_container_instance/models/environment_variable.rb'
|
64
|
+
autoload :Resource, '2018-09-01/generated/azure_mgmt_container_instance/models/resource.rb'
|
65
|
+
autoload :ContainerGroup, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group.rb'
|
66
|
+
autoload :ContainerNetworkProtocol, '2018-09-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb'
|
67
|
+
autoload :ContainerGroupRestartPolicy, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb'
|
68
|
+
autoload :ContainerGroupNetworkProtocol, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb'
|
69
|
+
autoload :ContainerGroupIpAddressType, '2018-09-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb'
|
70
|
+
autoload :OperatingSystemTypes, '2018-09-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb'
|
71
|
+
autoload :LogAnalyticsLogType, '2018-09-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb'
|
72
|
+
autoload :ContainerInstanceOperationsOrigin, '2018-09-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb'
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ContainerInstance::Mgmt::V2018_09_01
|
7
|
+
#
|
8
|
+
# ContainerGroupUsage
|
9
|
+
#
|
10
|
+
class ContainerGroupUsage
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the ContainerGroupUsage class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [ContainerInstanceManagementClient] reference to the ContainerInstanceManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get the usage for a subscription
|
26
|
+
#
|
27
|
+
# @param location [String] The identifier for the physical azure location.
|
28
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
29
|
+
# will be added to the HTTP request.
|
30
|
+
#
|
31
|
+
# @return [UsageListResult] operation results.
|
32
|
+
#
|
33
|
+
def list(location, custom_headers:nil)
|
34
|
+
response = list_async(location, custom_headers:custom_headers).value!
|
35
|
+
response.body unless response.nil?
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Get the usage for a subscription
|
40
|
+
#
|
41
|
+
# @param location [String] The identifier for the physical azure location.
|
42
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
43
|
+
# will be added to the HTTP request.
|
44
|
+
#
|
45
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
46
|
+
#
|
47
|
+
def list_with_http_info(location, custom_headers:nil)
|
48
|
+
list_async(location, custom_headers:custom_headers).value!
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Get the usage for a subscription
|
53
|
+
#
|
54
|
+
# @param location [String] The identifier for the physical azure location.
|
55
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
56
|
+
# to the HTTP request.
|
57
|
+
#
|
58
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
59
|
+
#
|
60
|
+
def list_async(location, custom_headers:nil)
|
61
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
62
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
63
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
64
|
+
|
65
|
+
|
66
|
+
request_headers = {}
|
67
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
68
|
+
|
69
|
+
# Set Headers
|
70
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
71
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
72
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages'
|
73
|
+
|
74
|
+
request_url = @base_url || @client.base_url
|
75
|
+
|
76
|
+
options = {
|
77
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
78
|
+
path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
|
79
|
+
query_params: {'api-version' => @client.api_version},
|
80
|
+
headers: request_headers.merge(custom_headers || {}),
|
81
|
+
base_url: request_url
|
82
|
+
}
|
83
|
+
promise = @client.make_request_async(:get, path_template, options)
|
84
|
+
|
85
|
+
promise = promise.then do |result|
|
86
|
+
http_response = result.response
|
87
|
+
status_code = http_response.status
|
88
|
+
response_content = http_response.body
|
89
|
+
unless status_code == 200
|
90
|
+
error_model = JSON.load(response_content)
|
91
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
92
|
+
end
|
93
|
+
|
94
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
95
|
+
# Deserialize Response
|
96
|
+
if status_code == 200
|
97
|
+
begin
|
98
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
99
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2018_09_01::Models::UsageListResult.mapper()
|
100
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
101
|
+
rescue Exception => e
|
102
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
result
|
107
|
+
end
|
108
|
+
|
109
|
+
promise.execute
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
end
|