azure_mgmt_batch 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_batch.rb +12 -9
  3. data/lib/generated/azure_mgmt_batch/application_operations.rb +0 -0
  4. data/lib/generated/azure_mgmt_batch/application_package_operations.rb +0 -0
  5. data/lib/generated/azure_mgmt_batch/batch_account_operations.rb +0 -0
  6. data/lib/generated/azure_mgmt_batch/batch_management_client.rb +0 -0
  7. data/lib/generated/azure_mgmt_batch/location.rb +103 -0
  8. data/lib/generated/azure_mgmt_batch/models/account_key_type.rb +0 -0
  9. data/lib/generated/azure_mgmt_batch/models/activate_application_package_parameters.rb +0 -0
  10. data/lib/generated/azure_mgmt_batch/models/application.rb +0 -0
  11. data/lib/generated/azure_mgmt_batch/models/application_package.rb +0 -0
  12. data/lib/generated/azure_mgmt_batch/models/auto_storage_base_properties.rb +0 -0
  13. data/lib/generated/azure_mgmt_batch/models/auto_storage_properties.rb +0 -0
  14. data/lib/generated/azure_mgmt_batch/models/batch_account.rb +0 -0
  15. data/lib/generated/azure_mgmt_batch/models/batch_account_create_parameters.rb +0 -0
  16. data/lib/generated/azure_mgmt_batch/models/batch_account_keys.rb +0 -0
  17. data/lib/generated/azure_mgmt_batch/models/batch_account_list_result.rb +0 -0
  18. data/lib/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb +0 -0
  19. data/lib/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb +0 -0
  20. data/lib/generated/azure_mgmt_batch/models/batch_location_quota.rb +0 -0
  21. data/lib/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb +59 -0
  22. data/lib/generated/azure_mgmt_batch/models/check_name_availability_result.rb +75 -0
  23. data/lib/generated/azure_mgmt_batch/models/key_vault_reference.rb +0 -0
  24. data/lib/generated/azure_mgmt_batch/models/list_applications_result.rb +0 -0
  25. data/lib/generated/azure_mgmt_batch/models/name_availability_reason.rb +16 -0
  26. data/lib/generated/azure_mgmt_batch/models/package_state.rb +0 -0
  27. data/lib/generated/azure_mgmt_batch/models/pool_allocation_mode.rb +0 -0
  28. data/lib/generated/azure_mgmt_batch/models/provisioning_state.rb +0 -0
  29. data/lib/generated/azure_mgmt_batch/module_definition.rb +0 -0
  30. data/lib/generated/azure_mgmt_batch/version.rb +1 -1
  31. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63feeef35bc8a241871399feff9b9df64a31a2be
4
- data.tar.gz: ab40e89e4c93ba44494074f27af7f7999291d29b
3
+ metadata.gz: 382dd32e17fbcf87227bfba1b3806300cba1c089
4
+ data.tar.gz: 0b04e2936567e060227a76caade019dc6621290c
5
5
  SHA512:
6
- metadata.gz: 3940fec35430a94abde6a4941602d2b502695d4707144d6d48ea0c219da5e0e75e2f81b10044b6915e6fd826395aba0cda2bbffa23040001e90d22e866ab44f3
7
- data.tar.gz: eab21386ccc1b2f6edc7332e7430bee6391516764591627c4d1eca50de45246f943d49016aa47b97c05eb439a6be8021b58f49adf152fa1d21d7f5757112f843
6
+ metadata.gz: db4478cd2832a9acd9364a9292543f24a0f761eb18bbdba554274dfff0907a27d6e5cb270f17d8b747a02eb11543926030416a5a79a34c13fb8cb198b7986f03
7
+ data.tar.gz: 1a7ba857061f5ccf3d07a2e593c170bad9a3318073e9221f3f07481736fe1b3fd93604611bceb9bc9281ba15c9e6ec47023215c2a9361aa38673f365305815e0
@@ -28,28 +28,31 @@ module Azure::ARM::Batch
28
28
  autoload :BatchManagementClient, 'generated/azure_mgmt_batch/batch_management_client.rb'
29
29
 
30
30
  module Models
31
- autoload :ApplicationCreateParameters, 'generated/azure_mgmt_batch/models/application_create_parameters.rb'
32
31
  autoload :ApplicationPackage, 'generated/azure_mgmt_batch/models/application_package.rb'
33
- autoload :KeyVaultReference, 'generated/azure_mgmt_batch/models/key_vault_reference.rb'
34
32
  autoload :Application, 'generated/azure_mgmt_batch/models/application.rb'
33
+ autoload :KeyVaultReference, 'generated/azure_mgmt_batch/models/key_vault_reference.rb'
34
+ autoload :ListApplicationsResult, 'generated/azure_mgmt_batch/models/list_applications_result.rb'
35
35
  autoload :BatchAccountCreateParameters, 'generated/azure_mgmt_batch/models/batch_account_create_parameters.rb'
36
- autoload :Operation, 'generated/azure_mgmt_batch/models/operation.rb'
36
+ autoload :CheckNameAvailabilityParameters, 'generated/azure_mgmt_batch/models/check_name_availability_parameters.rb'
37
37
  autoload :BatchAccountUpdateParameters, 'generated/azure_mgmt_batch/models/batch_account_update_parameters.rb'
38
- autoload :ListApplicationsResult, 'generated/azure_mgmt_batch/models/list_applications_result.rb'
39
- autoload :BatchAccountRegenerateKeyParameters, 'generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb'
40
38
  autoload :ApplicationUpdateParameters, 'generated/azure_mgmt_batch/models/application_update_parameters.rb'
41
- autoload :ActivateApplicationPackageParameters, 'generated/azure_mgmt_batch/models/activate_application_package_parameters.rb'
39
+ autoload :BatchAccountRegenerateKeyParameters, 'generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb'
42
40
  autoload :BatchLocationQuota, 'generated/azure_mgmt_batch/models/batch_location_quota.rb'
43
- autoload :OperationListResult, 'generated/azure_mgmt_batch/models/operation_list_result.rb'
44
- autoload :BatchAccountKeys, 'generated/azure_mgmt_batch/models/batch_account_keys.rb'
45
- autoload :BatchAccountListResult, 'generated/azure_mgmt_batch/models/batch_account_list_result.rb'
41
+ autoload :ActivateApplicationPackageParameters, 'generated/azure_mgmt_batch/models/activate_application_package_parameters.rb'
46
42
  autoload :AutoStorageBaseProperties, 'generated/azure_mgmt_batch/models/auto_storage_base_properties.rb'
43
+ autoload :BatchAccountListResult, 'generated/azure_mgmt_batch/models/batch_account_list_result.rb'
44
+ autoload :ApplicationCreateParameters, 'generated/azure_mgmt_batch/models/application_create_parameters.rb'
47
45
  autoload :OperationDisplay, 'generated/azure_mgmt_batch/models/operation_display.rb'
46
+ autoload :BatchAccountKeys, 'generated/azure_mgmt_batch/models/batch_account_keys.rb'
47
+ autoload :Operation, 'generated/azure_mgmt_batch/models/operation.rb'
48
+ autoload :CheckNameAvailabilityResult, 'generated/azure_mgmt_batch/models/check_name_availability_result.rb'
49
+ autoload :OperationListResult, 'generated/azure_mgmt_batch/models/operation_list_result.rb'
48
50
  autoload :AutoStorageProperties, 'generated/azure_mgmt_batch/models/auto_storage_properties.rb'
49
51
  autoload :BatchAccount, 'generated/azure_mgmt_batch/models/batch_account.rb'
50
52
  autoload :PoolAllocationMode, 'generated/azure_mgmt_batch/models/pool_allocation_mode.rb'
51
53
  autoload :ProvisioningState, 'generated/azure_mgmt_batch/models/provisioning_state.rb'
52
54
  autoload :AccountKeyType, 'generated/azure_mgmt_batch/models/account_key_type.rb'
53
55
  autoload :PackageState, 'generated/azure_mgmt_batch/models/package_state.rb'
56
+ autoload :NameAvailabilityReason, 'generated/azure_mgmt_batch/models/name_availability_reason.rb'
54
57
  end
55
58
  end
@@ -114,5 +114,108 @@ module Azure::ARM::Batch
114
114
  promise.execute
115
115
  end
116
116
 
117
+ #
118
+ # Checks whether the Batch account name is available in the specified region.
119
+ #
120
+ # @param location_name [String] The desired region for the name check.
121
+ # @param parameters [CheckNameAvailabilityParameters] Properties needed to
122
+ # check the availability of a name.
123
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
124
+ # will be added to the HTTP request.
125
+ #
126
+ # @return [CheckNameAvailabilityResult] operation results.
127
+ #
128
+ def check_name_availability(location_name, parameters, custom_headers = nil)
129
+ response = check_name_availability_async(location_name, parameters, custom_headers).value!
130
+ response.body unless response.nil?
131
+ end
132
+
133
+ #
134
+ # Checks whether the Batch account name is available in the specified region.
135
+ #
136
+ # @param location_name [String] The desired region for the name check.
137
+ # @param parameters [CheckNameAvailabilityParameters] Properties needed to
138
+ # check the availability of a name.
139
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
140
+ # will be added to the HTTP request.
141
+ #
142
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
143
+ #
144
+ def check_name_availability_with_http_info(location_name, parameters, custom_headers = nil)
145
+ check_name_availability_async(location_name, parameters, custom_headers).value!
146
+ end
147
+
148
+ #
149
+ # Checks whether the Batch account name is available in the specified region.
150
+ #
151
+ # @param location_name [String] The desired region for the name check.
152
+ # @param parameters [CheckNameAvailabilityParameters] Properties needed to
153
+ # check the availability of a name.
154
+ # @param [Hash{String => String}] A hash of custom headers that will be added
155
+ # to the HTTP request.
156
+ #
157
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
158
+ #
159
+ def check_name_availability_async(location_name, parameters, custom_headers = nil)
160
+ fail ArgumentError, 'location_name is nil' if location_name.nil?
161
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
162
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
163
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
164
+
165
+
166
+ request_headers = {}
167
+
168
+ # Set Headers
169
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
170
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
171
+
172
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
173
+
174
+ # Serialize Request
175
+ request_mapper = Azure::ARM::Batch::Models::CheckNameAvailabilityParameters.mapper()
176
+ request_content = @client.serialize(request_mapper, parameters)
177
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
178
+
179
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability'
180
+
181
+ request_url = @base_url || @client.base_url
182
+
183
+ options = {
184
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
185
+ path_params: {'locationName' => location_name,'subscriptionId' => @client.subscription_id},
186
+ query_params: {'api-version' => @client.api_version},
187
+ body: request_content,
188
+ headers: request_headers.merge(custom_headers || {}),
189
+ base_url: request_url
190
+ }
191
+ promise = @client.make_request_async(:post, path_template, options)
192
+
193
+ promise = promise.then do |result|
194
+ http_response = result.response
195
+ status_code = http_response.status
196
+ response_content = http_response.body
197
+ unless status_code == 200
198
+ error_model = JSON.load(response_content)
199
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
200
+ end
201
+
202
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
203
+ # Deserialize Response
204
+ if status_code == 200
205
+ begin
206
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
207
+ result_mapper = Azure::ARM::Batch::Models::CheckNameAvailabilityResult.mapper()
208
+ result.body = @client.deserialize(result_mapper, parsed_response)
209
+ rescue Exception => e
210
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
211
+ end
212
+ end
213
+
214
+ result
215
+ end
216
+
217
+ promise.execute
218
+ end
219
+
117
220
  end
118
221
  end
@@ -0,0 +1,59 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Batch
7
+ module Models
8
+ #
9
+ # Parameters for a check name availability request.
10
+ #
11
+ class CheckNameAvailabilityParameters
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [String] The name to check for availability
17
+ attr_accessor :name
18
+
19
+ # @return [String] The resource type. Must be set to
20
+ # Microsoft.Batch/batchAccounts. Default value:
21
+ # 'Microsoft.Batch/batchAccounts' .
22
+ attr_accessor :type
23
+
24
+
25
+ #
26
+ # Mapper for CheckNameAvailabilityParameters class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ required: false,
32
+ serialized_name: 'CheckNameAvailabilityParameters',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'CheckNameAvailabilityParameters',
36
+ model_properties: {
37
+ name: {
38
+ required: true,
39
+ serialized_name: 'name',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ type: {
45
+ required: true,
46
+ is_constant: true,
47
+ serialized_name: 'type',
48
+ default_value: 'Microsoft.Batch/batchAccounts',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,75 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Batch
7
+ module Models
8
+ #
9
+ # The CheckNameAvailability operation response.
10
+ #
11
+ class CheckNameAvailabilityResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Boolean] Gets a boolean value that indicates whether the name
17
+ # is available for you to use. If true, the name is available. If false,
18
+ # the name has already been taken or invalid and cannot be used.
19
+ attr_accessor :name_available
20
+
21
+ # @return [NameAvailabilityReason] Gets the reason that a Batch account
22
+ # name could not be used. The Reason element is only returned if
23
+ # NameAvailable is false. Possible values include: 'Invalid',
24
+ # 'AlreadyExists'
25
+ attr_accessor :reason
26
+
27
+ # @return [String] Gets an error message explaining the Reason value in
28
+ # more detail.
29
+ attr_accessor :message
30
+
31
+
32
+ #
33
+ # Mapper for CheckNameAvailabilityResult class as Ruby Hash.
34
+ # This will be used for serialization/deserialization.
35
+ #
36
+ def self.mapper()
37
+ {
38
+ required: false,
39
+ serialized_name: 'CheckNameAvailabilityResult',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'CheckNameAvailabilityResult',
43
+ model_properties: {
44
+ name_available: {
45
+ required: false,
46
+ read_only: true,
47
+ serialized_name: 'nameAvailable',
48
+ type: {
49
+ name: 'Boolean'
50
+ }
51
+ },
52
+ reason: {
53
+ required: false,
54
+ read_only: true,
55
+ serialized_name: 'reason',
56
+ type: {
57
+ name: 'Enum',
58
+ module: 'NameAvailabilityReason'
59
+ }
60
+ },
61
+ message: {
62
+ required: false,
63
+ read_only: true,
64
+ serialized_name: 'message',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Batch
7
+ module Models
8
+ #
9
+ # Defines values for NameAvailabilityReason
10
+ #
11
+ module NameAvailabilityReason
12
+ Invalid = "Invalid"
13
+ AlreadyExists = "AlreadyExists"
14
+ end
15
+ end
16
+ end
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Batch
7
- VERSION = '0.11.0'
7
+ VERSION = '0.12.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_batch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-19 00:00:00.000000000 Z
11
+ date: 2017-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.8.0
75
+ version: 0.9.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.8.0
82
+ version: 0.9.0
83
83
  description: Microsoft Azure Batch Management Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -109,8 +109,11 @@ files:
109
109
  - lib/generated/azure_mgmt_batch/models/batch_account_regenerate_key_parameters.rb
110
110
  - lib/generated/azure_mgmt_batch/models/batch_account_update_parameters.rb
111
111
  - lib/generated/azure_mgmt_batch/models/batch_location_quota.rb
112
+ - lib/generated/azure_mgmt_batch/models/check_name_availability_parameters.rb
113
+ - lib/generated/azure_mgmt_batch/models/check_name_availability_result.rb
112
114
  - lib/generated/azure_mgmt_batch/models/key_vault_reference.rb
113
115
  - lib/generated/azure_mgmt_batch/models/list_applications_result.rb
116
+ - lib/generated/azure_mgmt_batch/models/name_availability_reason.rb
114
117
  - lib/generated/azure_mgmt_batch/models/operation.rb
115
118
  - lib/generated/azure_mgmt_batch/models/operation_display.rb
116
119
  - lib/generated/azure_mgmt_batch/models/operation_list_result.rb