azure_mgmt_storage 0.17.6 → 0.17.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-11-01/generated/azure_mgmt_storage/blob_containers.rb +1721 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/blob_services.rb +266 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/management_policies.rb +355 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/access_tier.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb +136 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/account_status.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/action.rb +15 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb +75 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/blob_container.rb +217 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/blob_service_properties.rb +104 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/bypass.rb +18 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb +77 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/cors_rule.rb +128 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/cors_rules.rb +57 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/custom_domain.rb +60 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/date_after_creation.rb +50 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/date_after_modification.rb +50 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/default_action.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb +64 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/dimension.rb +57 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/encryption.rb +74 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/encryption_service.rb +62 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/encryption_services.rb +89 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/endpoints.rb +108 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb +85 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/geo_replication_status.rb +17 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/http_protocol.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/identity.rb +72 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/immutability_policy.rb +98 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb +95 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb +17 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/iprule.rb +61 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/key_permission.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/key_source.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/key_vault_properties.rb +68 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/kind.rb +19 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/lease_duration.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/lease_state.rb +19 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/lease_status.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/legal_hold.rb +71 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb +72 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb +47 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/list_container_item.rb +216 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/list_container_items.rb +55 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +47 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy.rb +89 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy_action.rb +62 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy_base_blob.rb +73 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy_definition.rb +60 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy_filter.rb +76 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy_rule.rb +87 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy_schema.rb +58 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb +47 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/metric_specification.rb +145 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/network_rule_set.rb +106 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/operation.rb +83 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/operation_display.rb +79 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/operation_list_result.rb +57 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/permissions.rb +22 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/proxy_resource.rb +63 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/public_access.rb +17 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/reason.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/reason_code.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/resource.rb +83 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/restriction.rb +85 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +247 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/service_specification.rb +56 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/services.rb +18 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/signed_resource.rb +18 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/signed_resource_types.rb +17 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/sku.rb +159 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/sku_name.rb +20 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/sku_tier.rb +16 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/skucapability.rb +63 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/state.rb +19 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account.rb +375 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +63 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +203 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_expand.rb +15 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_key.rb +73 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +57 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb +57 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +47 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +179 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb +57 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/tag_property.rb +97 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/tracked_resource.rb +92 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/update_history_property.rb +114 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/usage.rb +89 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/usage_list_result.rb +56 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/usage_name.rb +59 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb +75 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/operations.rb +108 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/skus.rb +114 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb +1505 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/storage_management_client.rb +155 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage/usages.rb +118 -0
- data/lib/2018-11-01/generated/azure_mgmt_storage.rb +126 -0
- data/lib/azure_mgmt_storage.rb +1 -0
- data/lib/profiles/latest/modules/storage_profile_module.rb +250 -224
- data/lib/version.rb +1 -1
- metadata +104 -2
@@ -0,0 +1,155 @@
|
|
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_11_01
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class StorageManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] The ID of the target subscription.
|
21
|
+
attr_accessor :subscription_id
|
22
|
+
|
23
|
+
# @return [String] The API version to use for this operation.
|
24
|
+
attr_reader :api_version
|
25
|
+
|
26
|
+
# @return [String] The preferred language for the response.
|
27
|
+
attr_accessor :accept_language
|
28
|
+
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
32
|
+
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
35
|
+
# generated and included in each request. Default is true.
|
36
|
+
attr_accessor :generate_client_request_id
|
37
|
+
|
38
|
+
# @return [Operations] operations
|
39
|
+
attr_reader :operations
|
40
|
+
|
41
|
+
# @return [Skus] skus
|
42
|
+
attr_reader :skus
|
43
|
+
|
44
|
+
# @return [StorageAccounts] storage_accounts
|
45
|
+
attr_reader :storage_accounts
|
46
|
+
|
47
|
+
# @return [Usages] usages
|
48
|
+
attr_reader :usages
|
49
|
+
|
50
|
+
# @return [ManagementPolicies] management_policies
|
51
|
+
attr_reader :management_policies
|
52
|
+
|
53
|
+
# @return [BlobServices] blob_services
|
54
|
+
attr_reader :blob_services
|
55
|
+
|
56
|
+
# @return [BlobContainers] blob_containers
|
57
|
+
attr_reader :blob_containers
|
58
|
+
|
59
|
+
#
|
60
|
+
# Creates initializes a new instance of the StorageManagementClient class.
|
61
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
62
|
+
# @param base_url [String] the base URI of the service.
|
63
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
64
|
+
#
|
65
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
66
|
+
super(credentials, options)
|
67
|
+
@base_url = base_url || 'https://management.azure.com'
|
68
|
+
|
69
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
70
|
+
@credentials = credentials
|
71
|
+
|
72
|
+
@operations = Operations.new(self)
|
73
|
+
@skus = Skus.new(self)
|
74
|
+
@storage_accounts = StorageAccounts.new(self)
|
75
|
+
@usages = Usages.new(self)
|
76
|
+
@management_policies = ManagementPolicies.new(self)
|
77
|
+
@blob_services = BlobServices.new(self)
|
78
|
+
@blob_containers = BlobContainers.new(self)
|
79
|
+
@api_version = '2018-11-01'
|
80
|
+
@accept_language = 'en-US'
|
81
|
+
@long_running_operation_retry_timeout = 30
|
82
|
+
@generate_client_request_id = true
|
83
|
+
add_telemetry
|
84
|
+
end
|
85
|
+
|
86
|
+
#
|
87
|
+
# Makes a request and returns the body of the response.
|
88
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
89
|
+
# @param path [String] the path, relative to {base_url}.
|
90
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
91
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
92
|
+
# Example:
|
93
|
+
#
|
94
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
95
|
+
# path = "/path"
|
96
|
+
# options = {
|
97
|
+
# body: request_content,
|
98
|
+
# query_params: {'api-version' => '2016-02-01'}
|
99
|
+
# }
|
100
|
+
# result = @client.make_request(:put, path, options)
|
101
|
+
#
|
102
|
+
def make_request(method, path, options = {})
|
103
|
+
result = make_request_with_http_info(method, path, options)
|
104
|
+
result.body unless result.nil?
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
# Makes a request and returns the operation response.
|
109
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
110
|
+
# @param path [String] the path, relative to {base_url}.
|
111
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
112
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
113
|
+
#
|
114
|
+
def make_request_with_http_info(method, path, options = {})
|
115
|
+
result = make_request_async(method, path, options).value!
|
116
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
#
|
121
|
+
# Makes a request asynchronously.
|
122
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
123
|
+
# @param path [String] the path, relative to {base_url}.
|
124
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
125
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
126
|
+
#
|
127
|
+
def make_request_async(method, path, options = {})
|
128
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
129
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
130
|
+
|
131
|
+
request_url = options[:base_url] || @base_url
|
132
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
133
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
134
|
+
end
|
135
|
+
|
136
|
+
request_headers = @request_headers
|
137
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
138
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
139
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
140
|
+
|
141
|
+
super(request_url, method, path, options)
|
142
|
+
end
|
143
|
+
|
144
|
+
|
145
|
+
private
|
146
|
+
#
|
147
|
+
# Adds telemetry information.
|
148
|
+
#
|
149
|
+
def add_telemetry
|
150
|
+
sdk_information = 'azure_mgmt_storage'
|
151
|
+
sdk_information = "#{sdk_information}/0.17.7"
|
152
|
+
add_user_agent_information(sdk_information)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,118 @@
|
|
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_11_01
|
7
|
+
#
|
8
|
+
# The Azure Storage Management API.
|
9
|
+
#
|
10
|
+
class Usages
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Usages 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
|
+
# Gets the current usage count and the limit for the resources of the location
|
26
|
+
# under the subscription.
|
27
|
+
#
|
28
|
+
# @param location [String] The location of the Azure Storage resource.
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [UsageListResult] operation results.
|
33
|
+
#
|
34
|
+
def list_by_location(location, custom_headers:nil)
|
35
|
+
response = list_by_location_async(location, custom_headers:custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Gets the current usage count and the limit for the resources of the location
|
41
|
+
# under the subscription.
|
42
|
+
#
|
43
|
+
# @param location [String] The location of the Azure Storage resource.
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_by_location_with_http_info(location, custom_headers:nil)
|
50
|
+
list_by_location_async(location, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Gets the current usage count and the limit for the resources of the location
|
55
|
+
# under the subscription.
|
56
|
+
#
|
57
|
+
# @param location [String] The location of the Azure Storage resource.
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_by_location_async(location, custom_headers:nil)
|
64
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
65
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
66
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
67
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
68
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
69
|
+
|
70
|
+
|
71
|
+
request_headers = {}
|
72
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
73
|
+
|
74
|
+
# Set Headers
|
75
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
76
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
77
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages'
|
78
|
+
|
79
|
+
request_url = @base_url || @client.base_url
|
80
|
+
|
81
|
+
options = {
|
82
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
83
|
+
path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
|
84
|
+
query_params: {'api-version' => @client.api_version},
|
85
|
+
headers: request_headers.merge(custom_headers || {}),
|
86
|
+
base_url: request_url
|
87
|
+
}
|
88
|
+
promise = @client.make_request_async(:get, path_template, options)
|
89
|
+
|
90
|
+
promise = promise.then do |result|
|
91
|
+
http_response = result.response
|
92
|
+
status_code = http_response.status
|
93
|
+
response_content = http_response.body
|
94
|
+
unless status_code == 200
|
95
|
+
error_model = JSON.load(response_content)
|
96
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
97
|
+
end
|
98
|
+
|
99
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
100
|
+
# Deserialize Response
|
101
|
+
if status_code == 200
|
102
|
+
begin
|
103
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
104
|
+
result_mapper = Azure::Storage::Mgmt::V2018_11_01::Models::UsageListResult.mapper()
|
105
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
106
|
+
rescue Exception => e
|
107
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
result
|
112
|
+
end
|
113
|
+
|
114
|
+
promise.execute
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
end
|
@@ -0,0 +1,126 @@
|
|
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
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2018-11-01/generated/azure_mgmt_storage/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Storage::Mgmt::V2018_11_01
|
23
|
+
autoload :Operations, '2018-11-01/generated/azure_mgmt_storage/operations.rb'
|
24
|
+
autoload :Skus, '2018-11-01/generated/azure_mgmt_storage/skus.rb'
|
25
|
+
autoload :StorageAccounts, '2018-11-01/generated/azure_mgmt_storage/storage_accounts.rb'
|
26
|
+
autoload :Usages, '2018-11-01/generated/azure_mgmt_storage/usages.rb'
|
27
|
+
autoload :ManagementPolicies, '2018-11-01/generated/azure_mgmt_storage/management_policies.rb'
|
28
|
+
autoload :BlobServices, '2018-11-01/generated/azure_mgmt_storage/blob_services.rb'
|
29
|
+
autoload :BlobContainers, '2018-11-01/generated/azure_mgmt_storage/blob_containers.rb'
|
30
|
+
autoload :StorageManagementClient, '2018-11-01/generated/azure_mgmt_storage/storage_management_client.rb'
|
31
|
+
|
32
|
+
module Models
|
33
|
+
autoload :UsageListResult, '2018-11-01/generated/azure_mgmt_storage/models/usage_list_result.rb'
|
34
|
+
autoload :OperationDisplay, '2018-11-01/generated/azure_mgmt_storage/models/operation_display.rb'
|
35
|
+
autoload :AccountSasParameters, '2018-11-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb'
|
36
|
+
autoload :MetricSpecification, '2018-11-01/generated/azure_mgmt_storage/models/metric_specification.rb'
|
37
|
+
autoload :ListAccountSasResponse, '2018-11-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb'
|
38
|
+
autoload :Operation, '2018-11-01/generated/azure_mgmt_storage/models/operation.rb'
|
39
|
+
autoload :ServiceSasParameters, '2018-11-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb'
|
40
|
+
autoload :StorageAccountCheckNameAvailabilityParameters, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb'
|
41
|
+
autoload :ListServiceSasResponse, '2018-11-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb'
|
42
|
+
autoload :Restriction, '2018-11-01/generated/azure_mgmt_storage/models/restriction.rb'
|
43
|
+
autoload :DateAfterModification, '2018-11-01/generated/azure_mgmt_storage/models/date_after_modification.rb'
|
44
|
+
autoload :StorageSkuListResult, '2018-11-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb'
|
45
|
+
autoload :ManagementPolicyBaseBlob, '2018-11-01/generated/azure_mgmt_storage/models/management_policy_base_blob.rb'
|
46
|
+
autoload :CustomDomain, '2018-11-01/generated/azure_mgmt_storage/models/custom_domain.rb'
|
47
|
+
autoload :DateAfterCreation, '2018-11-01/generated/azure_mgmt_storage/models/date_after_creation.rb'
|
48
|
+
autoload :EncryptionServices, '2018-11-01/generated/azure_mgmt_storage/models/encryption_services.rb'
|
49
|
+
autoload :ManagementPolicySnapShot, '2018-11-01/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb'
|
50
|
+
autoload :Encryption, '2018-11-01/generated/azure_mgmt_storage/models/encryption.rb'
|
51
|
+
autoload :ManagementPolicyAction, '2018-11-01/generated/azure_mgmt_storage/models/management_policy_action.rb'
|
52
|
+
autoload :IPRule, '2018-11-01/generated/azure_mgmt_storage/models/iprule.rb'
|
53
|
+
autoload :ManagementPolicyFilter, '2018-11-01/generated/azure_mgmt_storage/models/management_policy_filter.rb'
|
54
|
+
autoload :Identity, '2018-11-01/generated/azure_mgmt_storage/models/identity.rb'
|
55
|
+
autoload :ManagementPolicyDefinition, '2018-11-01/generated/azure_mgmt_storage/models/management_policy_definition.rb'
|
56
|
+
autoload :Endpoints, '2018-11-01/generated/azure_mgmt_storage/models/endpoints.rb'
|
57
|
+
autoload :ManagementPolicyRule, '2018-11-01/generated/azure_mgmt_storage/models/management_policy_rule.rb'
|
58
|
+
autoload :VirtualNetworkRule, '2018-11-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb'
|
59
|
+
autoload :NetworkRuleSet, '2018-11-01/generated/azure_mgmt_storage/models/network_rule_set.rb'
|
60
|
+
autoload :StorageAccountListResult, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb'
|
61
|
+
autoload :StorageAccountCreateParameters, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb'
|
62
|
+
autoload :StorageAccountRegenerateKeyParameters, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb'
|
63
|
+
autoload :GeoReplicationStats, '2018-11-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb'
|
64
|
+
autoload :UsageName, '2018-11-01/generated/azure_mgmt_storage/models/usage_name.rb'
|
65
|
+
autoload :Dimension, '2018-11-01/generated/azure_mgmt_storage/models/dimension.rb'
|
66
|
+
autoload :ManagementPolicySchema, '2018-11-01/generated/azure_mgmt_storage/models/management_policy_schema.rb'
|
67
|
+
autoload :OperationListResult, '2018-11-01/generated/azure_mgmt_storage/models/operation_list_result.rb'
|
68
|
+
autoload :DeleteRetentionPolicy, '2018-11-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb'
|
69
|
+
autoload :Sku, '2018-11-01/generated/azure_mgmt_storage/models/sku.rb'
|
70
|
+
autoload :CorsRules, '2018-11-01/generated/azure_mgmt_storage/models/cors_rules.rb'
|
71
|
+
autoload :EncryptionService, '2018-11-01/generated/azure_mgmt_storage/models/encryption_service.rb'
|
72
|
+
autoload :KeyVaultProperties, '2018-11-01/generated/azure_mgmt_storage/models/key_vault_properties.rb'
|
73
|
+
autoload :LegalHold, '2018-11-01/generated/azure_mgmt_storage/models/legal_hold.rb'
|
74
|
+
autoload :StorageAccountListKeysResult, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb'
|
75
|
+
autoload :CorsRule, '2018-11-01/generated/azure_mgmt_storage/models/cors_rule.rb'
|
76
|
+
autoload :Usage, '2018-11-01/generated/azure_mgmt_storage/models/usage.rb'
|
77
|
+
autoload :Resource, '2018-11-01/generated/azure_mgmt_storage/models/resource.rb'
|
78
|
+
autoload :SKUCapability, '2018-11-01/generated/azure_mgmt_storage/models/skucapability.rb'
|
79
|
+
autoload :UpdateHistoryProperty, '2018-11-01/generated/azure_mgmt_storage/models/update_history_property.rb'
|
80
|
+
autoload :StorageAccountKey, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_key.rb'
|
81
|
+
autoload :ImmutabilityPolicyProperties, '2018-11-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb'
|
82
|
+
autoload :ServiceSpecification, '2018-11-01/generated/azure_mgmt_storage/models/service_specification.rb'
|
83
|
+
autoload :TagProperty, '2018-11-01/generated/azure_mgmt_storage/models/tag_property.rb'
|
84
|
+
autoload :StorageAccountUpdateParameters, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb'
|
85
|
+
autoload :LegalHoldProperties, '2018-11-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb'
|
86
|
+
autoload :CheckNameAvailabilityResult, '2018-11-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb'
|
87
|
+
autoload :ListContainerItems, '2018-11-01/generated/azure_mgmt_storage/models/list_container_items.rb'
|
88
|
+
autoload :TrackedResource, '2018-11-01/generated/azure_mgmt_storage/models/tracked_resource.rb'
|
89
|
+
autoload :StorageAccount, '2018-11-01/generated/azure_mgmt_storage/models/storage_account.rb'
|
90
|
+
autoload :ManagementPolicy, '2018-11-01/generated/azure_mgmt_storage/models/management_policy.rb'
|
91
|
+
autoload :ProxyResource, '2018-11-01/generated/azure_mgmt_storage/models/proxy_resource.rb'
|
92
|
+
autoload :AzureEntityResource, '2018-11-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb'
|
93
|
+
autoload :BlobContainer, '2018-11-01/generated/azure_mgmt_storage/models/blob_container.rb'
|
94
|
+
autoload :ImmutabilityPolicy, '2018-11-01/generated/azure_mgmt_storage/models/immutability_policy.rb'
|
95
|
+
autoload :ListContainerItem, '2018-11-01/generated/azure_mgmt_storage/models/list_container_item.rb'
|
96
|
+
autoload :BlobServiceProperties, '2018-11-01/generated/azure_mgmt_storage/models/blob_service_properties.rb'
|
97
|
+
autoload :ReasonCode, '2018-11-01/generated/azure_mgmt_storage/models/reason_code.rb'
|
98
|
+
autoload :SkuName, '2018-11-01/generated/azure_mgmt_storage/models/sku_name.rb'
|
99
|
+
autoload :SkuTier, '2018-11-01/generated/azure_mgmt_storage/models/sku_tier.rb'
|
100
|
+
autoload :Kind, '2018-11-01/generated/azure_mgmt_storage/models/kind.rb'
|
101
|
+
autoload :Reason, '2018-11-01/generated/azure_mgmt_storage/models/reason.rb'
|
102
|
+
autoload :KeySource, '2018-11-01/generated/azure_mgmt_storage/models/key_source.rb'
|
103
|
+
autoload :Action, '2018-11-01/generated/azure_mgmt_storage/models/action.rb'
|
104
|
+
autoload :State, '2018-11-01/generated/azure_mgmt_storage/models/state.rb'
|
105
|
+
autoload :Bypass, '2018-11-01/generated/azure_mgmt_storage/models/bypass.rb'
|
106
|
+
autoload :DefaultAction, '2018-11-01/generated/azure_mgmt_storage/models/default_action.rb'
|
107
|
+
autoload :AccessTier, '2018-11-01/generated/azure_mgmt_storage/models/access_tier.rb'
|
108
|
+
autoload :GeoReplicationStatus, '2018-11-01/generated/azure_mgmt_storage/models/geo_replication_status.rb'
|
109
|
+
autoload :ProvisioningState, '2018-11-01/generated/azure_mgmt_storage/models/provisioning_state.rb'
|
110
|
+
autoload :AccountStatus, '2018-11-01/generated/azure_mgmt_storage/models/account_status.rb'
|
111
|
+
autoload :KeyPermission, '2018-11-01/generated/azure_mgmt_storage/models/key_permission.rb'
|
112
|
+
autoload :UsageUnit, '2018-11-01/generated/azure_mgmt_storage/models/usage_unit.rb'
|
113
|
+
autoload :Services, '2018-11-01/generated/azure_mgmt_storage/models/services.rb'
|
114
|
+
autoload :SignedResourceTypes, '2018-11-01/generated/azure_mgmt_storage/models/signed_resource_types.rb'
|
115
|
+
autoload :Permissions, '2018-11-01/generated/azure_mgmt_storage/models/permissions.rb'
|
116
|
+
autoload :HttpProtocol, '2018-11-01/generated/azure_mgmt_storage/models/http_protocol.rb'
|
117
|
+
autoload :SignedResource, '2018-11-01/generated/azure_mgmt_storage/models/signed_resource.rb'
|
118
|
+
autoload :PublicAccess, '2018-11-01/generated/azure_mgmt_storage/models/public_access.rb'
|
119
|
+
autoload :LeaseStatus, '2018-11-01/generated/azure_mgmt_storage/models/lease_status.rb'
|
120
|
+
autoload :LeaseState, '2018-11-01/generated/azure_mgmt_storage/models/lease_state.rb'
|
121
|
+
autoload :LeaseDuration, '2018-11-01/generated/azure_mgmt_storage/models/lease_duration.rb'
|
122
|
+
autoload :ImmutabilityPolicyState, '2018-11-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb'
|
123
|
+
autoload :ImmutabilityPolicyUpdateType, '2018-11-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb'
|
124
|
+
autoload :StorageAccountExpand, '2018-11-01/generated/azure_mgmt_storage/models/storage_account_expand.rb'
|
125
|
+
end
|
126
|
+
end
|
data/lib/azure_mgmt_storage.rb
CHANGED
@@ -9,6 +9,7 @@ require '2016-01-01/generated/azure_mgmt_storage'
|
|
9
9
|
require '2018-07-01/generated/azure_mgmt_storage'
|
10
10
|
require '2015-06-15/generated/azure_mgmt_storage'
|
11
11
|
require '2015-05-01-preview/generated/azure_mgmt_storage'
|
12
|
+
require '2018-11-01/generated/azure_mgmt_storage'
|
12
13
|
require '2016-12-01/generated/azure_mgmt_storage'
|
13
14
|
require '2017-06-01/generated/azure_mgmt_storage'
|
14
15
|
require 'profiles/v2017_03_09/storage_v2017_03_09_profile_client'
|