azure_mgmt_storage 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage.rb +50 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/account_status.rb +16 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/account_type.rb +19 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/check_name_availability_result.rb +70 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/custom_domain.rb +57 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/endpoints.rb +65 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/key_name.rb +16 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/reason.rb +16 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/resource.rb +95 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account.rb +219 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +56 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +92 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account_keys.rb +54 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account_list_result.rb +96 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +46 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +108 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/sub_resource.rb +45 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/usage.rb +80 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/usage_list_result.rb +52 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/usage_name.rb +54 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_accounts.rb +1262 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +135 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/usage_operations.rb +111 -0
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/version.rb +8 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage.rb +48 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/account_status.rb +16 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/account_type.rb +19 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/check_name_availability_result.rb +70 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/custom_domain.rb +56 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/endpoints.rb +75 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_storage/models/provisioning_state.rb +1 -1
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_storage/models/reason.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/resource.rb +94 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/storage_account.rb +218 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +56 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +84 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/storage_account_keys.rb +54 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/storage_account_list_result.rb +53 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +44 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +80 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/usage.rb +80 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/usage_list_result.rb +52 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/models/usage_name.rb +54 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_storage/models/usage_unit.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/storage_accounts.rb +1044 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +135 -0
- data/lib/2015-06-15/generated/azure_mgmt_storage/usage_operations.rb +111 -0
- data/lib/{generated → 2015-06-15/generated}/azure_mgmt_storage/version.rb +2 -2
- data/lib/2016-01-01/generated/azure_mgmt_storage.rb +57 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/access_tier.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/account_status.rb +16 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/check_name_availability_result.rb +1 -1
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/custom_domain.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/encryption.rb +59 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/encryption_service.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/encryption_services.rb +46 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/endpoints.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/key_permission.rb +16 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/kind.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/reason.rb +16 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/resource.rb +96 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/sku.rb +61 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/sku_name.rb +1 -1
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/sku_tier.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/storage_account.rb +267 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +58 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +133 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/storage_account_key.rb +69 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/storage_account_list_keys_result.rb +1 -1
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/storage_account_list_result.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +45 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +109 -0
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/usage.rb +1 -1
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/usage_list_result.rb +1 -1
- data/lib/{generated → 2016-01-01/generated}/azure_mgmt_storage/models/usage_name.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/storage_accounts.rb +1044 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +135 -0
- data/lib/2016-01-01/generated/azure_mgmt_storage/usage_operations.rb +111 -0
- data/lib/{generated/azure_mgmt_storage/module_definition.rb → 2016-01-01/generated/azure_mgmt_storage/version.rb} +3 -3
- data/lib/2016-12-01/generated/azure_mgmt_storage.rb +62 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/access_tier.rb +16 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb +127 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/account_status.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb +73 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/custom_domain.rb +57 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/encryption.rb +59 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/encryption_service.rb +59 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/encryption_services.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/endpoints.rb +79 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/http_protocol.rb +1 -1
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/key_permission.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/kind.rb +16 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/list_account_sas_response.rb +1 -1
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/reason.rb +16 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/resource.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +228 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/sku.rb +61 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/sku_name.rb +19 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/sku_tier.rb +16 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account.rb +279 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +57 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +145 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/models/storage_account_key.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +54 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb +54 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +44 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +121 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/usage.rb +84 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/usage_list_result.rb +53 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/usage_name.rb +56 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
- data/lib/2016-12-01/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/storage_accounts.rb +18 -18
- data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +135 -0
- data/lib/{generated → 2016-12-01/generated}/azure_mgmt_storage/usage_operations.rb +2 -2
- data/lib/2016-12-01/generated/azure_mgmt_storage/version.rb +8 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage.rb +64 -64
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/access_tier.rb +16 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/account_sas_parameters.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/account_status.rb +16 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/action.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/bypass.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb +73 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/custom_domain.rb +57 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/default_action.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/dimension.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/encryption.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/encryption_service.rb +59 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/encryption_services.rb +84 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/endpoints.rb +79 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/http_protocol.rb +16 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/identity.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/iprule.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/key_permission.rb +16 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/key_source.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/key_vault_properties.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/kind.rb +16 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb +45 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +45 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/metric_specification.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/network_rule_set.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/operation.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/operation_display.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/operation_list_result.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/permissions.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/reason.rb +16 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/reason_code.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/resource.rb +95 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/restriction.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/service_specification.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/services.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/signed_resource.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/signed_resource_types.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/sku.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/sku_name.rb +19 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/sku_tier.rb +16 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/skucapability.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/state.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/storage_account.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/storage_account_create_parameters.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/storage_account_key.rb +69 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +54 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb +54 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/storage_account_update_parameters.rb +1 -1
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/storage_sku_list_result.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/usage.rb +84 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/usage_list_result.rb +53 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/usage_name.rb +56 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/models/virtual_network_rule.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/operations.rb +2 -2
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/skus.rb +2 -2
- data/lib/2017-06-01/generated/azure_mgmt_storage/storage_accounts.rb +1276 -0
- data/lib/{generated → 2017-06-01/generated}/azure_mgmt_storage/storage_management_client.rb +3 -3
- data/lib/2017-06-01/generated/azure_mgmt_storage/usage_operations.rb +111 -0
- data/lib/2017-06-01/generated/azure_mgmt_storage/version.rb +8 -0
- data/lib/azure_mgmt_storage.rb +7 -1
- data/lib/module_definition.rb +8 -0
- data/lib/profiles/common/configurable.rb +73 -0
- data/lib/profiles/common/default.rb +68 -0
- data/lib/profiles/latest/modules/storage_profile_module.rb +276 -0
- data/lib/profiles/latest/storage_latest_profile_client.rb +33 -0
- data/lib/profiles/latest/storage_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/modules/storage_profile_module.rb +120 -0
- data/lib/profiles/v2017_03_09/storage_module_definition.rb +9 -0
- data/lib/profiles/v2017_03_09/storage_v2017_03_09_profile_client.rb +33 -0
- data/lib/version.rb +7 -0
- metadata +202 -67
@@ -0,0 +1,46 @@
|
|
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::V2015_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class StorageAccountRegenerateKeyParameters
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [KeyName] Possible values include: 'key1', 'key2'
|
17
|
+
attr_accessor :key_name
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for StorageAccountRegenerateKeyParameters class as Ruby Hash.
|
22
|
+
# This will be used for serialization/deserialization.
|
23
|
+
#
|
24
|
+
def self.mapper()
|
25
|
+
{
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'StorageAccountRegenerateKeyParameters',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'StorageAccountRegenerateKeyParameters',
|
31
|
+
model_properties: {
|
32
|
+
key_name: {
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'keyName',
|
35
|
+
type: {
|
36
|
+
name: 'Enum',
|
37
|
+
module: 'KeyName'
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/2015-05-01-preview/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb
ADDED
@@ -0,0 +1,108 @@
|
|
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::V2015_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The parameters to update on the account.
|
10
|
+
#
|
11
|
+
class StorageAccountUpdateParameters < Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [AccountType] Gets or sets the account type. Note that
|
16
|
+
# StandardZRS and PremiumLRS accounts cannot be changed to other account
|
17
|
+
# types, and other account types cannot be changed to StandardZRS or
|
18
|
+
# PremiumLRS. Possible values include: 'Standard_LRS', 'Standard_ZRS',
|
19
|
+
# 'Standard_GRS', 'Standard_RAGRS', 'Premium_LRS'
|
20
|
+
attr_accessor :account_type
|
21
|
+
|
22
|
+
# @return [CustomDomain] User domain assigned to the storage account.
|
23
|
+
# Name is the CNAME source. Only one custom domain is supported per
|
24
|
+
# storage account at this time. To clear the existing custom domain, use
|
25
|
+
# an empty string for the custom domain name property.
|
26
|
+
attr_accessor :custom_domain
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# Mapper for StorageAccountUpdateParameters class as Ruby Hash.
|
31
|
+
# This will be used for serialization/deserialization.
|
32
|
+
#
|
33
|
+
def self.mapper()
|
34
|
+
{
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'StorageAccountUpdateParameters',
|
37
|
+
type: {
|
38
|
+
name: 'Composite',
|
39
|
+
class_name: 'StorageAccountUpdateParameters',
|
40
|
+
model_properties: {
|
41
|
+
id: {
|
42
|
+
required: false,
|
43
|
+
read_only: true,
|
44
|
+
serialized_name: 'id',
|
45
|
+
type: {
|
46
|
+
name: 'String'
|
47
|
+
}
|
48
|
+
},
|
49
|
+
name: {
|
50
|
+
required: false,
|
51
|
+
read_only: true,
|
52
|
+
serialized_name: 'name',
|
53
|
+
type: {
|
54
|
+
name: 'String'
|
55
|
+
}
|
56
|
+
},
|
57
|
+
type: {
|
58
|
+
required: false,
|
59
|
+
read_only: true,
|
60
|
+
serialized_name: 'type',
|
61
|
+
type: {
|
62
|
+
name: 'String'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
location: {
|
66
|
+
required: true,
|
67
|
+
serialized_name: 'location',
|
68
|
+
type: {
|
69
|
+
name: 'String'
|
70
|
+
}
|
71
|
+
},
|
72
|
+
tags: {
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'tags',
|
75
|
+
type: {
|
76
|
+
name: 'Dictionary',
|
77
|
+
value: {
|
78
|
+
required: false,
|
79
|
+
serialized_name: 'StringElementType',
|
80
|
+
type: {
|
81
|
+
name: 'String'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
},
|
86
|
+
account_type: {
|
87
|
+
required: false,
|
88
|
+
serialized_name: 'properties.accountType',
|
89
|
+
type: {
|
90
|
+
name: 'Enum',
|
91
|
+
module: 'AccountType'
|
92
|
+
}
|
93
|
+
},
|
94
|
+
custom_domain: {
|
95
|
+
required: false,
|
96
|
+
serialized_name: 'properties.customDomain',
|
97
|
+
type: {
|
98
|
+
name: 'Composite',
|
99
|
+
class_name: 'CustomDomain'
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,45 @@
|
|
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::V2015_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class SubResource
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] Resource Id
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for SubResource class as Ruby Hash.
|
22
|
+
# This will be used for serialization/deserialization.
|
23
|
+
#
|
24
|
+
def self.mapper()
|
25
|
+
{
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'SubResource',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'SubResource',
|
31
|
+
model_properties: {
|
32
|
+
id: {
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'id',
|
35
|
+
type: {
|
36
|
+
name: 'String'
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,80 @@
|
|
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::V2015_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes Storage Resource Usage.
|
10
|
+
#
|
11
|
+
class Usage
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [UsageUnit] Gets the unit of measurement. Possible values
|
16
|
+
# include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond',
|
17
|
+
# 'BytesPerSecond'
|
18
|
+
attr_accessor :unit
|
19
|
+
|
20
|
+
# @return [Integer] Gets the current count of the allocated resources in
|
21
|
+
# the subscription.
|
22
|
+
attr_accessor :current_value
|
23
|
+
|
24
|
+
# @return [Integer] Gets the maximum count of the resources that can be
|
25
|
+
# allocated in the subscription.
|
26
|
+
attr_accessor :limit
|
27
|
+
|
28
|
+
# @return [UsageName] Gets the name of the type of usage.
|
29
|
+
attr_accessor :name
|
30
|
+
|
31
|
+
|
32
|
+
#
|
33
|
+
# Mapper for Usage class as Ruby Hash.
|
34
|
+
# This will be used for serialization/deserialization.
|
35
|
+
#
|
36
|
+
def self.mapper()
|
37
|
+
{
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'Usage',
|
40
|
+
type: {
|
41
|
+
name: 'Composite',
|
42
|
+
class_name: 'Usage',
|
43
|
+
model_properties: {
|
44
|
+
unit: {
|
45
|
+
required: false,
|
46
|
+
serialized_name: 'unit',
|
47
|
+
type: {
|
48
|
+
name: 'Enum',
|
49
|
+
module: 'UsageUnit'
|
50
|
+
}
|
51
|
+
},
|
52
|
+
current_value: {
|
53
|
+
required: false,
|
54
|
+
serialized_name: 'currentValue',
|
55
|
+
type: {
|
56
|
+
name: 'Number'
|
57
|
+
}
|
58
|
+
},
|
59
|
+
limit: {
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'limit',
|
62
|
+
type: {
|
63
|
+
name: 'Number'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
name: {
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'name',
|
69
|
+
type: {
|
70
|
+
name: 'Composite',
|
71
|
+
class_name: 'UsageName'
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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::V2015_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The List Usages operation response.
|
10
|
+
#
|
11
|
+
class UsageListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<Usage>] Gets or sets the list Storage Resource Usages.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for UsageListResult class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
required: false,
|
26
|
+
serialized_name: 'UsageListResult',
|
27
|
+
type: {
|
28
|
+
name: 'Composite',
|
29
|
+
class_name: 'UsageListResult',
|
30
|
+
model_properties: {
|
31
|
+
value: {
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'value',
|
34
|
+
type: {
|
35
|
+
name: 'Sequence',
|
36
|
+
element: {
|
37
|
+
required: false,
|
38
|
+
serialized_name: 'UsageElementType',
|
39
|
+
type: {
|
40
|
+
name: 'Composite',
|
41
|
+
class_name: 'Usage'
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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::V2015_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Usage Names.
|
10
|
+
#
|
11
|
+
class UsageName
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets a string describing the resource name.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# @return [String] Gets a localized string describing the resource name.
|
19
|
+
attr_accessor :localized_value
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for UsageName class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
required: false,
|
29
|
+
serialized_name: 'UsageName',
|
30
|
+
type: {
|
31
|
+
name: 'Composite',
|
32
|
+
class_name: 'UsageName',
|
33
|
+
model_properties: {
|
34
|
+
value: {
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'value',
|
37
|
+
type: {
|
38
|
+
name: 'String'
|
39
|
+
}
|
40
|
+
},
|
41
|
+
localized_value: {
|
42
|
+
required: false,
|
43
|
+
serialized_name: 'localizedValue',
|
44
|
+
type: {
|
45
|
+
name: 'String'
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,20 @@
|
|
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::V2015_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for UsageUnit
|
10
|
+
#
|
11
|
+
module UsageUnit
|
12
|
+
Count = "Count"
|
13
|
+
Bytes = "Bytes"
|
14
|
+
Seconds = "Seconds"
|
15
|
+
Percent = "Percent"
|
16
|
+
CountsPerSecond = "CountsPerSecond"
|
17
|
+
BytesPerSecond = "BytesPerSecond"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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 end
|
7
|
+
module Azure::Storage end
|
8
|
+
module Azure::Storage::Mgmt end
|
9
|
+
module Azure::Storage::Mgmt::V2015_05_01_preview end
|
@@ -0,0 +1,1262 @@
|
|
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::V2015_05_01_preview
|
7
|
+
#
|
8
|
+
# The Storage Management Client.
|
9
|
+
#
|
10
|
+
class StorageAccounts
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the StorageAccounts 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
|
+
# Checks that account name is valid and is not in use.
|
26
|
+
#
|
27
|
+
# @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
|
28
|
+
# of the storage account within the specified resource group. Storage account
|
29
|
+
# names must be between 3 and 24 characters in length and use numbers and
|
30
|
+
# lower-case letters only.
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
# @return [CheckNameAvailabilityResult] operation results.
|
35
|
+
#
|
36
|
+
def check_name_availability(account_name, custom_headers = nil)
|
37
|
+
response = check_name_availability_async(account_name, custom_headers).value!
|
38
|
+
response.body unless response.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Checks that account name is valid and is not in use.
|
43
|
+
#
|
44
|
+
# @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
|
45
|
+
# of the storage account within the specified resource group. Storage account
|
46
|
+
# names must be between 3 and 24 characters in length and use numbers and
|
47
|
+
# lower-case letters only.
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
52
|
+
#
|
53
|
+
def check_name_availability_with_http_info(account_name, custom_headers = nil)
|
54
|
+
check_name_availability_async(account_name, custom_headers).value!
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Checks that account name is valid and is not in use.
|
59
|
+
#
|
60
|
+
# @param account_name [StorageAccountCheckNameAvailabilityParameters] The name
|
61
|
+
# of the storage account within the specified resource group. Storage account
|
62
|
+
# names must be between 3 and 24 characters in length and use numbers and
|
63
|
+
# lower-case letters only.
|
64
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
65
|
+
# to the HTTP request.
|
66
|
+
#
|
67
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
68
|
+
#
|
69
|
+
def check_name_availability_async(account_name, custom_headers = nil)
|
70
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
71
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
72
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
73
|
+
|
74
|
+
|
75
|
+
request_headers = {}
|
76
|
+
|
77
|
+
# Set Headers
|
78
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
79
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
80
|
+
|
81
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
82
|
+
|
83
|
+
# Serialize Request
|
84
|
+
request_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountCheckNameAvailabilityParameters.mapper()
|
85
|
+
request_content = @client.serialize(request_mapper, account_name)
|
86
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
87
|
+
|
88
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability'
|
89
|
+
|
90
|
+
request_url = @base_url || @client.base_url
|
91
|
+
|
92
|
+
options = {
|
93
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
94
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
95
|
+
query_params: {'api-version' => @client.api_version},
|
96
|
+
body: request_content,
|
97
|
+
headers: request_headers.merge(custom_headers || {}),
|
98
|
+
base_url: request_url
|
99
|
+
}
|
100
|
+
promise = @client.make_request_async(:post, path_template, options)
|
101
|
+
|
102
|
+
promise = promise.then do |result|
|
103
|
+
http_response = result.response
|
104
|
+
status_code = http_response.status
|
105
|
+
response_content = http_response.body
|
106
|
+
unless status_code == 200
|
107
|
+
error_model = JSON.load(response_content)
|
108
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
109
|
+
end
|
110
|
+
|
111
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
112
|
+
# Deserialize Response
|
113
|
+
if status_code == 200
|
114
|
+
begin
|
115
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
116
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::CheckNameAvailabilityResult.mapper()
|
117
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
118
|
+
rescue Exception => e
|
119
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
result
|
124
|
+
end
|
125
|
+
|
126
|
+
promise.execute
|
127
|
+
end
|
128
|
+
|
129
|
+
#
|
130
|
+
# Asynchronously creates a new storage account with the specified parameters.
|
131
|
+
# Existing accounts cannot be updated with this API and should instead use the
|
132
|
+
# Update Storage Account API. If an account is already created and subsequent
|
133
|
+
# PUT request is issued with exact same set of properties, then HTTP 200 would
|
134
|
+
# be returned.
|
135
|
+
#
|
136
|
+
# @param resource_group_name [String] The name of the resource group within the
|
137
|
+
# user's subscription.
|
138
|
+
# @param account_name [String] The name of the storage account within the
|
139
|
+
# specified resource group. Storage account names must be between 3 and 24
|
140
|
+
# characters in length and use numbers and lower-case letters only.
|
141
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
142
|
+
# for the created account.
|
143
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
144
|
+
# will be added to the HTTP request.
|
145
|
+
#
|
146
|
+
# @return [StorageAccount] operation results.
|
147
|
+
#
|
148
|
+
def create(resource_group_name, account_name, parameters, custom_headers = nil)
|
149
|
+
response = create_async(resource_group_name, account_name, parameters, custom_headers).value!
|
150
|
+
response.body unless response.nil?
|
151
|
+
end
|
152
|
+
|
153
|
+
#
|
154
|
+
# @param resource_group_name [String] The name of the resource group within the
|
155
|
+
# user's subscription.
|
156
|
+
# @param account_name [String] The name of the storage account within the
|
157
|
+
# specified resource group. Storage account names must be between 3 and 24
|
158
|
+
# characters in length and use numbers and lower-case letters only.
|
159
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
160
|
+
# for the created account.
|
161
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
162
|
+
# will be added to the HTTP request.
|
163
|
+
#
|
164
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
165
|
+
# response.
|
166
|
+
#
|
167
|
+
def create_async(resource_group_name, account_name, parameters, custom_headers = nil)
|
168
|
+
# Send request
|
169
|
+
promise = begin_create_async(resource_group_name, account_name, parameters, custom_headers)
|
170
|
+
|
171
|
+
promise = promise.then do |response|
|
172
|
+
# Defining deserialization method.
|
173
|
+
deserialize_method = lambda do |parsed_response|
|
174
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccount.mapper()
|
175
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
176
|
+
end
|
177
|
+
|
178
|
+
# Waiting for response.
|
179
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
180
|
+
end
|
181
|
+
|
182
|
+
promise
|
183
|
+
end
|
184
|
+
|
185
|
+
#
|
186
|
+
# Deletes a storage account in Microsoft Azure.
|
187
|
+
#
|
188
|
+
# @param resource_group_name [String] The name of the resource group within the
|
189
|
+
# user's subscription.
|
190
|
+
# @param account_name [String] The name of the storage account within the
|
191
|
+
# specified resource group. Storage account names must be between 3 and 24
|
192
|
+
# characters in length and use numbers and lower-case letters only.
|
193
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
194
|
+
# will be added to the HTTP request.
|
195
|
+
#
|
196
|
+
#
|
197
|
+
def delete(resource_group_name, account_name, custom_headers = nil)
|
198
|
+
response = delete_async(resource_group_name, account_name, custom_headers).value!
|
199
|
+
nil
|
200
|
+
end
|
201
|
+
|
202
|
+
#
|
203
|
+
# Deletes a storage account in Microsoft Azure.
|
204
|
+
#
|
205
|
+
# @param resource_group_name [String] The name of the resource group within the
|
206
|
+
# user's subscription.
|
207
|
+
# @param account_name [String] The name of the storage account within the
|
208
|
+
# specified resource group. Storage account names must be between 3 and 24
|
209
|
+
# characters in length and use numbers and lower-case letters only.
|
210
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
211
|
+
# will be added to the HTTP request.
|
212
|
+
#
|
213
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
214
|
+
#
|
215
|
+
def delete_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
216
|
+
delete_async(resource_group_name, account_name, custom_headers).value!
|
217
|
+
end
|
218
|
+
|
219
|
+
#
|
220
|
+
# Deletes a storage account in Microsoft Azure.
|
221
|
+
#
|
222
|
+
# @param resource_group_name [String] The name of the resource group within the
|
223
|
+
# user's subscription.
|
224
|
+
# @param account_name [String] The name of the storage account within the
|
225
|
+
# specified resource group. Storage account names must be between 3 and 24
|
226
|
+
# characters in length and use numbers and lower-case letters only.
|
227
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
228
|
+
# to the HTTP request.
|
229
|
+
#
|
230
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
231
|
+
#
|
232
|
+
def delete_async(resource_group_name, account_name, custom_headers = nil)
|
233
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
234
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
235
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
236
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
237
|
+
|
238
|
+
|
239
|
+
request_headers = {}
|
240
|
+
|
241
|
+
# Set Headers
|
242
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
243
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
244
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
245
|
+
|
246
|
+
request_url = @base_url || @client.base_url
|
247
|
+
|
248
|
+
options = {
|
249
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
250
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
251
|
+
query_params: {'api-version' => @client.api_version},
|
252
|
+
headers: request_headers.merge(custom_headers || {}),
|
253
|
+
base_url: request_url
|
254
|
+
}
|
255
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
256
|
+
|
257
|
+
promise = promise.then do |result|
|
258
|
+
http_response = result.response
|
259
|
+
status_code = http_response.status
|
260
|
+
response_content = http_response.body
|
261
|
+
unless status_code == 200 || status_code == 204
|
262
|
+
error_model = JSON.load(response_content)
|
263
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
264
|
+
end
|
265
|
+
|
266
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
267
|
+
|
268
|
+
result
|
269
|
+
end
|
270
|
+
|
271
|
+
promise.execute
|
272
|
+
end
|
273
|
+
|
274
|
+
#
|
275
|
+
# Returns the properties for the specified storage account including but not
|
276
|
+
# limited to name, account type, location, and account status. The ListKeys
|
277
|
+
# operation should be used to retrieve storage keys.
|
278
|
+
#
|
279
|
+
# @param resource_group_name [String] The name of the resource group within the
|
280
|
+
# user's subscription.
|
281
|
+
# @param account_name [String] The name of the storage account within the
|
282
|
+
# specified resource group. Storage account names must be between 3 and 24
|
283
|
+
# characters in length and use numbers and lower-case letters only.
|
284
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
285
|
+
# will be added to the HTTP request.
|
286
|
+
#
|
287
|
+
# @return [StorageAccount] operation results.
|
288
|
+
#
|
289
|
+
def get_properties(resource_group_name, account_name, custom_headers = nil)
|
290
|
+
response = get_properties_async(resource_group_name, account_name, custom_headers).value!
|
291
|
+
response.body unless response.nil?
|
292
|
+
end
|
293
|
+
|
294
|
+
#
|
295
|
+
# Returns the properties for the specified storage account including but not
|
296
|
+
# limited to name, account type, location, and account status. The ListKeys
|
297
|
+
# operation should be used to retrieve storage keys.
|
298
|
+
#
|
299
|
+
# @param resource_group_name [String] The name of the resource group within the
|
300
|
+
# user's subscription.
|
301
|
+
# @param account_name [String] The name of the storage account within the
|
302
|
+
# specified resource group. Storage account names must be between 3 and 24
|
303
|
+
# characters in length and use numbers and lower-case letters only.
|
304
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
305
|
+
# will be added to the HTTP request.
|
306
|
+
#
|
307
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
308
|
+
#
|
309
|
+
def get_properties_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
310
|
+
get_properties_async(resource_group_name, account_name, custom_headers).value!
|
311
|
+
end
|
312
|
+
|
313
|
+
#
|
314
|
+
# Returns the properties for the specified storage account including but not
|
315
|
+
# limited to name, account type, location, and account status. The ListKeys
|
316
|
+
# operation should be used to retrieve storage keys.
|
317
|
+
#
|
318
|
+
# @param resource_group_name [String] The name of the resource group within the
|
319
|
+
# user's subscription.
|
320
|
+
# @param account_name [String] The name of the storage account within the
|
321
|
+
# specified resource group. Storage account names must be between 3 and 24
|
322
|
+
# characters in length and use numbers and lower-case letters only.
|
323
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
324
|
+
# to the HTTP request.
|
325
|
+
#
|
326
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
327
|
+
#
|
328
|
+
def get_properties_async(resource_group_name, account_name, custom_headers = nil)
|
329
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
330
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
331
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
332
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
333
|
+
|
334
|
+
|
335
|
+
request_headers = {}
|
336
|
+
|
337
|
+
# Set Headers
|
338
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
339
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
340
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
341
|
+
|
342
|
+
request_url = @base_url || @client.base_url
|
343
|
+
|
344
|
+
options = {
|
345
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
346
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
347
|
+
query_params: {'api-version' => @client.api_version},
|
348
|
+
headers: request_headers.merge(custom_headers || {}),
|
349
|
+
base_url: request_url
|
350
|
+
}
|
351
|
+
promise = @client.make_request_async(:get, path_template, options)
|
352
|
+
|
353
|
+
promise = promise.then do |result|
|
354
|
+
http_response = result.response
|
355
|
+
status_code = http_response.status
|
356
|
+
response_content = http_response.body
|
357
|
+
unless status_code == 200
|
358
|
+
error_model = JSON.load(response_content)
|
359
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
360
|
+
end
|
361
|
+
|
362
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
363
|
+
# Deserialize Response
|
364
|
+
if status_code == 200
|
365
|
+
begin
|
366
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
367
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccount.mapper()
|
368
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
369
|
+
rescue Exception => e
|
370
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
result
|
375
|
+
end
|
376
|
+
|
377
|
+
promise.execute
|
378
|
+
end
|
379
|
+
|
380
|
+
#
|
381
|
+
# Updates the account type or tags for a storage account. It can also be used
|
382
|
+
# to add a custom domain (note that custom domains cannot be added via the
|
383
|
+
# Create operation). Only one custom domain is supported per storage account.
|
384
|
+
# This API can only be used to update one of tags, accountType, or customDomain
|
385
|
+
# per call. To update multiple of these properties, call the API multiple times
|
386
|
+
# with one change per call. This call does not change the storage keys for the
|
387
|
+
# account. If you want to change storage account keys, use the RegenerateKey
|
388
|
+
# operation. The location and name of the storage account cannot be changed
|
389
|
+
# after creation.
|
390
|
+
#
|
391
|
+
# @param resource_group_name [String] The name of the resource group within the
|
392
|
+
# user's subscription.
|
393
|
+
# @param account_name [String] The name of the storage account within the
|
394
|
+
# specified resource group. Storage account names must be between 3 and 24
|
395
|
+
# characters in length and use numbers and lower-case letters only.
|
396
|
+
# @param parameters [StorageAccountUpdateParameters] The parameters to update
|
397
|
+
# on the account. Note that only one property can be changed at a time using
|
398
|
+
# this API.
|
399
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
400
|
+
# will be added to the HTTP request.
|
401
|
+
#
|
402
|
+
# @return [StorageAccount] operation results.
|
403
|
+
#
|
404
|
+
def update(resource_group_name, account_name, parameters, custom_headers = nil)
|
405
|
+
response = update_async(resource_group_name, account_name, parameters, custom_headers).value!
|
406
|
+
response.body unless response.nil?
|
407
|
+
end
|
408
|
+
|
409
|
+
#
|
410
|
+
# Updates the account type or tags for a storage account. It can also be used
|
411
|
+
# to add a custom domain (note that custom domains cannot be added via the
|
412
|
+
# Create operation). Only one custom domain is supported per storage account.
|
413
|
+
# This API can only be used to update one of tags, accountType, or customDomain
|
414
|
+
# per call. To update multiple of these properties, call the API multiple times
|
415
|
+
# with one change per call. This call does not change the storage keys for the
|
416
|
+
# account. If you want to change storage account keys, use the RegenerateKey
|
417
|
+
# operation. The location and name of the storage account cannot be changed
|
418
|
+
# after creation.
|
419
|
+
#
|
420
|
+
# @param resource_group_name [String] The name of the resource group within the
|
421
|
+
# user's subscription.
|
422
|
+
# @param account_name [String] The name of the storage account within the
|
423
|
+
# specified resource group. Storage account names must be between 3 and 24
|
424
|
+
# characters in length and use numbers and lower-case letters only.
|
425
|
+
# @param parameters [StorageAccountUpdateParameters] The parameters to update
|
426
|
+
# on the account. Note that only one property can be changed at a time using
|
427
|
+
# this API.
|
428
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
429
|
+
# will be added to the HTTP request.
|
430
|
+
#
|
431
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
432
|
+
#
|
433
|
+
def update_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil)
|
434
|
+
update_async(resource_group_name, account_name, parameters, custom_headers).value!
|
435
|
+
end
|
436
|
+
|
437
|
+
#
|
438
|
+
# Updates the account type or tags for a storage account. It can also be used
|
439
|
+
# to add a custom domain (note that custom domains cannot be added via the
|
440
|
+
# Create operation). Only one custom domain is supported per storage account.
|
441
|
+
# This API can only be used to update one of tags, accountType, or customDomain
|
442
|
+
# per call. To update multiple of these properties, call the API multiple times
|
443
|
+
# with one change per call. This call does not change the storage keys for the
|
444
|
+
# account. If you want to change storage account keys, use the RegenerateKey
|
445
|
+
# operation. The location and name of the storage account cannot be changed
|
446
|
+
# after creation.
|
447
|
+
#
|
448
|
+
# @param resource_group_name [String] The name of the resource group within the
|
449
|
+
# user's subscription.
|
450
|
+
# @param account_name [String] The name of the storage account within the
|
451
|
+
# specified resource group. Storage account names must be between 3 and 24
|
452
|
+
# characters in length and use numbers and lower-case letters only.
|
453
|
+
# @param parameters [StorageAccountUpdateParameters] The parameters to update
|
454
|
+
# on the account. Note that only one property can be changed at a time using
|
455
|
+
# this API.
|
456
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
457
|
+
# to the HTTP request.
|
458
|
+
#
|
459
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
460
|
+
#
|
461
|
+
def update_async(resource_group_name, account_name, parameters, custom_headers = nil)
|
462
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
463
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
464
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
465
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
466
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
467
|
+
|
468
|
+
|
469
|
+
request_headers = {}
|
470
|
+
|
471
|
+
# Set Headers
|
472
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
473
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
474
|
+
|
475
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
476
|
+
|
477
|
+
# Serialize Request
|
478
|
+
request_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountUpdateParameters.mapper()
|
479
|
+
request_content = @client.serialize(request_mapper, parameters)
|
480
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
481
|
+
|
482
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
483
|
+
|
484
|
+
request_url = @base_url || @client.base_url
|
485
|
+
|
486
|
+
options = {
|
487
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
488
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
489
|
+
query_params: {'api-version' => @client.api_version},
|
490
|
+
body: request_content,
|
491
|
+
headers: request_headers.merge(custom_headers || {}),
|
492
|
+
base_url: request_url
|
493
|
+
}
|
494
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
495
|
+
|
496
|
+
promise = promise.then do |result|
|
497
|
+
http_response = result.response
|
498
|
+
status_code = http_response.status
|
499
|
+
response_content = http_response.body
|
500
|
+
unless status_code == 200
|
501
|
+
error_model = JSON.load(response_content)
|
502
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
503
|
+
end
|
504
|
+
|
505
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
506
|
+
# Deserialize Response
|
507
|
+
if status_code == 200
|
508
|
+
begin
|
509
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
510
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccount.mapper()
|
511
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
512
|
+
rescue Exception => e
|
513
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
514
|
+
end
|
515
|
+
end
|
516
|
+
|
517
|
+
result
|
518
|
+
end
|
519
|
+
|
520
|
+
promise.execute
|
521
|
+
end
|
522
|
+
|
523
|
+
#
|
524
|
+
# Lists the access keys for the specified storage account.
|
525
|
+
#
|
526
|
+
# @param resource_group_name [String] The name of the resource group.
|
527
|
+
# @param account_name [String] The name of the storage account.
|
528
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
529
|
+
# will be added to the HTTP request.
|
530
|
+
#
|
531
|
+
# @return [StorageAccountKeys] operation results.
|
532
|
+
#
|
533
|
+
def list_keys(resource_group_name, account_name, custom_headers = nil)
|
534
|
+
response = list_keys_async(resource_group_name, account_name, custom_headers).value!
|
535
|
+
response.body unless response.nil?
|
536
|
+
end
|
537
|
+
|
538
|
+
#
|
539
|
+
# Lists the access keys for the specified storage account.
|
540
|
+
#
|
541
|
+
# @param resource_group_name [String] The name of the resource group.
|
542
|
+
# @param account_name [String] The name of the storage account.
|
543
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
544
|
+
# will be added to the HTTP request.
|
545
|
+
#
|
546
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
547
|
+
#
|
548
|
+
def list_keys_with_http_info(resource_group_name, account_name, custom_headers = nil)
|
549
|
+
list_keys_async(resource_group_name, account_name, custom_headers).value!
|
550
|
+
end
|
551
|
+
|
552
|
+
#
|
553
|
+
# Lists the access keys for the specified storage account.
|
554
|
+
#
|
555
|
+
# @param resource_group_name [String] The name of the resource group.
|
556
|
+
# @param account_name [String] The name of the storage account.
|
557
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
558
|
+
# to the HTTP request.
|
559
|
+
#
|
560
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
561
|
+
#
|
562
|
+
def list_keys_async(resource_group_name, account_name, custom_headers = nil)
|
563
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
564
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
565
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
566
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
567
|
+
|
568
|
+
|
569
|
+
request_headers = {}
|
570
|
+
|
571
|
+
# Set Headers
|
572
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
573
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
574
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys'
|
575
|
+
|
576
|
+
request_url = @base_url || @client.base_url
|
577
|
+
|
578
|
+
options = {
|
579
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
580
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
581
|
+
query_params: {'api-version' => @client.api_version},
|
582
|
+
headers: request_headers.merge(custom_headers || {}),
|
583
|
+
base_url: request_url
|
584
|
+
}
|
585
|
+
promise = @client.make_request_async(:post, path_template, options)
|
586
|
+
|
587
|
+
promise = promise.then do |result|
|
588
|
+
http_response = result.response
|
589
|
+
status_code = http_response.status
|
590
|
+
response_content = http_response.body
|
591
|
+
unless status_code == 200
|
592
|
+
error_model = JSON.load(response_content)
|
593
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
594
|
+
end
|
595
|
+
|
596
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
597
|
+
# Deserialize Response
|
598
|
+
if status_code == 200
|
599
|
+
begin
|
600
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
601
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountKeys.mapper()
|
602
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
603
|
+
rescue Exception => e
|
604
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
605
|
+
end
|
606
|
+
end
|
607
|
+
|
608
|
+
result
|
609
|
+
end
|
610
|
+
|
611
|
+
promise.execute
|
612
|
+
end
|
613
|
+
|
614
|
+
#
|
615
|
+
# Lists all the storage accounts available under the subscription. Note that
|
616
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
617
|
+
#
|
618
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
619
|
+
# will be added to the HTTP request.
|
620
|
+
#
|
621
|
+
# @return [Array<StorageAccount>] operation results.
|
622
|
+
#
|
623
|
+
def list(custom_headers = nil)
|
624
|
+
first_page = list_as_lazy(custom_headers)
|
625
|
+
first_page.get_all_items
|
626
|
+
end
|
627
|
+
|
628
|
+
#
|
629
|
+
# Lists all the storage accounts available under the subscription. Note that
|
630
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
631
|
+
#
|
632
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
633
|
+
# will be added to the HTTP request.
|
634
|
+
#
|
635
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
636
|
+
#
|
637
|
+
def list_with_http_info(custom_headers = nil)
|
638
|
+
list_async(custom_headers).value!
|
639
|
+
end
|
640
|
+
|
641
|
+
#
|
642
|
+
# Lists all the storage accounts available under the subscription. Note that
|
643
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
644
|
+
#
|
645
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
646
|
+
# to the HTTP request.
|
647
|
+
#
|
648
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
649
|
+
#
|
650
|
+
def list_async(custom_headers = nil)
|
651
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
652
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
653
|
+
|
654
|
+
|
655
|
+
request_headers = {}
|
656
|
+
|
657
|
+
# Set Headers
|
658
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
659
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
660
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts'
|
661
|
+
|
662
|
+
request_url = @base_url || @client.base_url
|
663
|
+
|
664
|
+
options = {
|
665
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
666
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
667
|
+
query_params: {'api-version' => @client.api_version},
|
668
|
+
headers: request_headers.merge(custom_headers || {}),
|
669
|
+
base_url: request_url
|
670
|
+
}
|
671
|
+
promise = @client.make_request_async(:get, path_template, options)
|
672
|
+
|
673
|
+
promise = promise.then do |result|
|
674
|
+
http_response = result.response
|
675
|
+
status_code = http_response.status
|
676
|
+
response_content = http_response.body
|
677
|
+
unless status_code == 200
|
678
|
+
error_model = JSON.load(response_content)
|
679
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
680
|
+
end
|
681
|
+
|
682
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
683
|
+
# Deserialize Response
|
684
|
+
if status_code == 200
|
685
|
+
begin
|
686
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
687
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountListResult.mapper()
|
688
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
689
|
+
rescue Exception => e
|
690
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
691
|
+
end
|
692
|
+
end
|
693
|
+
|
694
|
+
result
|
695
|
+
end
|
696
|
+
|
697
|
+
promise.execute
|
698
|
+
end
|
699
|
+
|
700
|
+
#
|
701
|
+
# Lists all the storage accounts available under the given resource group. Note
|
702
|
+
# that storage keys are not returned; use the ListKeys operation for this.
|
703
|
+
#
|
704
|
+
# @param resource_group_name [String] The name of the resource group within the
|
705
|
+
# user's subscription.
|
706
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
707
|
+
# will be added to the HTTP request.
|
708
|
+
#
|
709
|
+
# @return [Array<StorageAccount>] operation results.
|
710
|
+
#
|
711
|
+
def list_by_resource_group(resource_group_name, custom_headers = nil)
|
712
|
+
first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers)
|
713
|
+
first_page.get_all_items
|
714
|
+
end
|
715
|
+
|
716
|
+
#
|
717
|
+
# Lists all the storage accounts available under the given resource group. Note
|
718
|
+
# that storage keys are not returned; use the ListKeys operation for this.
|
719
|
+
#
|
720
|
+
# @param resource_group_name [String] The name of the resource group within the
|
721
|
+
# user's subscription.
|
722
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
723
|
+
# will be added to the HTTP request.
|
724
|
+
#
|
725
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
726
|
+
#
|
727
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers = nil)
|
728
|
+
list_by_resource_group_async(resource_group_name, custom_headers).value!
|
729
|
+
end
|
730
|
+
|
731
|
+
#
|
732
|
+
# Lists all the storage accounts available under the given resource group. Note
|
733
|
+
# that storage keys are not returned; use the ListKeys operation for this.
|
734
|
+
#
|
735
|
+
# @param resource_group_name [String] The name of the resource group within the
|
736
|
+
# user's subscription.
|
737
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
738
|
+
# to the HTTP request.
|
739
|
+
#
|
740
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
741
|
+
#
|
742
|
+
def list_by_resource_group_async(resource_group_name, custom_headers = nil)
|
743
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
744
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
745
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
746
|
+
|
747
|
+
|
748
|
+
request_headers = {}
|
749
|
+
|
750
|
+
# Set Headers
|
751
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
752
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
753
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts'
|
754
|
+
|
755
|
+
request_url = @base_url || @client.base_url
|
756
|
+
|
757
|
+
options = {
|
758
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
759
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
760
|
+
query_params: {'api-version' => @client.api_version},
|
761
|
+
headers: request_headers.merge(custom_headers || {}),
|
762
|
+
base_url: request_url
|
763
|
+
}
|
764
|
+
promise = @client.make_request_async(:get, path_template, options)
|
765
|
+
|
766
|
+
promise = promise.then do |result|
|
767
|
+
http_response = result.response
|
768
|
+
status_code = http_response.status
|
769
|
+
response_content = http_response.body
|
770
|
+
unless status_code == 200
|
771
|
+
error_model = JSON.load(response_content)
|
772
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
773
|
+
end
|
774
|
+
|
775
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
776
|
+
# Deserialize Response
|
777
|
+
if status_code == 200
|
778
|
+
begin
|
779
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
780
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountListResult.mapper()
|
781
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
782
|
+
rescue Exception => e
|
783
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
784
|
+
end
|
785
|
+
end
|
786
|
+
|
787
|
+
result
|
788
|
+
end
|
789
|
+
|
790
|
+
promise.execute
|
791
|
+
end
|
792
|
+
|
793
|
+
#
|
794
|
+
# Regenerates the access keys for the specified storage account.
|
795
|
+
#
|
796
|
+
# @param resource_group_name [String] The name of the resource group within the
|
797
|
+
# user's subscription.
|
798
|
+
# @param account_name [String] The name of the storage account within the
|
799
|
+
# specified resource group. Storage account names must be between 3 and 24
|
800
|
+
# characters in length and use numbers and lower-case letters only.
|
801
|
+
# @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
|
802
|
+
# of the key which should be regenerated.
|
803
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
804
|
+
# will be added to the HTTP request.
|
805
|
+
#
|
806
|
+
# @return [StorageAccountKeys] operation results.
|
807
|
+
#
|
808
|
+
def regenerate_key(resource_group_name, account_name, regenerate_key, custom_headers = nil)
|
809
|
+
response = regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers).value!
|
810
|
+
response.body unless response.nil?
|
811
|
+
end
|
812
|
+
|
813
|
+
#
|
814
|
+
# Regenerates the access keys for the specified storage account.
|
815
|
+
#
|
816
|
+
# @param resource_group_name [String] The name of the resource group within the
|
817
|
+
# user's subscription.
|
818
|
+
# @param account_name [String] The name of the storage account within the
|
819
|
+
# specified resource group. Storage account names must be between 3 and 24
|
820
|
+
# characters in length and use numbers and lower-case letters only.
|
821
|
+
# @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
|
822
|
+
# of the key which should be regenerated.
|
823
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
824
|
+
# will be added to the HTTP request.
|
825
|
+
#
|
826
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
827
|
+
#
|
828
|
+
def regenerate_key_with_http_info(resource_group_name, account_name, regenerate_key, custom_headers = nil)
|
829
|
+
regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers).value!
|
830
|
+
end
|
831
|
+
|
832
|
+
#
|
833
|
+
# Regenerates the access keys for the specified storage account.
|
834
|
+
#
|
835
|
+
# @param resource_group_name [String] The name of the resource group within the
|
836
|
+
# user's subscription.
|
837
|
+
# @param account_name [String] The name of the storage account within the
|
838
|
+
# specified resource group. Storage account names must be between 3 and 24
|
839
|
+
# characters in length and use numbers and lower-case letters only.
|
840
|
+
# @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name
|
841
|
+
# of the key which should be regenerated.
|
842
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
843
|
+
# to the HTTP request.
|
844
|
+
#
|
845
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
846
|
+
#
|
847
|
+
def regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers = nil)
|
848
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
849
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
850
|
+
fail ArgumentError, 'regenerate_key is nil' if regenerate_key.nil?
|
851
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
852
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
853
|
+
|
854
|
+
|
855
|
+
request_headers = {}
|
856
|
+
|
857
|
+
# Set Headers
|
858
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
859
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
860
|
+
|
861
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
862
|
+
|
863
|
+
# Serialize Request
|
864
|
+
request_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountRegenerateKeyParameters.mapper()
|
865
|
+
request_content = @client.serialize(request_mapper, regenerate_key)
|
866
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
867
|
+
|
868
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey'
|
869
|
+
|
870
|
+
request_url = @base_url || @client.base_url
|
871
|
+
|
872
|
+
options = {
|
873
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
874
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
875
|
+
query_params: {'api-version' => @client.api_version},
|
876
|
+
body: request_content,
|
877
|
+
headers: request_headers.merge(custom_headers || {}),
|
878
|
+
base_url: request_url
|
879
|
+
}
|
880
|
+
promise = @client.make_request_async(:post, path_template, options)
|
881
|
+
|
882
|
+
promise = promise.then do |result|
|
883
|
+
http_response = result.response
|
884
|
+
status_code = http_response.status
|
885
|
+
response_content = http_response.body
|
886
|
+
unless status_code == 200
|
887
|
+
error_model = JSON.load(response_content)
|
888
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
889
|
+
end
|
890
|
+
|
891
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
892
|
+
# Deserialize Response
|
893
|
+
if status_code == 200
|
894
|
+
begin
|
895
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
896
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountKeys.mapper()
|
897
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
898
|
+
rescue Exception => e
|
899
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
900
|
+
end
|
901
|
+
end
|
902
|
+
|
903
|
+
result
|
904
|
+
end
|
905
|
+
|
906
|
+
promise.execute
|
907
|
+
end
|
908
|
+
|
909
|
+
#
|
910
|
+
# Asynchronously creates a new storage account with the specified parameters.
|
911
|
+
# Existing accounts cannot be updated with this API and should instead use the
|
912
|
+
# Update Storage Account API. If an account is already created and subsequent
|
913
|
+
# PUT request is issued with exact same set of properties, then HTTP 200 would
|
914
|
+
# be returned.
|
915
|
+
#
|
916
|
+
# @param resource_group_name [String] The name of the resource group within the
|
917
|
+
# user's subscription.
|
918
|
+
# @param account_name [String] The name of the storage account within the
|
919
|
+
# specified resource group. Storage account names must be between 3 and 24
|
920
|
+
# characters in length and use numbers and lower-case letters only.
|
921
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
922
|
+
# for the created account.
|
923
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
924
|
+
# will be added to the HTTP request.
|
925
|
+
#
|
926
|
+
# @return [StorageAccount] operation results.
|
927
|
+
#
|
928
|
+
def begin_create(resource_group_name, account_name, parameters, custom_headers = nil)
|
929
|
+
response = begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
|
930
|
+
response.body unless response.nil?
|
931
|
+
end
|
932
|
+
|
933
|
+
#
|
934
|
+
# Asynchronously creates a new storage account with the specified parameters.
|
935
|
+
# Existing accounts cannot be updated with this API and should instead use the
|
936
|
+
# Update Storage Account API. If an account is already created and subsequent
|
937
|
+
# PUT request is issued with exact same set of properties, then HTTP 200 would
|
938
|
+
# be returned.
|
939
|
+
#
|
940
|
+
# @param resource_group_name [String] The name of the resource group within the
|
941
|
+
# user's subscription.
|
942
|
+
# @param account_name [String] The name of the storage account within the
|
943
|
+
# specified resource group. Storage account names must be between 3 and 24
|
944
|
+
# characters in length and use numbers and lower-case letters only.
|
945
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
946
|
+
# for the created account.
|
947
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
948
|
+
# will be added to the HTTP request.
|
949
|
+
#
|
950
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
951
|
+
#
|
952
|
+
def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers = nil)
|
953
|
+
begin_create_async(resource_group_name, account_name, parameters, custom_headers).value!
|
954
|
+
end
|
955
|
+
|
956
|
+
#
|
957
|
+
# Asynchronously creates a new storage account with the specified parameters.
|
958
|
+
# Existing accounts cannot be updated with this API and should instead use the
|
959
|
+
# Update Storage Account API. If an account is already created and subsequent
|
960
|
+
# PUT request is issued with exact same set of properties, then HTTP 200 would
|
961
|
+
# be returned.
|
962
|
+
#
|
963
|
+
# @param resource_group_name [String] The name of the resource group within the
|
964
|
+
# user's subscription.
|
965
|
+
# @param account_name [String] The name of the storage account within the
|
966
|
+
# specified resource group. Storage account names must be between 3 and 24
|
967
|
+
# characters in length and use numbers and lower-case letters only.
|
968
|
+
# @param parameters [StorageAccountCreateParameters] The parameters to provide
|
969
|
+
# for the created account.
|
970
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
971
|
+
# to the HTTP request.
|
972
|
+
#
|
973
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
974
|
+
#
|
975
|
+
def begin_create_async(resource_group_name, account_name, parameters, custom_headers = nil)
|
976
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
977
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
978
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
979
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
980
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
981
|
+
|
982
|
+
|
983
|
+
request_headers = {}
|
984
|
+
|
985
|
+
# Set Headers
|
986
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
987
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
988
|
+
|
989
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
990
|
+
|
991
|
+
# Serialize Request
|
992
|
+
request_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountCreateParameters.mapper()
|
993
|
+
request_content = @client.serialize(request_mapper, parameters)
|
994
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
995
|
+
|
996
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}'
|
997
|
+
|
998
|
+
request_url = @base_url || @client.base_url
|
999
|
+
|
1000
|
+
options = {
|
1001
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1002
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
1003
|
+
query_params: {'api-version' => @client.api_version},
|
1004
|
+
body: request_content,
|
1005
|
+
headers: request_headers.merge(custom_headers || {}),
|
1006
|
+
base_url: request_url
|
1007
|
+
}
|
1008
|
+
promise = @client.make_request_async(:put, path_template, options)
|
1009
|
+
|
1010
|
+
promise = promise.then do |result|
|
1011
|
+
http_response = result.response
|
1012
|
+
status_code = http_response.status
|
1013
|
+
response_content = http_response.body
|
1014
|
+
unless status_code == 200 || status_code == 202
|
1015
|
+
error_model = JSON.load(response_content)
|
1016
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1020
|
+
# Deserialize Response
|
1021
|
+
if status_code == 200
|
1022
|
+
begin
|
1023
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1024
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccount.mapper()
|
1025
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1026
|
+
rescue Exception => e
|
1027
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1028
|
+
end
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
result
|
1032
|
+
end
|
1033
|
+
|
1034
|
+
promise.execute
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
#
|
1038
|
+
# Lists all the storage accounts available under the subscription. Note that
|
1039
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
1040
|
+
#
|
1041
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1042
|
+
# to List operation.
|
1043
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1044
|
+
# will be added to the HTTP request.
|
1045
|
+
#
|
1046
|
+
# @return [StorageAccountListResult] operation results.
|
1047
|
+
#
|
1048
|
+
def list_next(next_page_link, custom_headers = nil)
|
1049
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
1050
|
+
response.body unless response.nil?
|
1051
|
+
end
|
1052
|
+
|
1053
|
+
#
|
1054
|
+
# Lists all the storage accounts available under the subscription. Note that
|
1055
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
1056
|
+
#
|
1057
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1058
|
+
# to List operation.
|
1059
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1060
|
+
# will be added to the HTTP request.
|
1061
|
+
#
|
1062
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1063
|
+
#
|
1064
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
1065
|
+
list_next_async(next_page_link, custom_headers).value!
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
#
|
1069
|
+
# Lists all the storage accounts available under the subscription. Note that
|
1070
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
1071
|
+
#
|
1072
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1073
|
+
# to List operation.
|
1074
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1075
|
+
# to the HTTP request.
|
1076
|
+
#
|
1077
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1078
|
+
#
|
1079
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
1080
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1081
|
+
|
1082
|
+
|
1083
|
+
request_headers = {}
|
1084
|
+
|
1085
|
+
# Set Headers
|
1086
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1087
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1088
|
+
path_template = '{nextLink}'
|
1089
|
+
|
1090
|
+
request_url = @base_url || @client.base_url
|
1091
|
+
|
1092
|
+
options = {
|
1093
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1094
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1095
|
+
headers: request_headers.merge(custom_headers || {}),
|
1096
|
+
base_url: request_url
|
1097
|
+
}
|
1098
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1099
|
+
|
1100
|
+
promise = promise.then do |result|
|
1101
|
+
http_response = result.response
|
1102
|
+
status_code = http_response.status
|
1103
|
+
response_content = http_response.body
|
1104
|
+
unless status_code == 200
|
1105
|
+
error_model = JSON.load(response_content)
|
1106
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1110
|
+
# Deserialize Response
|
1111
|
+
if status_code == 200
|
1112
|
+
begin
|
1113
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1114
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountListResult.mapper()
|
1115
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1116
|
+
rescue Exception => e
|
1117
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1118
|
+
end
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
result
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
promise.execute
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
#
|
1128
|
+
# Lists all the storage accounts available under the given resource group. Note
|
1129
|
+
# that storage keys are not returned; use the ListKeys operation for this.
|
1130
|
+
#
|
1131
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1132
|
+
# to List operation.
|
1133
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1134
|
+
# will be added to the HTTP request.
|
1135
|
+
#
|
1136
|
+
# @return [StorageAccountListResult] operation results.
|
1137
|
+
#
|
1138
|
+
def list_by_resource_group_next(next_page_link, custom_headers = nil)
|
1139
|
+
response = list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
1140
|
+
response.body unless response.nil?
|
1141
|
+
end
|
1142
|
+
|
1143
|
+
#
|
1144
|
+
# Lists all the storage accounts available under the given resource group. Note
|
1145
|
+
# that storage keys are not returned; use the ListKeys operation for this.
|
1146
|
+
#
|
1147
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1148
|
+
# to List operation.
|
1149
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1150
|
+
# will be added to the HTTP request.
|
1151
|
+
#
|
1152
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1153
|
+
#
|
1154
|
+
def list_by_resource_group_next_with_http_info(next_page_link, custom_headers = nil)
|
1155
|
+
list_by_resource_group_next_async(next_page_link, custom_headers).value!
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
#
|
1159
|
+
# Lists all the storage accounts available under the given resource group. Note
|
1160
|
+
# that storage keys are not returned; use the ListKeys operation for this.
|
1161
|
+
#
|
1162
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1163
|
+
# to List operation.
|
1164
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1165
|
+
# to the HTTP request.
|
1166
|
+
#
|
1167
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1168
|
+
#
|
1169
|
+
def list_by_resource_group_next_async(next_page_link, custom_headers = nil)
|
1170
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1171
|
+
|
1172
|
+
|
1173
|
+
request_headers = {}
|
1174
|
+
|
1175
|
+
# Set Headers
|
1176
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1177
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1178
|
+
path_template = '{nextLink}'
|
1179
|
+
|
1180
|
+
request_url = @base_url || @client.base_url
|
1181
|
+
|
1182
|
+
options = {
|
1183
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1184
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1185
|
+
headers: request_headers.merge(custom_headers || {}),
|
1186
|
+
base_url: request_url
|
1187
|
+
}
|
1188
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1189
|
+
|
1190
|
+
promise = promise.then do |result|
|
1191
|
+
http_response = result.response
|
1192
|
+
status_code = http_response.status
|
1193
|
+
response_content = http_response.body
|
1194
|
+
unless status_code == 200
|
1195
|
+
error_model = JSON.load(response_content)
|
1196
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1200
|
+
# Deserialize Response
|
1201
|
+
if status_code == 200
|
1202
|
+
begin
|
1203
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1204
|
+
result_mapper = Azure::Storage::Mgmt::V2015_05_01_preview::Models::StorageAccountListResult.mapper()
|
1205
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1206
|
+
rescue Exception => e
|
1207
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1208
|
+
end
|
1209
|
+
end
|
1210
|
+
|
1211
|
+
result
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
promise.execute
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
#
|
1218
|
+
# Lists all the storage accounts available under the subscription. Note that
|
1219
|
+
# storage keys are not returned; use the ListKeys operation for this.
|
1220
|
+
#
|
1221
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1222
|
+
# will be added to the HTTP request.
|
1223
|
+
#
|
1224
|
+
# @return [StorageAccountListResult] which provide lazy access to pages of the
|
1225
|
+
# response.
|
1226
|
+
#
|
1227
|
+
def list_as_lazy(custom_headers = nil)
|
1228
|
+
response = list_async(custom_headers).value!
|
1229
|
+
unless response.nil?
|
1230
|
+
page = response.body
|
1231
|
+
page.next_method = Proc.new do |next_page_link|
|
1232
|
+
list_next_async(next_page_link, custom_headers)
|
1233
|
+
end
|
1234
|
+
page
|
1235
|
+
end
|
1236
|
+
end
|
1237
|
+
|
1238
|
+
#
|
1239
|
+
# Lists all the storage accounts available under the given resource group. Note
|
1240
|
+
# that storage keys are not returned; use the ListKeys operation for this.
|
1241
|
+
#
|
1242
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1243
|
+
# user's subscription.
|
1244
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1245
|
+
# will be added to the HTTP request.
|
1246
|
+
#
|
1247
|
+
# @return [StorageAccountListResult] which provide lazy access to pages of the
|
1248
|
+
# response.
|
1249
|
+
#
|
1250
|
+
def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
|
1251
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers).value!
|
1252
|
+
unless response.nil?
|
1253
|
+
page = response.body
|
1254
|
+
page.next_method = Proc.new do |next_page_link|
|
1255
|
+
list_by_resource_group_next_async(next_page_link, custom_headers)
|
1256
|
+
end
|
1257
|
+
page
|
1258
|
+
end
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
end
|
1262
|
+
end
|