azure_mgmt_storage 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/azure_mgmt_storage.gemspec +4 -5
- data/lib/azure_mgmt_storage.rb +3 -57
- data/lib/generated/azure_mgmt_storage.rb +56 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/access_tier.rb +0 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/account_status.rb +0 -0
- data/lib/generated/azure_mgmt_storage/models/check_name_availability_result.rb +73 -0
- data/lib/generated/azure_mgmt_storage/models/custom_domain.rb +57 -0
- data/lib/generated/azure_mgmt_storage/models/encryption.rb +59 -0
- data/lib/generated/azure_mgmt_storage/models/encryption_service.rb +60 -0
- data/lib/generated/azure_mgmt_storage/models/encryption_services.rb +45 -0
- data/lib/generated/azure_mgmt_storage/models/endpoints.rb +79 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/key_permission.rb +0 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/kind.rb +0 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/provisioning_state.rb +0 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/reason.rb +0 -0
- data/lib/generated/azure_mgmt_storage/models/sku.rb +61 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/sku_name.rb +0 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/sku_tier.rb +0 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account.rb +269 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +57 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +134 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account_key.rb +69 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +54 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account_list_result.rb +54 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +44 -0
- data/lib/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +108 -0
- data/lib/generated/azure_mgmt_storage/models/usage.rb +84 -0
- data/lib/generated/azure_mgmt_storage/models/usage_list_result.rb +52 -0
- data/lib/generated/azure_mgmt_storage/models/usage_name.rb +56 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/models/usage_unit.rb +0 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/module_definition.rb +0 -0
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/storage_accounts.rb +81 -66
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/storage_management_client.rb +4 -4
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/usage_operations.rb +4 -4
- data/lib/{azure_mgmt_storage → generated/azure_mgmt_storage}/version.rb +1 -1
- metadata +54 -77
- data/lib/azure_mgmt_storage/models/check_name_availability_result.rb +0 -82
- data/lib/azure_mgmt_storage/models/custom_domain.rb +0 -68
- data/lib/azure_mgmt_storage/models/encryption.rb +0 -73
- data/lib/azure_mgmt_storage/models/encryption_service.rb +0 -72
- data/lib/azure_mgmt_storage/models/encryption_services.rb +0 -62
- data/lib/azure_mgmt_storage/models/endpoints.rb +0 -84
- data/lib/azure_mgmt_storage/models/sku.rb +0 -77
- data/lib/azure_mgmt_storage/models/storage_account.rb +0 -122
- data/lib/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +0 -67
- data/lib/azure_mgmt_storage/models/storage_account_create_parameters.rb +0 -122
- data/lib/azure_mgmt_storage/models/storage_account_key.rb +0 -78
- data/lib/azure_mgmt_storage/models/storage_account_list_keys_result.rb +0 -77
- data/lib/azure_mgmt_storage/models/storage_account_list_result.rb +0 -77
- data/lib/azure_mgmt_storage/models/storage_account_properties.rb +0 -227
- data/lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb +0 -100
- data/lib/azure_mgmt_storage/models/storage_account_properties_update_parameters.rb +0 -98
- data/lib/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +0 -56
- data/lib/azure_mgmt_storage/models/storage_account_update_parameters.rb +0 -94
- data/lib/azure_mgmt_storage/models/usage.rb +0 -99
- data/lib/azure_mgmt_storage/models/usage_list_result.rb +0 -76
- data/lib/azure_mgmt_storage/models/usage_name.rb +0 -65
@@ -0,0 +1,84 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Storage
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes Storage Resource Usage.
|
10
|
+
#
|
11
|
+
class Usage
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [UsageUnit] Gets the unit of measurement. Possible values
|
16
|
+
# include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond',
|
17
|
+
# 'BytesPerSecond'
|
18
|
+
attr_accessor :unit
|
19
|
+
|
20
|
+
# @return [Integer] Gets the current count of the allocated resources in
|
21
|
+
# the subscription.
|
22
|
+
attr_accessor :current_value
|
23
|
+
|
24
|
+
# @return [Integer] Gets the maximum count of the resources that can be
|
25
|
+
# allocated in the subscription.
|
26
|
+
attr_accessor :limit
|
27
|
+
|
28
|
+
# @return [UsageName] Gets the name of the type of usage.
|
29
|
+
attr_accessor :name
|
30
|
+
|
31
|
+
|
32
|
+
#
|
33
|
+
# Mapper for Usage class as Ruby Hash.
|
34
|
+
# This will be used for serialization/deserialization.
|
35
|
+
#
|
36
|
+
def self.mapper()
|
37
|
+
{
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'Usage',
|
40
|
+
type: {
|
41
|
+
name: 'Composite',
|
42
|
+
class_name: 'Usage',
|
43
|
+
model_properties: {
|
44
|
+
unit: {
|
45
|
+
required: false,
|
46
|
+
read_only: true,
|
47
|
+
serialized_name: 'unit',
|
48
|
+
type: {
|
49
|
+
name: 'Enum',
|
50
|
+
module: 'UsageUnit'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
current_value: {
|
54
|
+
required: false,
|
55
|
+
read_only: true,
|
56
|
+
serialized_name: 'currentValue',
|
57
|
+
type: {
|
58
|
+
name: 'Number'
|
59
|
+
}
|
60
|
+
},
|
61
|
+
limit: {
|
62
|
+
required: false,
|
63
|
+
read_only: true,
|
64
|
+
serialized_name: 'limit',
|
65
|
+
type: {
|
66
|
+
name: 'Number'
|
67
|
+
}
|
68
|
+
},
|
69
|
+
name: {
|
70
|
+
required: false,
|
71
|
+
read_only: true,
|
72
|
+
serialized_name: 'name',
|
73
|
+
type: {
|
74
|
+
name: 'Composite',
|
75
|
+
class_name: 'UsageName'
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Storage
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The List Usages operation response.
|
10
|
+
#
|
11
|
+
class UsageListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<Usage>] Gets or sets the list Storage Resource Usages.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for UsageListResult class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
required: false,
|
26
|
+
serialized_name: 'UsageListResult',
|
27
|
+
type: {
|
28
|
+
name: 'Composite',
|
29
|
+
class_name: 'UsageListResult',
|
30
|
+
model_properties: {
|
31
|
+
value: {
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'value',
|
34
|
+
type: {
|
35
|
+
name: 'Sequence',
|
36
|
+
element: {
|
37
|
+
required: false,
|
38
|
+
serialized_name: 'UsageElementType',
|
39
|
+
type: {
|
40
|
+
name: 'Composite',
|
41
|
+
class_name: 'Usage'
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Storage
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Usage Names.
|
10
|
+
#
|
11
|
+
class UsageName
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets a string describing the resource name.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# @return [String] Gets a localized string describing the resource name.
|
19
|
+
attr_accessor :localized_value
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for UsageName class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
required: false,
|
29
|
+
serialized_name: 'UsageName',
|
30
|
+
type: {
|
31
|
+
name: 'Composite',
|
32
|
+
class_name: 'UsageName',
|
33
|
+
model_properties: {
|
34
|
+
value: {
|
35
|
+
required: false,
|
36
|
+
read_only: true,
|
37
|
+
serialized_name: 'value',
|
38
|
+
type: {
|
39
|
+
name: 'String'
|
40
|
+
}
|
41
|
+
},
|
42
|
+
localized_value: {
|
43
|
+
required: false,
|
44
|
+
read_only: true,
|
45
|
+
serialized_name: 'localizedValue',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
File without changes
|
File without changes
|
@@ -69,21 +69,23 @@ module Azure::ARM::Storage
|
|
69
69
|
#
|
70
70
|
def check_name_availability_async(account_name, custom_headers = nil)
|
71
71
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
72
|
-
account_name.validate unless account_name.nil?
|
73
72
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
74
73
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
74
|
+
|
75
|
+
|
75
76
|
request_headers = {}
|
76
77
|
|
77
78
|
# Set Headers
|
78
79
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
79
80
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
80
81
|
|
81
|
-
# Serialize Request
|
82
82
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
request_content =
|
83
|
+
|
84
|
+
# Serialize Request
|
85
|
+
request_mapper = StorageAccountCheckNameAvailabilityParameters.mapper()
|
86
|
+
request_content = @client.serialize(request_mapper, account_name, 'account_name')
|
87
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
88
|
+
|
87
89
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability'
|
88
90
|
options = {
|
89
91
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -115,10 +117,8 @@ module Azure::ARM::Storage
|
|
115
117
|
if status_code == 200
|
116
118
|
begin
|
117
119
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
118
|
-
|
119
|
-
|
120
|
-
end
|
121
|
-
result.body = parsed_response
|
120
|
+
result_mapper = CheckNameAvailabilityResult.mapper()
|
121
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
122
122
|
rescue Exception => e
|
123
123
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
124
124
|
end
|
@@ -144,26 +144,39 @@ module Azure::ARM::Storage
|
|
144
144
|
# characters in length and use numbers and lower-case letters only.
|
145
145
|
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
146
146
|
# for the created account.
|
147
|
-
# @param
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
|
147
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
148
|
+
# will be added to the HTTP request.
|
149
|
+
#
|
150
|
+
# @return [StorageAccount] operation results.
|
151
|
+
#
|
152
|
+
def create(resource_group_name, account_name, parameters, custom_headers = nil)
|
153
|
+
response = create_async(resource_group_name, account_name, parameters, custom_headers).value!
|
154
|
+
response.body unless response.nil?
|
155
|
+
end
|
156
|
+
|
157
|
+
#
|
158
|
+
# @param resource_group_name [String] The name of the resource group within
|
159
|
+
# the user's subscription.
|
160
|
+
# @param account_name [String] The name of the storage account within the
|
161
|
+
# specified resource group. Storage account names must be between 3 and 24
|
162
|
+
# characters in length and use numbers and lower-case letters only.
|
163
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
164
|
+
# for the created account.
|
165
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
166
|
+
# will be added to the HTTP request.
|
153
167
|
#
|
154
168
|
# @return [Concurrent::Promise] promise which provides async access to http
|
155
169
|
# response.
|
156
170
|
#
|
157
|
-
def
|
171
|
+
def create_async(resource_group_name, account_name, parameters, custom_headers = nil)
|
158
172
|
# Send request
|
159
173
|
promise = begin_create_async(resource_group_name, account_name, parameters, custom_headers)
|
160
174
|
|
161
175
|
promise = promise.then do |response|
|
162
176
|
# Defining deserialization method.
|
163
177
|
deserialize_method = lambda do |parsed_response|
|
164
|
-
|
165
|
-
|
166
|
-
end
|
178
|
+
result_mapper = StorageAccount.mapper()
|
179
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
167
180
|
end
|
168
181
|
|
169
182
|
# Waiting for response.
|
@@ -243,21 +256,23 @@ module Azure::ARM::Storage
|
|
243
256
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
244
257
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
245
258
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
246
|
-
parameters.validate unless parameters.nil?
|
247
259
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
248
260
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
261
|
+
|
262
|
+
|
249
263
|
request_headers = {}
|
250
264
|
|
251
265
|
# Set Headers
|
252
266
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
253
267
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
254
268
|
|
255
|
-
# Serialize Request
|
256
269
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
request_content =
|
270
|
+
|
271
|
+
# Serialize Request
|
272
|
+
request_mapper = StorageAccountCreateParameters.mapper()
|
273
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
274
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
275
|
+
|
261
276
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
262
277
|
options = {
|
263
278
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -289,10 +304,8 @@ module Azure::ARM::Storage
|
|
289
304
|
if status_code == 200
|
290
305
|
begin
|
291
306
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
292
|
-
|
293
|
-
|
294
|
-
end
|
295
|
-
result.body = parsed_response
|
307
|
+
result_mapper = StorageAccount.mapper()
|
308
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
296
309
|
rescue Exception => e
|
297
310
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
298
311
|
end
|
@@ -356,6 +369,8 @@ module Azure::ARM::Storage
|
|
356
369
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
357
370
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
358
371
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
372
|
+
|
373
|
+
|
359
374
|
request_headers = {}
|
360
375
|
|
361
376
|
# Set Headers
|
@@ -453,6 +468,8 @@ module Azure::ARM::Storage
|
|
453
468
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
454
469
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
455
470
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
471
|
+
|
472
|
+
|
456
473
|
request_headers = {}
|
457
474
|
|
458
475
|
# Set Headers
|
@@ -488,10 +505,8 @@ module Azure::ARM::Storage
|
|
488
505
|
if status_code == 200
|
489
506
|
begin
|
490
507
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
491
|
-
|
492
|
-
|
493
|
-
end
|
494
|
-
result.body = parsed_response
|
508
|
+
result_mapper = StorageAccount.mapper()
|
509
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
495
510
|
rescue Exception => e
|
496
511
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
497
512
|
end
|
@@ -585,21 +600,23 @@ module Azure::ARM::Storage
|
|
585
600
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
586
601
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
587
602
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
588
|
-
parameters.validate unless parameters.nil?
|
589
603
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
590
604
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
605
|
+
|
606
|
+
|
591
607
|
request_headers = {}
|
592
608
|
|
593
609
|
# Set Headers
|
594
610
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
595
611
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
596
612
|
|
597
|
-
# Serialize Request
|
598
613
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
request_content =
|
614
|
+
|
615
|
+
# Serialize Request
|
616
|
+
request_mapper = StorageAccountUpdateParameters.mapper()
|
617
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
618
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
619
|
+
|
603
620
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
604
621
|
options = {
|
605
622
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -631,10 +648,8 @@ module Azure::ARM::Storage
|
|
631
648
|
if status_code == 200
|
632
649
|
begin
|
633
650
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
634
|
-
|
635
|
-
|
636
|
-
end
|
637
|
-
result.body = parsed_response
|
651
|
+
result_mapper = StorageAccount.mapper()
|
652
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
638
653
|
rescue Exception => e
|
639
654
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
640
655
|
end
|
@@ -685,6 +700,8 @@ module Azure::ARM::Storage
|
|
685
700
|
def list_async(custom_headers = nil)
|
686
701
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
687
702
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
703
|
+
|
704
|
+
|
688
705
|
request_headers = {}
|
689
706
|
|
690
707
|
# Set Headers
|
@@ -720,10 +737,8 @@ module Azure::ARM::Storage
|
|
720
737
|
if status_code == 200
|
721
738
|
begin
|
722
739
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
723
|
-
|
724
|
-
|
725
|
-
end
|
726
|
-
result.body = parsed_response
|
740
|
+
result_mapper = StorageAccountListResult.mapper()
|
741
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
727
742
|
rescue Exception => e
|
728
743
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
729
744
|
end
|
@@ -784,6 +799,8 @@ module Azure::ARM::Storage
|
|
784
799
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
785
800
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
786
801
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
802
|
+
|
803
|
+
|
787
804
|
request_headers = {}
|
788
805
|
|
789
806
|
# Set Headers
|
@@ -819,10 +836,8 @@ module Azure::ARM::Storage
|
|
819
836
|
if status_code == 200
|
820
837
|
begin
|
821
838
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
822
|
-
|
823
|
-
|
824
|
-
end
|
825
|
-
result.body = parsed_response
|
839
|
+
result_mapper = StorageAccountListResult.mapper()
|
840
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
826
841
|
rescue Exception => e
|
827
842
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
828
843
|
end
|
@@ -878,6 +893,8 @@ module Azure::ARM::Storage
|
|
878
893
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
879
894
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
880
895
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
896
|
+
|
897
|
+
|
881
898
|
request_headers = {}
|
882
899
|
|
883
900
|
# Set Headers
|
@@ -913,10 +930,8 @@ module Azure::ARM::Storage
|
|
913
930
|
if status_code == 200
|
914
931
|
begin
|
915
932
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
916
|
-
|
917
|
-
|
918
|
-
end
|
919
|
-
result.body = parsed_response
|
933
|
+
result_mapper = StorageAccountListKeysResult.mapper()
|
934
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
920
935
|
rescue Exception => e
|
921
936
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
922
937
|
end
|
@@ -986,21 +1001,23 @@ module Azure::ARM::Storage
|
|
986
1001
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
987
1002
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
988
1003
|
fail ArgumentError, 'regenerate_key is nil' if regenerate_key.nil?
|
989
|
-
regenerate_key.validate unless regenerate_key.nil?
|
990
1004
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
991
1005
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1006
|
+
|
1007
|
+
|
992
1008
|
request_headers = {}
|
993
1009
|
|
994
1010
|
# Set Headers
|
995
1011
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
996
1012
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
997
1013
|
|
998
|
-
# Serialize Request
|
999
1014
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
request_content =
|
1015
|
+
|
1016
|
+
# Serialize Request
|
1017
|
+
request_mapper = StorageAccountRegenerateKeyParameters.mapper()
|
1018
|
+
request_content = @client.serialize(request_mapper, regenerate_key, 'regenerate_key')
|
1019
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1020
|
+
|
1004
1021
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey'
|
1005
1022
|
options = {
|
1006
1023
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1032,10 +1049,8 @@ module Azure::ARM::Storage
|
|
1032
1049
|
if status_code == 200
|
1033
1050
|
begin
|
1034
1051
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1035
|
-
|
1036
|
-
|
1037
|
-
end
|
1038
|
-
result.body = parsed_response
|
1052
|
+
result_mapper = StorageAccountListKeysResult.mapper()
|
1053
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1039
1054
|
rescue Exception => e
|
1040
1055
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1041
1056
|
end
|