azure_mgmt_batch 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_batch.rb +8 -10
- data/lib/generated/azure_mgmt_batch/application_operations.rb +75 -507
- data/lib/generated/azure_mgmt_batch/application_package_operations.rb +428 -0
- data/lib/generated/azure_mgmt_batch/{account.rb → batch_account_operations.rb} +128 -161
- data/lib/generated/azure_mgmt_batch/batch_management_client.rb +64 -9
- data/lib/generated/azure_mgmt_batch/{subscription.rb → location.rb} +25 -25
- data/lib/generated/azure_mgmt_batch/models/application_package.rb +34 -2
- data/lib/generated/azure_mgmt_batch/models/{account_resource.rb → batch_account.rb} +8 -7
- data/lib/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +2 -2
- data/lib/generated/azure_mgmt_batch/models/{batch_account_list_key_result.rb → batch_account_keys.rb} +5 -5
- data/lib/generated/azure_mgmt_batch/models/batch_account_list_result.rb +5 -5
- data/lib/generated/azure_mgmt_batch/models/{subscription_quotas_get_result.rb → batch_location_quota.rb} +5 -5
- data/lib/generated/azure_mgmt_batch/models/{account_provisioning_state.rb → provisioning_state.rb} +2 -2
- data/lib/generated/azure_mgmt_batch/version.rb +1 -1
- metadata +12 -14
- data/lib/generated/azure_mgmt_batch/models/add_application_package_result.rb +0 -75
- data/lib/generated/azure_mgmt_batch/models/batch_account_regenerate_key_result.rb +0 -54
- data/lib/generated/azure_mgmt_batch/models/get_application_package_result.rb +0 -109
@@ -35,18 +35,17 @@ module Azure::ARM::Batch
|
|
35
35
|
# is generated and included in each request. Default is true.
|
36
36
|
attr_accessor :generate_client_request_id
|
37
37
|
|
38
|
-
# @return
|
39
|
-
|
40
|
-
attr_accessor :credentials
|
38
|
+
# @return [BatchAccountOperations] batch_account_operations
|
39
|
+
attr_reader :batch_account_operations
|
41
40
|
|
42
|
-
# @return [
|
43
|
-
attr_reader :
|
41
|
+
# @return [ApplicationPackageOperations] application_package_operations
|
42
|
+
attr_reader :application_package_operations
|
44
43
|
|
45
44
|
# @return [ApplicationOperations] application_operations
|
46
45
|
attr_reader :application_operations
|
47
46
|
|
48
|
-
# @return [
|
49
|
-
attr_reader :
|
47
|
+
# @return [Location] location
|
48
|
+
attr_reader :location
|
50
49
|
|
51
50
|
#
|
52
51
|
# Creates initializes a new instance of the BatchManagementClient class.
|
@@ -62,14 +61,70 @@ module Azure::ARM::Batch
|
|
62
61
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
|
63
62
|
@credentials = credentials
|
64
63
|
|
65
|
-
@
|
64
|
+
@batch_account_operations = BatchAccountOperations.new(self)
|
65
|
+
@application_package_operations = ApplicationPackageOperations.new(self)
|
66
66
|
@application_operations = ApplicationOperations.new(self)
|
67
|
-
@
|
67
|
+
@location = Location.new(self)
|
68
68
|
@api_version = '2015-12-01'
|
69
69
|
@accept_language = 'en-US'
|
70
70
|
@long_running_operation_retry_timeout = 30
|
71
71
|
@generate_client_request_id = true
|
72
72
|
end
|
73
73
|
|
74
|
+
#
|
75
|
+
# Makes a request and returns the body of the response.
|
76
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
77
|
+
# @param path [String] the path, relative to {base_url}.
|
78
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
79
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
80
|
+
# Example:
|
81
|
+
#
|
82
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
83
|
+
# path = "/path"
|
84
|
+
# options = {
|
85
|
+
# body: request_content,
|
86
|
+
# query_params: {'api-version' => '2016-02-01'}
|
87
|
+
# }
|
88
|
+
# result = @client.make_request(:put, path, options)
|
89
|
+
#
|
90
|
+
def make_request(method, path, options = {})
|
91
|
+
result = make_request_with_http_info(method, path, options)
|
92
|
+
result.body unless result.nil?
|
93
|
+
end
|
94
|
+
|
95
|
+
#
|
96
|
+
# Makes a request and returns the operation response.
|
97
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
98
|
+
# @param path [String] the path, relative to {base_url}.
|
99
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
100
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
101
|
+
#
|
102
|
+
def make_request_with_http_info(method, path, options = {})
|
103
|
+
result = make_request_async(method, path, options).value!
|
104
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
105
|
+
result
|
106
|
+
end
|
107
|
+
|
108
|
+
#
|
109
|
+
# Makes a request asynchronously.
|
110
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
111
|
+
# @param path [String] the path, relative to {base_url}.
|
112
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
113
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
114
|
+
#
|
115
|
+
def make_request_async(method, path, options = {})
|
116
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
117
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
118
|
+
|
119
|
+
request_url = options[:base_url] || @base_url
|
120
|
+
|
121
|
+
request_headers = @request_headers
|
122
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
123
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
124
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
125
|
+
|
126
|
+
super(request_url, method, path, options)
|
127
|
+
end
|
128
|
+
|
74
129
|
end
|
75
130
|
end
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
module Azure::ARM::Batch
|
7
7
|
#
|
8
|
-
#
|
8
|
+
# Location
|
9
9
|
#
|
10
|
-
class
|
10
|
+
class Location
|
11
11
|
include Azure::ARM::Batch::Models
|
12
12
|
include MsRestAzure
|
13
13
|
|
14
14
|
#
|
15
|
-
# Creates and initializes a new instance of the
|
15
|
+
# Creates and initializes a new instance of the Location class.
|
16
16
|
# @param client service class for accessing basic functionality.
|
17
17
|
#
|
18
18
|
def initialize(client)
|
@@ -23,21 +23,23 @@ module Azure::ARM::Batch
|
|
23
23
|
attr_reader :client
|
24
24
|
|
25
25
|
#
|
26
|
-
# Gets the Batch service quotas for the specified
|
26
|
+
# Gets the Batch service quotas for the specified subscription at the given
|
27
|
+
# location.
|
27
28
|
#
|
28
29
|
# @param location_name [String] The desired region for the quotas.
|
29
30
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
31
|
# will be added to the HTTP request.
|
31
32
|
#
|
32
|
-
# @return [
|
33
|
+
# @return [BatchLocationQuota] operation results.
|
33
34
|
#
|
34
|
-
def
|
35
|
-
response =
|
35
|
+
def get_quotas(location_name, custom_headers = nil)
|
36
|
+
response = get_quotas_async(location_name, custom_headers).value!
|
36
37
|
response.body unless response.nil?
|
37
38
|
end
|
38
39
|
|
39
40
|
#
|
40
|
-
# Gets the Batch service quotas for the specified
|
41
|
+
# Gets the Batch service quotas for the specified subscription at the given
|
42
|
+
# location.
|
41
43
|
#
|
42
44
|
# @param location_name [String] The desired region for the quotas.
|
43
45
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -45,12 +47,13 @@ module Azure::ARM::Batch
|
|
45
47
|
#
|
46
48
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
47
49
|
#
|
48
|
-
def
|
49
|
-
|
50
|
+
def get_quotas_with_http_info(location_name, custom_headers = nil)
|
51
|
+
get_quotas_async(location_name, custom_headers).value!
|
50
52
|
end
|
51
53
|
|
52
54
|
#
|
53
|
-
# Gets the Batch service quotas for the specified
|
55
|
+
# Gets the Batch service quotas for the specified subscription at the given
|
56
|
+
# location.
|
54
57
|
#
|
55
58
|
# @param location_name [String] The desired region for the quotas.
|
56
59
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -58,7 +61,7 @@ module Azure::ARM::Batch
|
|
58
61
|
#
|
59
62
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
60
63
|
#
|
61
|
-
def
|
64
|
+
def get_quotas_async(location_name, custom_headers = nil)
|
62
65
|
fail ArgumentError, 'location_name is nil' if location_name.nil?
|
63
66
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
64
67
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
@@ -70,36 +73,33 @@ module Azure::ARM::Batch
|
|
70
73
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
71
74
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
72
75
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas'
|
76
|
+
|
77
|
+
request_url = @base_url || @client.base_url
|
78
|
+
|
73
79
|
options = {
|
74
80
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
75
81
|
path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id},
|
76
82
|
query_params: {'api-version' => @client.api_version},
|
77
|
-
headers: request_headers.merge(custom_headers || {})
|
83
|
+
headers: request_headers.merge(custom_headers || {}),
|
84
|
+
base_url: request_url
|
78
85
|
}
|
86
|
+
promise = @client.make_request_async(:get, path_template, options)
|
79
87
|
|
80
|
-
|
81
|
-
|
82
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
83
|
-
promise = request.run_promise do |req|
|
84
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
85
|
-
end
|
86
|
-
|
87
|
-
promise = promise.then do |http_response|
|
88
|
+
promise = promise.then do |result|
|
89
|
+
http_response = result.response
|
88
90
|
status_code = http_response.status
|
89
91
|
response_content = http_response.body
|
90
92
|
unless status_code == 200
|
91
93
|
error_model = JSON.load(response_content)
|
92
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
94
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
93
95
|
end
|
94
96
|
|
95
|
-
# Create Result
|
96
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
97
97
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
98
98
|
# Deserialize Response
|
99
99
|
if status_code == 200
|
100
100
|
begin
|
101
101
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
102
|
-
result_mapper =
|
102
|
+
result_mapper = BatchLocationQuota.mapper()
|
103
103
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
104
104
|
rescue Exception => e
|
105
105
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -6,12 +6,16 @@
|
|
6
6
|
module Azure::ARM::Batch
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# An application package which represents a particular version of an
|
10
|
+
# application.
|
10
11
|
#
|
11
12
|
class ApplicationPackage
|
12
13
|
|
13
14
|
include MsRestAzure
|
14
15
|
|
16
|
+
# @return [String] The id of the application.
|
17
|
+
attr_accessor :id
|
18
|
+
|
15
19
|
# @return [String] The version of the application package.
|
16
20
|
attr_accessor :version
|
17
21
|
|
@@ -20,9 +24,16 @@ module Azure::ARM::Batch
|
|
20
24
|
attr_accessor :state
|
21
25
|
|
22
26
|
# @return [String] The format of the application package, if the package
|
23
|
-
#
|
27
|
+
# is active.
|
24
28
|
attr_accessor :format
|
25
29
|
|
30
|
+
# @return [String] The storage URL at which the application package is
|
31
|
+
# stored.
|
32
|
+
attr_accessor :storage_url
|
33
|
+
|
34
|
+
# @return [DateTime] The UTC time at which the storage URL will expire.
|
35
|
+
attr_accessor :storage_url_expiry
|
36
|
+
|
26
37
|
# @return [DateTime] The time at which the package was last activated,
|
27
38
|
# if the package is active.
|
28
39
|
attr_accessor :last_activation_time
|
@@ -40,6 +51,13 @@ module Azure::ARM::Batch
|
|
40
51
|
name: 'Composite',
|
41
52
|
class_name: 'ApplicationPackage',
|
42
53
|
model_properties: {
|
54
|
+
id: {
|
55
|
+
required: false,
|
56
|
+
serialized_name: 'id',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
},
|
43
61
|
version: {
|
44
62
|
required: false,
|
45
63
|
serialized_name: 'version',
|
@@ -62,6 +80,20 @@ module Azure::ARM::Batch
|
|
62
80
|
name: 'String'
|
63
81
|
}
|
64
82
|
},
|
83
|
+
storage_url: {
|
84
|
+
required: false,
|
85
|
+
serialized_name: 'storageUrl',
|
86
|
+
type: {
|
87
|
+
name: 'String'
|
88
|
+
}
|
89
|
+
},
|
90
|
+
storage_url_expiry: {
|
91
|
+
required: false,
|
92
|
+
serialized_name: 'storageUrlExpiry',
|
93
|
+
type: {
|
94
|
+
name: 'DateTime'
|
95
|
+
}
|
96
|
+
},
|
65
97
|
last_activation_time: {
|
66
98
|
required: false,
|
67
99
|
serialized_name: 'lastActivationTime',
|
@@ -8,7 +8,7 @@ module Azure::ARM::Batch
|
|
8
8
|
#
|
9
9
|
# Contains information about an Azure Batch account.
|
10
10
|
#
|
11
|
-
class
|
11
|
+
class BatchAccount < MsRestAzure::Resource
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
@@ -16,8 +16,8 @@ module Azure::ARM::Batch
|
|
16
16
|
# the Batch services.
|
17
17
|
attr_accessor :account_endpoint
|
18
18
|
|
19
|
-
# @return [
|
20
|
-
#
|
19
|
+
# @return [ProvisioningState] The provisioned state of the resource.
|
20
|
+
# Possible values include: 'Invalid', 'Creating', 'Deleting',
|
21
21
|
# 'Succeeded', 'Failed', 'Cancelled'
|
22
22
|
attr_accessor :provisioning_state
|
23
23
|
|
@@ -37,16 +37,16 @@ module Azure::ARM::Batch
|
|
37
37
|
|
38
38
|
|
39
39
|
#
|
40
|
-
# Mapper for
|
40
|
+
# Mapper for BatchAccount class as Ruby Hash.
|
41
41
|
# This will be used for serialization/deserialization.
|
42
42
|
#
|
43
43
|
def self.mapper()
|
44
44
|
{
|
45
45
|
required: false,
|
46
|
-
serialized_name: '
|
46
|
+
serialized_name: 'BatchAccount',
|
47
47
|
type: {
|
48
48
|
name: 'Composite',
|
49
|
-
class_name: '
|
49
|
+
class_name: 'BatchAccount',
|
50
50
|
model_properties: {
|
51
51
|
id: {
|
52
52
|
required: false,
|
@@ -95,6 +95,7 @@ module Azure::ARM::Batch
|
|
95
95
|
},
|
96
96
|
account_endpoint: {
|
97
97
|
required: false,
|
98
|
+
read_only: true,
|
98
99
|
serialized_name: 'properties.accountEndpoint',
|
99
100
|
type: {
|
100
101
|
name: 'String'
|
@@ -105,7 +106,7 @@ module Azure::ARM::Batch
|
|
105
106
|
serialized_name: 'properties.provisioningState',
|
106
107
|
type: {
|
107
108
|
name: 'Enum',
|
108
|
-
module: '
|
109
|
+
module: 'ProvisioningState'
|
109
110
|
}
|
110
111
|
},
|
111
112
|
auto_storage: {
|
@@ -12,7 +12,7 @@ module Azure::ARM::Batch
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [String] The region in which the account
|
15
|
+
# @return [String] The region in which to create the account.
|
16
16
|
attr_accessor :location
|
17
17
|
|
18
18
|
# @return [Hash{String => String}] The user specified tags associated
|
@@ -37,7 +37,7 @@ module Azure::ARM::Batch
|
|
37
37
|
class_name: 'BatchAccountCreateParameters',
|
38
38
|
model_properties: {
|
39
39
|
location: {
|
40
|
-
required:
|
40
|
+
required: true,
|
41
41
|
serialized_name: 'location',
|
42
42
|
type: {
|
43
43
|
name: 'String'
|
@@ -6,9 +6,9 @@
|
|
6
6
|
module Azure::ARM::Batch
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# A set of Azure Batch account keys.
|
10
10
|
#
|
11
|
-
class
|
11
|
+
class BatchAccountKeys
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
@@ -20,16 +20,16 @@ module Azure::ARM::Batch
|
|
20
20
|
|
21
21
|
|
22
22
|
#
|
23
|
-
# Mapper for
|
23
|
+
# Mapper for BatchAccountKeys class as Ruby Hash.
|
24
24
|
# This will be used for serialization/deserialization.
|
25
25
|
#
|
26
26
|
def self.mapper()
|
27
27
|
{
|
28
28
|
required: false,
|
29
|
-
serialized_name: '
|
29
|
+
serialized_name: 'BatchAccountKeys',
|
30
30
|
type: {
|
31
31
|
name: 'Composite',
|
32
|
-
class_name: '
|
32
|
+
class_name: 'BatchAccountKeys',
|
33
33
|
model_properties: {
|
34
34
|
primary: {
|
35
35
|
required: false,
|
@@ -12,8 +12,8 @@ module Azure::ARM::Batch
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [Array<
|
16
|
-
#
|
15
|
+
# @return [Array<BatchAccount>] The collection of returned Batch
|
16
|
+
# accounts.
|
17
17
|
attr_accessor :value
|
18
18
|
|
19
19
|
# @return [String] The continuation token.
|
@@ -25,7 +25,7 @@ module Azure::ARM::Batch
|
|
25
25
|
#
|
26
26
|
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
27
|
#
|
28
|
-
# @return [Array<
|
28
|
+
# @return [Array<BatchAccount>] operation results.
|
29
29
|
#
|
30
30
|
def get_all_items
|
31
31
|
items = @value
|
@@ -70,10 +70,10 @@ module Azure::ARM::Batch
|
|
70
70
|
name: 'Sequence',
|
71
71
|
element: {
|
72
72
|
required: false,
|
73
|
-
serialized_name: '
|
73
|
+
serialized_name: 'BatchAccountElementType',
|
74
74
|
type: {
|
75
75
|
name: 'Composite',
|
76
|
-
class_name: '
|
76
|
+
class_name: 'BatchAccount'
|
77
77
|
}
|
78
78
|
}
|
79
79
|
}
|
@@ -6,9 +6,9 @@
|
|
6
6
|
module Azure::ARM::Batch
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
#
|
9
|
+
# Quotas associated with a Batch region for a particular subscription.
|
10
10
|
#
|
11
|
-
class
|
11
|
+
class BatchLocationQuota
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
@@ -18,16 +18,16 @@ module Azure::ARM::Batch
|
|
18
18
|
|
19
19
|
|
20
20
|
#
|
21
|
-
# Mapper for
|
21
|
+
# Mapper for BatchLocationQuota class as Ruby Hash.
|
22
22
|
# This will be used for serialization/deserialization.
|
23
23
|
#
|
24
24
|
def self.mapper()
|
25
25
|
{
|
26
26
|
required: false,
|
27
|
-
serialized_name: '
|
27
|
+
serialized_name: 'BatchLocationQuota',
|
28
28
|
type: {
|
29
29
|
name: 'Composite',
|
30
|
-
class_name: '
|
30
|
+
class_name: 'BatchLocationQuota',
|
31
31
|
model_properties: {
|
32
32
|
account_quota: {
|
33
33
|
required: false,
|