azure_mgmt_container_instance 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +7 -6
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +7 -6
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +7 -6
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance.rb +18 -14
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_groups.rb +120 -71
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +11 -6
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/start_container.rb +144 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance.rb +67 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_group_usage.rb +113 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_groups.rb +984 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +149 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_logs.rb +139 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container.rb +168 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +59 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_group.rb +216 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/container_state.rb +99 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +57 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/event.rb +107 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/ip_address.rb +103 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/logs.rb +47 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/operation.rb +72 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/operation_display.rb +83 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/operations.rb +107 -0
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/start_container.rb +144 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance.rb +71 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_group_usage.rb +113 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_groups.rb +984 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +145 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_operations.rb +258 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group.rb +229 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +68 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/container_state.rb +94 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/event.rb +101 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/ip_address.rb +103 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +57 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/operation.rb +70 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +67 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/resource.rb +101 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +57 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +57 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/operations.rb +107 -0
- data/lib/azure_mgmt_container_instance.rb +3 -1
- data/lib/profiles/latest/modules/containerinstance_profile_module.rb +116 -84
- data/lib/version.rb +1 -1
- metadata +98 -4
data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb
ADDED
@@ -0,0 +1,149 @@
|
|
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_04_01
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class ContainerInstanceManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Subscription credentials which uniquely identify
|
21
|
+
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
|
+
# for every service call.
|
23
|
+
attr_accessor :subscription_id
|
24
|
+
|
25
|
+
# @return [String] Client API version
|
26
|
+
attr_reader :api_version
|
27
|
+
|
28
|
+
# @return [String] The preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
38
|
+
attr_accessor :generate_client_request_id
|
39
|
+
|
40
|
+
# @return [ContainerGroups] container_groups
|
41
|
+
attr_reader :container_groups
|
42
|
+
|
43
|
+
# @return [Operations] operations
|
44
|
+
attr_reader :operations
|
45
|
+
|
46
|
+
# @return [ContainerGroupUsage] container_group_usage
|
47
|
+
attr_reader :container_group_usage
|
48
|
+
|
49
|
+
# @return [ContainerLogs] container_logs
|
50
|
+
attr_reader :container_logs
|
51
|
+
|
52
|
+
# @return [StartContainer] start_container
|
53
|
+
attr_reader :start_container
|
54
|
+
|
55
|
+
#
|
56
|
+
# Creates initializes a new instance of the ContainerInstanceManagementClient class.
|
57
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
58
|
+
# @param base_url [String] the base URI of the service.
|
59
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
60
|
+
#
|
61
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
62
|
+
super(credentials, options)
|
63
|
+
@base_url = base_url || 'https://management.azure.com'
|
64
|
+
|
65
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
66
|
+
@credentials = credentials
|
67
|
+
|
68
|
+
@container_groups = ContainerGroups.new(self)
|
69
|
+
@operations = Operations.new(self)
|
70
|
+
@container_group_usage = ContainerGroupUsage.new(self)
|
71
|
+
@container_logs = ContainerLogs.new(self)
|
72
|
+
@start_container = StartContainer.new(self)
|
73
|
+
@api_version = '2018-04-01'
|
74
|
+
@accept_language = 'en-US'
|
75
|
+
@long_running_operation_retry_timeout = 30
|
76
|
+
@generate_client_request_id = true
|
77
|
+
add_telemetry
|
78
|
+
end
|
79
|
+
|
80
|
+
#
|
81
|
+
# Makes a request and returns the body of the response.
|
82
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
83
|
+
# @param path [String] the path, relative to {base_url}.
|
84
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
85
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
86
|
+
# Example:
|
87
|
+
#
|
88
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
89
|
+
# path = "/path"
|
90
|
+
# options = {
|
91
|
+
# body: request_content,
|
92
|
+
# query_params: {'api-version' => '2016-02-01'}
|
93
|
+
# }
|
94
|
+
# result = @client.make_request(:put, path, options)
|
95
|
+
#
|
96
|
+
def make_request(method, path, options = {})
|
97
|
+
result = make_request_with_http_info(method, path, options)
|
98
|
+
result.body unless result.nil?
|
99
|
+
end
|
100
|
+
|
101
|
+
#
|
102
|
+
# Makes a request and returns the operation response.
|
103
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
104
|
+
# @param path [String] the path, relative to {base_url}.
|
105
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
106
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
107
|
+
#
|
108
|
+
def make_request_with_http_info(method, path, options = {})
|
109
|
+
result = make_request_async(method, path, options).value!
|
110
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
111
|
+
result
|
112
|
+
end
|
113
|
+
|
114
|
+
#
|
115
|
+
# Makes a request asynchronously.
|
116
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
117
|
+
# @param path [String] the path, relative to {base_url}.
|
118
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
119
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
120
|
+
#
|
121
|
+
def make_request_async(method, path, options = {})
|
122
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
123
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
124
|
+
|
125
|
+
request_url = options[:base_url] || @base_url
|
126
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
127
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
128
|
+
end
|
129
|
+
|
130
|
+
request_headers = @request_headers
|
131
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
132
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
133
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
134
|
+
|
135
|
+
super(request_url, method, path, options)
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
private
|
140
|
+
#
|
141
|
+
# Adds telemetry information.
|
142
|
+
#
|
143
|
+
def add_telemetry
|
144
|
+
sdk_information = 'azure_mgmt_container_instance'
|
145
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
146
|
+
add_user_agent_information(sdk_information)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -0,0 +1,139 @@
|
|
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_04_01
|
7
|
+
#
|
8
|
+
# ContainerLogs
|
9
|
+
#
|
10
|
+
class ContainerLogs
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the ContainerLogs 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 logs for a specified container instance.
|
26
|
+
#
|
27
|
+
# Get the logs for a specified container instance in a specified resource group
|
28
|
+
# and container group.
|
29
|
+
#
|
30
|
+
# @param resource_group_name [String] The name of the resource group.
|
31
|
+
# @param container_group_name [String] The name of the container group.
|
32
|
+
# @param container_name [String] The name of the container instance.
|
33
|
+
# @param tail [Integer] The number of lines to show from the tail of the
|
34
|
+
# container instance log. If not provided, all available logs are shown up to
|
35
|
+
# 4mb.
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
|
+
# will be added to the HTTP request.
|
38
|
+
#
|
39
|
+
# @return [Logs] operation results.
|
40
|
+
#
|
41
|
+
def list(resource_group_name, container_group_name, container_name, tail:nil, custom_headers:nil)
|
42
|
+
response = list_async(resource_group_name, container_group_name, container_name, tail:tail, custom_headers:custom_headers).value!
|
43
|
+
response.body unless response.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# Get the logs for a specified container instance.
|
48
|
+
#
|
49
|
+
# Get the logs for a specified container instance in a specified resource group
|
50
|
+
# and container group.
|
51
|
+
#
|
52
|
+
# @param resource_group_name [String] The name of the resource group.
|
53
|
+
# @param container_group_name [String] The name of the container group.
|
54
|
+
# @param container_name [String] The name of the container instance.
|
55
|
+
# @param tail [Integer] The number of lines to show from the tail of the
|
56
|
+
# container instance log. If not provided, all available logs are shown up to
|
57
|
+
# 4mb.
|
58
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
59
|
+
# will be added to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
62
|
+
#
|
63
|
+
def list_with_http_info(resource_group_name, container_group_name, container_name, tail:nil, custom_headers:nil)
|
64
|
+
list_async(resource_group_name, container_group_name, container_name, tail:tail, custom_headers:custom_headers).value!
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# Get the logs for a specified container instance.
|
69
|
+
#
|
70
|
+
# Get the logs for a specified container instance in a specified resource group
|
71
|
+
# and container group.
|
72
|
+
#
|
73
|
+
# @param resource_group_name [String] The name of the resource group.
|
74
|
+
# @param container_group_name [String] The name of the container group.
|
75
|
+
# @param container_name [String] The name of the container instance.
|
76
|
+
# @param tail [Integer] The number of lines to show from the tail of the
|
77
|
+
# container instance log. If not provided, all available logs are shown up to
|
78
|
+
# 4mb.
|
79
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
80
|
+
# to the HTTP request.
|
81
|
+
#
|
82
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
83
|
+
#
|
84
|
+
def list_async(resource_group_name, container_group_name, container_name, tail:nil, custom_headers:nil)
|
85
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
86
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
87
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
88
|
+
fail ArgumentError, 'container_group_name is nil' if container_group_name.nil?
|
89
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
90
|
+
|
91
|
+
|
92
|
+
request_headers = {}
|
93
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
94
|
+
|
95
|
+
# Set Headers
|
96
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
97
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
98
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/logs'
|
99
|
+
|
100
|
+
request_url = @base_url || @client.base_url
|
101
|
+
|
102
|
+
options = {
|
103
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
104
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'containerGroupName' => container_group_name,'containerName' => container_name},
|
105
|
+
query_params: {'api-version' => @client.api_version,'tail' => tail},
|
106
|
+
headers: request_headers.merge(custom_headers || {}),
|
107
|
+
base_url: request_url
|
108
|
+
}
|
109
|
+
promise = @client.make_request_async(:get, path_template, options)
|
110
|
+
|
111
|
+
promise = promise.then do |result|
|
112
|
+
http_response = result.response
|
113
|
+
status_code = http_response.status
|
114
|
+
response_content = http_response.body
|
115
|
+
unless status_code == 200
|
116
|
+
error_model = JSON.load(response_content)
|
117
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
118
|
+
end
|
119
|
+
|
120
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
121
|
+
# Deserialize Response
|
122
|
+
if status_code == 200
|
123
|
+
begin
|
124
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
125
|
+
result_mapper = Azure::ContainerInstance::Mgmt::V2018_04_01::Models::Logs.mapper()
|
126
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
127
|
+
rescue Exception => e
|
128
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
result
|
133
|
+
end
|
134
|
+
|
135
|
+
promise.execute
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
@@ -0,0 +1,84 @@
|
|
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_04_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The properties of the Azure File volume. Azure File shares are mounted as
|
10
|
+
# volumes.
|
11
|
+
#
|
12
|
+
class AzureFileVolume
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] The name of the Azure File share to be mounted as a
|
17
|
+
# volume.
|
18
|
+
attr_accessor :share_name
|
19
|
+
|
20
|
+
# @return [Boolean] The flag indicating whether the Azure File shared
|
21
|
+
# mounted as a volume is read-only.
|
22
|
+
attr_accessor :read_only
|
23
|
+
|
24
|
+
# @return [String] The name of the storage account that contains the
|
25
|
+
# Azure File share.
|
26
|
+
attr_accessor :storage_account_name
|
27
|
+
|
28
|
+
# @return [String] The storage account access key used to access the
|
29
|
+
# Azure File share.
|
30
|
+
attr_accessor :storage_account_key
|
31
|
+
|
32
|
+
|
33
|
+
#
|
34
|
+
# Mapper for AzureFileVolume class as Ruby Hash.
|
35
|
+
# This will be used for serialization/deserialization.
|
36
|
+
#
|
37
|
+
def self.mapper()
|
38
|
+
{
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'AzureFileVolume',
|
42
|
+
type: {
|
43
|
+
name: 'Composite',
|
44
|
+
class_name: 'AzureFileVolume',
|
45
|
+
model_properties: {
|
46
|
+
share_name: {
|
47
|
+
client_side_validation: true,
|
48
|
+
required: true,
|
49
|
+
serialized_name: 'shareName',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
read_only: {
|
55
|
+
client_side_validation: true,
|
56
|
+
required: false,
|
57
|
+
serialized_name: 'readOnly',
|
58
|
+
type: {
|
59
|
+
name: 'Boolean'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
storage_account_name: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: true,
|
65
|
+
serialized_name: 'storageAccountName',
|
66
|
+
type: {
|
67
|
+
name: 'String'
|
68
|
+
}
|
69
|
+
},
|
70
|
+
storage_account_key: {
|
71
|
+
client_side_validation: true,
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'storageAccountKey',
|
74
|
+
type: {
|
75
|
+
name: 'String'
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,168 @@
|
|
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_04_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# A container instance.
|
10
|
+
#
|
11
|
+
class Container
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The user-provided name of the container instance.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [String] The name of the image used to create the container
|
19
|
+
# instance.
|
20
|
+
attr_accessor :image
|
21
|
+
|
22
|
+
# @return [Array<String>] The commands to execute within the container
|
23
|
+
# instance in exec form.
|
24
|
+
attr_accessor :command
|
25
|
+
|
26
|
+
# @return [Array<ContainerPort>] The exposed ports on the container
|
27
|
+
# instance.
|
28
|
+
attr_accessor :ports
|
29
|
+
|
30
|
+
# @return [Array<EnvironmentVariable>] The environment variables to set
|
31
|
+
# in the container instance.
|
32
|
+
attr_accessor :environment_variables
|
33
|
+
|
34
|
+
# @return [ContainerPropertiesInstanceView] The instance view of the
|
35
|
+
# container instance. Only valid in response.
|
36
|
+
attr_accessor :instance_view
|
37
|
+
|
38
|
+
# @return [ResourceRequirements] The resource requirements of the
|
39
|
+
# container instance.
|
40
|
+
attr_accessor :resources
|
41
|
+
|
42
|
+
# @return [Array<VolumeMount>] The volume mounts available to the
|
43
|
+
# container instance.
|
44
|
+
attr_accessor :volume_mounts
|
45
|
+
|
46
|
+
|
47
|
+
#
|
48
|
+
# Mapper for Container class as Ruby Hash.
|
49
|
+
# This will be used for serialization/deserialization.
|
50
|
+
#
|
51
|
+
def self.mapper()
|
52
|
+
{
|
53
|
+
client_side_validation: true,
|
54
|
+
required: false,
|
55
|
+
serialized_name: 'Container',
|
56
|
+
type: {
|
57
|
+
name: 'Composite',
|
58
|
+
class_name: 'Container',
|
59
|
+
model_properties: {
|
60
|
+
name: {
|
61
|
+
client_side_validation: true,
|
62
|
+
required: true,
|
63
|
+
serialized_name: 'name',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
image: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: true,
|
71
|
+
serialized_name: 'properties.image',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
},
|
76
|
+
command: {
|
77
|
+
client_side_validation: true,
|
78
|
+
required: false,
|
79
|
+
serialized_name: 'properties.command',
|
80
|
+
type: {
|
81
|
+
name: 'Sequence',
|
82
|
+
element: {
|
83
|
+
client_side_validation: true,
|
84
|
+
required: false,
|
85
|
+
serialized_name: 'StringElementType',
|
86
|
+
type: {
|
87
|
+
name: 'String'
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
},
|
92
|
+
ports: {
|
93
|
+
client_side_validation: true,
|
94
|
+
required: false,
|
95
|
+
serialized_name: 'properties.ports',
|
96
|
+
type: {
|
97
|
+
name: 'Sequence',
|
98
|
+
element: {
|
99
|
+
client_side_validation: true,
|
100
|
+
required: false,
|
101
|
+
serialized_name: 'ContainerPortElementType',
|
102
|
+
type: {
|
103
|
+
name: 'Composite',
|
104
|
+
class_name: 'ContainerPort'
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
},
|
109
|
+
environment_variables: {
|
110
|
+
client_side_validation: true,
|
111
|
+
required: false,
|
112
|
+
serialized_name: 'properties.environmentVariables',
|
113
|
+
type: {
|
114
|
+
name: 'Sequence',
|
115
|
+
element: {
|
116
|
+
client_side_validation: true,
|
117
|
+
required: false,
|
118
|
+
serialized_name: 'EnvironmentVariableElementType',
|
119
|
+
type: {
|
120
|
+
name: 'Composite',
|
121
|
+
class_name: 'EnvironmentVariable'
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
},
|
126
|
+
instance_view: {
|
127
|
+
client_side_validation: true,
|
128
|
+
required: false,
|
129
|
+
read_only: true,
|
130
|
+
serialized_name: 'properties.instanceView',
|
131
|
+
type: {
|
132
|
+
name: 'Composite',
|
133
|
+
class_name: 'ContainerPropertiesInstanceView'
|
134
|
+
}
|
135
|
+
},
|
136
|
+
resources: {
|
137
|
+
client_side_validation: true,
|
138
|
+
required: true,
|
139
|
+
serialized_name: 'properties.resources',
|
140
|
+
type: {
|
141
|
+
name: 'Composite',
|
142
|
+
class_name: 'ResourceRequirements'
|
143
|
+
}
|
144
|
+
},
|
145
|
+
volume_mounts: {
|
146
|
+
client_side_validation: true,
|
147
|
+
required: false,
|
148
|
+
serialized_name: 'properties.volumeMounts',
|
149
|
+
type: {
|
150
|
+
name: 'Sequence',
|
151
|
+
element: {
|
152
|
+
client_side_validation: true,
|
153
|
+
required: false,
|
154
|
+
serialized_name: 'VolumeMountElementType',
|
155
|
+
type: {
|
156
|
+
name: 'Composite',
|
157
|
+
class_name: 'VolumeMount'
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
164
|
+
}
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|