azure_mgmt_storage 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_storage.rb +9 -9
  3. data/lib/generated/azure_mgmt_storage/models/access_tier.rb +1 -1
  4. data/lib/generated/azure_mgmt_storage/models/account_status.rb +1 -1
  5. data/lib/generated/azure_mgmt_storage/models/check_name_availability_result.rb +5 -5
  6. data/lib/generated/azure_mgmt_storage/models/custom_domain.rb +4 -4
  7. data/lib/generated/azure_mgmt_storage/models/encryption.rb +5 -5
  8. data/lib/generated/azure_mgmt_storage/models/encryption_service.rb +8 -9
  9. data/lib/generated/azure_mgmt_storage/models/encryption_services.rb +4 -3
  10. data/lib/generated/azure_mgmt_storage/models/endpoints.rb +2 -2
  11. data/lib/generated/azure_mgmt_storage/models/key_permission.rb +1 -1
  12. data/lib/generated/azure_mgmt_storage/models/kind.rb +1 -1
  13. data/lib/generated/azure_mgmt_storage/models/provisioning_state.rb +1 -1
  14. data/lib/generated/azure_mgmt_storage/models/reason.rb +1 -1
  15. data/lib/generated/azure_mgmt_storage/models/sku.rb +2 -2
  16. data/lib/generated/azure_mgmt_storage/models/sku_name.rb +1 -1
  17. data/lib/generated/azure_mgmt_storage/models/sku_tier.rb +1 -1
  18. data/lib/generated/azure_mgmt_storage/models/storage_account.rb +23 -25
  19. data/lib/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +3 -2
  20. data/lib/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +18 -19
  21. data/lib/generated/azure_mgmt_storage/models/storage_account_key.rb +4 -4
  22. data/lib/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +4 -4
  23. data/lib/generated/azure_mgmt_storage/models/storage_account_list_result.rb +2 -2
  24. data/lib/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +2 -1
  25. data/lib/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +18 -17
  26. data/lib/generated/azure_mgmt_storage/models/usage.rb +1 -1
  27. data/lib/generated/azure_mgmt_storage/models/usage_list_result.rb +4 -3
  28. data/lib/generated/azure_mgmt_storage/models/usage_name.rb +2 -2
  29. data/lib/generated/azure_mgmt_storage/models/usage_unit.rb +1 -1
  30. data/lib/generated/azure_mgmt_storage/module_definition.rb +1 -1
  31. data/lib/generated/azure_mgmt_storage/storage_accounts.rb +223 -217
  32. data/lib/generated/azure_mgmt_storage/storage_management_client.rb +16 -3
  33. data/lib/generated/azure_mgmt_storage/usage_operations.rb +1 -1
  34. data/lib/generated/azure_mgmt_storage/version.rb +2 -2
  35. metadata +4 -4
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -15,11 +15,11 @@ module Azure::ARM::Storage
15
15
  # @return [String] Name of the key.
16
16
  attr_accessor :key_name
17
17
 
18
- # @return [String] Base 64 encoded value of the key.
18
+ # @return [String] Base 64-encoded value of the key.
19
19
  attr_accessor :value
20
20
 
21
- # @return [KeyPermission] Permissions for the key. Possible values
22
- # include: 'READ', 'FULL'
21
+ # @return [KeyPermission] Permissions for the key -- read-only or full
22
+ # permissions. Possible values include: 'READ', 'FULL'
23
23
  attr_accessor :permissions
24
24
 
25
25
 
@@ -1,19 +1,19 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Storage
7
7
  module Models
8
8
  #
9
- # The ListKeys operation response.
9
+ # The response from the ListKeys operation.
10
10
  #
11
11
  class StorageAccountListKeysResult
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Array<StorageAccountKey>] Gets the list of account keys and
16
- # their properties.
15
+ # @return [Array<StorageAccountKey>] Gets the list of storage account
16
+ # keys and their properties for the specified storage account.
17
17
  attr_accessor :keys
18
18
 
19
19
 
@@ -1,12 +1,12 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Storage
7
7
  module Models
8
8
  #
9
- # The list storage accounts operation response.
9
+ # The response from the List Storage Accounts operation.
10
10
  #
11
11
  class StorageAccountListResult
12
12
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -7,6 +7,7 @@ module Azure::ARM::Storage
7
7
  module Models
8
8
  #
9
9
  # Model object.
10
+ #
10
11
  #
11
12
  class StorageAccountRegenerateKeyParameters
12
13
 
@@ -1,32 +1,34 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Storage
7
7
  module Models
8
8
  #
9
- # The parameters to provide for the account.
9
+ # The parameters that can be provided when updating the storage account
10
+ # properties.
10
11
  #
11
12
  class StorageAccountUpdateParameters
12
13
 
13
14
  include MsRestAzure
14
15
 
15
- # @return [Sku] Gets or sets the sku type. Note that sku cannot be
16
- # updated to StandardZRS or ProvisionedLRS, nor can accounts of that
17
- # sku type be updated to any other value.
16
+ # @return [Sku] Gets or sets the SKU name. Note that the SKU name cannot
17
+ # be updated to Standard_ZRS or Premium_LRS, nor can accounts of those
18
+ # sku names be updated to any other value.
18
19
  attr_accessor :sku
19
20
 
20
- # @return [Hash{String => String}] Gets or sets a list of key value
21
- # pairs that describe the resource. These tags can be used in viewing
22
- # and grouping this resource (across resource groups). A maximum of 15
23
- # tags can be provided for a resource. Each tag must have a key no
24
- # greater than 128 characters and value no greater than 256 characters.
21
+ # @return [Hash{String => String}] Gets or sets a list of key value pairs
22
+ # that describe the resource. These tags can be used in viewing and
23
+ # grouping this resource (across resource groups). A maximum of 15 tags
24
+ # can be provided for a resource. Each tag must have a key no greater in
25
+ # length than 128 characters and a value no greater in length than 256
26
+ # characters.
25
27
  attr_accessor :tags
26
28
 
27
- # @return [CustomDomain] User domain assigned to the storage account.
28
- # Name is the CNAME source. Only one custom domain is supported per
29
- # storage account at this time. To clear the existing custom domain,
29
+ # @return [CustomDomain] Custom domain assigned to the storage account by
30
+ # the user. Name is the CNAME source. Only one custom domain is supported
31
+ # per storage account at this time. To clear the existing custom domain,
30
32
  # use an empty string for the custom domain name property.
31
33
  attr_accessor :custom_domain
32
34
 
@@ -34,10 +36,9 @@ module Azure::ARM::Storage
34
36
  # The default setting is unencrypted.
35
37
  attr_accessor :encryption
36
38
 
37
- # @return [AccessTier] The access tier used for billing. Access tier
38
- # cannot be changed more than once every 7 days (168 hours). Access
39
- # tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or
40
- # PremiumLRS account types. Possible values include: 'Hot', 'Cool'
39
+ # @return [AccessTier] Required for storage accounts where kind =
40
+ # BlobStorage. The access tier used for billing. Possible values include:
41
+ # 'Hot', 'Cool'
41
42
  attr_accessor :access_tier
42
43
 
43
44
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,18 +1,19 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Storage
7
7
  module Models
8
8
  #
9
- # The List Usages operation response.
9
+ # The response from the List Usages operation.
10
10
  #
11
11
  class UsageListResult
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [Array<Usage>] Gets or sets the list Storage Resource Usages.
15
+ # @return [Array<Usage>] Gets or sets the list of Storage Resource
16
+ # Usages.
16
17
  attr_accessor :value
17
18
 
18
19
 
@@ -1,12 +1,12 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Storage
7
7
  module Models
8
8
  #
9
- # The Usage Names.
9
+ # The usage names that can be used; currently limited to StorageAccount.
10
10
  #
11
11
  class UsageName
12
12
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -23,7 +23,7 @@ module Azure::ARM::Storage
23
23
  attr_reader :client
24
24
 
25
25
  #
26
- # Checks that account name is valid and is not in use.
26
+ # Checks that the storage account name is valid and is not already in use.
27
27
  #
28
28
  # @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
29
29
  # of the storage account within the specified resource group. Storage account
@@ -40,7 +40,7 @@ module Azure::ARM::Storage
40
40
  end
41
41
 
42
42
  #
43
- # Checks that account name is valid and is not in use.
43
+ # Checks that the storage account name is valid and is not already in use.
44
44
  #
45
45
  # @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
46
46
  # of the storage account within the specified resource group. Storage account
@@ -56,7 +56,7 @@ module Azure::ARM::Storage
56
56
  end
57
57
 
58
58
  #
59
- # Checks that account name is valid and is not in use.
59
+ # Checks that the storage account name is valid and is not already in use.
60
60
  #
61
61
  # @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
62
62
  # of the storage account within the specified resource group. Storage account
@@ -129,13 +129,13 @@ module Azure::ARM::Storage
129
129
 
130
130
  #
131
131
  # Asynchronously creates a new storage account with the specified parameters.
132
- # If an account is already created and subsequent create request is issued
132
+ # If an account is already created and a subsequent create request is issued
133
133
  # with different properties, the account properties will be updated. If an
134
- # account is already created and subsequent create or update request is
135
- # issued with exact same set of properties, the request will succeed.
134
+ # account is already created and a subsequent create or update request is
135
+ # issued with the exact same set of properties, the request will succeed.
136
136
  #
137
- # @param resource_group_name [String] The name of the resource group within
138
- # the user's subscription.
137
+ # @param resource_group_name [String] The name of the resource group within the
138
+ # user's subscription.
139
139
  # @param account_name [String] The name of the storage account within the
140
140
  # specified resource group. Storage account names must be between 3 and 24
141
141
  # characters in length and use numbers and lower-case letters only.
@@ -152,8 +152,8 @@ module Azure::ARM::Storage
152
152
  end
153
153
 
154
154
  #
155
- # @param resource_group_name [String] The name of the resource group within
156
- # the user's subscription.
155
+ # @param resource_group_name [String] The name of the resource group within the
156
+ # user's subscription.
157
157
  # @param account_name [String] The name of the storage account within the
158
158
  # specified resource group. Storage account names must be between 3 and 24
159
159
  # characters in length and use numbers and lower-case letters only.
@@ -183,139 +183,11 @@ module Azure::ARM::Storage
183
183
  promise
184
184
  end
185
185
 
186
- #
187
- # Asynchronously creates a new storage account with the specified parameters.
188
- # If an account is already created and subsequent create request is issued
189
- # with different properties, the account properties will be updated. If an
190
- # account is already created and subsequent create or update request is
191
- # issued with exact same set of properties, the request will succeed.
192
- #
193
- # @param resource_group_name [String] The name of the resource group within
194
- # the user's subscription.
195
- # @param account_name [String] The name of the storage account within the
196
- # specified resource group. Storage account names must be between 3 and 24
197
- # characters in length and use numbers and lower-case letters only.
198
- # @param parameters [StorageAccountCreateParameters] The parameters to provide
199
- # for the created account.
200
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
201
- # will be added to the HTTP request.
202
- #
203
- # @return [StorageAccount] operation results.
204
- #
205
- def begin_create(resource_group_name, account_name, parameters, custom_headers = nil)
206
- response = begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
207
- response.body unless response.nil?
208
- end
209
-
210
- #
211
- # Asynchronously creates a new storage account with the specified parameters.
212
- # If an account is already created and subsequent create request is issued
213
- # with different properties, the account properties will be updated. If an
214
- # account is already created and subsequent create or update request is
215
- # issued with exact same set of properties, the request will succeed.
216
- #
217
- # @param resource_group_name [String] The name of the resource group within
218
- # the user's subscription.
219
- # @param account_name [String] The name of the storage account within the
220
- # specified resource group. Storage account names must be between 3 and 24
221
- # characters in length and use numbers and lower-case letters only.
222
- # @param parameters [StorageAccountCreateParameters] The parameters to provide
223
- # for the created account.
224
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
225
- # will be added to the HTTP request.
226
- #
227
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
228
- #
229
- def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil)
230
- begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
231
- end
232
-
233
- #
234
- # Asynchronously creates a new storage account with the specified parameters.
235
- # If an account is already created and subsequent create request is issued
236
- # with different properties, the account properties will be updated. If an
237
- # account is already created and subsequent create or update request is
238
- # issued with exact same set of properties, the request will succeed.
239
- #
240
- # @param resource_group_name [String] The name of the resource group within
241
- # the user's subscription.
242
- # @param account_name [String] The name of the storage account within the
243
- # specified resource group. Storage account names must be between 3 and 24
244
- # characters in length and use numbers and lower-case letters only.
245
- # @param parameters [StorageAccountCreateParameters] The parameters to provide
246
- # for the created account.
247
- # @param [Hash{String => String}] A hash of custom headers that will be added
248
- # to the HTTP request.
249
- #
250
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
251
- #
252
- def begin_create_async(resource_group_name, account_name, parameters, custom_headers = nil)
253
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
254
- fail ArgumentError, 'account_name is nil' if account_name.nil?
255
- fail ArgumentError, 'parameters is nil' if parameters.nil?
256
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
257
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
258
-
259
-
260
- request_headers = {}
261
-
262
- # Set Headers
263
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
264
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
265
-
266
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
267
-
268
- # Serialize Request
269
- request_mapper = StorageAccountCreateParameters.mapper()
270
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
271
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
272
-
273
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
274
-
275
- request_url = @base_url || @client.base_url
276
-
277
- options = {
278
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
279
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
280
- query_params: {'api-version' => @client.api_version},
281
- body: request_content,
282
- headers: request_headers.merge(custom_headers || {}),
283
- base_url: request_url
284
- }
285
- promise = @client.make_request_async(:put, path_template, options)
286
-
287
- promise = promise.then do |result|
288
- http_response = result.response
289
- status_code = http_response.status
290
- response_content = http_response.body
291
- unless status_code == 202 || status_code == 200
292
- error_model = JSON.load(response_content)
293
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
294
- end
295
-
296
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
297
- # Deserialize Response
298
- if status_code == 200
299
- begin
300
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
301
- result_mapper = StorageAccount.mapper()
302
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
303
- rescue Exception => e
304
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
305
- end
306
- end
307
-
308
- result
309
- end
310
-
311
- promise.execute
312
- end
313
-
314
186
  #
315
187
  # Deletes a storage account in Microsoft Azure.
316
188
  #
317
- # @param resource_group_name [String] The name of the resource group within
318
- # the user's subscription.
189
+ # @param resource_group_name [String] The name of the resource group within the
190
+ # user's subscription.
319
191
  # @param account_name [String] The name of the storage account within the
320
192
  # specified resource group. Storage account names must be between 3 and 24
321
193
  # characters in length and use numbers and lower-case letters only.
@@ -331,8 +203,8 @@ module Azure::ARM::Storage
331
203
  #
332
204
  # Deletes a storage account in Microsoft Azure.
333
205
  #
334
- # @param resource_group_name [String] The name of the resource group within
335
- # the user's subscription.
206
+ # @param resource_group_name [String] The name of the resource group within the
207
+ # user's subscription.
336
208
  # @param account_name [String] The name of the storage account within the
337
209
  # specified resource group. Storage account names must be between 3 and 24
338
210
  # characters in length and use numbers and lower-case letters only.
@@ -348,8 +220,8 @@ module Azure::ARM::Storage
348
220
  #
349
221
  # Deletes a storage account in Microsoft Azure.
350
222
  #
351
- # @param resource_group_name [String] The name of the resource group within
352
- # the user's subscription.
223
+ # @param resource_group_name [String] The name of the resource group within the
224
+ # user's subscription.
353
225
  # @param account_name [String] The name of the storage account within the
354
226
  # specified resource group. Storage account names must be between 3 and 24
355
227
  # characters in length and use numbers and lower-case letters only.
@@ -402,11 +274,11 @@ module Azure::ARM::Storage
402
274
 
403
275
  #
404
276
  # Returns the properties for the specified storage account including but not
405
- # limited to name, account type, location, and account status. The ListKeys
277
+ # limited to name, SKU name, location, and account status. The ListKeys
406
278
  # operation should be used to retrieve storage keys.
407
279
  #
408
- # @param resource_group_name [String] The name of the resource group within
409
- # the user's subscription.
280
+ # @param resource_group_name [String] The name of the resource group within the
281
+ # user's subscription.
410
282
  # @param account_name [String] The name of the storage account within the
411
283
  # specified resource group. Storage account names must be between 3 and 24
412
284
  # characters in length and use numbers and lower-case letters only.
@@ -422,11 +294,11 @@ module Azure::ARM::Storage
422
294
 
423
295
  #
424
296
  # Returns the properties for the specified storage account including but not
425
- # limited to name, account type, location, and account status. The ListKeys
297
+ # limited to name, SKU name, location, and account status. The ListKeys
426
298
  # operation should be used to retrieve storage keys.
427
299
  #
428
- # @param resource_group_name [String] The name of the resource group within
429
- # the user's subscription.
300
+ # @param resource_group_name [String] The name of the resource group within the
301
+ # user's subscription.
430
302
  # @param account_name [String] The name of the storage account within the
431
303
  # specified resource group. Storage account names must be between 3 and 24
432
304
  # characters in length and use numbers and lower-case letters only.
@@ -441,11 +313,11 @@ module Azure::ARM::Storage
441
313
 
442
314
  #
443
315
  # Returns the properties for the specified storage account including but not
444
- # limited to name, account type, location, and account status. The ListKeys
316
+ # limited to name, SKU name, location, and account status. The ListKeys
445
317
  # operation should be used to retrieve storage keys.
446
318
  #
447
- # @param resource_group_name [String] The name of the resource group within
448
- # the user's subscription.
319
+ # @param resource_group_name [String] The name of the resource group within the
320
+ # user's subscription.
449
321
  # @param account_name [String] The name of the storage account within the
450
322
  # specified resource group. Storage account names must be between 3 and 24
451
323
  # characters in length and use numbers and lower-case letters only.
@@ -507,18 +379,18 @@ module Azure::ARM::Storage
507
379
  end
508
380
 
509
381
  #
510
- # The update operation can be used to update the account type, encryption, or
511
- # tags for a storage account. It can also be used to map the account to a
512
- # custom domain. Only one custom domain is supported per storage account and.
513
- # replacement/change of custom domain is not supported. In order to replace
514
- # an old custom domain, the old value must be cleared/unregistered before a
515
- # new value may be set. Update of multiple properties is supported. This call
516
- # does not change the storage keys for the account. If you want to change
517
- # storage account keys, use the regenerate keys operation. The location and
382
+ # The update operation can be used to update the SKU, encryption, access tier,
383
+ # or tags for a storage account. It can also be used to map the account to a
384
+ # custom domain. Only one custom domain is supported per storage account; the
385
+ # replacement/change of custom domain is not supported. In order to replace an
386
+ # old custom domain, the old value must be cleared/unregistered before a new
387
+ # value can be set. The update of multiple properties is supported. This call
388
+ # does not change the storage keys for the account. If you want to change the
389
+ # storage account keys, use the regenerate keys operation. The location and
518
390
  # name of the storage account cannot be changed after creation.
519
391
  #
520
- # @param resource_group_name [String] The name of the resource group within
521
- # the user's subscription.
392
+ # @param resource_group_name [String] The name of the resource group within the
393
+ # user's subscription.
522
394
  # @param account_name [String] The name of the storage account within the
523
395
  # specified resource group. Storage account names must be between 3 and 24
524
396
  # characters in length and use numbers and lower-case letters only.
@@ -535,18 +407,18 @@ module Azure::ARM::Storage
535
407
  end
536
408
 
537
409
  #
538
- # The update operation can be used to update the account type, encryption, or
539
- # tags for a storage account. It can also be used to map the account to a
540
- # custom domain. Only one custom domain is supported per storage account and.
541
- # replacement/change of custom domain is not supported. In order to replace
542
- # an old custom domain, the old value must be cleared/unregistered before a
543
- # new value may be set. Update of multiple properties is supported. This call
544
- # does not change the storage keys for the account. If you want to change
545
- # storage account keys, use the regenerate keys operation. The location and
410
+ # The update operation can be used to update the SKU, encryption, access tier,
411
+ # or tags for a storage account. It can also be used to map the account to a
412
+ # custom domain. Only one custom domain is supported per storage account; the
413
+ # replacement/change of custom domain is not supported. In order to replace an
414
+ # old custom domain, the old value must be cleared/unregistered before a new
415
+ # value can be set. The update of multiple properties is supported. This call
416
+ # does not change the storage keys for the account. If you want to change the
417
+ # storage account keys, use the regenerate keys operation. The location and
546
418
  # name of the storage account cannot be changed after creation.
547
419
  #
548
- # @param resource_group_name [String] The name of the resource group within
549
- # the user's subscription.
420
+ # @param resource_group_name [String] The name of the resource group within the
421
+ # user's subscription.
550
422
  # @param account_name [String] The name of the storage account within the
551
423
  # specified resource group. Storage account names must be between 3 and 24
552
424
  # characters in length and use numbers and lower-case letters only.
@@ -562,18 +434,18 @@ module Azure::ARM::Storage
562
434
  end
563
435
 
564
436
  #
565
- # The update operation can be used to update the account type, encryption, or
566
- # tags for a storage account. It can also be used to map the account to a
567
- # custom domain. Only one custom domain is supported per storage account and.
568
- # replacement/change of custom domain is not supported. In order to replace
569
- # an old custom domain, the old value must be cleared/unregistered before a
570
- # new value may be set. Update of multiple properties is supported. This call
571
- # does not change the storage keys for the account. If you want to change
572
- # storage account keys, use the regenerate keys operation. The location and
437
+ # The update operation can be used to update the SKU, encryption, access tier,
438
+ # or tags for a storage account. It can also be used to map the account to a
439
+ # custom domain. Only one custom domain is supported per storage account; the
440
+ # replacement/change of custom domain is not supported. In order to replace an
441
+ # old custom domain, the old value must be cleared/unregistered before a new
442
+ # value can be set. The update of multiple properties is supported. This call
443
+ # does not change the storage keys for the account. If you want to change the
444
+ # storage account keys, use the regenerate keys operation. The location and
573
445
  # name of the storage account cannot be changed after creation.
574
446
  #
575
- # @param resource_group_name [String] The name of the resource group within
576
- # the user's subscription.
447
+ # @param resource_group_name [String] The name of the resource group within the
448
+ # user's subscription.
577
449
  # @param account_name [String] The name of the storage account within the
578
450
  # specified resource group. Storage account names must be between 3 and 24
579
451
  # characters in length and use numbers and lower-case letters only.
@@ -733,12 +605,11 @@ module Azure::ARM::Storage
733
605
  end
734
606
 
735
607
  #
736
- # Lists all the storage accounts available under the given resource group.
737
- # Note that storage keys are not returned; use the ListKeys operation for
738
- # this.
608
+ # Lists all the storage accounts available under the given resource group. Note
609
+ # that storage keys are not returned; use the ListKeys operation for this.
739
610
  #
740
- # @param resource_group_name [String] The name of the resource group within
741
- # the user's subscription.
611
+ # @param resource_group_name [String] The name of the resource group within the
612
+ # user's subscription.
742
613
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
743
614
  # will be added to the HTTP request.
744
615
  #
@@ -750,12 +621,11 @@ module Azure::ARM::Storage
750
621
  end
751
622
 
752
623
  #
753
- # Lists all the storage accounts available under the given resource group.
754
- # Note that storage keys are not returned; use the ListKeys operation for
755
- # this.
624
+ # Lists all the storage accounts available under the given resource group. Note
625
+ # that storage keys are not returned; use the ListKeys operation for this.
756
626
  #
757
- # @param resource_group_name [String] The name of the resource group within
758
- # the user's subscription.
627
+ # @param resource_group_name [String] The name of the resource group within the
628
+ # user's subscription.
759
629
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
760
630
  # will be added to the HTTP request.
761
631
  #
@@ -766,12 +636,11 @@ module Azure::ARM::Storage
766
636
  end
767
637
 
768
638
  #
769
- # Lists all the storage accounts available under the given resource group.
770
- # Note that storage keys are not returned; use the ListKeys operation for
771
- # this.
639
+ # Lists all the storage accounts available under the given resource group. Note
640
+ # that storage keys are not returned; use the ListKeys operation for this.
772
641
  #
773
- # @param resource_group_name [String] The name of the resource group within
774
- # the user's subscription.
642
+ # @param resource_group_name [String] The name of the resource group within the
643
+ # user's subscription.
775
644
  # @param [Hash{String => String}] A hash of custom headers that will be added
776
645
  # to the HTTP request.
777
646
  #
@@ -831,8 +700,11 @@ module Azure::ARM::Storage
831
700
  #
832
701
  # Lists the access keys for the specified storage account.
833
702
  #
834
- # @param resource_group_name [String] The name of the resource group.
835
- # @param account_name [String] The name of the storage account.
703
+ # @param resource_group_name [String] The name of the resource group within the
704
+ # user's subscription.
705
+ # @param account_name [String] The name of the storage account within the
706
+ # specified resource group. Storage account names must be between 3 and 24
707
+ # characters in length and use numbers and lower-case letters only.
836
708
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
837
709
  # will be added to the HTTP request.
838
710
  #
@@ -846,8 +718,11 @@ module Azure::ARM::Storage
846
718
  #
847
719
  # Lists the access keys for the specified storage account.
848
720
  #
849
- # @param resource_group_name [String] The name of the resource group.
850
- # @param account_name [String] The name of the storage account.
721
+ # @param resource_group_name [String] The name of the resource group within the
722
+ # user's subscription.
723
+ # @param account_name [String] The name of the storage account within the
724
+ # specified resource group. Storage account names must be between 3 and 24
725
+ # characters in length and use numbers and lower-case letters only.
851
726
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
852
727
  # will be added to the HTTP request.
853
728
  #
@@ -860,8 +735,11 @@ module Azure::ARM::Storage
860
735
  #
861
736
  # Lists the access keys for the specified storage account.
862
737
  #
863
- # @param resource_group_name [String] The name of the resource group.
864
- # @param account_name [String] The name of the storage account.
738
+ # @param resource_group_name [String] The name of the resource group within the
739
+ # user's subscription.
740
+ # @param account_name [String] The name of the storage account within the
741
+ # specified resource group. Storage account names must be between 3 and 24
742
+ # characters in length and use numbers and lower-case letters only.
865
743
  # @param [Hash{String => String}] A hash of custom headers that will be added
866
744
  # to the HTTP request.
867
745
  #
@@ -920,15 +798,15 @@ module Azure::ARM::Storage
920
798
  end
921
799
 
922
800
  #
923
- # Regenerates the access keys for the specified storage account.
801
+ # Regenerates one of the access keys for the specified storage account.
924
802
  #
925
- # @param resource_group_name [String] The name of the resource group within
926
- # the user's subscription.
803
+ # @param resource_group_name [String] The name of the resource group within the
804
+ # user's subscription.
927
805
  # @param account_name [String] The name of the storage account within the
928
806
  # specified resource group. Storage account names must be between 3 and 24
929
807
  # characters in length and use numbers and lower-case letters only.
930
808
  # @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
931
- # of the key which should be regenerated. key1 or key2 for the default keys
809
+ # of the key which should be regenerated -- key1 or key2.
932
810
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
933
811
  # will be added to the HTTP request.
934
812
  #
@@ -940,15 +818,15 @@ module Azure::ARM::Storage
940
818
  end
941
819
 
942
820
  #
943
- # Regenerates the access keys for the specified storage account.
821
+ # Regenerates one of the access keys for the specified storage account.
944
822
  #
945
- # @param resource_group_name [String] The name of the resource group within
946
- # the user's subscription.
823
+ # @param resource_group_name [String] The name of the resource group within the
824
+ # user's subscription.
947
825
  # @param account_name [String] The name of the storage account within the
948
826
  # specified resource group. Storage account names must be between 3 and 24
949
827
  # characters in length and use numbers and lower-case letters only.
950
828
  # @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
951
- # of the key which should be regenerated. key1 or key2 for the default keys
829
+ # of the key which should be regenerated -- key1 or key2.
952
830
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
953
831
  # will be added to the HTTP request.
954
832
  #
@@ -959,15 +837,15 @@ module Azure::ARM::Storage
959
837
  end
960
838
 
961
839
  #
962
- # Regenerates the access keys for the specified storage account.
840
+ # Regenerates one of the access keys for the specified storage account.
963
841
  #
964
- # @param resource_group_name [String] The name of the resource group within
965
- # the user's subscription.
842
+ # @param resource_group_name [String] The name of the resource group within the
843
+ # user's subscription.
966
844
  # @param account_name [String] The name of the storage account within the
967
845
  # specified resource group. Storage account names must be between 3 and 24
968
846
  # characters in length and use numbers and lower-case letters only.
969
847
  # @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
970
- # of the key which should be regenerated. key1 or key2 for the default keys
848
+ # of the key which should be regenerated -- key1 or key2.
971
849
  # @param [Hash{String => String}] A hash of custom headers that will be added
972
850
  # to the HTTP request.
973
851
  #
@@ -1035,5 +913,133 @@ module Azure::ARM::Storage
1035
913
  promise.execute
1036
914
  end
1037
915
 
916
+ #
917
+ # Asynchronously creates a new storage account with the specified parameters.
918
+ # If an account is already created and a subsequent create request is issued
919
+ # with different properties, the account properties will be updated. If an
920
+ # account is already created and a subsequent create or update request is
921
+ # issued with the exact same set of properties, the request will succeed.
922
+ #
923
+ # @param resource_group_name [String] The name of the resource group within the
924
+ # user's subscription.
925
+ # @param account_name [String] The name of the storage account within the
926
+ # specified resource group. Storage account names must be between 3 and 24
927
+ # characters in length and use numbers and lower-case letters only.
928
+ # @param parameters [StorageAccountCreateParameters] The parameters to provide
929
+ # for the created account.
930
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
931
+ # will be added to the HTTP request.
932
+ #
933
+ # @return [StorageAccount] operation results.
934
+ #
935
+ def begin_create(resource_group_name, account_name, parameters, custom_headers = nil)
936
+ response = begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
937
+ response.body unless response.nil?
938
+ end
939
+
940
+ #
941
+ # Asynchronously creates a new storage account with the specified parameters.
942
+ # If an account is already created and a subsequent create request is issued
943
+ # with different properties, the account properties will be updated. If an
944
+ # account is already created and a subsequent create or update request is
945
+ # issued with the exact same set of properties, the request will succeed.
946
+ #
947
+ # @param resource_group_name [String] The name of the resource group within the
948
+ # user's subscription.
949
+ # @param account_name [String] The name of the storage account within the
950
+ # specified resource group. Storage account names must be between 3 and 24
951
+ # characters in length and use numbers and lower-case letters only.
952
+ # @param parameters [StorageAccountCreateParameters] The parameters to provide
953
+ # for the created account.
954
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
955
+ # will be added to the HTTP request.
956
+ #
957
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
958
+ #
959
+ def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil)
960
+ begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
961
+ end
962
+
963
+ #
964
+ # Asynchronously creates a new storage account with the specified parameters.
965
+ # If an account is already created and a subsequent create request is issued
966
+ # with different properties, the account properties will be updated. If an
967
+ # account is already created and a subsequent create or update request is
968
+ # issued with the exact same set of properties, the request will succeed.
969
+ #
970
+ # @param resource_group_name [String] The name of the resource group within the
971
+ # user's subscription.
972
+ # @param account_name [String] The name of the storage account within the
973
+ # specified resource group. Storage account names must be between 3 and 24
974
+ # characters in length and use numbers and lower-case letters only.
975
+ # @param parameters [StorageAccountCreateParameters] The parameters to provide
976
+ # for the created account.
977
+ # @param [Hash{String => String}] A hash of custom headers that will be added
978
+ # to the HTTP request.
979
+ #
980
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
981
+ #
982
+ def begin_create_async(resource_group_name, account_name, parameters, custom_headers = nil)
983
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
984
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
985
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
986
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
987
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
988
+
989
+
990
+ request_headers = {}
991
+
992
+ # Set Headers
993
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
994
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
995
+
996
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
997
+
998
+ # Serialize Request
999
+ request_mapper = StorageAccountCreateParameters.mapper()
1000
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
1001
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1002
+
1003
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
1004
+
1005
+ request_url = @base_url || @client.base_url
1006
+
1007
+ options = {
1008
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1009
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
1010
+ query_params: {'api-version' => @client.api_version},
1011
+ body: request_content,
1012
+ headers: request_headers.merge(custom_headers || {}),
1013
+ base_url: request_url
1014
+ }
1015
+ promise = @client.make_request_async(:put, path_template, options)
1016
+
1017
+ promise = promise.then do |result|
1018
+ http_response = result.response
1019
+ status_code = http_response.status
1020
+ response_content = http_response.body
1021
+ unless status_code == 200 || status_code == 202
1022
+ error_model = JSON.load(response_content)
1023
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1024
+ end
1025
+
1026
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1027
+ # Deserialize Response
1028
+ if status_code == 200
1029
+ begin
1030
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1031
+ result_mapper = StorageAccount.mapper()
1032
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1033
+ rescue Exception => e
1034
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1035
+ end
1036
+ end
1037
+
1038
+ result
1039
+ end
1040
+
1041
+ promise.execute
1042
+ end
1043
+
1038
1044
  end
1039
1045
  end