azure_mgmt_storage 0.2.1 → 0.3.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 +13 -5
- data/README.md +8 -31
- data/azure_mgmt_storage.gemspec +2 -2
- data/lib/azure_mgmt_storage.rb +14 -5
- data/lib/azure_mgmt_storage/models/access_tier.rb +16 -0
- data/lib/azure_mgmt_storage/models/account_status.rb +1 -1
- data/lib/azure_mgmt_storage/models/check_name_availability_result.rb +1 -1
- data/lib/azure_mgmt_storage/models/custom_domain.rb +1 -1
- data/lib/azure_mgmt_storage/models/encryption.rb +73 -0
- data/lib/azure_mgmt_storage/models/encryption_service.rb +72 -0
- data/lib/azure_mgmt_storage/models/{storage_account_keys.rb → encryption_services.rb} +18 -21
- data/lib/azure_mgmt_storage/models/endpoints.rb +1 -1
- data/lib/azure_mgmt_storage/models/key_permission.rb +16 -0
- data/lib/azure_mgmt_storage/models/kind.rb +16 -0
- data/lib/azure_mgmt_storage/models/provisioning_state.rb +1 -1
- data/lib/azure_mgmt_storage/models/reason.rb +1 -1
- data/lib/azure_mgmt_storage/models/sku.rb +77 -0
- data/lib/azure_mgmt_storage/models/{account_type.rb → sku_name.rb} +4 -4
- data/lib/azure_mgmt_storage/models/sku_tier.rb +16 -0
- data/lib/azure_mgmt_storage/models/storage_account.rb +31 -1
- data/lib/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
- data/lib/azure_mgmt_storage/models/storage_account_create_parameters.rb +43 -3
- data/lib/azure_mgmt_storage/models/storage_account_key.rb +78 -0
- data/lib/azure_mgmt_storage/models/storage_account_list_keys_result.rb +77 -0
- data/lib/azure_mgmt_storage/models/storage_account_list_result.rb +1 -1
- data/lib/azure_mgmt_storage/models/storage_account_properties.rb +34 -16
- data/lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb +50 -12
- data/lib/azure_mgmt_storage/models/storage_account_properties_update_parameters.rb +34 -18
- data/lib/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
- data/lib/azure_mgmt_storage/models/storage_account_update_parameters.rb +25 -3
- data/lib/azure_mgmt_storage/models/usage.rb +1 -5
- data/lib/azure_mgmt_storage/models/usage_list_result.rb +1 -1
- data/lib/azure_mgmt_storage/models/usage_name.rb +1 -1
- data/lib/azure_mgmt_storage/models/usage_unit.rb +1 -1
- data/lib/azure_mgmt_storage/module_definition.rb +1 -1
- data/lib/azure_mgmt_storage/storage_accounts.rb +450 -100
- data/lib/azure_mgmt_storage/storage_management_client.rb +2 -2
- data/lib/azure_mgmt_storage/usage_operations.rb +35 -6
- data/lib/azure_mgmt_storage/version.rb +2 -2
- metadata +42 -26
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -17,11 +17,6 @@ module Azure::ARM::Storage
|
|
17
17
|
# 'Creating', 'ResolvingDNS', 'Succeeded'
|
18
18
|
attr_accessor :provisioning_state
|
19
19
|
|
20
|
-
# @return [AccountType] Gets the type of the storage account. Possible
|
21
|
-
# values include: 'Standard_LRS', 'Standard_ZRS', 'Standard_GRS',
|
22
|
-
# 'Standard_RAGRS', 'Premium_LRS'
|
23
|
-
attr_accessor :account_type
|
24
|
-
|
25
20
|
# @return [Endpoints] Gets the URLs that are used to perform a retrieval
|
26
21
|
# of a public blob, queue or table object.Note that StandardZRS and
|
27
22
|
# PremiumLRS accounts only return the blob endpoint.
|
@@ -68,6 +63,16 @@ module Azure::ARM::Storage
|
|
68
63
|
# StandardRAGRS.
|
69
64
|
attr_accessor :secondary_endpoints
|
70
65
|
|
66
|
+
# @return [Encryption] Gets the encryption settings on the account. If
|
67
|
+
# unspecified the account is unencrypted.
|
68
|
+
attr_accessor :encryption
|
69
|
+
|
70
|
+
# @return [AccessTier] The access tier used for billing. Access tier
|
71
|
+
# cannot be changed more than once every 7 days (168 hours). Access
|
72
|
+
# tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or
|
73
|
+
# PremiumLRS account types. Possible values include: 'Hot', 'Cool'
|
74
|
+
attr_accessor :access_tier
|
75
|
+
|
71
76
|
#
|
72
77
|
# Validate the object. Throws ValidationError if validation fails.
|
73
78
|
#
|
@@ -75,6 +80,7 @@ module Azure::ARM::Storage
|
|
75
80
|
@primary_endpoints.validate unless @primary_endpoints.nil?
|
76
81
|
@custom_domain.validate unless @custom_domain.nil?
|
77
82
|
@secondary_endpoints.validate unless @secondary_endpoints.nil?
|
83
|
+
@encryption.validate unless @encryption.nil?
|
78
84
|
end
|
79
85
|
|
80
86
|
#
|
@@ -89,9 +95,6 @@ module Azure::ARM::Storage
|
|
89
95
|
serialized_property = object.provisioning_state
|
90
96
|
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
91
97
|
|
92
|
-
serialized_property = object.account_type
|
93
|
-
output_object['accountType'] = serialized_property unless serialized_property.nil?
|
94
|
-
|
95
98
|
serialized_property = object.primary_endpoints
|
96
99
|
unless serialized_property.nil?
|
97
100
|
serialized_property = Endpoints.serialize_object(serialized_property)
|
@@ -130,6 +133,15 @@ module Azure::ARM::Storage
|
|
130
133
|
end
|
131
134
|
output_object['secondaryEndpoints'] = serialized_property unless serialized_property.nil?
|
132
135
|
|
136
|
+
serialized_property = object.encryption
|
137
|
+
unless serialized_property.nil?
|
138
|
+
serialized_property = Encryption.serialize_object(serialized_property)
|
139
|
+
end
|
140
|
+
output_object['encryption'] = serialized_property unless serialized_property.nil?
|
141
|
+
|
142
|
+
serialized_property = object.access_tier
|
143
|
+
output_object['accessTier'] = serialized_property unless serialized_property.nil?
|
144
|
+
|
133
145
|
output_object
|
134
146
|
end
|
135
147
|
|
@@ -149,13 +161,6 @@ module Azure::ARM::Storage
|
|
149
161
|
end
|
150
162
|
output_object.provisioning_state = deserialized_property
|
151
163
|
|
152
|
-
deserialized_property = object['accountType']
|
153
|
-
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
154
|
-
enum_is_valid = AccountType.constants.any? { |e| AccountType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
155
|
-
warn 'Enum AccountType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
156
|
-
end
|
157
|
-
output_object.account_type = deserialized_property
|
158
|
-
|
159
164
|
deserialized_property = object['primaryEndpoints']
|
160
165
|
unless deserialized_property.nil?
|
161
166
|
deserialized_property = Endpoints.deserialize_object(deserialized_property)
|
@@ -202,6 +207,19 @@ module Azure::ARM::Storage
|
|
202
207
|
end
|
203
208
|
output_object.secondary_endpoints = deserialized_property
|
204
209
|
|
210
|
+
deserialized_property = object['encryption']
|
211
|
+
unless deserialized_property.nil?
|
212
|
+
deserialized_property = Encryption.deserialize_object(deserialized_property)
|
213
|
+
end
|
214
|
+
output_object.encryption = deserialized_property
|
215
|
+
|
216
|
+
deserialized_property = object['accessTier']
|
217
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
218
|
+
enum_is_valid = AccessTier.constants.any? { |e| AccessTier.const_get(e).to_s.downcase == deserialized_property.downcase }
|
219
|
+
warn 'Enum AccessTier does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
220
|
+
end
|
221
|
+
output_object.access_tier = deserialized_property
|
222
|
+
|
205
223
|
output_object
|
206
224
|
end
|
207
225
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -12,16 +12,30 @@ module Azure::ARM::Storage
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [
|
16
|
-
#
|
17
|
-
#
|
18
|
-
|
15
|
+
# @return [CustomDomain] User domain assigned to the storage account.
|
16
|
+
# Name is the CNAME source. Only one custom domain is supported per
|
17
|
+
# storage account at this time. To clear the existing custom domain,
|
18
|
+
# use an empty string for the custom domain name property.
|
19
|
+
attr_accessor :custom_domain
|
20
|
+
|
21
|
+
# @return [Encryption] Provides the encryption settings on the account.
|
22
|
+
# If left unspecified the account encryption settings will remain. The
|
23
|
+
# default setting is unencrypted.
|
24
|
+
attr_accessor :encryption
|
25
|
+
|
26
|
+
# @return [AccessTier] Required for StandardBlob accounts. The access
|
27
|
+
# tier used for billing. Access tier cannot be changed more than once
|
28
|
+
# every 7 days (168 hours). Access tier cannot be set for StandardLRS,
|
29
|
+
# StandardGRS, StandardRAGRS, or PremiumLRS account types. Possible
|
30
|
+
# values include: 'Hot', 'Cool'
|
31
|
+
attr_accessor :access_tier
|
19
32
|
|
20
33
|
#
|
21
34
|
# Validate the object. Throws ValidationError if validation fails.
|
22
35
|
#
|
23
36
|
def validate
|
24
|
-
|
37
|
+
@custom_domain.validate unless @custom_domain.nil?
|
38
|
+
@encryption.validate unless @encryption.nil?
|
25
39
|
end
|
26
40
|
|
27
41
|
#
|
@@ -33,8 +47,20 @@ module Azure::ARM::Storage
|
|
33
47
|
object.validate
|
34
48
|
output_object = {}
|
35
49
|
|
36
|
-
serialized_property = object.
|
37
|
-
|
50
|
+
serialized_property = object.custom_domain
|
51
|
+
unless serialized_property.nil?
|
52
|
+
serialized_property = CustomDomain.serialize_object(serialized_property)
|
53
|
+
end
|
54
|
+
output_object['customDomain'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.encryption
|
57
|
+
unless serialized_property.nil?
|
58
|
+
serialized_property = Encryption.serialize_object(serialized_property)
|
59
|
+
end
|
60
|
+
output_object['encryption'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.access_tier
|
63
|
+
output_object['accessTier'] = serialized_property unless serialized_property.nil?
|
38
64
|
|
39
65
|
output_object
|
40
66
|
end
|
@@ -48,12 +74,24 @@ module Azure::ARM::Storage
|
|
48
74
|
return if object.nil?
|
49
75
|
output_object = StorageAccountPropertiesCreateParameters.new
|
50
76
|
|
51
|
-
deserialized_property = object['
|
77
|
+
deserialized_property = object['customDomain']
|
78
|
+
unless deserialized_property.nil?
|
79
|
+
deserialized_property = CustomDomain.deserialize_object(deserialized_property)
|
80
|
+
end
|
81
|
+
output_object.custom_domain = deserialized_property
|
82
|
+
|
83
|
+
deserialized_property = object['encryption']
|
84
|
+
unless deserialized_property.nil?
|
85
|
+
deserialized_property = Encryption.deserialize_object(deserialized_property)
|
86
|
+
end
|
87
|
+
output_object.encryption = deserialized_property
|
88
|
+
|
89
|
+
deserialized_property = object['accessTier']
|
52
90
|
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
53
|
-
enum_is_valid =
|
54
|
-
warn 'Enum
|
91
|
+
enum_is_valid = AccessTier.constants.any? { |e| AccessTier.const_get(e).to_s.downcase == deserialized_property.downcase }
|
92
|
+
warn 'Enum AccessTier does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
55
93
|
end
|
56
|
-
output_object.
|
94
|
+
output_object.access_tier = deserialized_property
|
57
95
|
|
58
96
|
output_object
|
59
97
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -12,24 +12,28 @@ module Azure::ARM::Storage
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [AccountType] Gets or sets the account type. Note that
|
16
|
-
# StandardZRS and PremiumLRS accounts cannot be changed to other
|
17
|
-
# account types, and other account types cannot be changed to
|
18
|
-
# StandardZRS or PremiumLRS. Possible values include: 'Standard_LRS',
|
19
|
-
# 'Standard_ZRS', 'Standard_GRS', 'Standard_RAGRS', 'Premium_LRS'
|
20
|
-
attr_accessor :account_type
|
21
|
-
|
22
15
|
# @return [CustomDomain] User domain assigned to the storage account.
|
23
16
|
# Name is the CNAME source. Only one custom domain is supported per
|
24
17
|
# storage account at this time. To clear the existing custom domain,
|
25
18
|
# use an empty string for the custom domain name property.
|
26
19
|
attr_accessor :custom_domain
|
27
20
|
|
21
|
+
# @return [Encryption] Provides the encryption settings on the account.
|
22
|
+
# The default setting is unencrypted.
|
23
|
+
attr_accessor :encryption
|
24
|
+
|
25
|
+
# @return [AccessTier] The access tier used for billing. Access tier
|
26
|
+
# cannot be changed more than once every 7 days (168 hours). Access
|
27
|
+
# tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or
|
28
|
+
# PremiumLRS account types. Possible values include: 'Hot', 'Cool'
|
29
|
+
attr_accessor :access_tier
|
30
|
+
|
28
31
|
#
|
29
32
|
# Validate the object. Throws ValidationError if validation fails.
|
30
33
|
#
|
31
34
|
def validate
|
32
35
|
@custom_domain.validate unless @custom_domain.nil?
|
36
|
+
@encryption.validate unless @encryption.nil?
|
33
37
|
end
|
34
38
|
|
35
39
|
#
|
@@ -41,15 +45,21 @@ module Azure::ARM::Storage
|
|
41
45
|
object.validate
|
42
46
|
output_object = {}
|
43
47
|
|
44
|
-
serialized_property = object.account_type
|
45
|
-
output_object['accountType'] = serialized_property unless serialized_property.nil?
|
46
|
-
|
47
48
|
serialized_property = object.custom_domain
|
48
49
|
unless serialized_property.nil?
|
49
50
|
serialized_property = CustomDomain.serialize_object(serialized_property)
|
50
51
|
end
|
51
52
|
output_object['customDomain'] = serialized_property unless serialized_property.nil?
|
52
53
|
|
54
|
+
serialized_property = object.encryption
|
55
|
+
unless serialized_property.nil?
|
56
|
+
serialized_property = Encryption.serialize_object(serialized_property)
|
57
|
+
end
|
58
|
+
output_object['encryption'] = serialized_property unless serialized_property.nil?
|
59
|
+
|
60
|
+
serialized_property = object.access_tier
|
61
|
+
output_object['accessTier'] = serialized_property unless serialized_property.nil?
|
62
|
+
|
53
63
|
output_object
|
54
64
|
end
|
55
65
|
|
@@ -62,19 +72,25 @@ module Azure::ARM::Storage
|
|
62
72
|
return if object.nil?
|
63
73
|
output_object = StorageAccountPropertiesUpdateParameters.new
|
64
74
|
|
65
|
-
deserialized_property = object['accountType']
|
66
|
-
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
67
|
-
enum_is_valid = AccountType.constants.any? { |e| AccountType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
68
|
-
warn 'Enum AccountType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
69
|
-
end
|
70
|
-
output_object.account_type = deserialized_property
|
71
|
-
|
72
75
|
deserialized_property = object['customDomain']
|
73
76
|
unless deserialized_property.nil?
|
74
77
|
deserialized_property = CustomDomain.deserialize_object(deserialized_property)
|
75
78
|
end
|
76
79
|
output_object.custom_domain = deserialized_property
|
77
80
|
|
81
|
+
deserialized_property = object['encryption']
|
82
|
+
unless deserialized_property.nil?
|
83
|
+
deserialized_property = Encryption.deserialize_object(deserialized_property)
|
84
|
+
end
|
85
|
+
output_object.encryption = deserialized_property
|
86
|
+
|
87
|
+
deserialized_property = object['accessTier']
|
88
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
89
|
+
enum_is_valid = AccessTier.constants.any? { |e| AccessTier.const_get(e).to_s.downcase == deserialized_property.downcase }
|
90
|
+
warn 'Enum AccessTier does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
91
|
+
end
|
92
|
+
output_object.access_tier = deserialized_property
|
93
|
+
|
78
94
|
output_object
|
79
95
|
end
|
80
96
|
end
|
@@ -1,18 +1,27 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
|
9
|
+
# The parameters to provide for the account.
|
10
10
|
#
|
11
11
|
class StorageAccountUpdateParameters
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [
|
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.
|
18
|
+
attr_accessor :sku
|
19
|
+
|
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.
|
16
25
|
attr_accessor :tags
|
17
26
|
|
18
27
|
# @return [StorageAccountPropertiesUpdateParameters]
|
@@ -22,6 +31,7 @@ module Azure::ARM::Storage
|
|
22
31
|
# Validate the object. Throws ValidationError if validation fails.
|
23
32
|
#
|
24
33
|
def validate
|
34
|
+
@sku.validate unless @sku.nil?
|
25
35
|
@tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
|
26
36
|
@properties.validate unless @properties.nil?
|
27
37
|
end
|
@@ -35,6 +45,12 @@ module Azure::ARM::Storage
|
|
35
45
|
object.validate
|
36
46
|
output_object = {}
|
37
47
|
|
48
|
+
serialized_property = object.sku
|
49
|
+
unless serialized_property.nil?
|
50
|
+
serialized_property = Sku.serialize_object(serialized_property)
|
51
|
+
end
|
52
|
+
output_object['sku'] = serialized_property unless serialized_property.nil?
|
53
|
+
|
38
54
|
serialized_property = object.tags
|
39
55
|
output_object['tags'] = serialized_property unless serialized_property.nil?
|
40
56
|
|
@@ -56,6 +72,12 @@ module Azure::ARM::Storage
|
|
56
72
|
return if object.nil?
|
57
73
|
output_object = StorageAccountUpdateParameters.new
|
58
74
|
|
75
|
+
deserialized_property = object['sku']
|
76
|
+
unless deserialized_property.nil?
|
77
|
+
deserialized_property = Sku.deserialize_object(deserialized_property)
|
78
|
+
end
|
79
|
+
output_object.sku = deserialized_property
|
80
|
+
|
59
81
|
deserialized_property = object['tags']
|
60
82
|
output_object.tags = deserialized_property
|
61
83
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -32,10 +32,6 @@ module Azure::ARM::Storage
|
|
32
32
|
# Validate the object. Throws ValidationError if validation fails.
|
33
33
|
#
|
34
34
|
def validate
|
35
|
-
fail MsRest::ValidationError, 'property unit is nil' if @unit.nil?
|
36
|
-
fail MsRest::ValidationError, 'property current_value is nil' if @current_value.nil?
|
37
|
-
fail MsRest::ValidationError, 'property limit is nil' if @limit.nil?
|
38
|
-
fail MsRest::ValidationError, 'property name is nil' if @name.nil?
|
39
35
|
@name.validate unless @name.nil?
|
40
36
|
end
|
41
37
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -29,13 +29,45 @@ module Azure::ARM::Storage
|
|
29
29
|
# of the storage account within the specified resource group. Storage account
|
30
30
|
# names must be between 3 and 24 characters in length and use numbers and
|
31
31
|
# lower-case letters only.
|
32
|
-
# @param [Hash{String => String}]
|
33
|
-
#
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
34
|
#
|
35
|
-
# @return [
|
36
|
-
# response.
|
35
|
+
# @return [CheckNameAvailabilityResult] operation results.
|
37
36
|
#
|
38
37
|
def check_name_availability(account_name, custom_headers = nil)
|
38
|
+
response = check_name_availability_async(account_name, custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Checks that account name is valid and is not in use.
|
44
|
+
#
|
45
|
+
# @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
|
46
|
+
# of the storage account within the specified resource group. Storage account
|
47
|
+
# names must be between 3 and 24 characters in length and use numbers and
|
48
|
+
# lower-case letters only.
|
49
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
50
|
+
# will be added to the HTTP request.
|
51
|
+
#
|
52
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
53
|
+
#
|
54
|
+
def check_name_availability_with_http_info(account_name, custom_headers = nil)
|
55
|
+
check_name_availability_async(account_name, custom_headers).value!
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Checks that account name is valid and is not in use.
|
60
|
+
#
|
61
|
+
# @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
|
62
|
+
# of the storage account within the specified resource group. Storage account
|
63
|
+
# names must be between 3 and 24 characters in length and use numbers and
|
64
|
+
# lower-case letters only.
|
65
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
66
|
+
# to the HTTP request.
|
67
|
+
#
|
68
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
69
|
+
#
|
70
|
+
def check_name_availability_async(account_name, custom_headers = nil)
|
39
71
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
40
72
|
account_name.validate unless account_name.nil?
|
41
73
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -51,7 +83,7 @@ module Azure::ARM::Storage
|
|
51
83
|
unless account_name.nil?
|
52
84
|
account_name = StorageAccountCheckNameAvailabilityParameters.serialize_object(account_name)
|
53
85
|
end
|
54
|
-
request_content = JSON.generate(account_name, quirks_mode: true)
|
86
|
+
request_content = account_name != nil ? JSON.generate(account_name, quirks_mode: true) : nil
|
55
87
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability'
|
56
88
|
options = {
|
57
89
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -60,7 +92,10 @@ module Azure::ARM::Storage
|
|
60
92
|
body: request_content,
|
61
93
|
headers: request_headers.merge(custom_headers || {})
|
62
94
|
}
|
63
|
-
|
95
|
+
|
96
|
+
request_url = @base_url || @client.base_url
|
97
|
+
|
98
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
64
99
|
promise = request.run_promise do |req|
|
65
100
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
66
101
|
end
|
@@ -97,10 +132,10 @@ module Azure::ARM::Storage
|
|
97
132
|
|
98
133
|
#
|
99
134
|
# Asynchronously creates a new storage account with the specified parameters.
|
100
|
-
#
|
101
|
-
# the
|
102
|
-
#
|
103
|
-
#
|
135
|
+
# If an account is already created and subsequent create request is issued
|
136
|
+
# with different properties, the account properties will be updated. If an
|
137
|
+
# account is already created and subsequent create or update request is
|
138
|
+
# issued with exact same set of properties, the request will succeed.
|
104
139
|
#
|
105
140
|
# @param resource_group_name [String] The name of the resource group within
|
106
141
|
# the user's subscription.
|
@@ -121,7 +156,7 @@ module Azure::ARM::Storage
|
|
121
156
|
#
|
122
157
|
def create(resource_group_name, account_name, parameters, custom_headers = nil)
|
123
158
|
# Send request
|
124
|
-
promise =
|
159
|
+
promise = begin_create_async(resource_group_name, account_name, parameters, custom_headers)
|
125
160
|
|
126
161
|
promise = promise.then do |response|
|
127
162
|
# Defining deserialization method.
|
@@ -132,7 +167,7 @@ module Azure::ARM::Storage
|
|
132
167
|
end
|
133
168
|
|
134
169
|
# Waiting for response.
|
135
|
-
@client.
|
170
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
136
171
|
end
|
137
172
|
|
138
173
|
promise
|
@@ -140,10 +175,10 @@ module Azure::ARM::Storage
|
|
140
175
|
|
141
176
|
#
|
142
177
|
# Asynchronously creates a new storage account with the specified parameters.
|
143
|
-
#
|
144
|
-
# the
|
145
|
-
#
|
146
|
-
#
|
178
|
+
# If an account is already created and subsequent create request is issued
|
179
|
+
# with different properties, the account properties will be updated. If an
|
180
|
+
# account is already created and subsequent create or update request is
|
181
|
+
# issued with exact same set of properties, the request will succeed.
|
147
182
|
#
|
148
183
|
# @param resource_group_name [String] The name of the resource group within
|
149
184
|
# the user's subscription.
|
@@ -152,13 +187,59 @@ module Azure::ARM::Storage
|
|
152
187
|
# characters in length and use numbers and lower-case letters only.
|
153
188
|
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
154
189
|
# for the created account.
|
155
|
-
# @param [Hash{String => String}]
|
156
|
-
#
|
190
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
191
|
+
# will be added to the HTTP request.
|
157
192
|
#
|
158
|
-
# @return [
|
159
|
-
# response.
|
193
|
+
# @return [StorageAccount] operation results.
|
160
194
|
#
|
161
195
|
def begin_create(resource_group_name, account_name, parameters, custom_headers = nil)
|
196
|
+
response = begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
|
197
|
+
response.body unless response.nil?
|
198
|
+
end
|
199
|
+
|
200
|
+
#
|
201
|
+
# Asynchronously creates a new storage account with the specified parameters.
|
202
|
+
# If an account is already created and subsequent create request is issued
|
203
|
+
# with different properties, the account properties will be updated. If an
|
204
|
+
# account is already created and subsequent create or update request is
|
205
|
+
# issued with exact same set of properties, the request will succeed.
|
206
|
+
#
|
207
|
+
# @param resource_group_name [String] The name of the resource group within
|
208
|
+
# the user's subscription.
|
209
|
+
# @param account_name [String] The name of the storage account within the
|
210
|
+
# specified resource group. Storage account names must be between 3 and 24
|
211
|
+
# characters in length and use numbers and lower-case letters only.
|
212
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
213
|
+
# for the created account.
|
214
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
215
|
+
# will be added to the HTTP request.
|
216
|
+
#
|
217
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
218
|
+
#
|
219
|
+
def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil)
|
220
|
+
begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
|
221
|
+
end
|
222
|
+
|
223
|
+
#
|
224
|
+
# Asynchronously creates a new storage account with the specified parameters.
|
225
|
+
# If an account is already created and subsequent create request is issued
|
226
|
+
# with different properties, the account properties will be updated. If an
|
227
|
+
# account is already created and subsequent create or update request is
|
228
|
+
# issued with exact same set of properties, the request will succeed.
|
229
|
+
#
|
230
|
+
# @param resource_group_name [String] The name of the resource group within
|
231
|
+
# the user's subscription.
|
232
|
+
# @param account_name [String] The name of the storage account within the
|
233
|
+
# specified resource group. Storage account names must be between 3 and 24
|
234
|
+
# characters in length and use numbers and lower-case letters only.
|
235
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
236
|
+
# for the created account.
|
237
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
238
|
+
# to the HTTP request.
|
239
|
+
#
|
240
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
241
|
+
#
|
242
|
+
def begin_create_async(resource_group_name, account_name, parameters, custom_headers = nil)
|
162
243
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
163
244
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
164
245
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
@@ -176,7 +257,7 @@ module Azure::ARM::Storage
|
|
176
257
|
unless parameters.nil?
|
177
258
|
parameters = StorageAccountCreateParameters.serialize_object(parameters)
|
178
259
|
end
|
179
|
-
request_content = JSON.generate(parameters, quirks_mode: true)
|
260
|
+
request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
|
180
261
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
181
262
|
options = {
|
182
263
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -185,7 +266,10 @@ module Azure::ARM::Storage
|
|
185
266
|
body: request_content,
|
186
267
|
headers: request_headers.merge(custom_headers || {})
|
187
268
|
}
|
188
|
-
|
269
|
+
|
270
|
+
request_url = @base_url || @client.base_url
|
271
|
+
|
272
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
189
273
|
promise = request.run_promise do |req|
|
190
274
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
191
275
|
end
|
@@ -193,7 +277,7 @@ module Azure::ARM::Storage
|
|
193
277
|
promise = promise.then do |http_response|
|
194
278
|
status_code = http_response.status
|
195
279
|
response_content = http_response.body
|
196
|
-
unless status_code ==
|
280
|
+
unless status_code == 202 || status_code == 200
|
197
281
|
error_model = JSON.load(response_content)
|
198
282
|
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
199
283
|
end
|
@@ -228,13 +312,46 @@ module Azure::ARM::Storage
|
|
228
312
|
# @param account_name [String] The name of the storage account within the
|
229
313
|
# specified resource group. Storage account names must be between 3 and 24
|
230
314
|
# characters in length and use numbers and lower-case letters only.
|
231
|
-
# @param [Hash{String => String}]
|
232
|
-
#
|
315
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
316
|
+
# will be added to the HTTP request.
|
233
317
|
#
|
234
|
-
# @return [Concurrent::Promise] Promise object which allows to get HTTP
|
235
|
-
# response.
|
236
318
|
#
|
237
319
|
def delete(resource_group_name, account_name, custom_headers = nil)
|
320
|
+
response = delete_async(resource_group_name, account_name, custom_headers).value!
|
321
|
+
nil
|
322
|
+
end
|
323
|
+
|
324
|
+
#
|
325
|
+
# Deletes a storage account in Microsoft Azure.
|
326
|
+
#
|
327
|
+
# @param resource_group_name [String] The name of the resource group within
|
328
|
+
# the user's subscription.
|
329
|
+
# @param account_name [String] The name of the storage account within the
|
330
|
+
# specified resource group. Storage account names must be between 3 and 24
|
331
|
+
# characters in length and use numbers and lower-case letters only.
|
332
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
333
|
+
# will be added to the HTTP request.
|
334
|
+
#
|
335
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
336
|
+
#
|
337
|
+
def delete_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
338
|
+
delete_async(resource_group_name, account_name, custom_headers).value!
|
339
|
+
end
|
340
|
+
|
341
|
+
#
|
342
|
+
# Deletes a storage account in Microsoft Azure.
|
343
|
+
#
|
344
|
+
# @param resource_group_name [String] The name of the resource group within
|
345
|
+
# the user's subscription.
|
346
|
+
# @param account_name [String] The name of the storage account within the
|
347
|
+
# specified resource group. Storage account names must be between 3 and 24
|
348
|
+
# characters in length and use numbers and lower-case letters only.
|
349
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
350
|
+
# to the HTTP request.
|
351
|
+
#
|
352
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
353
|
+
#
|
354
|
+
def delete_async(resource_group_name, account_name, custom_headers = nil)
|
238
355
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
239
356
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
240
357
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -251,7 +368,10 @@ module Azure::ARM::Storage
|
|
251
368
|
query_params: {'api-version' => @client.api_version},
|
252
369
|
headers: request_headers.merge(custom_headers || {})
|
253
370
|
}
|
254
|
-
|
371
|
+
|
372
|
+
request_url = @base_url || @client.base_url
|
373
|
+
|
374
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
255
375
|
promise = request.run_promise do |req|
|
256
376
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
257
377
|
end
|
@@ -284,13 +404,51 @@ module Azure::ARM::Storage
|
|
284
404
|
# @param account_name [String] The name of the storage account within the
|
285
405
|
# specified resource group. Storage account names must be between 3 and 24
|
286
406
|
# characters in length and use numbers and lower-case letters only.
|
287
|
-
# @param [Hash{String => String}]
|
288
|
-
#
|
407
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
408
|
+
# will be added to the HTTP request.
|
289
409
|
#
|
290
|
-
# @return [
|
291
|
-
# response.
|
410
|
+
# @return [StorageAccount] operation results.
|
292
411
|
#
|
293
412
|
def get_properties(resource_group_name, account_name, custom_headers = nil)
|
413
|
+
response = get_properties_async(resource_group_name, account_name, custom_headers).value!
|
414
|
+
response.body unless response.nil?
|
415
|
+
end
|
416
|
+
|
417
|
+
#
|
418
|
+
# Returns the properties for the specified storage account including but not
|
419
|
+
# limited to name, account type, location, and account status. The ListKeys
|
420
|
+
# operation should be used to retrieve storage keys.
|
421
|
+
#
|
422
|
+
# @param resource_group_name [String] The name of the resource group within
|
423
|
+
# the user's subscription.
|
424
|
+
# @param account_name [String] The name of the storage account within the
|
425
|
+
# specified resource group. Storage account names must be between 3 and 24
|
426
|
+
# characters in length and use numbers and lower-case letters only.
|
427
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
428
|
+
# will be added to the HTTP request.
|
429
|
+
#
|
430
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
431
|
+
#
|
432
|
+
def get_properties_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
433
|
+
get_properties_async(resource_group_name, account_name, custom_headers).value!
|
434
|
+
end
|
435
|
+
|
436
|
+
#
|
437
|
+
# Returns the properties for the specified storage account including but not
|
438
|
+
# limited to name, account type, location, and account status. The ListKeys
|
439
|
+
# operation should be used to retrieve storage keys.
|
440
|
+
#
|
441
|
+
# @param resource_group_name [String] The name of the resource group within
|
442
|
+
# the user's subscription.
|
443
|
+
# @param account_name [String] The name of the storage account within the
|
444
|
+
# specified resource group. Storage account names must be between 3 and 24
|
445
|
+
# characters in length and use numbers and lower-case letters only.
|
446
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
447
|
+
# to the HTTP request.
|
448
|
+
#
|
449
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
450
|
+
#
|
451
|
+
def get_properties_async(resource_group_name, account_name, custom_headers = nil)
|
294
452
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
295
453
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
296
454
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
@@ -307,7 +465,10 @@ module Azure::ARM::Storage
|
|
307
465
|
query_params: {'api-version' => @client.api_version},
|
308
466
|
headers: request_headers.merge(custom_headers || {})
|
309
467
|
}
|
310
|
-
|
468
|
+
|
469
|
+
request_url = @base_url || @client.base_url
|
470
|
+
|
471
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
311
472
|
promise = request.run_promise do |req|
|
312
473
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
313
474
|
end
|
@@ -343,34 +504,84 @@ module Azure::ARM::Storage
|
|
343
504
|
end
|
344
505
|
|
345
506
|
#
|
346
|
-
#
|
347
|
-
#
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
# storage keys for the account. If you want to change storage account keys,
|
356
|
-
# use the RegenerateKey operation. The location and name of the storage
|
357
|
-
# account cannot be changed after creation.
|
507
|
+
# The update operation can be used to update the account type, encryption, or
|
508
|
+
# tags for a storage account. It can also be used to map the account to a
|
509
|
+
# custom domain. Only one custom domain is supported per storage account and.
|
510
|
+
# replacement/change of custom domain is not supported. In order to replace
|
511
|
+
# an old custom domain, the old value must be cleared/unregistered before a
|
512
|
+
# new value may be set. Update of multiple properties is supported. This call
|
513
|
+
# does not change the storage keys for the account. If you want to change
|
514
|
+
# storage account keys, use the regenerate keys operation. The location and
|
515
|
+
# name of the storage account cannot be changed after creation.
|
358
516
|
#
|
359
517
|
# @param resource_group_name [String] The name of the resource group within
|
360
518
|
# the user's subscription.
|
361
519
|
# @param account_name [String] The name of the storage account within the
|
362
520
|
# specified resource group. Storage account names must be between 3 and 24
|
363
521
|
# characters in length and use numbers and lower-case letters only.
|
364
|
-
# @param parameters [StorageAccountUpdateParameters] The parameters to
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
# applied to HTTP request.
|
522
|
+
# @param parameters [StorageAccountUpdateParameters] The parameters to provide
|
523
|
+
# for the updated account.
|
524
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
525
|
+
# will be added to the HTTP request.
|
369
526
|
#
|
370
|
-
# @return [
|
371
|
-
# response.
|
527
|
+
# @return [StorageAccount] operation results.
|
372
528
|
#
|
373
529
|
def update(resource_group_name, account_name, parameters, custom_headers = nil)
|
530
|
+
response = update_async(resource_group_name, account_name, parameters, custom_headers).value!
|
531
|
+
response.body unless response.nil?
|
532
|
+
end
|
533
|
+
|
534
|
+
#
|
535
|
+
# The update operation can be used to update the account type, encryption, or
|
536
|
+
# tags for a storage account. It can also be used to map the account to a
|
537
|
+
# custom domain. Only one custom domain is supported per storage account and.
|
538
|
+
# replacement/change of custom domain is not supported. In order to replace
|
539
|
+
# an old custom domain, the old value must be cleared/unregistered before a
|
540
|
+
# new value may be set. Update of multiple properties is supported. This call
|
541
|
+
# does not change the storage keys for the account. If you want to change
|
542
|
+
# storage account keys, use the regenerate keys operation. The location and
|
543
|
+
# name of the storage account cannot be changed after creation.
|
544
|
+
#
|
545
|
+
# @param resource_group_name [String] The name of the resource group within
|
546
|
+
# the user's subscription.
|
547
|
+
# @param account_name [String] The name of the storage account within the
|
548
|
+
# specified resource group. Storage account names must be between 3 and 24
|
549
|
+
# characters in length and use numbers and lower-case letters only.
|
550
|
+
# @param parameters [StorageAccountUpdateParameters] The parameters to provide
|
551
|
+
# for the updated account.
|
552
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
553
|
+
# will be added to the HTTP request.
|
554
|
+
#
|
555
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
556
|
+
#
|
557
|
+
def update_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil)
|
558
|
+
update_async(resource_group_name, account_name, parameters, custom_headers).value!
|
559
|
+
end
|
560
|
+
|
561
|
+
#
|
562
|
+
# The update operation can be used to update the account type, encryption, or
|
563
|
+
# tags for a storage account. It can also be used to map the account to a
|
564
|
+
# custom domain. Only one custom domain is supported per storage account and.
|
565
|
+
# replacement/change of custom domain is not supported. In order to replace
|
566
|
+
# an old custom domain, the old value must be cleared/unregistered before a
|
567
|
+
# new value may be set. Update of multiple properties is supported. This call
|
568
|
+
# does not change the storage keys for the account. If you want to change
|
569
|
+
# storage account keys, use the regenerate keys operation. The location and
|
570
|
+
# name of the storage account cannot be changed after creation.
|
571
|
+
#
|
572
|
+
# @param resource_group_name [String] The name of the resource group within
|
573
|
+
# the user's subscription.
|
574
|
+
# @param account_name [String] The name of the storage account within the
|
575
|
+
# specified resource group. Storage account names must be between 3 and 24
|
576
|
+
# characters in length and use numbers and lower-case letters only.
|
577
|
+
# @param parameters [StorageAccountUpdateParameters] The parameters to provide
|
578
|
+
# for the updated account.
|
579
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
580
|
+
# to the HTTP request.
|
581
|
+
#
|
582
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
583
|
+
#
|
584
|
+
def update_async(resource_group_name, account_name, parameters, custom_headers = nil)
|
374
585
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
375
586
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
376
587
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
@@ -388,7 +599,7 @@ module Azure::ARM::Storage
|
|
388
599
|
unless parameters.nil?
|
389
600
|
parameters = StorageAccountUpdateParameters.serialize_object(parameters)
|
390
601
|
end
|
391
|
-
request_content = JSON.generate(parameters, quirks_mode: true)
|
602
|
+
request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
|
392
603
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
393
604
|
options = {
|
394
605
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -397,7 +608,10 @@ module Azure::ARM::Storage
|
|
397
608
|
body: request_content,
|
398
609
|
headers: request_headers.merge(custom_headers || {})
|
399
610
|
}
|
400
|
-
|
611
|
+
|
612
|
+
request_url = @base_url || @client.base_url
|
613
|
+
|
614
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
401
615
|
promise = request.run_promise do |req|
|
402
616
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
403
617
|
end
|
@@ -433,19 +647,42 @@ module Azure::ARM::Storage
|
|
433
647
|
end
|
434
648
|
|
435
649
|
#
|
436
|
-
# Lists the
|
650
|
+
# Lists all the storage accounts available under the subscription. Note that
|
651
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
437
652
|
#
|
438
|
-
# @param
|
439
|
-
#
|
440
|
-
# @param [Hash{String => String}] The hash of custom headers need to be
|
441
|
-
# applied to HTTP request.
|
653
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
654
|
+
# will be added to the HTTP request.
|
442
655
|
#
|
443
|
-
# @return [
|
444
|
-
# response.
|
656
|
+
# @return [StorageAccountListResult] operation results.
|
445
657
|
#
|
446
|
-
def
|
447
|
-
|
448
|
-
|
658
|
+
def list(custom_headers = nil)
|
659
|
+
response = list_async(custom_headers).value!
|
660
|
+
response.body unless response.nil?
|
661
|
+
end
|
662
|
+
|
663
|
+
#
|
664
|
+
# Lists all the storage accounts available under the subscription. Note that
|
665
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
666
|
+
#
|
667
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
668
|
+
# will be added to the HTTP request.
|
669
|
+
#
|
670
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
671
|
+
#
|
672
|
+
def list_with_http_info(custom_headers = nil)
|
673
|
+
list_async(custom_headers).value!
|
674
|
+
end
|
675
|
+
|
676
|
+
#
|
677
|
+
# Lists all the storage accounts available under the subscription. Note that
|
678
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
679
|
+
#
|
680
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
681
|
+
# to the HTTP request.
|
682
|
+
#
|
683
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
684
|
+
#
|
685
|
+
def list_async(custom_headers = nil)
|
449
686
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
450
687
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
451
688
|
request_headers = {}
|
@@ -453,14 +690,17 @@ module Azure::ARM::Storage
|
|
453
690
|
# Set Headers
|
454
691
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
455
692
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
456
|
-
path_template = '/subscriptions/{subscriptionId}/
|
693
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts'
|
457
694
|
options = {
|
458
695
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
459
|
-
path_params: {'
|
696
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
460
697
|
query_params: {'api-version' => @client.api_version},
|
461
698
|
headers: request_headers.merge(custom_headers || {})
|
462
699
|
}
|
463
|
-
|
700
|
+
|
701
|
+
request_url = @base_url || @client.base_url
|
702
|
+
|
703
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
464
704
|
promise = request.run_promise do |req|
|
465
705
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
466
706
|
end
|
@@ -481,7 +721,7 @@ module Azure::ARM::Storage
|
|
481
721
|
begin
|
482
722
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
483
723
|
unless parsed_response.nil?
|
484
|
-
parsed_response =
|
724
|
+
parsed_response = StorageAccountListResult.deserialize_object(parsed_response)
|
485
725
|
end
|
486
726
|
result.body = parsed_response
|
487
727
|
rescue Exception => e
|
@@ -496,16 +736,52 @@ module Azure::ARM::Storage
|
|
496
736
|
end
|
497
737
|
|
498
738
|
#
|
499
|
-
# Lists all the storage accounts available under the
|
500
|
-
# storage keys are not returned; use the ListKeys operation for
|
739
|
+
# Lists all the storage accounts available under the given resource group.
|
740
|
+
# Note that storage keys are not returned; use the ListKeys operation for
|
741
|
+
# this.
|
501
742
|
#
|
502
|
-
# @param [
|
503
|
-
#
|
743
|
+
# @param resource_group_name [String] The name of the resource group within
|
744
|
+
# the user's subscription.
|
745
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
746
|
+
# will be added to the HTTP request.
|
504
747
|
#
|
505
|
-
# @return [
|
506
|
-
# response.
|
748
|
+
# @return [StorageAccountListResult] operation results.
|
507
749
|
#
|
508
|
-
def
|
750
|
+
def list_by_resource_group(resource_group_name, custom_headers = nil)
|
751
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers).value!
|
752
|
+
response.body unless response.nil?
|
753
|
+
end
|
754
|
+
|
755
|
+
#
|
756
|
+
# Lists all the storage accounts available under the given resource group.
|
757
|
+
# Note that storage keys are not returned; use the ListKeys operation for
|
758
|
+
# this.
|
759
|
+
#
|
760
|
+
# @param resource_group_name [String] The name of the resource group within
|
761
|
+
# the user's subscription.
|
762
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
763
|
+
# will be added to the HTTP request.
|
764
|
+
#
|
765
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
766
|
+
#
|
767
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
|
768
|
+
list_by_resource_group_async(resource_group_name, custom_headers).value!
|
769
|
+
end
|
770
|
+
|
771
|
+
#
|
772
|
+
# Lists all the storage accounts available under the given resource group.
|
773
|
+
# Note that storage keys are not returned; use the ListKeys operation for
|
774
|
+
# this.
|
775
|
+
#
|
776
|
+
# @param resource_group_name [String] The name of the resource group within
|
777
|
+
# the user's subscription.
|
778
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
779
|
+
# to the HTTP request.
|
780
|
+
#
|
781
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
782
|
+
#
|
783
|
+
def list_by_resource_group_async(resource_group_name, custom_headers = nil)
|
784
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
509
785
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
510
786
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
511
787
|
request_headers = {}
|
@@ -513,14 +789,17 @@ module Azure::ARM::Storage
|
|
513
789
|
# Set Headers
|
514
790
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
515
791
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
516
|
-
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts'
|
792
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts'
|
517
793
|
options = {
|
518
794
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
519
|
-
path_params: {'subscriptionId' => @client.subscription_id},
|
795
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
520
796
|
query_params: {'api-version' => @client.api_version},
|
521
797
|
headers: request_headers.merge(custom_headers || {})
|
522
798
|
}
|
523
|
-
|
799
|
+
|
800
|
+
request_url = @base_url || @client.base_url
|
801
|
+
|
802
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
524
803
|
promise = request.run_promise do |req|
|
525
804
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
526
805
|
end
|
@@ -556,20 +835,47 @@ module Azure::ARM::Storage
|
|
556
835
|
end
|
557
836
|
|
558
837
|
#
|
559
|
-
# Lists
|
560
|
-
# Note that storage keys are not returned; use the ListKeys operation for
|
561
|
-
# this.
|
838
|
+
# Lists the access keys for the specified storage account.
|
562
839
|
#
|
563
|
-
# @param resource_group_name [String] The name of the resource group
|
564
|
-
# the
|
565
|
-
# @param [Hash{String => String}]
|
566
|
-
#
|
840
|
+
# @param resource_group_name [String] The name of the resource group.
|
841
|
+
# @param account_name [String] The name of the storage account.
|
842
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
843
|
+
# will be added to the HTTP request.
|
567
844
|
#
|
568
|
-
# @return [
|
569
|
-
# response.
|
845
|
+
# @return [StorageAccountListKeysResult] operation results.
|
570
846
|
#
|
571
|
-
def
|
847
|
+
def list_keys(resource_group_name, account_name, custom_headers = nil)
|
848
|
+
response = list_keys_async(resource_group_name, account_name, custom_headers).value!
|
849
|
+
response.body unless response.nil?
|
850
|
+
end
|
851
|
+
|
852
|
+
#
|
853
|
+
# Lists the access keys for the specified storage account.
|
854
|
+
#
|
855
|
+
# @param resource_group_name [String] The name of the resource group.
|
856
|
+
# @param account_name [String] The name of the storage account.
|
857
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
858
|
+
# will be added to the HTTP request.
|
859
|
+
#
|
860
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
861
|
+
#
|
862
|
+
def list_keys_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
863
|
+
list_keys_async(resource_group_name, account_name, custom_headers).value!
|
864
|
+
end
|
865
|
+
|
866
|
+
#
|
867
|
+
# Lists the access keys for the specified storage account.
|
868
|
+
#
|
869
|
+
# @param resource_group_name [String] The name of the resource group.
|
870
|
+
# @param account_name [String] The name of the storage account.
|
871
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
872
|
+
# to the HTTP request.
|
873
|
+
#
|
874
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
875
|
+
#
|
876
|
+
def list_keys_async(resource_group_name, account_name, custom_headers = nil)
|
572
877
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
878
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
573
879
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
574
880
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
575
881
|
request_headers = {}
|
@@ -577,14 +883,17 @@ module Azure::ARM::Storage
|
|
577
883
|
# Set Headers
|
578
884
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
579
885
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
580
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts'
|
886
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys'
|
581
887
|
options = {
|
582
888
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
583
|
-
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
889
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
584
890
|
query_params: {'api-version' => @client.api_version},
|
585
891
|
headers: request_headers.merge(custom_headers || {})
|
586
892
|
}
|
587
|
-
|
893
|
+
|
894
|
+
request_url = @base_url || @client.base_url
|
895
|
+
|
896
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
588
897
|
promise = request.run_promise do |req|
|
589
898
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
590
899
|
end
|
@@ -605,7 +914,7 @@ module Azure::ARM::Storage
|
|
605
914
|
begin
|
606
915
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
607
916
|
unless parsed_response.nil?
|
608
|
-
parsed_response =
|
917
|
+
parsed_response = StorageAccountListKeysResult.deserialize_object(parsed_response)
|
609
918
|
end
|
610
919
|
result.body = parsed_response
|
611
920
|
rescue Exception => e
|
@@ -629,13 +938,51 @@ module Azure::ARM::Storage
|
|
629
938
|
# characters in length and use numbers and lower-case letters only.
|
630
939
|
# @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
|
631
940
|
# of the key which should be regenerated. key1 or key2 for the default keys
|
632
|
-
# @param [Hash{String => String}]
|
633
|
-
#
|
941
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
942
|
+
# will be added to the HTTP request.
|
634
943
|
#
|
635
|
-
# @return [
|
636
|
-
# response.
|
944
|
+
# @return [StorageAccountListKeysResult] operation results.
|
637
945
|
#
|
638
946
|
def regenerate_key(resource_group_name, account_name, regenerate_key, custom_headers = nil)
|
947
|
+
response = regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers).value!
|
948
|
+
response.body unless response.nil?
|
949
|
+
end
|
950
|
+
|
951
|
+
#
|
952
|
+
# Regenerates the access keys for the specified storage account.
|
953
|
+
#
|
954
|
+
# @param resource_group_name [String] The name of the resource group within
|
955
|
+
# the user's subscription.
|
956
|
+
# @param account_name [String] The name of the storage account within the
|
957
|
+
# specified resource group. Storage account names must be between 3 and 24
|
958
|
+
# characters in length and use numbers and lower-case letters only.
|
959
|
+
# @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
|
960
|
+
# of the key which should be regenerated. key1 or key2 for the default keys
|
961
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
962
|
+
# will be added to the HTTP request.
|
963
|
+
#
|
964
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
965
|
+
#
|
966
|
+
def regenerate_key_with_http_info(resource_group_name, account_name, regenerate_key, custom_headers = nil)
|
967
|
+
regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers).value!
|
968
|
+
end
|
969
|
+
|
970
|
+
#
|
971
|
+
# Regenerates the access keys for the specified storage account.
|
972
|
+
#
|
973
|
+
# @param resource_group_name [String] The name of the resource group within
|
974
|
+
# the user's subscription.
|
975
|
+
# @param account_name [String] The name of the storage account within the
|
976
|
+
# specified resource group. Storage account names must be between 3 and 24
|
977
|
+
# characters in length and use numbers and lower-case letters only.
|
978
|
+
# @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
|
979
|
+
# of the key which should be regenerated. key1 or key2 for the default keys
|
980
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
981
|
+
# to the HTTP request.
|
982
|
+
#
|
983
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
984
|
+
#
|
985
|
+
def regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers = nil)
|
639
986
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
640
987
|
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
641
988
|
fail ArgumentError, 'regenerate_key is nil' if regenerate_key.nil?
|
@@ -653,7 +1000,7 @@ module Azure::ARM::Storage
|
|
653
1000
|
unless regenerate_key.nil?
|
654
1001
|
regenerate_key = StorageAccountRegenerateKeyParameters.serialize_object(regenerate_key)
|
655
1002
|
end
|
656
|
-
request_content = JSON.generate(regenerate_key, quirks_mode: true)
|
1003
|
+
request_content = regenerate_key != nil ? JSON.generate(regenerate_key, quirks_mode: true) : nil
|
657
1004
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey'
|
658
1005
|
options = {
|
659
1006
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -662,7 +1009,10 @@ module Azure::ARM::Storage
|
|
662
1009
|
body: request_content,
|
663
1010
|
headers: request_headers.merge(custom_headers || {})
|
664
1011
|
}
|
665
|
-
|
1012
|
+
|
1013
|
+
request_url = @base_url || @client.base_url
|
1014
|
+
|
1015
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
666
1016
|
promise = request.run_promise do |req|
|
667
1017
|
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
668
1018
|
end
|
@@ -683,7 +1033,7 @@ module Azure::ARM::Storage
|
|
683
1033
|
begin
|
684
1034
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
685
1035
|
unless parsed_response.nil?
|
686
|
-
parsed_response =
|
1036
|
+
parsed_response = StorageAccountListKeysResult.deserialize_object(parsed_response)
|
687
1037
|
end
|
688
1038
|
result.body = parsed_response
|
689
1039
|
rescue Exception => e
|