azure_mgmt_storage 0.17.3 → 0.17.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  3. data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  4. data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  5. data/lib/2016-12-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
  6. data/lib/2016-12-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
  7. data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
  8. data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  9. data/lib/2017-06-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
  10. data/lib/2017-06-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
  11. data/lib/2017-06-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
  12. data/lib/2017-06-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
  13. data/lib/2017-06-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
  14. data/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  15. data/lib/2017-10-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
  16. data/lib/2017-10-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
  17. data/lib/2017-10-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
  18. data/lib/2017-10-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
  19. data/lib/2017-10-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
  20. data/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  21. data/lib/2018-02-01/generated/azure_mgmt_storage/blob_containers.rb +3 -3
  22. data/lib/2018-02-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
  23. data/lib/2018-02-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
  24. data/lib/2018-02-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
  25. data/lib/2018-02-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
  26. data/lib/2018-02-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
  27. data/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  28. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb +3 -3
  29. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/dimension.rb +1 -1
  30. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
  31. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
  32. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
  33. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
  34. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  35. data/lib/2018-07-01/generated/azure_mgmt_storage.rb +35 -27
  36. data/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb +3 -3
  37. data/lib/2018-07-01/generated/azure_mgmt_storage/blob_services.rb +266 -0
  38. data/lib/2018-07-01/generated/azure_mgmt_storage/models/blob_service_properties.rb +104 -0
  39. data/lib/2018-07-01/generated/azure_mgmt_storage/models/cors_rule.rb +128 -0
  40. data/lib/2018-07-01/generated/azure_mgmt_storage/models/cors_rules.rb +57 -0
  41. data/lib/2018-07-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb +64 -0
  42. data/lib/2018-07-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
  43. data/lib/2018-07-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb +85 -0
  44. data/lib/2018-07-01/generated/azure_mgmt_storage/models/geo_replication_status.rb +17 -0
  45. data/lib/2018-07-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
  46. data/lib/2018-07-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
  47. data/lib/2018-07-01/generated/azure_mgmt_storage/models/sku.rb +4 -4
  48. data/lib/2018-07-01/generated/azure_mgmt_storage/models/skucapability.rb +3 -3
  49. data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account.rb +26 -0
  50. data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
  51. data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +1 -1
  52. data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_expand.rb +15 -0
  53. data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
  54. data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +1 -1
  55. data/lib/2018-07-01/generated/azure_mgmt_storage/storage_accounts.rb +171 -6
  56. data/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb +5 -1
  57. data/lib/profiles/latest/modules/storage_profile_module.rb +116 -86
  58. data/lib/version.rb +1 -1
  59. metadata +10 -2
@@ -1578,7 +1578,7 @@ module Azure::Storage::Mgmt::V2018_07_01
1578
1578
  # the immutability policy already exists. If omitted, this operation will
1579
1579
  # always be applied.
1580
1580
  # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
1581
- # will be extented for a blob container.
1581
+ # will be extended for a blob container.
1582
1582
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1583
1583
  # will be added to the HTTP request.
1584
1584
  #
@@ -1609,7 +1609,7 @@ module Azure::Storage::Mgmt::V2018_07_01
1609
1609
  # the immutability policy already exists. If omitted, this operation will
1610
1610
  # always be applied.
1611
1611
  # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
1612
- # will be extented for a blob container.
1612
+ # will be extended for a blob container.
1613
1613
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1614
1614
  # will be added to the HTTP request.
1615
1615
  #
@@ -1639,7 +1639,7 @@ module Azure::Storage::Mgmt::V2018_07_01
1639
1639
  # the immutability policy already exists. If omitted, this operation will
1640
1640
  # always be applied.
1641
1641
  # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
1642
- # will be extented for a blob container.
1642
+ # will be extended for a blob container.
1643
1643
  # @param [Hash{String => String}] A hash of custom headers that will be added
1644
1644
  # to the HTTP request.
1645
1645
  #
@@ -0,0 +1,266 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Storage::Mgmt::V2018_07_01
7
+ #
8
+ # The Azure Storage Management API.
9
+ #
10
+ class BlobServices
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the BlobServices class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StorageManagementClient] reference to the StorageManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Sets the properties of a storage account’s Blob service, including properties
26
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group within the
29
+ # user's subscription. The name is case insensitive.
30
+ # @param account_name [String] The name of the storage account within the
31
+ # specified resource group. Storage account names must be between 3 and 24
32
+ # characters in length and use numbers and lower-case letters only.
33
+ # @param parameters [BlobServiceProperties] The properties of a storage
34
+ # account’s Blob service, including properties for Storage Analytics and CORS
35
+ # (Cross-Origin Resource Sharing) rules.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ # @return [BlobServiceProperties] operation results.
40
+ #
41
+ def set_service_properties(resource_group_name, account_name, parameters, custom_headers:nil)
42
+ response = set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
43
+ response.body unless response.nil?
44
+ end
45
+
46
+ #
47
+ # Sets the properties of a storage account’s Blob service, including properties
48
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
49
+ #
50
+ # @param resource_group_name [String] The name of the resource group within the
51
+ # user's subscription. The name is case insensitive.
52
+ # @param account_name [String] The name of the storage account within the
53
+ # specified resource group. Storage account names must be between 3 and 24
54
+ # characters in length and use numbers and lower-case letters only.
55
+ # @param parameters [BlobServiceProperties] The properties of a storage
56
+ # account’s Blob service, including properties for Storage Analytics and CORS
57
+ # (Cross-Origin Resource Sharing) rules.
58
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
59
+ # will be added to the HTTP request.
60
+ #
61
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
62
+ #
63
+ def set_service_properties_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
64
+ set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
65
+ end
66
+
67
+ #
68
+ # Sets the properties of a storage account’s Blob service, including properties
69
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
70
+ #
71
+ # @param resource_group_name [String] The name of the resource group within the
72
+ # user's subscription. The name is case insensitive.
73
+ # @param account_name [String] The name of the storage account within the
74
+ # specified resource group. Storage account names must be between 3 and 24
75
+ # characters in length and use numbers and lower-case letters only.
76
+ # @param parameters [BlobServiceProperties] The properties of a storage
77
+ # account’s Blob service, including properties for Storage Analytics and CORS
78
+ # (Cross-Origin Resource Sharing) rules.
79
+ # @param [Hash{String => String}] A hash of custom headers that will be added
80
+ # to the HTTP request.
81
+ #
82
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
83
+ #
84
+ def set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:nil)
85
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
86
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
87
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
88
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
89
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
90
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
91
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
92
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
93
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
94
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
95
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
96
+ blob_services_name = 'default'
97
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
98
+
99
+
100
+ request_headers = {}
101
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
102
+
103
+ # Set Headers
104
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
105
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
106
+
107
+ # Serialize Request
108
+ request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobServiceProperties.mapper()
109
+ request_content = @client.serialize(request_mapper, parameters)
110
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
111
+
112
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'
113
+
114
+ request_url = @base_url || @client.base_url
115
+
116
+ options = {
117
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
118
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'BlobServicesName' => blob_services_name},
119
+ query_params: {'api-version' => @client.api_version},
120
+ body: request_content,
121
+ headers: request_headers.merge(custom_headers || {}),
122
+ base_url: request_url
123
+ }
124
+ promise = @client.make_request_async(:put, path_template, options)
125
+
126
+ promise = promise.then do |result|
127
+ http_response = result.response
128
+ status_code = http_response.status
129
+ response_content = http_response.body
130
+ unless status_code == 200
131
+ error_model = JSON.load(response_content)
132
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
133
+ end
134
+
135
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
136
+ # Deserialize Response
137
+ if status_code == 200
138
+ begin
139
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
140
+ result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobServiceProperties.mapper()
141
+ result.body = @client.deserialize(result_mapper, parsed_response)
142
+ rescue Exception => e
143
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
144
+ end
145
+ end
146
+
147
+ result
148
+ end
149
+
150
+ promise.execute
151
+ end
152
+
153
+ #
154
+ # Gets the properties of a storage account’s Blob service, including properties
155
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
156
+ #
157
+ # @param resource_group_name [String] The name of the resource group within the
158
+ # user's subscription. The name is case insensitive.
159
+ # @param account_name [String] The name of the storage account within the
160
+ # specified resource group. Storage account names must be between 3 and 24
161
+ # characters in length and use numbers and lower-case letters only.
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [BlobServiceProperties] operation results.
166
+ #
167
+ def get_service_properties(resource_group_name, account_name, custom_headers:nil)
168
+ response = get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
169
+ response.body unless response.nil?
170
+ end
171
+
172
+ #
173
+ # Gets the properties of a storage account’s Blob service, including properties
174
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
175
+ #
176
+ # @param resource_group_name [String] The name of the resource group within the
177
+ # user's subscription. The name is case insensitive.
178
+ # @param account_name [String] The name of the storage account within the
179
+ # specified resource group. Storage account names must be between 3 and 24
180
+ # characters in length and use numbers and lower-case letters only.
181
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
182
+ # will be added to the HTTP request.
183
+ #
184
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
185
+ #
186
+ def get_service_properties_with_http_info(resource_group_name, account_name, custom_headers:nil)
187
+ get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
188
+ end
189
+
190
+ #
191
+ # Gets the properties of a storage account’s Blob service, including properties
192
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
193
+ #
194
+ # @param resource_group_name [String] The name of the resource group within the
195
+ # user's subscription. The name is case insensitive.
196
+ # @param account_name [String] The name of the storage account within the
197
+ # specified resource group. Storage account names must be between 3 and 24
198
+ # characters in length and use numbers and lower-case letters only.
199
+ # @param [Hash{String => String}] A hash of custom headers that will be added
200
+ # to the HTTP request.
201
+ #
202
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
203
+ #
204
+ def get_service_properties_async(resource_group_name, account_name, custom_headers:nil)
205
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
206
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
207
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
208
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
209
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
210
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
211
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
212
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
213
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
214
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
215
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
216
+ blob_services_name = 'default'
217
+
218
+
219
+ request_headers = {}
220
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
221
+
222
+ # Set Headers
223
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
224
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
225
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'
226
+
227
+ request_url = @base_url || @client.base_url
228
+
229
+ options = {
230
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
231
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'BlobServicesName' => blob_services_name},
232
+ query_params: {'api-version' => @client.api_version},
233
+ headers: request_headers.merge(custom_headers || {}),
234
+ base_url: request_url
235
+ }
236
+ promise = @client.make_request_async(:get, path_template, options)
237
+
238
+ promise = promise.then do |result|
239
+ http_response = result.response
240
+ status_code = http_response.status
241
+ response_content = http_response.body
242
+ unless status_code == 200
243
+ error_model = JSON.load(response_content)
244
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
245
+ end
246
+
247
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
248
+ # Deserialize Response
249
+ if status_code == 200
250
+ begin
251
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
252
+ result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobServiceProperties.mapper()
253
+ result.body = @client.deserialize(result_mapper, parsed_response)
254
+ rescue Exception => e
255
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
256
+ end
257
+ end
258
+
259
+ result
260
+ end
261
+
262
+ promise.execute
263
+ end
264
+
265
+ end
266
+ end
@@ -0,0 +1,104 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Storage::Mgmt::V2018_07_01
7
+ module Models
8
+ #
9
+ # The properties of a storage account’s Blob service.
10
+ #
11
+ class BlobServiceProperties < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [CorsRules] Specifies CORS rules for the Blob service. You can
16
+ # include up to five CorsRule elements in the request. If no CorsRule
17
+ # elements are included in the request body, all CORS rules will be
18
+ # deleted, and CORS will be disabled for the Blob service.
19
+ attr_accessor :cors
20
+
21
+ # @return [String] DefaultServiceVersion indicates the default version to
22
+ # use for requests to the Blob service if an incoming request’s version
23
+ # is not specified. Possible values include version 2008-10-27 and all
24
+ # more recent versions.
25
+ attr_accessor :default_service_version
26
+
27
+ # @return [DeleteRetentionPolicy] The blob service properties for soft
28
+ # delete.
29
+ attr_accessor :delete_retention_policy
30
+
31
+
32
+ #
33
+ # Mapper for BlobServiceProperties class as Ruby Hash.
34
+ # This will be used for serialization/deserialization.
35
+ #
36
+ def self.mapper()
37
+ {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'BlobServiceProperties',
41
+ type: {
42
+ name: 'Composite',
43
+ class_name: 'BlobServiceProperties',
44
+ model_properties: {
45
+ id: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ read_only: true,
49
+ serialized_name: 'id',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ name: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ read_only: true,
58
+ serialized_name: 'name',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ type: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ read_only: true,
67
+ serialized_name: 'type',
68
+ type: {
69
+ name: 'String'
70
+ }
71
+ },
72
+ cors: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ serialized_name: 'properties.cors',
76
+ type: {
77
+ name: 'Composite',
78
+ class_name: 'CorsRules'
79
+ }
80
+ },
81
+ default_service_version: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ serialized_name: 'properties.defaultServiceVersion',
85
+ type: {
86
+ name: 'String'
87
+ }
88
+ },
89
+ delete_retention_policy: {
90
+ client_side_validation: true,
91
+ required: false,
92
+ serialized_name: 'properties.deleteRetentionPolicy',
93
+ type: {
94
+ name: 'Composite',
95
+ class_name: 'DeleteRetentionPolicy'
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,128 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Storage::Mgmt::V2018_07_01
7
+ module Models
8
+ #
9
+ # Specifies a CORS rule for the Blob service.
10
+ #
11
+ class CorsRule
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] Required if CorsRule element is present. A list
16
+ # of origin domains that will be allowed via CORS, or "*" to allow all
17
+ # domains
18
+ attr_accessor :allowed_origins
19
+
20
+ # @return [Array<Enum>] Required if CorsRule element is present. A list
21
+ # of HTTP methods that are allowed to be executed by the origin.
22
+ attr_accessor :allowed_methods
23
+
24
+ # @return [Integer] Required if CorsRule element is present. The number
25
+ # of seconds that the client/browser should cache a preflight response.
26
+ attr_accessor :max_age_in_seconds
27
+
28
+ # @return [Array<String>] Required if CorsRule element is present. A list
29
+ # of response headers to expose to CORS clients.
30
+ attr_accessor :exposed_headers
31
+
32
+ # @return [Array<String>] Required if CorsRule element is present. A list
33
+ # of headers allowed to be part of the cross-origin request.
34
+ attr_accessor :allowed_headers
35
+
36
+
37
+ #
38
+ # Mapper for CorsRule class as Ruby Hash.
39
+ # This will be used for serialization/deserialization.
40
+ #
41
+ def self.mapper()
42
+ {
43
+ client_side_validation: true,
44
+ required: false,
45
+ serialized_name: 'CorsRule',
46
+ type: {
47
+ name: 'Composite',
48
+ class_name: 'CorsRule',
49
+ model_properties: {
50
+ allowed_origins: {
51
+ client_side_validation: true,
52
+ required: true,
53
+ serialized_name: 'allowedOrigins',
54
+ type: {
55
+ name: 'Sequence',
56
+ element: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ serialized_name: 'StringElementType',
60
+ type: {
61
+ name: 'String'
62
+ }
63
+ }
64
+ }
65
+ },
66
+ allowed_methods: {
67
+ client_side_validation: true,
68
+ required: true,
69
+ serialized_name: 'allowedMethods',
70
+ type: {
71
+ name: 'Sequence',
72
+ element: {
73
+ client_side_validation: true,
74
+ required: false,
75
+ serialized_name: 'enumElementType',
76
+ type: {
77
+ name: 'String'
78
+ }
79
+ }
80
+ }
81
+ },
82
+ max_age_in_seconds: {
83
+ client_side_validation: true,
84
+ required: true,
85
+ serialized_name: 'maxAgeInSeconds',
86
+ type: {
87
+ name: 'Number'
88
+ }
89
+ },
90
+ exposed_headers: {
91
+ client_side_validation: true,
92
+ required: true,
93
+ serialized_name: 'exposedHeaders',
94
+ type: {
95
+ name: 'Sequence',
96
+ element: {
97
+ client_side_validation: true,
98
+ required: false,
99
+ serialized_name: 'StringElementType',
100
+ type: {
101
+ name: 'String'
102
+ }
103
+ }
104
+ }
105
+ },
106
+ allowed_headers: {
107
+ client_side_validation: true,
108
+ required: true,
109
+ serialized_name: 'allowedHeaders',
110
+ type: {
111
+ name: 'Sequence',
112
+ element: {
113
+ client_side_validation: true,
114
+ required: false,
115
+ serialized_name: 'StringElementType',
116
+ type: {
117
+ name: 'String'
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ end
126
+ end
127
+ end
128
+ end