diff --git a/ChangeLog.md b/ChangeLog.md index 953d5ccc4..ecb782220 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,7 @@ +## 2018.09.28 - Azure Ruby SDK Release +* Released 0.17.2 version of azure_mgmt_storage to include latest changes to 2018-07-01 version. +* Released 0.18.6 version of azure_sdk to include the latest changes in azure_mgmt_storage. + ## 2018.09.21 - Azure Ruby SDK Release * Released 0.17.2 version of azure_mgmt_signalr to include the latest changes to 2018-03-01-preview version. * Released 0.18.5 version of azure_sdk to include the latest changes in azure_mgmt_signalr. diff --git a/azure_sdk/lib/azure_sdk/version.rb b/azure_sdk/lib/azure_sdk/version.rb index 901e01cda..9248834b1 100644 --- a/azure_sdk/lib/azure_sdk/version.rb +++ b/azure_sdk/lib/azure_sdk/version.rb @@ -3,5 +3,5 @@ # Licensed under the MIT License. See License.txt in the project root for license information. module Azure - VERSION = '0.18.5' + VERSION = '0.18.6' end diff --git a/azure_sdk/lib/latest/modules/storage_profile_module.rb b/azure_sdk/lib/latest/modules/storage_profile_module.rb index fbc28071f..624ac06d5 100644 --- a/azure_sdk/lib/latest/modules/storage_profile_module.rb +++ b/azure_sdk/lib/latest/modules/storage_profile_module.rb @@ -7,90 +7,90 @@ require 'azure_mgmt_storage' module Azure::Profiles::Latest module Storage module Mgmt - Operations = Azure::Storage::Mgmt::V2018_03_01_preview::Operations - Skus = Azure::Storage::Mgmt::V2018_03_01_preview::Skus - StorageAccounts = Azure::Storage::Mgmt::V2018_03_01_preview::StorageAccounts - Usages = Azure::Storage::Mgmt::V2018_03_01_preview::Usages - BlobContainers = Azure::Storage::Mgmt::V2018_03_01_preview::BlobContainers + Operations = Azure::Storage::Mgmt::V2018_07_01::Operations + Skus = Azure::Storage::Mgmt::V2018_07_01::Skus + StorageAccounts = Azure::Storage::Mgmt::V2018_07_01::StorageAccounts + Usages = Azure::Storage::Mgmt::V2018_07_01::Usages + BlobContainers = Azure::Storage::Mgmt::V2018_07_01::BlobContainers module Models - StorageAccountListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListResult - StorageAccountListKeysResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListKeysResult - Dimension = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Dimension - StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountRegenerateKeyParameters - ServiceSpecification = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSpecification - StorageAccountUpdateParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountUpdateParameters - OperationListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationListResult - UsageName = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageName - SKUCapability = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SKUCapability - Usage = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Usage - Sku = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Sku - UsageListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageListResult - CheckNameAvailabilityResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityResult - AccountSasParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountSasParameters - EncryptionService = Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionService - ListAccountSasResponse = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListAccountSasResponse - KeyVaultProperties = Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyVaultProperties - ServiceSasParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSasParameters - VirtualNetworkRule = Azure::Storage::Mgmt::V2018_03_01_preview::Models::VirtualNetworkRule - ListServiceSasResponse = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListServiceSasResponse - NetworkRuleSet = Azure::Storage::Mgmt::V2018_03_01_preview::Models::NetworkRuleSet - EncryptionServices = Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionServices - Encryption = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Encryption - Endpoints = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Endpoints - IPRule = Azure::Storage::Mgmt::V2018_03_01_preview::Models::IPRule - StorageAccountKey = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountKey - Identity = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Identity - MetricSpecification = Azure::Storage::Mgmt::V2018_03_01_preview::Models::MetricSpecification - StorageAccountCheckNameAvailabilityParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCheckNameAvailabilityParameters ManagementPoliciesRulesSetParameter = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ManagementPoliciesRulesSetParameter - StorageSkuListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageSkuListResult - ListContainerItems = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItems - StorageAccountCreateParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCreateParameters - LegalHold = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold - OperationDisplay = Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationDisplay - LegalHoldProperties = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHoldProperties - Restriction = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Restriction - Resource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Resource - TagProperty = Azure::Storage::Mgmt::V2018_03_01_preview::Models::TagProperty - Operation = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Operation - UpdateHistoryProperty = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UpdateHistoryProperty - CustomDomain = Azure::Storage::Mgmt::V2018_03_01_preview::Models::CustomDomain - ImmutabilityPolicyProperties = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyProperties - StorageAccount = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccount StorageAccountManagementPolicies = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountManagementPolicies - ProxyResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProxyResource - TrackedResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::TrackedResource - AzureEntityResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AzureEntityResource - BlobContainer = Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer - ImmutabilityPolicy = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy - ListContainerItem = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItem - ReasonCode = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ReasonCode - SkuName = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuName - SkuTier = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuTier - Kind = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Kind - Reason = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Reason - KeySource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeySource - Action = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Action - State = Azure::Storage::Mgmt::V2018_03_01_preview::Models::State - Bypass = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Bypass - DefaultAction = Azure::Storage::Mgmt::V2018_03_01_preview::Models::DefaultAction - AccessTier = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccessTier - ProvisioningState = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProvisioningState - AccountStatus = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountStatus - KeyPermission = Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyPermission - UsageUnit = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageUnit - Services = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Services - SignedResourceTypes = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResourceTypes - Permissions = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Permissions - HttpProtocol = Azure::Storage::Mgmt::V2018_03_01_preview::Models::HttpProtocol - SignedResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResource - PublicAccess = Azure::Storage::Mgmt::V2018_03_01_preview::Models::PublicAccess - LeaseStatus = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseStatus - LeaseState = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseState - LeaseDuration = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseDuration - ImmutabilityPolicyState = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyState - ImmutabilityPolicyUpdateType = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyUpdateType + StorageAccountKey = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountKey + StorageAccountListResult = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListResult + Dimension = Azure::Storage::Mgmt::V2018_07_01::Models::Dimension + StorageAccountListKeysResult = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListKeysResult + ServiceSpecification = Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSpecification + StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountRegenerateKeyParameters + OperationListResult = Azure::Storage::Mgmt::V2018_07_01::Models::OperationListResult + StorageAccountUpdateParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountUpdateParameters + SKUCapability = Azure::Storage::Mgmt::V2018_07_01::Models::SKUCapability + UsageName = Azure::Storage::Mgmt::V2018_07_01::Models::UsageName + Sku = Azure::Storage::Mgmt::V2018_07_01::Models::Sku + Usage = Azure::Storage::Mgmt::V2018_07_01::Models::Usage + CheckNameAvailabilityResult = Azure::Storage::Mgmt::V2018_07_01::Models::CheckNameAvailabilityResult + UsageListResult = Azure::Storage::Mgmt::V2018_07_01::Models::UsageListResult + EncryptionService = Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionService + AccountSasParameters = Azure::Storage::Mgmt::V2018_07_01::Models::AccountSasParameters + KeyVaultProperties = Azure::Storage::Mgmt::V2018_07_01::Models::KeyVaultProperties + ListAccountSasResponse = Azure::Storage::Mgmt::V2018_07_01::Models::ListAccountSasResponse + VirtualNetworkRule = Azure::Storage::Mgmt::V2018_07_01::Models::VirtualNetworkRule + ServiceSasParameters = Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSasParameters + NetworkRuleSet = Azure::Storage::Mgmt::V2018_07_01::Models::NetworkRuleSet + ListServiceSasResponse = Azure::Storage::Mgmt::V2018_07_01::Models::ListServiceSasResponse + StorageAccountCreateParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCreateParameters + IPRule = Azure::Storage::Mgmt::V2018_07_01::Models::IPRule + LegalHoldProperties = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHoldProperties + OperationDisplay = Azure::Storage::Mgmt::V2018_07_01::Models::OperationDisplay + Identity = Azure::Storage::Mgmt::V2018_07_01::Models::Identity + Operation = Azure::Storage::Mgmt::V2018_07_01::Models::Operation + Endpoints = Azure::Storage::Mgmt::V2018_07_01::Models::Endpoints + Restriction = Azure::Storage::Mgmt::V2018_07_01::Models::Restriction + CustomDomain = Azure::Storage::Mgmt::V2018_07_01::Models::CustomDomain + ListContainerItems = Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItems + Encryption = Azure::Storage::Mgmt::V2018_07_01::Models::Encryption + Resource = Azure::Storage::Mgmt::V2018_07_01::Models::Resource + StorageAccountCheckNameAvailabilityParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCheckNameAvailabilityParameters + LegalHold = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold + EncryptionServices = Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionServices + UpdateHistoryProperty = Azure::Storage::Mgmt::V2018_07_01::Models::UpdateHistoryProperty + StorageSkuListResult = Azure::Storage::Mgmt::V2018_07_01::Models::StorageSkuListResult + ImmutabilityPolicyProperties = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyProperties + MetricSpecification = Azure::Storage::Mgmt::V2018_07_01::Models::MetricSpecification + TagProperty = Azure::Storage::Mgmt::V2018_07_01::Models::TagProperty + StorageAccount = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount + ProxyResource = Azure::Storage::Mgmt::V2018_07_01::Models::ProxyResource + AzureEntityResource = Azure::Storage::Mgmt::V2018_07_01::Models::AzureEntityResource + TrackedResource = Azure::Storage::Mgmt::V2018_07_01::Models::TrackedResource + BlobContainer = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer + ImmutabilityPolicy = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy + ListContainerItem = Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItem + ReasonCode = Azure::Storage::Mgmt::V2018_07_01::Models::ReasonCode + SkuName = Azure::Storage::Mgmt::V2018_07_01::Models::SkuName + SkuTier = Azure::Storage::Mgmt::V2018_07_01::Models::SkuTier + Kind = Azure::Storage::Mgmt::V2018_07_01::Models::Kind + Reason = Azure::Storage::Mgmt::V2018_07_01::Models::Reason + KeySource = Azure::Storage::Mgmt::V2018_07_01::Models::KeySource + Action = Azure::Storage::Mgmt::V2018_07_01::Models::Action + State = Azure::Storage::Mgmt::V2018_07_01::Models::State + Bypass = Azure::Storage::Mgmt::V2018_07_01::Models::Bypass + DefaultAction = Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction + AccessTier = Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier + ProvisioningState = Azure::Storage::Mgmt::V2018_07_01::Models::ProvisioningState + AccountStatus = Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus + KeyPermission = Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission + UsageUnit = Azure::Storage::Mgmt::V2018_07_01::Models::UsageUnit + Services = Azure::Storage::Mgmt::V2018_07_01::Models::Services + SignedResourceTypes = Azure::Storage::Mgmt::V2018_07_01::Models::SignedResourceTypes + Permissions = Azure::Storage::Mgmt::V2018_07_01::Models::Permissions + HttpProtocol = Azure::Storage::Mgmt::V2018_07_01::Models::HttpProtocol + SignedResource = Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource + PublicAccess = Azure::Storage::Mgmt::V2018_07_01::Models::PublicAccess + LeaseStatus = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus + LeaseState = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseState + LeaseDuration = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration + ImmutabilityPolicyState = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyState + ImmutabilityPolicyUpdateType = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyUpdateType end class StorageManagementClass @@ -104,11 +104,17 @@ module Azure::Profiles::Latest @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @operations = @client_0.operations - @skus = @client_0.skus - @storage_accounts = @client_0.storage_accounts - @usages = @client_0.usages - @blob_containers = @client_0.blob_containers + + @client_1 = Azure::Storage::Mgmt::V2018_07_01::StorageManagementClient.new(configurable.credentials, base_url, options) + if(@client_1.respond_to?(:subscription_id)) + @client_1.subscription_id = configurable.subscription_id + end + add_telemetry(@client_1) + @operations = @client_1.operations + @skus = @client_1.skus + @storage_accounts = @client_1.storage_accounts + @usages = @client_1.usages + @blob_containers = @client_1.blob_containers @model_classes = ModelClasses.new end @@ -119,7 +125,9 @@ module Azure::Profiles::Latest end def method_missing(method, *args) - if @client_0.respond_to?method + if @client_1.respond_to?method + @client_1.send(method, *args) + elsif @client_0.respond_to?method @client_0.send(method, *args) else super @@ -127,236 +135,236 @@ module Azure::Profiles::Latest end class ModelClasses - def storage_account_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListResult - end - def storage_account_list_keys_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListKeysResult - end - def dimension - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Dimension - end - def storage_account_regenerate_key_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountRegenerateKeyParameters - end - def service_specification - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSpecification - end - def storage_account_update_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountUpdateParameters - end - def operation_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationListResult - end - def usage_name - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageName - end - def skucapability - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SKUCapability - end - def usage - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Usage - end - def sku - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Sku - end - def usage_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageListResult - end - def check_name_availability_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityResult - end - def account_sas_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountSasParameters - end - def encryption_service - Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionService - end - def list_account_sas_response - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListAccountSasResponse - end - def key_vault_properties - Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyVaultProperties - end - def service_sas_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSasParameters - end - def virtual_network_rule - Azure::Storage::Mgmt::V2018_03_01_preview::Models::VirtualNetworkRule - end - def list_service_sas_response - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListServiceSasResponse - end - def network_rule_set - Azure::Storage::Mgmt::V2018_03_01_preview::Models::NetworkRuleSet - end - def encryption_services - Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionServices - end - def encryption - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Encryption - end - def endpoints - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Endpoints - end - def iprule - Azure::Storage::Mgmt::V2018_03_01_preview::Models::IPRule - end - def storage_account_key - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountKey - end - def identity - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Identity - end - def metric_specification - Azure::Storage::Mgmt::V2018_03_01_preview::Models::MetricSpecification - end - def storage_account_check_name_availability_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCheckNameAvailabilityParameters - end def management_policies_rules_set_parameter Azure::Storage::Mgmt::V2018_03_01_preview::Models::ManagementPoliciesRulesSetParameter end - def storage_sku_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageSkuListResult - end - def list_container_items - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItems - end - def storage_account_create_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCreateParameters - end - def legal_hold - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold - end - def operation_display - Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationDisplay - end - def legal_hold_properties - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHoldProperties - end - def restriction - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Restriction - end - def resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Resource - end - def tag_property - Azure::Storage::Mgmt::V2018_03_01_preview::Models::TagProperty - end - def operation - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Operation - end - def update_history_property - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UpdateHistoryProperty - end - def custom_domain - Azure::Storage::Mgmt::V2018_03_01_preview::Models::CustomDomain - end - def immutability_policy_properties - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyProperties - end - def storage_account - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccount - end def storage_account_management_policies Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountManagementPolicies end - def proxy_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProxyResource + def storage_account_key + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountKey end - def tracked_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::TrackedResource + def storage_account_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListResult + end + def dimension + Azure::Storage::Mgmt::V2018_07_01::Models::Dimension + end + def storage_account_list_keys_result + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListKeysResult + end + def service_specification + Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSpecification + end + def storage_account_regenerate_key_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountRegenerateKeyParameters + end + def operation_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::OperationListResult + end + def storage_account_update_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountUpdateParameters + end + def skucapability + Azure::Storage::Mgmt::V2018_07_01::Models::SKUCapability + end + def usage_name + Azure::Storage::Mgmt::V2018_07_01::Models::UsageName + end + def sku + Azure::Storage::Mgmt::V2018_07_01::Models::Sku + end + def usage + Azure::Storage::Mgmt::V2018_07_01::Models::Usage + end + def check_name_availability_result + Azure::Storage::Mgmt::V2018_07_01::Models::CheckNameAvailabilityResult + end + def usage_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::UsageListResult + end + def encryption_service + Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionService + end + def account_sas_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::AccountSasParameters + end + def key_vault_properties + Azure::Storage::Mgmt::V2018_07_01::Models::KeyVaultProperties + end + def list_account_sas_response + Azure::Storage::Mgmt::V2018_07_01::Models::ListAccountSasResponse + end + def virtual_network_rule + Azure::Storage::Mgmt::V2018_07_01::Models::VirtualNetworkRule + end + def service_sas_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSasParameters + end + def network_rule_set + Azure::Storage::Mgmt::V2018_07_01::Models::NetworkRuleSet + end + def list_service_sas_response + Azure::Storage::Mgmt::V2018_07_01::Models::ListServiceSasResponse + end + def storage_account_create_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCreateParameters + end + def iprule + Azure::Storage::Mgmt::V2018_07_01::Models::IPRule + end + def legal_hold_properties + Azure::Storage::Mgmt::V2018_07_01::Models::LegalHoldProperties + end + def operation_display + Azure::Storage::Mgmt::V2018_07_01::Models::OperationDisplay + end + def identity + Azure::Storage::Mgmt::V2018_07_01::Models::Identity + end + def operation + Azure::Storage::Mgmt::V2018_07_01::Models::Operation + end + def endpoints + Azure::Storage::Mgmt::V2018_07_01::Models::Endpoints + end + def restriction + Azure::Storage::Mgmt::V2018_07_01::Models::Restriction + end + def custom_domain + Azure::Storage::Mgmt::V2018_07_01::Models::CustomDomain + end + def list_container_items + Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItems + end + def encryption + Azure::Storage::Mgmt::V2018_07_01::Models::Encryption + end + def resource + Azure::Storage::Mgmt::V2018_07_01::Models::Resource + end + def storage_account_check_name_availability_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCheckNameAvailabilityParameters + end + def legal_hold + Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold + end + def encryption_services + Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionServices + end + def update_history_property + Azure::Storage::Mgmt::V2018_07_01::Models::UpdateHistoryProperty + end + def storage_sku_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::StorageSkuListResult + end + def immutability_policy_properties + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyProperties + end + def metric_specification + Azure::Storage::Mgmt::V2018_07_01::Models::MetricSpecification + end + def tag_property + Azure::Storage::Mgmt::V2018_07_01::Models::TagProperty + end + def storage_account + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount + end + def proxy_resource + Azure::Storage::Mgmt::V2018_07_01::Models::ProxyResource end def azure_entity_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AzureEntityResource + Azure::Storage::Mgmt::V2018_07_01::Models::AzureEntityResource + end + def tracked_resource + Azure::Storage::Mgmt::V2018_07_01::Models::TrackedResource end def blob_container - Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer + Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer end def immutability_policy - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy end def list_container_item - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItem + Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItem end def reason_code - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ReasonCode + Azure::Storage::Mgmt::V2018_07_01::Models::ReasonCode end def sku_name - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuName + Azure::Storage::Mgmt::V2018_07_01::Models::SkuName end def sku_tier - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuTier + Azure::Storage::Mgmt::V2018_07_01::Models::SkuTier end def kind - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Kind + Azure::Storage::Mgmt::V2018_07_01::Models::Kind end def reason - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Reason + Azure::Storage::Mgmt::V2018_07_01::Models::Reason end def key_source - Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeySource + Azure::Storage::Mgmt::V2018_07_01::Models::KeySource end def action - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Action + Azure::Storage::Mgmt::V2018_07_01::Models::Action end def state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::State + Azure::Storage::Mgmt::V2018_07_01::Models::State end def bypass - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Bypass + Azure::Storage::Mgmt::V2018_07_01::Models::Bypass end def default_action - Azure::Storage::Mgmt::V2018_03_01_preview::Models::DefaultAction + Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction end def access_tier - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccessTier + Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier end def provisioning_state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProvisioningState + Azure::Storage::Mgmt::V2018_07_01::Models::ProvisioningState end def account_status - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountStatus + Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus end def key_permission - Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyPermission + Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission end def usage_unit - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageUnit + Azure::Storage::Mgmt::V2018_07_01::Models::UsageUnit end def services - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Services + Azure::Storage::Mgmt::V2018_07_01::Models::Services end def signed_resource_types - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResourceTypes + Azure::Storage::Mgmt::V2018_07_01::Models::SignedResourceTypes end def permissions - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Permissions + Azure::Storage::Mgmt::V2018_07_01::Models::Permissions end def http_protocol - Azure::Storage::Mgmt::V2018_03_01_preview::Models::HttpProtocol + Azure::Storage::Mgmt::V2018_07_01::Models::HttpProtocol end def signed_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResource + Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource end def public_access - Azure::Storage::Mgmt::V2018_03_01_preview::Models::PublicAccess + Azure::Storage::Mgmt::V2018_07_01::Models::PublicAccess end def lease_status - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseStatus + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus end def lease_state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseState + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseState end def lease_duration - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseDuration + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration end def immutability_policy_state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyState + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyState end def immutability_policy_update_type - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyUpdateType + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyUpdateType end end end diff --git a/config/GEMS_TO_RELEASE b/config/GEMS_TO_RELEASE index c8bd6b69f..2c485aa72 100644 --- a/config/GEMS_TO_RELEASE +++ b/config/GEMS_TO_RELEASE @@ -1,6 +1,6 @@ { "management": [ - "azure_mgmt_signalr" + "azure_mgmt_storage" ], "rollup": [ "azure_sdk" diff --git a/config/GEM_VERSIONS b/config/GEM_VERSIONS index 37d7d4dfa..a01d2d97e 100644 --- a/config/GEM_VERSIONS +++ b/config/GEM_VERSIONS @@ -1,7 +1,7 @@ { "rollup": { - "azure_sdk": "0.18.5" + "azure_sdk": "0.18.6" }, "data": { "azure_cognitiveservices_computervision": "0.17.0", @@ -76,7 +76,7 @@ "azure_mgmt_signalr": "0.17.2", "azure_mgmt_sql": "0.17.1", "azure_mgmt_stor_simple8000_series": "0.17.1", - "azure_mgmt_storage": "0.17.1", + "azure_mgmt_storage": "0.17.2", "azure_mgmt_stream_analytics": "0.17.1", "azure_mgmt_subscriptions": "0.17.0", "azure_mgmt_traffic_manager": "0.17.1", diff --git a/config/config.json b/config/config.json index 934e10c0f..8770527d6 100644 --- a/config/config.json +++ b/config/config.json @@ -1205,43 +1205,48 @@ } }, "azure_mgmt_storage": { + "azure_mgmt_storage_2018_07_01": { + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", + "namespace": "Azure::Storage::Mgmt::V2018_07_01", + "tag": "package-2018-07-only" + }, "azure_mgmt_storage_2018_03_01_preview": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2018_03_01_preview", "tag": "package-2018-03" }, "azure_mgmt_storage_2018_02_01": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2018_02_01", "tag": "package-2018-02" }, "azure_mgmt_storage_2017_10_01": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2017_10_01", "tag": "package-2017-10" }, "azure_mgmt_storage_2017_06_01": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2017_06_01", "tag": "package-2017-06" }, "azure_mgmt_storage_2016_12_01": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2016_12_01", "tag": "package-2016-12" }, "azure_mgmt_storage_2016_01_01": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2016_01_01", "tag": "package-2016-01" }, "azure_mgmt_storage_2015_06_15": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2015_06_15", "tag": "package-2015-06" }, "azure_mgmt_storage_2015_05_01_preview": { - "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0840eaa81abaf0a42c88d8e2705dff1c89c4f149/specification/storage/resource-manager/readme.md", + "markdown": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4d6d40c5c73df1b96b01fd207171ef1f7c13b49a/specification/storage/resource-manager/readme.md", "namespace": "Azure::Storage::Mgmt::V2015_05_01_preview", "tag": "package-2015-05-preview" } diff --git a/config/profiles.json b/config/profiles.json index f4c05da9a..7285cdc49 100644 --- a/config/profiles.json +++ b/config/profiles.json @@ -368,7 +368,8 @@ }, "Microsoft.Storage": { "management": { - "2018-03-01-preview": ["*"] + "2018-03-01-preview": ["*"], + "2018-07-01": ["*"] } }, "Microsoft.StreamAnalytics": { @@ -1355,7 +1356,8 @@ "resourceTypes": { "Microsoft.Storage" : { "management": { - "2018-03-01-preview": ["*"] + "2018-03-01-preview": ["*"], + "2018-07-01": ["*"] } } }, diff --git a/management/azure_mgmt_storage/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb index 8a79e10ae..38e7cbda7 100644 --- a/management/azure_mgmt_storage/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb @@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2015_05_01_preview # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb index b3a8ac491..d6adcd8ea 100644 --- a/management/azure_mgmt_storage/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb @@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2015_06_15 # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb index b7dcb23ff..602952c12 100644 --- a/management/azure_mgmt_storage/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb @@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2016_01_01 # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb index e2ae2a00d..d2d7f99b9 100644 --- a/management/azure_mgmt_storage/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb @@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2016_12_01 # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb index 1bb9da8ee..80993af11 100644 --- a/management/azure_mgmt_storage/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb @@ -138,7 +138,7 @@ module Azure::Storage::Mgmt::V2017_06_01 # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb index a7e07ae06..16c8d8205 100644 --- a/management/azure_mgmt_storage/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb @@ -138,7 +138,7 @@ module Azure::Storage::Mgmt::V2017_10_01 # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/operation_display.rb b/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/operation_display.rb index 1588f21c1..e82207539 100644 --- a/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/operation_display.rb +++ b/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/operation_display.rb @@ -21,6 +21,9 @@ module Azure::Storage::Mgmt::V2018_02_01 # @return [String] Type of operation: get, read, delete, etc. attr_accessor :operation + # @return [String] Description of the operation. + attr_accessor :description + # # Mapper for OperationDisplay class as Ruby Hash. @@ -58,6 +61,14 @@ module Azure::Storage::Mgmt::V2018_02_01 type: { name: 'String' } + }, + description: { + client_side_validation: true, + required: false, + serialized_name: 'description', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb b/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb index 605316fc0..36bbf2fc8 100644 --- a/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +++ b/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb @@ -100,7 +100,7 @@ module Azure::Storage::Mgmt::V2018_02_01 }, resource: { client_side_validation: true, - required: true, + required: false, serialized_name: 'signedResource', type: { name: 'String' diff --git a/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb index 72d0c19f4..7a6c07910 100644 --- a/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb @@ -140,7 +140,7 @@ module Azure::Storage::Mgmt::V2018_02_01 # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/operation_display.rb b/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/operation_display.rb index 6d5934120..19f1fb087 100644 --- a/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/operation_display.rb +++ b/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/operation_display.rb @@ -21,6 +21,9 @@ module Azure::Storage::Mgmt::V2018_03_01_preview # @return [String] Type of operation: get, read, delete, etc. attr_accessor :operation + # @return [String] Description of the operation. + attr_accessor :description + # # Mapper for OperationDisplay class as Ruby Hash. @@ -58,6 +61,14 @@ module Azure::Storage::Mgmt::V2018_03_01_preview type: { name: 'String' } + }, + description: { + client_side_validation: true, + required: false, + serialized_name: 'description', + type: { + name: 'String' + } } } } diff --git a/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/service_sas_parameters.rb b/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/service_sas_parameters.rb index 031a0ef15..63640b4b9 100644 --- a/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/service_sas_parameters.rb +++ b/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/service_sas_parameters.rb @@ -100,7 +100,7 @@ module Azure::Storage::Mgmt::V2018_03_01_preview }, resource: { client_side_validation: true, - required: true, + required: false, serialized_name: 'signedResource', type: { name: 'String' diff --git a/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb index 0a45473ad..2c1a6d079 100644 --- a/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +++ b/management/azure_mgmt_storage/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb @@ -140,7 +140,7 @@ module Azure::Storage::Mgmt::V2018_03_01_preview # def add_telemetry sdk_information = 'azure_mgmt_storage' - sdk_information = "#{sdk_information}/0.17.1" + sdk_information = "#{sdk_information}/0.17.2" add_user_agent_information(sdk_information) end end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage.rb new file mode 100644 index 000000000..51ebecf58 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage.rb @@ -0,0 +1,107 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +require 'uri' +require 'cgi' +require 'date' +require 'json' +require 'base64' +require 'erb' +require 'securerandom' +require 'time' +require 'timeliness' +require 'faraday' +require 'faraday-cookie_jar' +require 'concurrent' +require 'ms_rest' +require '2018-07-01/generated/azure_mgmt_storage/module_definition' +require 'ms_rest_azure' + +module Azure::Storage::Mgmt::V2018_07_01 + autoload :Operations, '2018-07-01/generated/azure_mgmt_storage/operations.rb' + autoload :Skus, '2018-07-01/generated/azure_mgmt_storage/skus.rb' + autoload :StorageAccounts, '2018-07-01/generated/azure_mgmt_storage/storage_accounts.rb' + autoload :Usages, '2018-07-01/generated/azure_mgmt_storage/usages.rb' + autoload :BlobContainers, '2018-07-01/generated/azure_mgmt_storage/blob_containers.rb' + autoload :StorageManagementClient, '2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb' + + module Models + autoload :StorageAccountKey, '2018-07-01/generated/azure_mgmt_storage/models/storage_account_key.rb' + autoload :StorageAccountListResult, '2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb' + autoload :Dimension, '2018-07-01/generated/azure_mgmt_storage/models/dimension.rb' + autoload :StorageAccountListKeysResult, '2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb' + autoload :ServiceSpecification, '2018-07-01/generated/azure_mgmt_storage/models/service_specification.rb' + autoload :StorageAccountRegenerateKeyParameters, '2018-07-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb' + autoload :OperationListResult, '2018-07-01/generated/azure_mgmt_storage/models/operation_list_result.rb' + autoload :StorageAccountUpdateParameters, '2018-07-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb' + autoload :SKUCapability, '2018-07-01/generated/azure_mgmt_storage/models/skucapability.rb' + autoload :UsageName, '2018-07-01/generated/azure_mgmt_storage/models/usage_name.rb' + autoload :Sku, '2018-07-01/generated/azure_mgmt_storage/models/sku.rb' + autoload :Usage, '2018-07-01/generated/azure_mgmt_storage/models/usage.rb' + autoload :CheckNameAvailabilityResult, '2018-07-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb' + autoload :UsageListResult, '2018-07-01/generated/azure_mgmt_storage/models/usage_list_result.rb' + autoload :EncryptionService, '2018-07-01/generated/azure_mgmt_storage/models/encryption_service.rb' + autoload :AccountSasParameters, '2018-07-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb' + autoload :KeyVaultProperties, '2018-07-01/generated/azure_mgmt_storage/models/key_vault_properties.rb' + autoload :ListAccountSasResponse, '2018-07-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb' + autoload :VirtualNetworkRule, '2018-07-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb' + autoload :ServiceSasParameters, '2018-07-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb' + autoload :NetworkRuleSet, '2018-07-01/generated/azure_mgmt_storage/models/network_rule_set.rb' + autoload :ListServiceSasResponse, '2018-07-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb' + autoload :StorageAccountCreateParameters, '2018-07-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb' + autoload :IPRule, '2018-07-01/generated/azure_mgmt_storage/models/iprule.rb' + autoload :LegalHoldProperties, '2018-07-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb' + autoload :OperationDisplay, '2018-07-01/generated/azure_mgmt_storage/models/operation_display.rb' + autoload :Identity, '2018-07-01/generated/azure_mgmt_storage/models/identity.rb' + autoload :Operation, '2018-07-01/generated/azure_mgmt_storage/models/operation.rb' + autoload :Endpoints, '2018-07-01/generated/azure_mgmt_storage/models/endpoints.rb' + autoload :Restriction, '2018-07-01/generated/azure_mgmt_storage/models/restriction.rb' + autoload :CustomDomain, '2018-07-01/generated/azure_mgmt_storage/models/custom_domain.rb' + autoload :ListContainerItems, '2018-07-01/generated/azure_mgmt_storage/models/list_container_items.rb' + autoload :Encryption, '2018-07-01/generated/azure_mgmt_storage/models/encryption.rb' + autoload :Resource, '2018-07-01/generated/azure_mgmt_storage/models/resource.rb' + autoload :StorageAccountCheckNameAvailabilityParameters, '2018-07-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb' + autoload :LegalHold, '2018-07-01/generated/azure_mgmt_storage/models/legal_hold.rb' + autoload :EncryptionServices, '2018-07-01/generated/azure_mgmt_storage/models/encryption_services.rb' + autoload :UpdateHistoryProperty, '2018-07-01/generated/azure_mgmt_storage/models/update_history_property.rb' + autoload :StorageSkuListResult, '2018-07-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb' + autoload :ImmutabilityPolicyProperties, '2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb' + autoload :MetricSpecification, '2018-07-01/generated/azure_mgmt_storage/models/metric_specification.rb' + autoload :TagProperty, '2018-07-01/generated/azure_mgmt_storage/models/tag_property.rb' + autoload :StorageAccount, '2018-07-01/generated/azure_mgmt_storage/models/storage_account.rb' + autoload :ProxyResource, '2018-07-01/generated/azure_mgmt_storage/models/proxy_resource.rb' + autoload :AzureEntityResource, '2018-07-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb' + autoload :TrackedResource, '2018-07-01/generated/azure_mgmt_storage/models/tracked_resource.rb' + autoload :BlobContainer, '2018-07-01/generated/azure_mgmt_storage/models/blob_container.rb' + autoload :ImmutabilityPolicy, '2018-07-01/generated/azure_mgmt_storage/models/immutability_policy.rb' + autoload :ListContainerItem, '2018-07-01/generated/azure_mgmt_storage/models/list_container_item.rb' + autoload :ReasonCode, '2018-07-01/generated/azure_mgmt_storage/models/reason_code.rb' + autoload :SkuName, '2018-07-01/generated/azure_mgmt_storage/models/sku_name.rb' + autoload :SkuTier, '2018-07-01/generated/azure_mgmt_storage/models/sku_tier.rb' + autoload :Kind, '2018-07-01/generated/azure_mgmt_storage/models/kind.rb' + autoload :Reason, '2018-07-01/generated/azure_mgmt_storage/models/reason.rb' + autoload :KeySource, '2018-07-01/generated/azure_mgmt_storage/models/key_source.rb' + autoload :Action, '2018-07-01/generated/azure_mgmt_storage/models/action.rb' + autoload :State, '2018-07-01/generated/azure_mgmt_storage/models/state.rb' + autoload :Bypass, '2018-07-01/generated/azure_mgmt_storage/models/bypass.rb' + autoload :DefaultAction, '2018-07-01/generated/azure_mgmt_storage/models/default_action.rb' + autoload :AccessTier, '2018-07-01/generated/azure_mgmt_storage/models/access_tier.rb' + autoload :ProvisioningState, '2018-07-01/generated/azure_mgmt_storage/models/provisioning_state.rb' + autoload :AccountStatus, '2018-07-01/generated/azure_mgmt_storage/models/account_status.rb' + autoload :KeyPermission, '2018-07-01/generated/azure_mgmt_storage/models/key_permission.rb' + autoload :UsageUnit, '2018-07-01/generated/azure_mgmt_storage/models/usage_unit.rb' + autoload :Services, '2018-07-01/generated/azure_mgmt_storage/models/services.rb' + autoload :SignedResourceTypes, '2018-07-01/generated/azure_mgmt_storage/models/signed_resource_types.rb' + autoload :Permissions, '2018-07-01/generated/azure_mgmt_storage/models/permissions.rb' + autoload :HttpProtocol, '2018-07-01/generated/azure_mgmt_storage/models/http_protocol.rb' + autoload :SignedResource, '2018-07-01/generated/azure_mgmt_storage/models/signed_resource.rb' + autoload :PublicAccess, '2018-07-01/generated/azure_mgmt_storage/models/public_access.rb' + autoload :LeaseStatus, '2018-07-01/generated/azure_mgmt_storage/models/lease_status.rb' + autoload :LeaseState, '2018-07-01/generated/azure_mgmt_storage/models/lease_state.rb' + autoload :LeaseDuration, '2018-07-01/generated/azure_mgmt_storage/models/lease_duration.rb' + autoload :ImmutabilityPolicyState, '2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb' + autoload :ImmutabilityPolicyUpdateType, '2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb' + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb new file mode 100644 index 000000000..568527c96 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb @@ -0,0 +1,1721 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + # + # The Azure Storage Management API. + # + class BlobContainers + include MsRestAzure + + # + # Creates and initializes a new instance of the BlobContainers class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorageManagementClient] reference to the StorageManagementClient + attr_reader :client + + # + # Lists all containers and does not support a prefix like data plane. Also SRP + # today does not return continuation token. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ListContainerItems] operation results. + # + def list(resource_group_name, account_name, custom_headers:nil) + response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all containers and does not support a prefix like data plane. Also SRP + # today does not return continuation token. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(resource_group_name, account_name, custom_headers:nil) + list_async(resource_group_name, account_name, custom_headers:custom_headers).value! + end + + # + # Lists all containers and does not support a prefix like data plane. Also SRP + # today does not return continuation token. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(resource_group_name, account_name, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItems.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates a new container under the specified account as described by request + # body. The container resource includes metadata and properties for that + # container. It does not include a list of the blobs contained by the + # container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param blob_container [BlobContainer] Properties of the blob container to + # create. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BlobContainer] operation results. + # + def create(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) + response = create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Creates a new container under the specified account as described by request + # body. The container resource includes metadata and properties for that + # container. It does not include a list of the blobs contained by the + # container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param blob_container [BlobContainer] Properties of the blob container to + # create. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) + create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! + end + + # + # Creates a new container under the specified account as described by request + # body. The container resource includes metadata and properties for that + # container. It does not include a list of the blobs contained by the + # container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param blob_container [BlobContainer] Properties of the blob container to + # create. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, 'blob_container is nil' if blob_container.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer.mapper() + request_content = @client.serialize(request_mapper, blob_container) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 201 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 201 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Updates container properties as specified in request body. Properties not + # mentioned in the request will be unchanged. Update fails if the specified + # container doesn't already exist. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param blob_container [BlobContainer] Properties to update for the blob + # container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BlobContainer] operation results. + # + def update(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) + response = update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Updates container properties as specified in request body. Properties not + # mentioned in the request will be unchanged. Update fails if the specified + # container doesn't already exist. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param blob_container [BlobContainer] Properties to update for the blob + # container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def update_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) + update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! + end + + # + # Updates container properties as specified in request body. Properties not + # mentioned in the request will be unchanged. Update fails if the specified + # container doesn't already exist. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param blob_container [BlobContainer] Properties to update for the blob + # container. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, 'blob_container is nil' if blob_container.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer.mapper() + request_content = @client.serialize(request_mapper, blob_container) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets properties of a specified container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [BlobContainer] operation results. + # + def get(resource_group_name, account_name, container_name, custom_headers:nil) + response = get_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Gets properties of a specified container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil) + get_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! + end + + # + # Gets properties of a specified container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_async(resource_group_name, account_name, container_name, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Deletes specified container under its account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, account_name, container_name, custom_headers:nil) + response = delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! + nil + end + + # + # Deletes specified container under its account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil) + delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! + end + + # + # Deletes specified container under its account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, account_name, container_name, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Sets legal hold tags. Setting the same tag results in an idempotent + # operation. SetLegalHold follows an append pattern and does not clear out the + # existing tags that are not specified in the request. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param legal_hold [LegalHold] The LegalHold property that will be set to a + # blob container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LegalHold] operation results. + # + def set_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) + response = set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Sets legal hold tags. Setting the same tag results in an idempotent + # operation. SetLegalHold follows an append pattern and does not clear out the + # existing tags that are not specified in the request. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param legal_hold [LegalHold] The LegalHold property that will be set to a + # blob container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def set_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) + set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! + end + + # + # Sets legal hold tags. Setting the same tag results in an idempotent + # operation. SetLegalHold follows an append pattern and does not clear out the + # existing tags that are not specified in the request. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param legal_hold [LegalHold] The LegalHold property that will be set to a + # blob container. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + fail ArgumentError, 'legal_hold is nil' if legal_hold.nil? + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold.mapper() + request_content = @client.serialize(request_mapper, legal_hold) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Clears legal hold tags. Clearing the same or non-existent tag results in an + # idempotent operation. ClearLegalHold clears out only the specified tags in + # the request. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param legal_hold [LegalHold] The LegalHold property that will be clear from + # a blob container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [LegalHold] operation results. + # + def clear_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) + response = clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Clears legal hold tags. Clearing the same or non-existent tag results in an + # idempotent operation. ClearLegalHold clears out only the specified tags in + # the request. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param legal_hold [LegalHold] The LegalHold property that will be clear from + # a blob container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def clear_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) + clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! + end + + # + # Clears legal hold tags. Clearing the same or non-existent tag results in an + # idempotent operation. ClearLegalHold clears out only the specified tags in + # the request. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param legal_hold [LegalHold] The LegalHold property that will be clear from + # a blob container. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + fail ArgumentError, 'legal_hold is nil' if legal_hold.nil? + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold.mapper() + request_content = @client.serialize(request_mapper, legal_hold) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Creates or updates an unlocked immutability policy. ETag in If-Match is + # honored if given but not required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that + # will be created or updated to a blob container. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ImmutabilityPolicy] operation results. + # + def create_or_update_immutability_policy(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil) + response = create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:parameters, if_match:if_match, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Creates or updates an unlocked immutability policy. ETag in If-Match is + # honored if given but not required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that + # will be created or updated to a blob container. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def create_or_update_immutability_policy_with_http_info(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil) + create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:parameters, if_match:if_match, custom_headers:custom_headers).value! + end + + # + # Creates or updates an unlocked immutability policy. ETag in If-Match is + # honored if given but not required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that + # will be created or updated to a blob container. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + immutability_policy_name = 'default' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Gets the existing immutability policy along with the corresponding ETag in + # response headers and body. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ImmutabilityPolicy] operation results. + # + def get_immutability_policy(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil) + response = get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the existing immutability policy along with the corresponding ETag in + # response headers and body. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil) + get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value! + end + + # + # Gets the existing immutability policy along with the corresponding ETag in + # response headers and body. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + immutability_policy_name = 'default' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Aborts an unlocked immutability policy. The response of delete has + # immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required + # for this operation. Deleting a locked immutability policy is not allowed, + # only way is to delete the container after deleting all blobs inside the + # container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ImmutabilityPolicy] operation results. + # + def delete_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers:nil) + response = delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Aborts an unlocked immutability policy. The response of delete has + # immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required + # for this operation. Deleting a locked immutability policy is not allowed, + # only way is to delete the container after deleting all blobs inside the + # container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil) + delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! + end + + # + # Aborts an unlocked immutability policy. The response of delete has + # immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required + # for this operation. Deleting a locked immutability policy is not allowed, + # only way is to delete the container after deleting all blobs inside the + # container. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + immutability_policy_name = 'default' + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + fail ArgumentError, 'if_match is nil' if if_match.nil? + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Sets the ImmutabilityPolicy to Locked state. The only action allowed on a + # Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is + # required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ImmutabilityPolicy] operation results. + # + def lock_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers:nil) + response = lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Sets the ImmutabilityPolicy to Locked state. The only action allowed on a + # Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is + # required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def lock_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil) + lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! + end + + # + # Sets the ImmutabilityPolicy to Locked state. The only action allowed on a + # Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is + # required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + fail ArgumentError, 'if_match is nil' if if_match.nil? + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Extends the immutabilityPeriodSinceCreationInDays of a locked + # immutabilityPolicy. The only action allowed on a Locked policy will be this + # action. ETag in If-Match is required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that + # will be extented for a blob container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ImmutabilityPolicy] operation results. + # + def extend_immutability_policy(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil) + response = extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Extends the immutabilityPeriodSinceCreationInDays of a locked + # immutabilityPolicy. The only action allowed on a Locked policy will be this + # action. ETag in If-Match is required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that + # will be extented for a blob container. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def extend_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil) + extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value! + end + + # + # Extends the immutabilityPeriodSinceCreationInDays of a locked + # immutabilityPolicy. The only action allowed on a Locked policy will be this + # action. ETag in If-Match is required for this operation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param container_name [String] The name of the blob container within the + # specified storage account. Blob container names must be between 3 and 63 + # characters in length and use numbers, lower-case letters and dash (-) only. + # Every dash (-) character must be immediately preceded and followed by a + # letter or number. + # @param if_match [String] The entity state (ETag) version of the immutability + # policy to update. A value of "*" can be used to apply the operation only if + # the immutability policy already exists. If omitted, this operation will + # always be applied. + # @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that + # will be extented for a blob container. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'container_name is nil' if container_name.nil? + fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 + fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + fail ArgumentError, 'if_match is nil' if if_match.nil? + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['If-Match'] = if_match unless if_match.nil? + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/access_tier.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/access_tier.rb new file mode 100644 index 000000000..5afd0f4e2 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/access_tier.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for AccessTier + # + module AccessTier + Hot = "Hot" + Cool = "Cool" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb new file mode 100644 index 000000000..89c783c98 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb @@ -0,0 +1,136 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The parameters to list SAS credentials of a storage account. + # + class AccountSasParameters + + include MsRestAzure + + # @return [Services] The signed services accessible with the account SAS. + # Possible values include: Blob (b), Queue (q), Table (t), File (f). + # Possible values include: 'b', 'q', 't', 'f' + attr_accessor :services + + # @return [SignedResourceTypes] The signed resource types that are + # accessible with the account SAS. Service (s): Access to service-level + # APIs; Container (c): Access to container-level APIs; Object (o): Access + # to object-level APIs for blobs, queue messages, table entities, and + # files. Possible values include: 's', 'c', 'o' + attr_accessor :resource_types + + # @return [Permissions] The signed permissions for the account SAS. + # Possible values include: Read (r), Write (w), Delete (d), List (l), Add + # (a), Create (c), Update (u) and Process (p). Possible values include: + # 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p' + attr_accessor :permissions + + # @return [String] An IP address or a range of IP addresses from which to + # accept requests. + attr_accessor :ipaddress_or_range + + # @return [HttpProtocol] The protocol permitted for a request made with + # the account SAS. Possible values include: 'https,http', 'https' + attr_accessor :protocols + + # @return [DateTime] The time at which the SAS becomes valid. + attr_accessor :shared_access_start_time + + # @return [DateTime] The time at which the shared access signature + # becomes invalid. + attr_accessor :shared_access_expiry_time + + # @return [String] The key to sign the account SAS token with. + attr_accessor :key_to_sign + + + # + # Mapper for AccountSasParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'AccountSasParameters', + type: { + name: 'Composite', + class_name: 'AccountSasParameters', + model_properties: { + services: { + client_side_validation: true, + required: true, + serialized_name: 'signedServices', + type: { + name: 'String' + } + }, + resource_types: { + client_side_validation: true, + required: true, + serialized_name: 'signedResourceTypes', + type: { + name: 'String' + } + }, + permissions: { + client_side_validation: true, + required: true, + serialized_name: 'signedPermission', + type: { + name: 'String' + } + }, + ipaddress_or_range: { + client_side_validation: true, + required: false, + serialized_name: 'signedIp', + type: { + name: 'String' + } + }, + protocols: { + client_side_validation: true, + required: false, + serialized_name: 'signedProtocol', + type: { + name: 'Enum', + module: 'HttpProtocol' + } + }, + shared_access_start_time: { + client_side_validation: true, + required: false, + serialized_name: 'signedStart', + type: { + name: 'DateTime' + } + }, + shared_access_expiry_time: { + client_side_validation: true, + required: true, + serialized_name: 'signedExpiry', + type: { + name: 'DateTime' + } + }, + key_to_sign: { + client_side_validation: true, + required: false, + serialized_name: 'keyToSign', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/account_status.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/account_status.rb new file mode 100644 index 000000000..92e0cc306 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/account_status.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for AccountStatus + # + module AccountStatus + Available = "available" + Unavailable = "unavailable" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/action.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/action.rb new file mode 100644 index 000000000..1df472fff --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/action.rb @@ -0,0 +1,15 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for Action + # + module Action + Allow = "Allow" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb new file mode 100644 index 000000000..f2c73df2d --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb @@ -0,0 +1,75 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The resource model definition for a Azure Resource Manager resource with + # an etag. + # + class AzureEntityResource < Resource + + include MsRestAzure + + # @return [String] Resource Etag. + attr_accessor :etag + + + # + # Mapper for AzureEntityResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'AzureEntityResource', + type: { + name: 'Composite', + class_name: 'AzureEntityResource', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + etag: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'etag', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/blob_container.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/blob_container.rb new file mode 100644 index 000000000..5e2c9cbbc --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/blob_container.rb @@ -0,0 +1,217 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Properties of the blob container, including Id, resource name, resource + # type, Etag. + # + class BlobContainer < AzureEntityResource + + include MsRestAzure + + # @return [PublicAccess] Specifies whether data in the container may be + # accessed publicly and the level of access. Possible values include: + # 'Container', 'Blob', 'None' + attr_accessor :public_access + + # @return [DateTime] Returns the date and time the container was last + # modified. + attr_accessor :last_modified_time + + # @return [LeaseStatus] The lease status of the container. Possible + # values include: 'Locked', 'Unlocked' + attr_accessor :lease_status + + # @return [LeaseState] Lease state of the container. Possible values + # include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + attr_accessor :lease_state + + # @return [LeaseDuration] Specifies whether the lease on a container is + # of infinite or fixed duration, only when the container is leased. + # Possible values include: 'Infinite', 'Fixed' + attr_accessor :lease_duration + + # @return [Hash{String => String}] A name-value pair to associate with + # the container as metadata. + attr_accessor :metadata + + # @return [ImmutabilityPolicyProperties] The ImmutabilityPolicy property + # of the container. + attr_accessor :immutability_policy + + # @return [LegalHoldProperties] The LegalHold property of the container. + attr_accessor :legal_hold + + # @return [Boolean] The hasLegalHold public property is set to true by + # SRP if there are at least one existing tag. The hasLegalHold public + # property is set to false by SRP if all existing legal hold tags are + # cleared out. There can be a maximum of 1000 blob containers with + # hasLegalHold=true for a given account. + attr_accessor :has_legal_hold + + # @return [Boolean] The hasImmutabilityPolicy public property is set to + # true by SRP if ImmutabilityPolicy has been created for this container. + # The hasImmutabilityPolicy public property is set to false by SRP if + # ImmutabilityPolicy has not been created for this container. + attr_accessor :has_immutability_policy + + + # + # Mapper for BlobContainer class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'BlobContainer', + type: { + name: 'Composite', + class_name: 'BlobContainer', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + etag: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'etag', + type: { + name: 'String' + } + }, + public_access: { + client_side_validation: true, + required: false, + serialized_name: 'properties.publicAccess', + type: { + name: 'Enum', + module: 'PublicAccess' + } + }, + last_modified_time: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + lease_status: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.leaseStatus', + type: { + name: 'String' + } + }, + lease_state: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.leaseState', + type: { + name: 'String' + } + }, + lease_duration: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.leaseDuration', + type: { + name: 'String' + } + }, + metadata: { + client_side_validation: true, + required: false, + serialized_name: 'properties.metadata', + type: { + name: 'Dictionary', + value: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + immutability_policy: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.immutabilityPolicy', + type: { + name: 'Composite', + class_name: 'ImmutabilityPolicyProperties' + } + }, + legal_hold: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.legalHold', + type: { + name: 'Composite', + class_name: 'LegalHoldProperties' + } + }, + has_legal_hold: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.hasLegalHold', + type: { + name: 'Boolean' + } + }, + has_immutability_policy: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.hasImmutabilityPolicy', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/bypass.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/bypass.rb new file mode 100644 index 000000000..9bfa78b8b --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/bypass.rb @@ -0,0 +1,18 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for Bypass + # + module Bypass + None = "None" + Logging = "Logging" + Metrics = "Metrics" + AzureServices = "AzureServices" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb new file mode 100644 index 000000000..44e1ea115 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb @@ -0,0 +1,77 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The CheckNameAvailability operation response. + # + class CheckNameAvailabilityResult + + include MsRestAzure + + # @return [Boolean] Gets a boolean value that indicates whether the name + # is available for you to use. If true, the name is available. If false, + # the name has already been taken or is invalid and cannot be used. + attr_accessor :name_available + + # @return [Reason] Gets the reason that a storage account name could not + # be used. The Reason element is only returned if NameAvailable is false. + # Possible values include: 'AccountNameInvalid', 'AlreadyExists' + attr_accessor :reason + + # @return [String] Gets an error message explaining the Reason value in + # more detail. + attr_accessor :message + + + # + # Mapper for CheckNameAvailabilityResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'CheckNameAvailabilityResult', + type: { + name: 'Composite', + class_name: 'CheckNameAvailabilityResult', + model_properties: { + name_available: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'nameAvailable', + type: { + name: 'Boolean' + } + }, + reason: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'reason', + type: { + name: 'Enum', + module: 'Reason' + } + }, + message: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'message', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/custom_domain.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/custom_domain.rb new file mode 100644 index 000000000..e436d9834 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/custom_domain.rb @@ -0,0 +1,60 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The custom domain assigned to this storage account. This can be set via + # Update. + # + class CustomDomain + + include MsRestAzure + + # @return [String] Gets or sets the custom domain name assigned to the + # storage account. Name is the CNAME source. + attr_accessor :name + + # @return [Boolean] Indicates whether indirect CName validation is + # enabled. Default value is false. This should only be set on updates. + attr_accessor :use_sub_domain + + + # + # Mapper for CustomDomain class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'CustomDomain', + type: { + name: 'Composite', + class_name: 'CustomDomain', + model_properties: { + name: { + client_side_validation: true, + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + use_sub_domain: { + client_side_validation: true, + required: false, + serialized_name: 'useSubDomain', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/default_action.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/default_action.rb new file mode 100644 index 000000000..eba39fc5d --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/default_action.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for DefaultAction + # + module DefaultAction + Allow = "Allow" + Deny = "Deny" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/dimension.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/dimension.rb new file mode 100644 index 000000000..bd3fbfa4d --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/dimension.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Dimension of blobs, possiblly be blob type or access tier. + # + class Dimension + + include MsRestAzure + + # @return [String] Display name of dimension. + attr_accessor :name + + # @return [String] Display name of dimension. + attr_accessor :display_name + + + # + # Mapper for Dimension class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Dimension', + type: { + name: 'Composite', + class_name: 'Dimension', + model_properties: { + name: { + client_side_validation: true, + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display_name: { + client_side_validation: true, + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption.rb new file mode 100644 index 000000000..4bfba2035 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption.rb @@ -0,0 +1,74 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The encryption settings on the storage account. + # + class Encryption + + include MsRestAzure + + # @return [EncryptionServices] List of services which support encryption. + attr_accessor :services + + # @return [KeySource] The encryption keySource (provider). Possible + # values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault. + # Possible values include: 'Microsoft.Storage', 'Microsoft.Keyvault'. + # Default value: 'Microsoft.Storage' . + attr_accessor :key_source + + # @return [KeyVaultProperties] Properties provided by key vault. + attr_accessor :key_vault_properties + + + # + # Mapper for Encryption class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Encryption', + type: { + name: 'Composite', + class_name: 'Encryption', + model_properties: { + services: { + client_side_validation: true, + required: false, + serialized_name: 'services', + type: { + name: 'Composite', + class_name: 'EncryptionServices' + } + }, + key_source: { + client_side_validation: true, + required: true, + serialized_name: 'keySource', + default_value: 'Microsoft.Storage', + type: { + name: 'String' + } + }, + key_vault_properties: { + client_side_validation: true, + required: false, + serialized_name: 'keyvaultproperties', + type: { + name: 'Composite', + class_name: 'KeyVaultProperties' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption_service.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption_service.rb new file mode 100644 index 000000000..606569262 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption_service.rb @@ -0,0 +1,62 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # A service that allows server-side encryption to be used. + # + class EncryptionService + + include MsRestAzure + + # @return [Boolean] A boolean indicating whether or not the service + # encrypts the data as it is stored. + attr_accessor :enabled + + # @return [DateTime] Gets a rough estimate of the date/time when the + # encryption was last enabled by the user. Only returned when encryption + # is enabled. There might be some unencrypted blobs which were written + # after this time, as it is just a rough estimate. + attr_accessor :last_enabled_time + + + # + # Mapper for EncryptionService class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'EncryptionService', + type: { + name: 'Composite', + class_name: 'EncryptionService', + model_properties: { + enabled: { + client_side_validation: true, + required: false, + serialized_name: 'enabled', + type: { + name: 'Boolean' + } + }, + last_enabled_time: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'lastEnabledTime', + type: { + name: 'DateTime' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption_services.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption_services.rb new file mode 100644 index 000000000..cb266432d --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/encryption_services.rb @@ -0,0 +1,89 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # A list of services that support encryption. + # + class EncryptionServices + + include MsRestAzure + + # @return [EncryptionService] The encryption function of the blob storage + # service. + attr_accessor :blob + + # @return [EncryptionService] The encryption function of the file storage + # service. + attr_accessor :file + + # @return [EncryptionService] The encryption function of the table + # storage service. + attr_accessor :table + + # @return [EncryptionService] The encryption function of the queue + # storage service. + attr_accessor :queue + + + # + # Mapper for EncryptionServices class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'EncryptionServices', + type: { + name: 'Composite', + class_name: 'EncryptionServices', + model_properties: { + blob: { + client_side_validation: true, + required: false, + serialized_name: 'blob', + type: { + name: 'Composite', + class_name: 'EncryptionService' + } + }, + file: { + client_side_validation: true, + required: false, + serialized_name: 'file', + type: { + name: 'Composite', + class_name: 'EncryptionService' + } + }, + table: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'table', + type: { + name: 'Composite', + class_name: 'EncryptionService' + } + }, + queue: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'queue', + type: { + name: 'Composite', + class_name: 'EncryptionService' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/endpoints.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/endpoints.rb new file mode 100644 index 000000000..79ce724a0 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/endpoints.rb @@ -0,0 +1,108 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The URIs that are used to perform a retrieval of a public blob, queue, + # table, web or dfs object. + # + class Endpoints + + include MsRestAzure + + # @return [String] Gets the blob endpoint. + attr_accessor :blob + + # @return [String] Gets the queue endpoint. + attr_accessor :queue + + # @return [String] Gets the table endpoint. + attr_accessor :table + + # @return [String] Gets the file endpoint. + attr_accessor :file + + # @return [String] Gets the web endpoint. + attr_accessor :web + + # @return [String] Gets the dfs endpoint. + attr_accessor :dfs + + + # + # Mapper for Endpoints class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Endpoints', + type: { + name: 'Composite', + class_name: 'Endpoints', + model_properties: { + blob: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'blob', + type: { + name: 'String' + } + }, + queue: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'queue', + type: { + name: 'String' + } + }, + table: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'table', + type: { + name: 'String' + } + }, + file: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'file', + type: { + name: 'String' + } + }, + web: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'web', + type: { + name: 'String' + } + }, + dfs: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'dfs', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/http_protocol.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/http_protocol.rb new file mode 100644 index 000000000..fb6dca699 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/http_protocol.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for HttpProtocol + # + module HttpProtocol + Httpshttp = "https,http" + Https = "https" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/identity.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/identity.rb new file mode 100644 index 000000000..b9b4638ab --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/identity.rb @@ -0,0 +1,72 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Identity for the resource. + # + class Identity + + include MsRestAzure + + # @return [String] The principal ID of resource identity. + attr_accessor :principal_id + + # @return [String] The tenant ID of resource. + attr_accessor :tenant_id + + # @return [String] The identity type. Default value: 'SystemAssigned' . + attr_accessor :type + + + # + # Mapper for Identity class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Identity', + type: { + name: 'Composite', + class_name: 'Identity', + model_properties: { + principal_id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'principalId', + type: { + name: 'String' + } + }, + tenant_id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: true, + is_constant: true, + serialized_name: 'type', + default_value: 'SystemAssigned', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy.rb new file mode 100644 index 000000000..3f41ef75a --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy.rb @@ -0,0 +1,98 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The ImmutabilityPolicy property of a blob container, including Id, + # resource name, resource type, Etag. + # + class ImmutabilityPolicy < AzureEntityResource + + include MsRestAzure + + # @return [Integer] The immutability period for the blobs in the + # container since the policy creation, in days. + attr_accessor :immutability_period_since_creation_in_days + + # @return [ImmutabilityPolicyState] The ImmutabilityPolicy state of a + # blob container, possible values include: Locked and Unlocked. Possible + # values include: 'Locked', 'Unlocked' + attr_accessor :state + + + # + # Mapper for ImmutabilityPolicy class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ImmutabilityPolicy', + type: { + name: 'Composite', + class_name: 'ImmutabilityPolicy', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + etag: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'etag', + type: { + name: 'String' + } + }, + immutability_period_since_creation_in_days: { + client_side_validation: true, + required: true, + serialized_name: 'properties.immutabilityPeriodSinceCreationInDays', + type: { + name: 'Number' + } + }, + state: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb new file mode 100644 index 000000000..4d56508d3 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb @@ -0,0 +1,95 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The properties of an ImmutabilityPolicy of a blob container. + # + class ImmutabilityPolicyProperties + + include MsRestAzure + + # @return [Integer] The immutability period for the blobs in the + # container since the policy creation, in days. + attr_accessor :immutability_period_since_creation_in_days + + # @return [ImmutabilityPolicyState] The ImmutabilityPolicy state of a + # blob container, possible values include: Locked and Unlocked. Possible + # values include: 'Locked', 'Unlocked' + attr_accessor :state + + # @return [String] ImmutabilityPolicy Etag. + attr_accessor :etag + + # @return [Array] The ImmutabilityPolicy update + # history of the blob container. + attr_accessor :update_history + + + # + # Mapper for ImmutabilityPolicyProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ImmutabilityPolicyProperties', + type: { + name: 'Composite', + class_name: 'ImmutabilityPolicyProperties', + model_properties: { + immutability_period_since_creation_in_days: { + client_side_validation: true, + required: true, + serialized_name: 'properties.immutabilityPeriodSinceCreationInDays', + type: { + name: 'Number' + } + }, + state: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.state', + type: { + name: 'String' + } + }, + etag: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'etag', + type: { + name: 'String' + } + }, + update_history: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'updateHistory', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'UpdateHistoryPropertyElementType', + type: { + name: 'Composite', + class_name: 'UpdateHistoryProperty' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb new file mode 100644 index 000000000..7b37638f9 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for ImmutabilityPolicyState + # + module ImmutabilityPolicyState + Locked = "Locked" + Unlocked = "Unlocked" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb new file mode 100644 index 000000000..bf3265935 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for ImmutabilityPolicyUpdateType + # + module ImmutabilityPolicyUpdateType + Put = "put" + Lock = "lock" + Extend = "extend" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/iprule.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/iprule.rb new file mode 100644 index 000000000..67acde5a5 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/iprule.rb @@ -0,0 +1,61 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # IP rule with specific IP or IP range in CIDR format. + # + class IPRule + + include MsRestAzure + + # @return [String] Specifies the IP or IP range in CIDR format. Only IPV4 + # address is allowed. + attr_accessor :ipaddress_or_range + + # @return [Action] The action of IP ACL rule. Possible values include: + # 'Allow'. Default value: 'Allow' . + attr_accessor :action + + + # + # Mapper for IPRule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'IPRule', + type: { + name: 'Composite', + class_name: 'IPRule', + model_properties: { + ipaddress_or_range: { + client_side_validation: true, + required: true, + serialized_name: 'value', + type: { + name: 'String' + } + }, + action: { + client_side_validation: true, + required: false, + serialized_name: 'action', + default_value: 'Allow', + type: { + name: 'Enum', + module: 'Action' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_permission.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_permission.rb new file mode 100644 index 000000000..a348cadbc --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_permission.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for KeyPermission + # + module KeyPermission + Read = "Read" + Full = "Full" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_source.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_source.rb new file mode 100644 index 000000000..bc113a74b --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_source.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for KeySource + # + module KeySource + MicrosoftStorage = "Microsoft.Storage" + MicrosoftKeyvault = "Microsoft.Keyvault" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_vault_properties.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_vault_properties.rb new file mode 100644 index 000000000..5ae0d5bd6 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/key_vault_properties.rb @@ -0,0 +1,68 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Properties of key vault. + # + class KeyVaultProperties + + include MsRestAzure + + # @return [String] The name of KeyVault key. + attr_accessor :key_name + + # @return [String] The version of KeyVault key. + attr_accessor :key_version + + # @return [String] The Uri of KeyVault. + attr_accessor :key_vault_uri + + + # + # Mapper for KeyVaultProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'KeyVaultProperties', + type: { + name: 'Composite', + class_name: 'KeyVaultProperties', + model_properties: { + key_name: { + client_side_validation: true, + required: false, + serialized_name: 'keyname', + type: { + name: 'String' + } + }, + key_version: { + client_side_validation: true, + required: false, + serialized_name: 'keyversion', + type: { + name: 'String' + } + }, + key_vault_uri: { + client_side_validation: true, + required: false, + serialized_name: 'keyvaulturi', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/kind.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/kind.rb new file mode 100644 index 000000000..22d18fc3e --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/kind.rb @@ -0,0 +1,19 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for Kind + # + module Kind + Storage = "Storage" + StorageV2 = "StorageV2" + BlobStorage = "BlobStorage" + FileStorage = "FileStorage" + BlockBlobStorage = "BlockBlobStorage" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_duration.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_duration.rb new file mode 100644 index 000000000..55f2f2c47 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_duration.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for LeaseDuration + # + module LeaseDuration + Infinite = "Infinite" + Fixed = "Fixed" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_state.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_state.rb new file mode 100644 index 000000000..466836ccd --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_state.rb @@ -0,0 +1,19 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for LeaseState + # + module LeaseState + Available = "Available" + Leased = "Leased" + Expired = "Expired" + Breaking = "Breaking" + Broken = "Broken" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_status.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_status.rb new file mode 100644 index 000000000..62f884690 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/lease_status.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for LeaseStatus + # + module LeaseStatus + Locked = "Locked" + Unlocked = "Unlocked" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/legal_hold.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/legal_hold.rb new file mode 100644 index 000000000..4e648c73b --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/legal_hold.rb @@ -0,0 +1,71 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The LegalHold property of a blob container. + # + class LegalHold + + include MsRestAzure + + # @return [Boolean] The hasLegalHold public property is set to true by + # SRP if there are at least one existing tag. The hasLegalHold public + # property is set to false by SRP if all existing legal hold tags are + # cleared out. There can be a maximum of 1000 blob containers with + # hasLegalHold=true for a given account. + attr_accessor :has_legal_hold + + # @return [Array] Each tag should be 3 to 23 alphanumeric + # characters and is normalized to lower case at SRP. + attr_accessor :tags + + + # + # Mapper for LegalHold class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'LegalHold', + type: { + name: 'Composite', + class_name: 'LegalHold', + model_properties: { + has_legal_hold: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'hasLegalHold', + type: { + name: 'Boolean' + } + }, + tags: { + client_side_validation: true, + required: true, + serialized_name: 'tags', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb new file mode 100644 index 000000000..48535aea2 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb @@ -0,0 +1,72 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The LegalHold property of a blob container. + # + class LegalHoldProperties + + include MsRestAzure + + # @return [Boolean] The hasLegalHold public property is set to true by + # SRP if there are at least one existing tag. The hasLegalHold public + # property is set to false by SRP if all existing legal hold tags are + # cleared out. There can be a maximum of 1000 blob containers with + # hasLegalHold=true for a given account. + attr_accessor :has_legal_hold + + # @return [Array] The list of LegalHold tags of a blob + # container. + attr_accessor :tags + + + # + # Mapper for LegalHoldProperties class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'LegalHoldProperties', + type: { + name: 'Composite', + class_name: 'LegalHoldProperties', + model_properties: { + has_legal_hold: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'hasLegalHold', + type: { + name: 'Boolean' + } + }, + tags: { + client_side_validation: true, + required: false, + serialized_name: 'tags', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'TagPropertyElementType', + type: { + name: 'Composite', + class_name: 'TagProperty' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb new file mode 100644 index 000000000..91a927a07 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb @@ -0,0 +1,47 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The List SAS credentials operation response. + # + class ListAccountSasResponse + + include MsRestAzure + + # @return [String] List SAS credentials of storage account. + attr_accessor :account_sas_token + + + # + # Mapper for ListAccountSasResponse class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ListAccountSasResponse', + type: { + name: 'Composite', + class_name: 'ListAccountSasResponse', + model_properties: { + account_sas_token: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'accountSasToken', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_container_item.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_container_item.rb new file mode 100644 index 000000000..acad6a5c4 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_container_item.rb @@ -0,0 +1,216 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The blob container properties be listed out. + # + class ListContainerItem < AzureEntityResource + + include MsRestAzure + + # @return [PublicAccess] Specifies whether data in the container may be + # accessed publicly and the level of access. Possible values include: + # 'Container', 'Blob', 'None' + attr_accessor :public_access + + # @return [DateTime] Returns the date and time the container was last + # modified. + attr_accessor :last_modified_time + + # @return [LeaseStatus] The lease status of the container. Possible + # values include: 'Locked', 'Unlocked' + attr_accessor :lease_status + + # @return [LeaseState] Lease state of the container. Possible values + # include: 'Available', 'Leased', 'Expired', 'Breaking', 'Broken' + attr_accessor :lease_state + + # @return [LeaseDuration] Specifies whether the lease on a container is + # of infinite or fixed duration, only when the container is leased. + # Possible values include: 'Infinite', 'Fixed' + attr_accessor :lease_duration + + # @return [Hash{String => String}] A name-value pair to associate with + # the container as metadata. + attr_accessor :metadata + + # @return [ImmutabilityPolicyProperties] The ImmutabilityPolicy property + # of the container. + attr_accessor :immutability_policy + + # @return [LegalHoldProperties] The LegalHold property of the container. + attr_accessor :legal_hold + + # @return [Boolean] The hasLegalHold public property is set to true by + # SRP if there are at least one existing tag. The hasLegalHold public + # property is set to false by SRP if all existing legal hold tags are + # cleared out. There can be a maximum of 1000 blob containers with + # hasLegalHold=true for a given account. + attr_accessor :has_legal_hold + + # @return [Boolean] The hasImmutabilityPolicy public property is set to + # true by SRP if ImmutabilityPolicy has been created for this container. + # The hasImmutabilityPolicy public property is set to false by SRP if + # ImmutabilityPolicy has not been created for this container. + attr_accessor :has_immutability_policy + + + # + # Mapper for ListContainerItem class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ListContainerItem', + type: { + name: 'Composite', + class_name: 'ListContainerItem', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + etag: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'etag', + type: { + name: 'String' + } + }, + public_access: { + client_side_validation: true, + required: false, + serialized_name: 'properties.publicAccess', + type: { + name: 'Enum', + module: 'PublicAccess' + } + }, + last_modified_time: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.lastModifiedTime', + type: { + name: 'DateTime' + } + }, + lease_status: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.leaseStatus', + type: { + name: 'String' + } + }, + lease_state: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.leaseState', + type: { + name: 'String' + } + }, + lease_duration: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.leaseDuration', + type: { + name: 'String' + } + }, + metadata: { + client_side_validation: true, + required: false, + serialized_name: 'properties.metadata', + type: { + name: 'Dictionary', + value: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + immutability_policy: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.immutabilityPolicy', + type: { + name: 'Composite', + class_name: 'ImmutabilityPolicyProperties' + } + }, + legal_hold: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.legalHold', + type: { + name: 'Composite', + class_name: 'LegalHoldProperties' + } + }, + has_legal_hold: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.hasLegalHold', + type: { + name: 'Boolean' + } + }, + has_immutability_policy: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.hasImmutabilityPolicy', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_container_items.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_container_items.rb new file mode 100644 index 000000000..ef8721fb1 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_container_items.rb @@ -0,0 +1,55 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The list of blob containers. + # + class ListContainerItems + + include MsRestAzure + + # @return [Array] The list of blob containers. + attr_accessor :value + + + # + # Mapper for ListContainerItems class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ListContainerItems', + type: { + name: 'Composite', + class_name: 'ListContainerItems', + model_properties: { + value: { + client_side_validation: true, + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'ListContainerItemElementType', + type: { + name: 'Composite', + class_name: 'ListContainerItem' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb new file mode 100644 index 000000000..8778f9996 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb @@ -0,0 +1,47 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The List service SAS credentials operation response. + # + class ListServiceSasResponse + + include MsRestAzure + + # @return [String] List service SAS credentials of speicific resource. + attr_accessor :service_sas_token + + + # + # Mapper for ListServiceSasResponse class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ListServiceSasResponse', + type: { + name: 'Composite', + class_name: 'ListServiceSasResponse', + model_properties: { + service_sas_token: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'serviceSasToken', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/metric_specification.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/metric_specification.rb new file mode 100644 index 000000000..841cae8b8 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/metric_specification.rb @@ -0,0 +1,145 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Metric specification of operation. + # + class MetricSpecification + + include MsRestAzure + + # @return [String] Name of metric specification. + attr_accessor :name + + # @return [String] Display name of metric specification. + attr_accessor :display_name + + # @return [String] Display description of metric specification. + attr_accessor :display_description + + # @return [String] Unit could be Bytes or Count. + attr_accessor :unit + + # @return [Array] Dimensions of blobs, including blob type and + # access tier. + attr_accessor :dimensions + + # @return [String] Aggregation type could be Average. + attr_accessor :aggregation_type + + # @return [Boolean] The property to decide fill gap with zero or not. + attr_accessor :fill_gap_with_zero + + # @return [String] The category this metric specification belong to, + # could be Capacity. + attr_accessor :category + + # @return [String] Account Resource Id. + attr_accessor :resource_id_dimension_name_override + + + # + # Mapper for MetricSpecification class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'MetricSpecification', + type: { + name: 'Composite', + class_name: 'MetricSpecification', + model_properties: { + name: { + client_side_validation: true, + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display_name: { + client_side_validation: true, + required: false, + serialized_name: 'displayName', + type: { + name: 'String' + } + }, + display_description: { + client_side_validation: true, + required: false, + serialized_name: 'displayDescription', + type: { + name: 'String' + } + }, + unit: { + client_side_validation: true, + required: false, + serialized_name: 'unit', + type: { + name: 'String' + } + }, + dimensions: { + client_side_validation: true, + required: false, + serialized_name: 'dimensions', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'DimensionElementType', + type: { + name: 'Composite', + class_name: 'Dimension' + } + } + } + }, + aggregation_type: { + client_side_validation: true, + required: false, + serialized_name: 'aggregationType', + type: { + name: 'String' + } + }, + fill_gap_with_zero: { + client_side_validation: true, + required: false, + serialized_name: 'fillGapWithZero', + type: { + name: 'Boolean' + } + }, + category: { + client_side_validation: true, + required: false, + serialized_name: 'category', + type: { + name: 'String' + } + }, + resource_id_dimension_name_override: { + client_side_validation: true, + required: false, + serialized_name: 'resourceIdDimensionNameOverride', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/network_rule_set.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/network_rule_set.rb new file mode 100644 index 000000000..9326ceb2b --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/network_rule_set.rb @@ -0,0 +1,106 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Network rule set + # + class NetworkRuleSet + + include MsRestAzure + + # @return [Bypass] Specifies whether traffic is bypassed for + # Logging/Metrics/AzureServices. Possible values are any combination of + # Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or + # None to bypass none of those traffics. Possible values include: 'None', + # 'Logging', 'Metrics', 'AzureServices'. Default value: 'AzureServices' . + attr_accessor :bypass + + # @return [Array] Sets the virtual network rules + attr_accessor :virtual_network_rules + + # @return [Array] Sets the IP ACL rules + attr_accessor :ip_rules + + # @return [DefaultAction] Specifies the default action of allow or deny + # when no other rules match. Possible values include: 'Allow', 'Deny'. + # Default value: 'Allow' . + attr_accessor :default_action + + + # + # Mapper for NetworkRuleSet class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'NetworkRuleSet', + type: { + name: 'Composite', + class_name: 'NetworkRuleSet', + model_properties: { + bypass: { + client_side_validation: true, + required: false, + serialized_name: 'bypass', + default_value: 'AzureServices', + type: { + name: 'String' + } + }, + virtual_network_rules: { + client_side_validation: true, + required: false, + serialized_name: 'virtualNetworkRules', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'VirtualNetworkRuleElementType', + type: { + name: 'Composite', + class_name: 'VirtualNetworkRule' + } + } + } + }, + ip_rules: { + client_side_validation: true, + required: false, + serialized_name: 'ipRules', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'IPRuleElementType', + type: { + name: 'Composite', + class_name: 'IPRule' + } + } + } + }, + default_action: { + client_side_validation: true, + required: true, + serialized_name: 'defaultAction', + default_value: 'Allow', + type: { + name: 'Enum', + module: 'DefaultAction' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation.rb new file mode 100644 index 000000000..6a2180140 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation.rb @@ -0,0 +1,83 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Storage REST API operation definition. + # + class Operation + + include MsRestAzure + + # @return [String] Operation name: {provider}/{resource}/{operation} + attr_accessor :name + + # @return [OperationDisplay] Display metadata associated with the + # operation. + attr_accessor :display + + # @return [String] The origin of operations. + attr_accessor :origin + + # @return [ServiceSpecification] One property of operation, include + # metric specifications. + attr_accessor :service_specification + + + # + # Mapper for Operation class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Operation', + type: { + name: 'Composite', + class_name: 'Operation', + model_properties: { + name: { + client_side_validation: true, + required: false, + serialized_name: 'name', + type: { + name: 'String' + } + }, + display: { + client_side_validation: true, + required: false, + serialized_name: 'display', + type: { + name: 'Composite', + class_name: 'OperationDisplay' + } + }, + origin: { + client_side_validation: true, + required: false, + serialized_name: 'origin', + type: { + name: 'String' + } + }, + service_specification: { + client_side_validation: true, + required: false, + serialized_name: 'properties.serviceSpecification', + type: { + name: 'Composite', + class_name: 'ServiceSpecification' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation_display.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation_display.rb new file mode 100644 index 000000000..dff1949b5 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation_display.rb @@ -0,0 +1,79 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Display metadata associated with the operation. + # + class OperationDisplay + + include MsRestAzure + + # @return [String] Service provider: Microsoft Storage. + attr_accessor :provider + + # @return [String] Resource on which the operation is performed etc. + attr_accessor :resource + + # @return [String] Type of operation: get, read, delete, etc. + attr_accessor :operation + + # @return [String] Description of the operation. + attr_accessor :description + + + # + # Mapper for OperationDisplay class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Operation_display', + type: { + name: 'Composite', + class_name: 'OperationDisplay', + model_properties: { + provider: { + client_side_validation: true, + required: false, + serialized_name: 'provider', + type: { + name: 'String' + } + }, + resource: { + client_side_validation: true, + required: false, + serialized_name: 'resource', + type: { + name: 'String' + } + }, + operation: { + client_side_validation: true, + required: false, + serialized_name: 'operation', + type: { + name: 'String' + } + }, + description: { + client_side_validation: true, + required: false, + serialized_name: 'description', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation_list_result.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation_list_result.rb new file mode 100644 index 000000000..bda3e1503 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/operation_list_result.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Result of the request to list Storage operations. It contains a list of + # operations and a URL link to get the next set of results. + # + class OperationListResult + + include MsRestAzure + + # @return [Array] List of Storage operations supported by the + # Storage resource provider. + attr_accessor :value + + + # + # Mapper for OperationListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'OperationListResult', + type: { + name: 'Composite', + class_name: 'OperationListResult', + model_properties: { + value: { + client_side_validation: true, + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'OperationElementType', + type: { + name: 'Composite', + class_name: 'Operation' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/permissions.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/permissions.rb new file mode 100644 index 000000000..75a329eba --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/permissions.rb @@ -0,0 +1,22 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for Permissions + # + module Permissions + R = "r" + D = "d" + W = "w" + L = "l" + A = "a" + C = "c" + U = "u" + P = "p" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/provisioning_state.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/provisioning_state.rb new file mode 100644 index 000000000..88d484d1e --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/provisioning_state.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for ProvisioningState + # + module ProvisioningState + Creating = "Creating" + ResolvingDNS = "ResolvingDNS" + Succeeded = "Succeeded" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/proxy_resource.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/proxy_resource.rb new file mode 100644 index 000000000..fee605640 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/proxy_resource.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The resource model definition for a ARM proxy resource. It will have + # everything other than required location and tags + # + class ProxyResource < Resource + + include MsRestAzure + + + # + # Mapper for ProxyResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ProxyResource', + type: { + name: 'Composite', + class_name: 'ProxyResource', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/public_access.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/public_access.rb new file mode 100644 index 000000000..1edd065bd --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/public_access.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for PublicAccess + # + module PublicAccess + Container = "Container" + Blob = "Blob" + None = "None" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/reason.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/reason.rb new file mode 100644 index 000000000..094080d3a --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/reason.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for Reason + # + module Reason + AccountNameInvalid = "AccountNameInvalid" + AlreadyExists = "AlreadyExists" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/reason_code.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/reason_code.rb new file mode 100644 index 000000000..84bf9656a --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/reason_code.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for ReasonCode + # + module ReasonCode + QuotaId = "QuotaId" + NotAvailableForSubscription = "NotAvailableForSubscription" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/resource.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/resource.rb new file mode 100644 index 000000000..455439c01 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/resource.rb @@ -0,0 +1,83 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Model object. + # + # + class Resource + + include MsRestAzure + + # @return [String] Fully qualified resource Id for the resource. Ex - + # /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + attr_accessor :id + + # @return [String] The name of the resource + attr_accessor :name + + # @return [String] The type of the resource. Ex- + # Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + attr_accessor :type + + + # @return [String] the name of the resource group of the resource. + def resource_group + unless self.id.nil? + groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/) + groups.captures[0].strip if groups + end + end + + + # + # Mapper for Resource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Resource', + type: { + name: 'Composite', + class_name: 'Resource', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/restriction.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/restriction.rb new file mode 100644 index 000000000..6b56a5a83 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/restriction.rb @@ -0,0 +1,85 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The restriction because of which SKU cannot be used. + # + class Restriction + + include MsRestAzure + + # @return [String] The type of restrictions. As of now only possible + # value for this is location. + attr_accessor :type + + # @return [Array] The value of restrictions. If the restriction + # type is set to location. This would be different locations where the + # SKU is restricted. + attr_accessor :values + + # @return [ReasonCode] The reason for the restriction. As of now this can + # be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the + # SKU has requiredQuotas parameter as the subscription does not belong to + # that quota. The "NotAvailableForSubscription" is related to capacity at + # DC. Possible values include: 'QuotaId', 'NotAvailableForSubscription' + attr_accessor :reason_code + + + # + # Mapper for Restriction class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Restriction', + type: { + name: 'Composite', + class_name: 'Restriction', + model_properties: { + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + values: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'values', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + reason_code: { + client_side_validation: true, + required: false, + serialized_name: 'reasonCode', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb new file mode 100644 index 000000000..cc6db0a1a --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb @@ -0,0 +1,247 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The parameters to list service SAS credentials of a speicific resource. + # + class ServiceSasParameters + + include MsRestAzure + + # @return [String] The canonical path to the signed resource. + attr_accessor :canonicalized_resource + + # @return [SignedResource] The signed services accessible with the + # service SAS. Possible values include: Blob (b), Container (c), File + # (f), Share (s). Possible values include: 'b', 'c', 'f', 's' + attr_accessor :resource + + # @return [Permissions] The signed permissions for the service SAS. + # Possible values include: Read (r), Write (w), Delete (d), List (l), Add + # (a), Create (c), Update (u) and Process (p). Possible values include: + # 'r', 'd', 'w', 'l', 'a', 'c', 'u', 'p' + attr_accessor :permissions + + # @return [String] An IP address or a range of IP addresses from which to + # accept requests. + attr_accessor :ipaddress_or_range + + # @return [HttpProtocol] The protocol permitted for a request made with + # the account SAS. Possible values include: 'https,http', 'https' + attr_accessor :protocols + + # @return [DateTime] The time at which the SAS becomes valid. + attr_accessor :shared_access_start_time + + # @return [DateTime] The time at which the shared access signature + # becomes invalid. + attr_accessor :shared_access_expiry_time + + # @return [String] A unique value up to 64 characters in length that + # correlates to an access policy specified for the container, queue, or + # table. + attr_accessor :identifier + + # @return [String] The start of partition key. + attr_accessor :partition_key_start + + # @return [String] The end of partition key. + attr_accessor :partition_key_end + + # @return [String] The start of row key. + attr_accessor :row_key_start + + # @return [String] The end of row key. + attr_accessor :row_key_end + + # @return [String] The key to sign the account SAS token with. + attr_accessor :key_to_sign + + # @return [String] The response header override for cache control. + attr_accessor :cache_control + + # @return [String] The response header override for content disposition. + attr_accessor :content_disposition + + # @return [String] The response header override for content encoding. + attr_accessor :content_encoding + + # @return [String] The response header override for content language. + attr_accessor :content_language + + # @return [String] The response header override for content type. + attr_accessor :content_type + + + # + # Mapper for ServiceSasParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ServiceSasParameters', + type: { + name: 'Composite', + class_name: 'ServiceSasParameters', + model_properties: { + canonicalized_resource: { + client_side_validation: true, + required: true, + serialized_name: 'canonicalizedResource', + type: { + name: 'String' + } + }, + resource: { + client_side_validation: true, + required: false, + serialized_name: 'signedResource', + type: { + name: 'String' + } + }, + permissions: { + client_side_validation: true, + required: false, + serialized_name: 'signedPermission', + type: { + name: 'String' + } + }, + ipaddress_or_range: { + client_side_validation: true, + required: false, + serialized_name: 'signedIp', + type: { + name: 'String' + } + }, + protocols: { + client_side_validation: true, + required: false, + serialized_name: 'signedProtocol', + type: { + name: 'Enum', + module: 'HttpProtocol' + } + }, + shared_access_start_time: { + client_side_validation: true, + required: false, + serialized_name: 'signedStart', + type: { + name: 'DateTime' + } + }, + shared_access_expiry_time: { + client_side_validation: true, + required: false, + serialized_name: 'signedExpiry', + type: { + name: 'DateTime' + } + }, + identifier: { + client_side_validation: true, + required: false, + serialized_name: 'signedIdentifier', + constraints: { + MaxLength: 64 + }, + type: { + name: 'String' + } + }, + partition_key_start: { + client_side_validation: true, + required: false, + serialized_name: 'startPk', + type: { + name: 'String' + } + }, + partition_key_end: { + client_side_validation: true, + required: false, + serialized_name: 'endPk', + type: { + name: 'String' + } + }, + row_key_start: { + client_side_validation: true, + required: false, + serialized_name: 'startRk', + type: { + name: 'String' + } + }, + row_key_end: { + client_side_validation: true, + required: false, + serialized_name: 'endRk', + type: { + name: 'String' + } + }, + key_to_sign: { + client_side_validation: true, + required: false, + serialized_name: 'keyToSign', + type: { + name: 'String' + } + }, + cache_control: { + client_side_validation: true, + required: false, + serialized_name: 'rscc', + type: { + name: 'String' + } + }, + content_disposition: { + client_side_validation: true, + required: false, + serialized_name: 'rscd', + type: { + name: 'String' + } + }, + content_encoding: { + client_side_validation: true, + required: false, + serialized_name: 'rsce', + type: { + name: 'String' + } + }, + content_language: { + client_side_validation: true, + required: false, + serialized_name: 'rscl', + type: { + name: 'String' + } + }, + content_type: { + client_side_validation: true, + required: false, + serialized_name: 'rsct', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/service_specification.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/service_specification.rb new file mode 100644 index 000000000..17e41742e --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/service_specification.rb @@ -0,0 +1,56 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # One property of operation, include metric specifications. + # + class ServiceSpecification + + include MsRestAzure + + # @return [Array] Metric specifications of + # operation. + attr_accessor :metric_specifications + + + # + # Mapper for ServiceSpecification class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'ServiceSpecification', + type: { + name: 'Composite', + class_name: 'ServiceSpecification', + model_properties: { + metric_specifications: { + client_side_validation: true, + required: false, + serialized_name: 'metricSpecifications', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'MetricSpecificationElementType', + type: { + name: 'Composite', + class_name: 'MetricSpecification' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/services.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/services.rb new file mode 100644 index 000000000..eaab5cc64 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/services.rb @@ -0,0 +1,18 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for Services + # + module Services + B = "b" + Q = "q" + T = "t" + F = "f" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/signed_resource.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/signed_resource.rb new file mode 100644 index 000000000..67466621d --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/signed_resource.rb @@ -0,0 +1,18 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for SignedResource + # + module SignedResource + B = "b" + C = "c" + F = "f" + S = "s" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/signed_resource_types.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/signed_resource_types.rb new file mode 100644 index 000000000..17362f2e4 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/signed_resource_types.rb @@ -0,0 +1,17 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for SignedResourceTypes + # + module SignedResourceTypes + S = "s" + C = "c" + O = "o" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku.rb new file mode 100644 index 000000000..d245b645e --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku.rb @@ -0,0 +1,159 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The SKU of the storage account. + # + class Sku + + include MsRestAzure + + # @return [SkuName] Gets or sets the sku name. Required for account + # creation; optional for update. Note that in older versions, sku name + # was called accountType. Possible values include: 'Standard_LRS', + # 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS', + # 'Premium_ZRS' + attr_accessor :name + + # @return [SkuTier] Gets the sku tier. This is based on the SKU name. + # Possible values include: 'Standard', 'Premium' + attr_accessor :tier + + # @return [String] The type of the resource, usually it is + # 'storageAccounts'. + attr_accessor :resource_type + + # @return [Kind] Indicates the type of storage account. Possible values + # include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + # 'BlockBlobStorage' + attr_accessor :kind + + # @return [Array] The set of locations that the SKU is available. + # This will be supported and registered Azure Geo Regions (e.g. West US, + # East US, Southeast Asia, etc.). + attr_accessor :locations + + # @return [Array] The capability information in the + # specified sku, including file encryption, network acls, change + # notification, etc. + attr_accessor :capabilities + + # @return [Array] The restrictions because of which SKU + # cannot be used. This is empty if there are no restrictions. + attr_accessor :restrictions + + + # + # Mapper for Sku class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Sku', + type: { + name: 'Composite', + class_name: 'Sku', + model_properties: { + name: { + client_side_validation: true, + required: true, + serialized_name: 'name', + type: { + name: 'Enum', + module: 'SkuName' + } + }, + tier: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'tier', + type: { + name: 'Enum', + module: 'SkuTier' + } + }, + resource_type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'resourceType', + type: { + name: 'String' + } + }, + kind: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + locations: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'locations', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + capabilities: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'capabilities', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'SKUCapabilityElementType', + type: { + name: 'Composite', + class_name: 'SKUCapability' + } + } + } + }, + restrictions: { + client_side_validation: true, + required: false, + serialized_name: 'restrictions', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'RestrictionElementType', + type: { + name: 'Composite', + class_name: 'Restriction' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku_name.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku_name.rb new file mode 100644 index 000000000..85cd2f1a2 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku_name.rb @@ -0,0 +1,20 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for SkuName + # + module SkuName + StandardLRS = "Standard_LRS" + StandardGRS = "Standard_GRS" + StandardRAGRS = "Standard_RAGRS" + StandardZRS = "Standard_ZRS" + PremiumLRS = "Premium_LRS" + PremiumZRS = "Premium_ZRS" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku_tier.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku_tier.rb new file mode 100644 index 000000000..d5fc406a1 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/sku_tier.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for SkuTier + # + module SkuTier + Standard = "Standard" + Premium = "Premium" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/skucapability.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/skucapability.rb new file mode 100644 index 000000000..b0def95eb --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/skucapability.rb @@ -0,0 +1,63 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The capability information in the specified sku, including file + # encryption, network acls, change notification, etc. + # + class SKUCapability + + include MsRestAzure + + # @return [String] The name of capability, The capability information in + # the specified sku, including file encryption, network acls, change + # notification, etc. + attr_accessor :name + + # @return [String] A string value to indicate states of given capability. + # Possibly 'true' or 'false'. + attr_accessor :value + + + # + # Mapper for SKUCapability class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'SKUCapability', + type: { + name: 'Composite', + class_name: 'SKUCapability', + model_properties: { + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + value: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/state.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/state.rb new file mode 100644 index 000000000..4a753ca8c --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/state.rb @@ -0,0 +1,19 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for State + # + module State + Provisioning = "provisioning" + Deprovisioning = "deprovisioning" + Succeeded = "succeeded" + Failed = "failed" + NetworkSourceDeleted = "networkSourceDeleted" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account.rb new file mode 100644 index 000000000..5e125c23d --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account.rb @@ -0,0 +1,349 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The storage account. + # + class StorageAccount < TrackedResource + + include MsRestAzure + + # @return [Sku] Gets the SKU. + attr_accessor :sku + + # @return [Kind] Gets the Kind. Possible values include: 'Storage', + # 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + attr_accessor :kind + + # @return [Identity] The identity of the resource. + attr_accessor :identity + + # @return [ProvisioningState] Gets the status of the storage account at + # the time the operation was called. Possible values include: 'Creating', + # 'ResolvingDNS', 'Succeeded' + attr_accessor :provisioning_state + + # @return [Endpoints] Gets the URLs that are used to perform a retrieval + # of a public blob, queue, or table object. Note that Standard_ZRS and + # Premium_LRS accounts only return the blob endpoint. + attr_accessor :primary_endpoints + + # @return [String] Gets the location of the primary data center for the + # storage account. + attr_accessor :primary_location + + # @return [AccountStatus] Gets the status indicating whether the primary + # location of the storage account is available or unavailable. Possible + # values include: 'available', 'unavailable' + attr_accessor :status_of_primary + + # @return [DateTime] Gets the timestamp of the most recent instance of a + # failover to the secondary location. Only the most recent timestamp is + # retained. This element is not returned if there has never been a + # failover instance. Only available if the accountType is Standard_GRS or + # Standard_RAGRS. + attr_accessor :last_geo_failover_time + + # @return [String] Gets the location of the geo-replicated secondary for + # the storage account. Only available if the accountType is Standard_GRS + # or Standard_RAGRS. + attr_accessor :secondary_location + + # @return [AccountStatus] Gets the status indicating whether the + # secondary location of the storage account is available or unavailable. + # Only available if the SKU name is Standard_GRS or Standard_RAGRS. + # Possible values include: 'available', 'unavailable' + attr_accessor :status_of_secondary + + # @return [DateTime] Gets the creation date and time of the storage + # account in UTC. + attr_accessor :creation_time + + # @return [CustomDomain] Gets the custom domain the user assigned to this + # storage account. + attr_accessor :custom_domain + + # @return [Endpoints] Gets the URLs that are used to perform a retrieval + # of a public blob, queue, or table object from the secondary location of + # the storage account. Only available if the SKU name is Standard_RAGRS. + attr_accessor :secondary_endpoints + + # @return [Encryption] Gets the encryption settings on the account. If + # unspecified, the account is unencrypted. + attr_accessor :encryption + + # @return [AccessTier] Required for storage accounts where kind = + # BlobStorage. The access tier used for billing. Possible values include: + # 'Hot', 'Cool' + attr_accessor :access_tier + + # @return [Boolean] Enables Azure Files AAD Integration for SMB if sets + # to true. + attr_accessor :enable_azure_files_aad_integration + + # @return [Boolean] Allows https traffic only to storage service if sets + # to true. + attr_accessor :enable_https_traffic_only + + # @return [NetworkRuleSet] Network rule set + attr_accessor :network_rule_set + + # @return [Boolean] Account HierarchicalNamespace enabled if sets to + # true. + attr_accessor :is_hns_enabled + + + # + # Mapper for StorageAccount class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccount', + type: { + name: 'Composite', + class_name: 'StorageAccount', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + tags: { + client_side_validation: true, + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + location: { + client_side_validation: true, + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + sku: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + kind: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + identity: { + client_side_validation: true, + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'Identity' + } + }, + provisioning_state: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.provisioningState', + type: { + name: 'Enum', + module: 'ProvisioningState' + } + }, + primary_endpoints: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.primaryEndpoints', + type: { + name: 'Composite', + class_name: 'Endpoints' + } + }, + primary_location: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.primaryLocation', + type: { + name: 'String' + } + }, + status_of_primary: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.statusOfPrimary', + type: { + name: 'Enum', + module: 'AccountStatus' + } + }, + last_geo_failover_time: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.lastGeoFailoverTime', + type: { + name: 'DateTime' + } + }, + secondary_location: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.secondaryLocation', + type: { + name: 'String' + } + }, + status_of_secondary: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.statusOfSecondary', + type: { + name: 'Enum', + module: 'AccountStatus' + } + }, + creation_time: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.creationTime', + type: { + name: 'DateTime' + } + }, + custom_domain: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.customDomain', + type: { + name: 'Composite', + class_name: 'CustomDomain' + } + }, + secondary_endpoints: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.secondaryEndpoints', + type: { + name: 'Composite', + class_name: 'Endpoints' + } + }, + encryption: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.encryption', + type: { + name: 'Composite', + class_name: 'Encryption' + } + }, + access_tier: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.accessTier', + type: { + name: 'Enum', + module: 'AccessTier' + } + }, + enable_azure_files_aad_integration: { + client_side_validation: true, + required: false, + serialized_name: 'properties.azureFilesAadIntegration', + type: { + name: 'Boolean' + } + }, + enable_https_traffic_only: { + client_side_validation: true, + required: false, + serialized_name: 'properties.supportsHttpsTrafficOnly', + type: { + name: 'Boolean' + } + }, + network_rule_set: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'properties.networkAcls', + type: { + name: 'Composite', + class_name: 'NetworkRuleSet' + } + }, + is_hns_enabled: { + client_side_validation: true, + required: false, + serialized_name: 'properties.isHnsEnabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb new file mode 100644 index 000000000..67b667d59 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb @@ -0,0 +1,62 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The parameters used to check the availabity of the storage account name. + # + class StorageAccountCheckNameAvailabilityParameters + + include MsRestAzure + + # @return [String] The storage account name. + attr_accessor :name + + # @return [String] The type of resource, + # Microsoft.Storage/storageAccounts. Default value: + # 'Microsoft.Storage/storageAccounts' . + attr_accessor :type + + + # + # Mapper for StorageAccountCheckNameAvailabilityParameters class as Ruby + # Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountCheckNameAvailabilityParameters', + type: { + name: 'Composite', + class_name: 'StorageAccountCheckNameAvailabilityParameters', + model_properties: { + name: { + client_side_validation: true, + required: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: true, + is_constant: true, + serialized_name: 'type', + default_value: 'Microsoft.Storage/storageAccounts', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb new file mode 100644 index 000000000..ab6c9c46b --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb @@ -0,0 +1,203 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The parameters used when creating a storage account. + # + class StorageAccountCreateParameters + + include MsRestAzure + + # @return [Sku] Required. Gets or sets the sku name. + attr_accessor :sku + + # @return [Kind] Required. Indicates the type of storage account. + # Possible values include: 'Storage', 'StorageV2', 'BlobStorage', + # 'FileStorage', 'BlockBlobStorage' + attr_accessor :kind + + # @return [String] Required. Gets or sets the location of the resource. + # This will be one of the supported and registered Azure Geo Regions + # (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + # resource cannot be changed once it is created, but if an identical geo + # region is specified on update, the request will succeed. + attr_accessor :location + + # @return [Hash{String => String}] Gets or sets a list of key value pairs + # that describe the resource. These tags can be used for viewing and + # grouping this resource (across resource groups). A maximum of 15 tags + # can be provided for a resource. Each tag must have a key with a length + # no greater than 128 characters and a value with a length no greater + # than 256 characters. + attr_accessor :tags + + # @return [Identity] The identity of the resource. + attr_accessor :identity + + # @return [CustomDomain] User domain assigned to the storage account. + # Name is the CNAME source. Only one custom domain is supported per + # storage account at this time. To clear the existing custom domain, use + # an empty string for the custom domain name property. + attr_accessor :custom_domain + + # @return [Encryption] Provides the encryption settings on the account. + # If left unspecified the account encryption settings will remain the + # same. The default setting is unencrypted. + attr_accessor :encryption + + # @return [NetworkRuleSet] Network rule set + attr_accessor :network_rule_set + + # @return [AccessTier] Required for storage accounts where kind = + # BlobStorage. The access tier used for billing. Possible values include: + # 'Hot', 'Cool' + attr_accessor :access_tier + + # @return [Boolean] Enables Azure Files AAD Integration for SMB if sets + # to true. + attr_accessor :enable_azure_files_aad_integration + + # @return [Boolean] Allows https traffic only to storage service if sets + # to true. + attr_accessor :enable_https_traffic_only + + # @return [Boolean] Account HierarchicalNamespace enabled if sets to + # true. + attr_accessor :is_hns_enabled + + + # + # Mapper for StorageAccountCreateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountCreateParameters', + type: { + name: 'Composite', + class_name: 'StorageAccountCreateParameters', + model_properties: { + sku: { + client_side_validation: true, + required: true, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + kind: { + client_side_validation: true, + required: true, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + }, + location: { + client_side_validation: true, + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + }, + tags: { + client_side_validation: true, + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + identity: { + client_side_validation: true, + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'Identity' + } + }, + custom_domain: { + client_side_validation: true, + required: false, + serialized_name: 'properties.customDomain', + type: { + name: 'Composite', + class_name: 'CustomDomain' + } + }, + encryption: { + client_side_validation: true, + required: false, + serialized_name: 'properties.encryption', + type: { + name: 'Composite', + class_name: 'Encryption' + } + }, + network_rule_set: { + client_side_validation: true, + required: false, + serialized_name: 'properties.networkAcls', + type: { + name: 'Composite', + class_name: 'NetworkRuleSet' + } + }, + access_tier: { + client_side_validation: true, + required: false, + serialized_name: 'properties.accessTier', + type: { + name: 'Enum', + module: 'AccessTier' + } + }, + enable_azure_files_aad_integration: { + client_side_validation: true, + required: false, + serialized_name: 'properties.azureFilesAadIntegration', + type: { + name: 'Boolean' + } + }, + enable_https_traffic_only: { + client_side_validation: true, + required: false, + serialized_name: 'properties.supportsHttpsTrafficOnly', + type: { + name: 'Boolean' + } + }, + is_hns_enabled: { + client_side_validation: true, + required: false, + serialized_name: 'properties.isHnsEnabled', + type: { + name: 'Boolean' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_key.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_key.rb new file mode 100644 index 000000000..4cf34e4c4 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_key.rb @@ -0,0 +1,73 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # An access key for the storage account. + # + class StorageAccountKey + + include MsRestAzure + + # @return [String] Name of the key. + attr_accessor :key_name + + # @return [String] Base 64-encoded value of the key. + attr_accessor :value + + # @return [KeyPermission] Permissions for the key -- read-only or full + # permissions. Possible values include: 'Read', 'Full' + attr_accessor :permissions + + + # + # Mapper for StorageAccountKey class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountKey', + type: { + name: 'Composite', + class_name: 'StorageAccountKey', + model_properties: { + key_name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'keyName', + type: { + name: 'String' + } + }, + value: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'String' + } + }, + permissions: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'permissions', + type: { + name: 'Enum', + module: 'KeyPermission' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb new file mode 100644 index 000000000..f54f1f4fd --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The response from the ListKeys operation. + # + class StorageAccountListKeysResult + + include MsRestAzure + + # @return [Array] Gets the list of storage account + # keys and their properties for the specified storage account. + attr_accessor :keys + + + # + # Mapper for StorageAccountListKeysResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountListKeysResult', + type: { + name: 'Composite', + class_name: 'StorageAccountListKeysResult', + model_properties: { + keys: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'keys', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountKeyElementType', + type: { + name: 'Composite', + class_name: 'StorageAccountKey' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb new file mode 100644 index 000000000..e11a65269 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The response from the List Storage Accounts operation. + # + class StorageAccountListResult + + include MsRestAzure + + # @return [Array] Gets the list of storage accounts and + # their properties. + attr_accessor :value + + + # + # Mapper for StorageAccountListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountListResult', + type: { + name: 'Composite', + class_name: 'StorageAccountListResult', + model_properties: { + value: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountElementType', + type: { + name: 'Composite', + class_name: 'StorageAccount' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb new file mode 100644 index 000000000..0f5c58c65 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb @@ -0,0 +1,47 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The parameters used to regenerate the storage account key. + # + class StorageAccountRegenerateKeyParameters + + include MsRestAzure + + # @return [String] The name of storage keys that want to be regenerated, + # possible vaules are key1, key2. + attr_accessor :key_name + + + # + # Mapper for StorageAccountRegenerateKeyParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountRegenerateKeyParameters', + type: { + name: 'Composite', + class_name: 'StorageAccountRegenerateKeyParameters', + model_properties: { + key_name: { + client_side_validation: true, + required: true, + serialized_name: 'keyName', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb new file mode 100644 index 000000000..525ed980b --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb @@ -0,0 +1,179 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The parameters that can be provided when updating the storage account + # properties. + # + class StorageAccountUpdateParameters + + include MsRestAzure + + # @return [Sku] Gets or sets the SKU name. Note that the SKU name cannot + # be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can + # accounts of those sku names be updated to any other value. + attr_accessor :sku + + # @return [Hash{String => String}] Gets or sets a list of key value pairs + # that describe the resource. These tags can be used in viewing and + # grouping this resource (across resource groups). A maximum of 15 tags + # can be provided for a resource. Each tag must have a key no greater in + # length than 128 characters and a value no greater in length than 256 + # characters. + attr_accessor :tags + + # @return [Identity] The identity of the resource. + attr_accessor :identity + + # @return [CustomDomain] Custom domain assigned to the storage account by + # the user. Name is the CNAME source. Only one custom domain is supported + # per storage account at this time. To clear the existing custom domain, + # use an empty string for the custom domain name property. + attr_accessor :custom_domain + + # @return [Encryption] Provides the encryption settings on the account. + # The default setting is unencrypted. + attr_accessor :encryption + + # @return [AccessTier] Required for storage accounts where kind = + # BlobStorage. The access tier used for billing. Possible values include: + # 'Hot', 'Cool' + attr_accessor :access_tier + + # @return [Boolean] Enables Azure Files AAD Integration for SMB if sets + # to true. + attr_accessor :enable_azure_files_aad_integration + + # @return [Boolean] Allows https traffic only to storage service if sets + # to true. + attr_accessor :enable_https_traffic_only + + # @return [NetworkRuleSet] Network rule set + attr_accessor :network_rule_set + + # @return [Kind] Optional. Indicates the type of storage account. + # Currently only StorageV2 value supported by server. Possible values + # include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', + # 'BlockBlobStorage' + attr_accessor :kind + + + # + # Mapper for StorageAccountUpdateParameters class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageAccountUpdateParameters', + type: { + name: 'Composite', + class_name: 'StorageAccountUpdateParameters', + model_properties: { + sku: { + client_side_validation: true, + required: false, + serialized_name: 'sku', + type: { + name: 'Composite', + class_name: 'Sku' + } + }, + tags: { + client_side_validation: true, + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + identity: { + client_side_validation: true, + required: false, + serialized_name: 'identity', + type: { + name: 'Composite', + class_name: 'Identity' + } + }, + custom_domain: { + client_side_validation: true, + required: false, + serialized_name: 'properties.customDomain', + type: { + name: 'Composite', + class_name: 'CustomDomain' + } + }, + encryption: { + client_side_validation: true, + required: false, + serialized_name: 'properties.encryption', + type: { + name: 'Composite', + class_name: 'Encryption' + } + }, + access_tier: { + client_side_validation: true, + required: false, + serialized_name: 'properties.accessTier', + type: { + name: 'Enum', + module: 'AccessTier' + } + }, + enable_azure_files_aad_integration: { + client_side_validation: true, + required: false, + serialized_name: 'properties.azureFilesAadIntegration', + type: { + name: 'Boolean' + } + }, + enable_https_traffic_only: { + client_side_validation: true, + required: false, + serialized_name: 'properties.supportsHttpsTrafficOnly', + type: { + name: 'Boolean' + } + }, + network_rule_set: { + client_side_validation: true, + required: false, + serialized_name: 'properties.networkAcls', + type: { + name: 'Composite', + class_name: 'NetworkRuleSet' + } + }, + kind: { + client_side_validation: true, + required: false, + serialized_name: 'kind', + type: { + name: 'Enum', + module: 'Kind' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb new file mode 100644 index 000000000..1a9fe55db --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb @@ -0,0 +1,57 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The response from the List Storage SKUs operation. + # + class StorageSkuListResult + + include MsRestAzure + + # @return [Array] Get the list result of storage SKUs and their + # properties. + attr_accessor :value + + + # + # Mapper for StorageSkuListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'StorageSkuListResult', + type: { + name: 'Composite', + class_name: 'StorageSkuListResult', + model_properties: { + value: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'SkuElementType', + type: { + name: 'Composite', + class_name: 'Sku' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/tag_property.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/tag_property.rb new file mode 100644 index 000000000..f605a035e --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/tag_property.rb @@ -0,0 +1,97 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # A tag of the LegalHold of a blob container. + # + class TagProperty + + include MsRestAzure + + # @return [String] The tag value. + attr_accessor :tag + + # @return [DateTime] Returns the date and time the tag was added. + attr_accessor :timestamp + + # @return [String] Returns the Object ID of the user who added the tag. + attr_accessor :object_identifier + + # @return [String] Returns the Tenant ID that issued the token for the + # user who added the tag. + attr_accessor :tenant_id + + # @return [String] Returns the User Principal Name of the user who added + # the tag. + attr_accessor :upn + + + # + # Mapper for TagProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'TagProperty', + type: { + name: 'Composite', + class_name: 'TagProperty', + model_properties: { + tag: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'tag', + type: { + name: 'String' + } + }, + timestamp: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'timestamp', + type: { + name: 'DateTime' + } + }, + object_identifier: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'objectIdentifier', + type: { + name: 'String' + } + }, + tenant_id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + upn: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'upn', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/tracked_resource.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/tracked_resource.rb new file mode 100644 index 000000000..516db1d36 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/tracked_resource.rb @@ -0,0 +1,92 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The resource model definition for a ARM tracked top level resource + # + class TrackedResource < Resource + + include MsRestAzure + + # @return [Hash{String => String}] Resource tags. + attr_accessor :tags + + # @return [String] The geo-location where the resource lives + attr_accessor :location + + + # + # Mapper for TrackedResource class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'TrackedResource', + type: { + name: 'Composite', + class_name: 'TrackedResource', + model_properties: { + id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'String' + } + }, + type: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'type', + type: { + name: 'String' + } + }, + tags: { + client_side_validation: true, + required: false, + serialized_name: 'tags', + type: { + name: 'Dictionary', + value: { + client_side_validation: true, + required: false, + serialized_name: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + location: { + client_side_validation: true, + required: true, + serialized_name: 'location', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/update_history_property.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/update_history_property.rb new file mode 100644 index 000000000..b6f1d701c --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/update_history_property.rb @@ -0,0 +1,114 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # An update history of the ImmutabilityPolicy of a blob container. + # + class UpdateHistoryProperty + + include MsRestAzure + + # @return [ImmutabilityPolicyUpdateType] The ImmutabilityPolicy update + # type of a blob container, possible values include: put, lock and + # extend. Possible values include: 'put', 'lock', 'extend' + attr_accessor :update + + # @return [Integer] The immutability period for the blobs in the + # container since the policy creation, in days. + attr_accessor :immutability_period_since_creation_in_days + + # @return [DateTime] Returns the date and time the ImmutabilityPolicy was + # updated. + attr_accessor :timestamp + + # @return [String] Returns the Object ID of the user who updated the + # ImmutabilityPolicy. + attr_accessor :object_identifier + + # @return [String] Returns the Tenant ID that issued the token for the + # user who updated the ImmutabilityPolicy. + attr_accessor :tenant_id + + # @return [String] Returns the User Principal Name of the user who + # updated the ImmutabilityPolicy. + attr_accessor :upn + + + # + # Mapper for UpdateHistoryProperty class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'UpdateHistoryProperty', + type: { + name: 'Composite', + class_name: 'UpdateHistoryProperty', + model_properties: { + update: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'update', + type: { + name: 'String' + } + }, + immutability_period_since_creation_in_days: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'immutabilityPeriodSinceCreationInDays', + type: { + name: 'Number' + } + }, + timestamp: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'timestamp', + type: { + name: 'DateTime' + } + }, + object_identifier: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'objectIdentifier', + type: { + name: 'String' + } + }, + tenant_id: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'tenantId', + type: { + name: 'String' + } + }, + upn: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'upn', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage.rb new file mode 100644 index 000000000..da3469c16 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage.rb @@ -0,0 +1,89 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Describes Storage Resource Usage. + # + class Usage + + include MsRestAzure + + # @return [UsageUnit] Gets the unit of measurement. Possible values + # include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountsPerSecond', + # 'BytesPerSecond' + attr_accessor :unit + + # @return [Integer] Gets the current count of the allocated resources in + # the subscription. + attr_accessor :current_value + + # @return [Integer] Gets the maximum count of the resources that can be + # allocated in the subscription. + attr_accessor :limit + + # @return [UsageName] Gets the name of the type of usage. + attr_accessor :name + + + # + # Mapper for Usage class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'Usage', + type: { + name: 'Composite', + class_name: 'Usage', + model_properties: { + unit: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'unit', + type: { + name: 'Enum', + module: 'UsageUnit' + } + }, + current_value: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'currentValue', + type: { + name: 'Number' + } + }, + limit: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'limit', + type: { + name: 'Number' + } + }, + name: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'name', + type: { + name: 'Composite', + class_name: 'UsageName' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_list_result.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_list_result.rb new file mode 100644 index 000000000..d51ee8b0b --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_list_result.rb @@ -0,0 +1,56 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The response from the List Usages operation. + # + class UsageListResult + + include MsRestAzure + + # @return [Array] Gets or sets the list of Storage Resource + # Usages. + attr_accessor :value + + + # + # Mapper for UsageListResult class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'UsageListResult', + type: { + name: 'Composite', + class_name: 'UsageListResult', + model_properties: { + value: { + client_side_validation: true, + required: false, + serialized_name: 'value', + type: { + name: 'Sequence', + element: { + client_side_validation: true, + required: false, + serialized_name: 'UsageElementType', + type: { + name: 'Composite', + class_name: 'Usage' + } + } + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_name.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_name.rb new file mode 100644 index 000000000..eac869f2d --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_name.rb @@ -0,0 +1,59 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # The usage names that can be used; currently limited to StorageAccount. + # + class UsageName + + include MsRestAzure + + # @return [String] Gets a string describing the resource name. + attr_accessor :value + + # @return [String] Gets a localized string describing the resource name. + attr_accessor :localized_value + + + # + # Mapper for UsageName class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'UsageName', + type: { + name: 'Composite', + class_name: 'UsageName', + model_properties: { + value: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'value', + type: { + name: 'String' + } + }, + localized_value: { + client_side_validation: true, + required: false, + read_only: true, + serialized_name: 'localizedValue', + type: { + name: 'String' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_unit.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_unit.rb new file mode 100644 index 000000000..b7cf8edfd --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/usage_unit.rb @@ -0,0 +1,20 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Defines values for UsageUnit + # + module UsageUnit + Count = "Count" + Bytes = "Bytes" + Seconds = "Seconds" + Percent = "Percent" + CountsPerSecond = "CountsPerSecond" + BytesPerSecond = "BytesPerSecond" + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb new file mode 100644 index 000000000..7ea4d6fb4 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb @@ -0,0 +1,75 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + module Models + # + # Virtual Network rule. + # + class VirtualNetworkRule + + include MsRestAzure + + # @return [String] Resource ID of a subnet, for example: + # /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + attr_accessor :virtual_network_resource_id + + # @return [Action] The action of virtual network rule. Possible values + # include: 'Allow'. Default value: 'Allow' . + attr_accessor :action + + # @return [State] Gets the state of virtual network rule. Possible values + # include: 'provisioning', 'deprovisioning', 'succeeded', 'failed', + # 'networkSourceDeleted' + attr_accessor :state + + + # + # Mapper for VirtualNetworkRule class as Ruby Hash. + # This will be used for serialization/deserialization. + # + def self.mapper() + { + client_side_validation: true, + required: false, + serialized_name: 'VirtualNetworkRule', + type: { + name: 'Composite', + class_name: 'VirtualNetworkRule', + model_properties: { + virtual_network_resource_id: { + client_side_validation: true, + required: true, + serialized_name: 'id', + type: { + name: 'String' + } + }, + action: { + client_side_validation: true, + required: false, + serialized_name: 'action', + default_value: 'Allow', + type: { + name: 'Enum', + module: 'Action' + } + }, + state: { + client_side_validation: true, + required: false, + serialized_name: 'state', + type: { + name: 'Enum', + module: 'State' + } + } + } + } + } + end + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/module_definition.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/module_definition.rb new file mode 100644 index 000000000..7002ddf60 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/module_definition.rb @@ -0,0 +1,9 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure end +module Azure::Storage end +module Azure::Storage::Mgmt end +module Azure::Storage::Mgmt::V2018_07_01 end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/operations.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/operations.rb new file mode 100644 index 000000000..caf3c46a1 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/operations.rb @@ -0,0 +1,108 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + # + # The Azure Storage Management API. + # + class Operations + include MsRestAzure + + # + # Creates and initializes a new instance of the Operations class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorageManagementClient] reference to the StorageManagementClient + attr_reader :client + + # + # Lists all of the available Storage Rest API operations. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [OperationListResult] operation results. + # + def list(custom_headers:nil) + response = list_async(custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all of the available Storage Rest API operations. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers:nil) + list_async(custom_headers:custom_headers).value! + end + + # + # Lists all of the available Storage Rest API operations. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(custom_headers:nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'providers/Microsoft.Storage/operations' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::OperationListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/skus.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/skus.rb new file mode 100644 index 000000000..b9d213e5a --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/skus.rb @@ -0,0 +1,114 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + # + # The Azure Storage Management API. + # + class Skus + include MsRestAzure + + # + # Creates and initializes a new instance of the Skus class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorageManagementClient] reference to the StorageManagementClient + attr_reader :client + + # + # Lists the available SKUs supported by Microsoft.Storage for given + # subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageSkuListResult] operation results. + # + def list(custom_headers:nil) + response = list_async(custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the available SKUs supported by Microsoft.Storage for given + # subscription. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers:nil) + list_async(custom_headers:custom_headers).value! + end + + # + # Lists the available SKUs supported by Microsoft.Storage for given + # subscription. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(custom_headers:nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageSkuListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/storage_accounts.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/storage_accounts.rb new file mode 100644 index 000000000..27ab07f49 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/storage_accounts.rb @@ -0,0 +1,1340 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + # + # The Azure Storage Management API. + # + class StorageAccounts + include MsRestAzure + + # + # Creates and initializes a new instance of the StorageAccounts class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorageManagementClient] reference to the StorageManagementClient + attr_reader :client + + # + # Checks that the storage account name is valid and is not already in use. + # + # @param account_name [StorageAccountCheckNameAvailabilityParameters] The name + # of the storage account within the specified resource group. Storage account + # names must be between 3 and 24 characters in length and use numbers and + # lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [CheckNameAvailabilityResult] operation results. + # + def check_name_availability(account_name, custom_headers:nil) + response = check_name_availability_async(account_name, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Checks that the storage account name is valid and is not already in use. + # + # @param account_name [StorageAccountCheckNameAvailabilityParameters] The name + # of the storage account within the specified resource group. Storage account + # names must be between 3 and 24 characters in length and use numbers and + # lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def check_name_availability_with_http_info(account_name, custom_headers:nil) + check_name_availability_async(account_name, custom_headers:custom_headers).value! + end + + # + # Checks that the storage account name is valid and is not already in use. + # + # @param account_name [StorageAccountCheckNameAvailabilityParameters] The name + # of the storage account within the specified resource group. Storage account + # names must be between 3 and 24 characters in length and use numbers and + # lower-case letters only. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def check_name_availability_async(account_name, custom_headers:nil) + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCheckNameAvailabilityParameters.mapper() + request_content = @client.serialize(request_mapper, account_name) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::CheckNameAvailabilityResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Asynchronously creates a new storage account with the specified parameters. + # If an account is already created and a subsequent create request is issued + # with different properties, the account properties will be updated. If an + # account is already created and a subsequent create or update request is + # issued with the exact same set of properties, the request will succeed. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountCreateParameters] The parameters to provide + # for the created account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccount] operation results. + # + def create(resource_group_name, account_name, parameters, custom_headers:nil) + response = create_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountCreateParameters] The parameters to provide + # for the created account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [Concurrent::Promise] promise which provides async access to http + # response. + # + def create_async(resource_group_name, account_name, parameters, custom_headers:nil) + # Send request + promise = begin_create_async(resource_group_name, account_name, parameters, custom_headers:custom_headers) + + promise = promise.then do |response| + # Defining deserialization method. + deserialize_method = lambda do |parsed_response| + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount.mapper() + parsed_response = @client.deserialize(result_mapper, parsed_response) + end + + # Waiting for response. + @client.get_long_running_operation_result(response, deserialize_method) + end + + promise + end + + # + # Deletes a storage account in Microsoft Azure. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # + def delete(resource_group_name, account_name, custom_headers:nil) + response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value! + nil + end + + # + # Deletes a storage account in Microsoft Azure. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def delete_with_http_info(resource_group_name, account_name, custom_headers:nil) + delete_async(resource_group_name, account_name, custom_headers:custom_headers).value! + end + + # + # Deletes a storage account in Microsoft Azure. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def delete_async(resource_group_name, account_name, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:delete, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 204 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + + result + end + + promise.execute + end + + # + # Returns the properties for the specified storage account including but not + # limited to name, SKU name, location, and account status. The ListKeys + # operation should be used to retrieve storage keys. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccount] operation results. + # + def get_properties(resource_group_name, account_name, custom_headers:nil) + response = get_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Returns the properties for the specified storage account including but not + # limited to name, SKU name, location, and account status. The ListKeys + # operation should be used to retrieve storage keys. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def get_properties_with_http_info(resource_group_name, account_name, custom_headers:nil) + get_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value! + end + + # + # Returns the properties for the specified storage account including but not + # limited to name, SKU name, location, and account status. The ListKeys + # operation should be used to retrieve storage keys. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def get_properties_async(resource_group_name, account_name, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # The update operation can be used to update the SKU, encryption, access tier, + # or tags for a storage account. It can also be used to map the account to a + # custom domain. Only one custom domain is supported per storage account; the + # replacement/change of custom domain is not supported. In order to replace an + # old custom domain, the old value must be cleared/unregistered before a new + # value can be set. The update of multiple properties is supported. This call + # does not change the storage keys for the account. If you want to change the + # storage account keys, use the regenerate keys operation. The location and + # name of the storage account cannot be changed after creation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountUpdateParameters] The parameters to provide + # for the updated account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccount] operation results. + # + def update(resource_group_name, account_name, parameters, custom_headers:nil) + response = update_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # The update operation can be used to update the SKU, encryption, access tier, + # or tags for a storage account. It can also be used to map the account to a + # custom domain. Only one custom domain is supported per storage account; the + # replacement/change of custom domain is not supported. In order to replace an + # old custom domain, the old value must be cleared/unregistered before a new + # value can be set. The update of multiple properties is supported. This call + # does not change the storage keys for the account. If you want to change the + # storage account keys, use the regenerate keys operation. The location and + # name of the storage account cannot be changed after creation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountUpdateParameters] The parameters to provide + # for the updated account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def update_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil) + update_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + end + + # + # The update operation can be used to update the SKU, encryption, access tier, + # or tags for a storage account. It can also be used to map the account to a + # custom domain. Only one custom domain is supported per storage account; the + # replacement/change of custom domain is not supported. In order to replace an + # old custom domain, the old value must be cleared/unregistered before a new + # value can be set. The update of multiple properties is supported. This call + # does not change the storage keys for the account. If you want to change the + # storage account keys, use the regenerate keys operation. The location and + # name of the storage account cannot be changed after creation. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountUpdateParameters] The parameters to provide + # for the updated account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def update_async(resource_group_name, account_name, parameters, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountUpdateParameters.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:patch, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists all the storage accounts available under the subscription. Note that + # storage keys are not returned; use the ListKeys operation for this. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountListResult] operation results. + # + def list(custom_headers:nil) + response = list_async(custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all the storage accounts available under the subscription. Note that + # storage keys are not returned; use the ListKeys operation for this. + # + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_with_http_info(custom_headers:nil) + list_async(custom_headers:custom_headers).value! + end + + # + # Lists all the storage accounts available under the subscription. Note that + # storage keys are not returned; use the ListKeys operation for this. + # + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_async(custom_headers:nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists all the storage accounts available under the given resource group. Note + # that storage keys are not returned; use the ListKeys operation for this. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountListResult] operation results. + # + def list_by_resource_group(resource_group_name, custom_headers:nil) + response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Lists all the storage accounts available under the given resource group. Note + # that storage keys are not returned; use the ListKeys operation for this. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) + list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! + end + + # + # Lists all the storage accounts available under the given resource group. Note + # that storage keys are not returned; use the ListKeys operation for this. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_resource_group_async(resource_group_name, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Lists the access keys for the specified storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountListKeysResult] operation results. + # + def list_keys(resource_group_name, account_name, custom_headers:nil) + response = list_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Lists the access keys for the specified storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_keys_with_http_info(resource_group_name, account_name, custom_headers:nil) + list_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value! + end + + # + # Lists the access keys for the specified storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_keys_async(resource_group_name, account_name, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListKeysResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Regenerates one of the access keys for the specified storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name + # of the key which should be regenerated -- key1 or key2. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccountListKeysResult] operation results. + # + def regenerate_key(resource_group_name, account_name, regenerate_key, custom_headers:nil) + response = regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Regenerates one of the access keys for the specified storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name + # of the key which should be regenerated -- key1 or key2. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def regenerate_key_with_http_info(resource_group_name, account_name, regenerate_key, custom_headers:nil) + regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers:custom_headers).value! + end + + # + # Regenerates one of the access keys for the specified storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param regenerate_key [StorageAccountRegenerateKeyParameters] Specifies name + # of the key which should be regenerated -- key1 or key2. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def regenerate_key_async(resource_group_name, account_name, regenerate_key, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'regenerate_key is nil' if regenerate_key.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountRegenerateKeyParameters.mapper() + request_content = @client.serialize(request_mapper, regenerate_key) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListKeysResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # List SAS credentials of a storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [AccountSasParameters] The parameters to provide to list + # SAS credentials for the storage account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ListAccountSasResponse] operation results. + # + def list_account_sas(resource_group_name, account_name, parameters, custom_headers:nil) + response = list_account_sas_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # List SAS credentials of a storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [AccountSasParameters] The parameters to provide to list + # SAS credentials for the storage account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_account_sas_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil) + list_account_sas_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + end + + # + # List SAS credentials of a storage account. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [AccountSasParameters] The parameters to provide to list + # SAS credentials for the storage account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_account_sas_async(resource_group_name, account_name, parameters, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::AccountSasParameters.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ListAccountSasResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # List service SAS credentials of a specific resource. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [ServiceSasParameters] The parameters to provide to list + # service SAS credentials. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [ListServiceSasResponse] operation results. + # + def list_service_sas(resource_group_name, account_name, parameters, custom_headers:nil) + response = list_service_sas_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # List service SAS credentials of a specific resource. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [ServiceSasParameters] The parameters to provide to list + # service SAS credentials. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_service_sas_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil) + list_service_sas_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + end + + # + # List service SAS credentials of a specific resource. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [ServiceSasParameters] The parameters to provide to list + # service SAS credentials. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_service_sas_async(resource_group_name, account_name, parameters, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSasParameters.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:post, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::ListServiceSasResponse.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + # + # Asynchronously creates a new storage account with the specified parameters. + # If an account is already created and a subsequent create request is issued + # with different properties, the account properties will be updated. If an + # account is already created and a subsequent create or update request is + # issued with the exact same set of properties, the request will succeed. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountCreateParameters] The parameters to provide + # for the created account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [StorageAccount] operation results. + # + def begin_create(resource_group_name, account_name, parameters, custom_headers:nil) + response = begin_create_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Asynchronously creates a new storage account with the specified parameters. + # If an account is already created and a subsequent create request is issued + # with different properties, the account properties will be updated. If an + # account is already created and a subsequent create or update request is + # issued with the exact same set of properties, the request will succeed. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountCreateParameters] The parameters to provide + # for the created account. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def begin_create_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil) + begin_create_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value! + end + + # + # Asynchronously creates a new storage account with the specified parameters. + # If an account is already created and a subsequent create request is issued + # with different properties, the account properties will be updated. If an + # account is already created and a subsequent create or update request is + # issued with the exact same set of properties, the request will succeed. + # + # @param resource_group_name [String] The name of the resource group within the + # user's subscription. The name is case insensitive. + # @param account_name [String] The name of the storage account within the + # specified resource group. Storage account names must be between 3 and 24 + # characters in length and use numbers and lower-case letters only. + # @param parameters [StorageAccountCreateParameters] The parameters to provide + # for the created account. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def begin_create_async(resource_group_name, account_name, parameters, custom_headers:nil) + fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 + fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? + fail ArgumentError, 'account_name is nil' if account_name.nil? + fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 + fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 + fail ArgumentError, 'parameters is nil' if parameters.nil? + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + + # Serialize Request + request_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCreateParameters.mapper() + request_content = @client.serialize(request_mapper, parameters) + request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil + + path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, + query_params: {'api-version' => @client.api_version}, + body: request_content, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:put, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 || status_code == 202 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb new file mode 100644 index 000000000..3f9652f70 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb @@ -0,0 +1,147 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + # + # A service client - single point of access to the REST API. + # + class StorageManagementClient < MsRestAzure::AzureServiceClient + include MsRestAzure + include MsRestAzure::Serialization + + # @return [String] the base URI of the service. + attr_accessor :base_url + + # @return Credentials needed for the client to connect to Azure. + attr_reader :credentials + + # @return [String] The ID of the target subscription. + attr_accessor :subscription_id + + # @return [String] The API version to use for this operation. + attr_reader :api_version + + # @return [String] The preferred language for the response. + attr_accessor :accept_language + + # @return [Integer] The retry timeout in seconds for Long Running + # Operations. Default value is 30. + attr_accessor :long_running_operation_retry_timeout + + # @return [Boolean] Whether a unique x-ms-client-request-id should be + # generated. When set to true a unique x-ms-client-request-id value is + # generated and included in each request. Default is true. + attr_accessor :generate_client_request_id + + # @return [Operations] operations + attr_reader :operations + + # @return [Skus] skus + attr_reader :skus + + # @return [StorageAccounts] storage_accounts + attr_reader :storage_accounts + + # @return [Usages] usages + attr_reader :usages + + # @return [BlobContainers] blob_containers + attr_reader :blob_containers + + # + # Creates initializes a new instance of the StorageManagementClient class. + # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. + # @param base_url [String] the base URI of the service. + # @param options [Array] filters to be applied to the HTTP requests. + # + def initialize(credentials = nil, base_url = nil, options = nil) + super(credentials, options) + @base_url = base_url || 'https://management.azure.com' + + fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? + @credentials = credentials + + @operations = Operations.new(self) + @skus = Skus.new(self) + @storage_accounts = StorageAccounts.new(self) + @usages = Usages.new(self) + @blob_containers = BlobContainers.new(self) + @api_version = '2018-07-01' + @accept_language = 'en-US' + @long_running_operation_retry_timeout = 30 + @generate_client_request_id = true + add_telemetry + end + + # + # Makes a request and returns the body of the response. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [Hash{String=>String}] containing the body of the response. + # Example: + # + # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}" + # path = "/path" + # options = { + # body: request_content, + # query_params: {'api-version' => '2016-02-01'} + # } + # result = @client.make_request(:put, path, options) + # + def make_request(method, path, options = {}) + result = make_request_with_http_info(method, path, options) + result.body unless result.nil? + end + + # + # Makes a request and returns the operation response. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status. + # + def make_request_with_http_info(method, path, options = {}) + result = make_request_async(method, path, options).value! + result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) + result + end + + # + # Makes a request asynchronously. + # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. + # @param path [String] the path, relative to {base_url}. + # @param options [Hash{String=>String}] specifying any request options like :body. + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def make_request_async(method, path, options = {}) + fail ArgumentError, 'method is nil' if method.nil? + fail ArgumentError, 'path is nil' if path.nil? + + request_url = options[:base_url] || @base_url + if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?) + @request_headers['Content-Type'] = options[:headers]['Content-Type'] + end + + request_headers = @request_headers + request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? + options.merge!({headers: request_headers.merge(options[:headers] || {})}) + options.merge!({credentials: @credentials}) unless @credentials.nil? + + super(request_url, method, path, options) + end + + + private + # + # Adds telemetry information. + # + def add_telemetry + sdk_information = 'azure_mgmt_storage' + sdk_information = "#{sdk_information}/0.17.2" + add_user_agent_information(sdk_information) + end + end +end diff --git a/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/usages.rb b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/usages.rb new file mode 100644 index 000000000..6da032a15 --- /dev/null +++ b/management/azure_mgmt_storage/lib/2018-07-01/generated/azure_mgmt_storage/usages.rb @@ -0,0 +1,118 @@ +# encoding: utf-8 +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. + +module Azure::Storage::Mgmt::V2018_07_01 + # + # The Azure Storage Management API. + # + class Usages + include MsRestAzure + + # + # Creates and initializes a new instance of the Usages class. + # @param client service class for accessing basic functionality. + # + def initialize(client) + @client = client + end + + # @return [StorageManagementClient] reference to the StorageManagementClient + attr_reader :client + + # + # Gets the current usage count and the limit for the resources of the location + # under the subscription. + # + # @param location [String] The location of the Azure Storage resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [UsageListResult] operation results. + # + def list_by_location(location, custom_headers:nil) + response = list_by_location_async(location, custom_headers:custom_headers).value! + response.body unless response.nil? + end + + # + # Gets the current usage count and the limit for the resources of the location + # under the subscription. + # + # @param location [String] The location of the Azure Storage resource. + # @param custom_headers [Hash{String => String}] A hash of custom headers that + # will be added to the HTTP request. + # + # @return [MsRestAzure::AzureOperationResponse] HTTP response information. + # + def list_by_location_with_http_info(location, custom_headers:nil) + list_by_location_async(location, custom_headers:custom_headers).value! + end + + # + # Gets the current usage count and the limit for the resources of the location + # under the subscription. + # + # @param location [String] The location of the Azure Storage resource. + # @param [Hash{String => String}] A hash of custom headers that will be added + # to the HTTP request. + # + # @return [Concurrent::Promise] Promise object which holds the HTTP response. + # + def list_by_location_async(location, custom_headers:nil) + fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? + fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 + fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? + fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 + fail ArgumentError, 'location is nil' if location.nil? + + + request_headers = {} + request_headers['Content-Type'] = 'application/json; charset=utf-8' + + # Set Headers + request_headers['x-ms-client-request-id'] = SecureRandom.uuid + request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? + path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages' + + request_url = @base_url || @client.base_url + + options = { + middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], + path_params: {'subscriptionId' => @client.subscription_id,'location' => location}, + query_params: {'api-version' => @client.api_version}, + headers: request_headers.merge(custom_headers || {}), + base_url: request_url + } + promise = @client.make_request_async(:get, path_template, options) + + promise = promise.then do |result| + http_response = result.response + status_code = http_response.status + response_content = http_response.body + unless status_code == 200 + error_model = JSON.load(response_content) + fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) + end + + result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? + # Deserialize Response + if status_code == 200 + begin + parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) + result_mapper = Azure::Storage::Mgmt::V2018_07_01::Models::UsageListResult.mapper() + result.body = @client.deserialize(result_mapper, parsed_response) + rescue Exception => e + fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) + end + end + + result + end + + promise.execute + end + + end +end diff --git a/management/azure_mgmt_storage/lib/azure_mgmt_storage.rb b/management/azure_mgmt_storage/lib/azure_mgmt_storage.rb index ca9405e7b..44dc230bd 100644 --- a/management/azure_mgmt_storage/lib/azure_mgmt_storage.rb +++ b/management/azure_mgmt_storage/lib/azure_mgmt_storage.rb @@ -6,6 +6,7 @@ require '2018-03-01-preview/generated/azure_mgmt_storage' require '2017-10-01/generated/azure_mgmt_storage' require '2018-02-01/generated/azure_mgmt_storage' require '2016-01-01/generated/azure_mgmt_storage' +require '2018-07-01/generated/azure_mgmt_storage' require '2015-06-15/generated/azure_mgmt_storage' require '2015-05-01-preview/generated/azure_mgmt_storage' require '2016-12-01/generated/azure_mgmt_storage' diff --git a/management/azure_mgmt_storage/lib/profiles/latest/modules/storage_profile_module.rb b/management/azure_mgmt_storage/lib/profiles/latest/modules/storage_profile_module.rb index 6d0646afa..15fbc2b82 100644 --- a/management/azure_mgmt_storage/lib/profiles/latest/modules/storage_profile_module.rb +++ b/management/azure_mgmt_storage/lib/profiles/latest/modules/storage_profile_module.rb @@ -6,90 +6,90 @@ require 'azure_mgmt_storage' module Azure::Storage::Profiles::Latest module Mgmt - Operations = Azure::Storage::Mgmt::V2018_03_01_preview::Operations - Skus = Azure::Storage::Mgmt::V2018_03_01_preview::Skus - StorageAccounts = Azure::Storage::Mgmt::V2018_03_01_preview::StorageAccounts - Usages = Azure::Storage::Mgmt::V2018_03_01_preview::Usages - BlobContainers = Azure::Storage::Mgmt::V2018_03_01_preview::BlobContainers + Operations = Azure::Storage::Mgmt::V2018_07_01::Operations + Skus = Azure::Storage::Mgmt::V2018_07_01::Skus + StorageAccounts = Azure::Storage::Mgmt::V2018_07_01::StorageAccounts + Usages = Azure::Storage::Mgmt::V2018_07_01::Usages + BlobContainers = Azure::Storage::Mgmt::V2018_07_01::BlobContainers module Models - StorageAccountListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListResult - StorageAccountListKeysResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListKeysResult - Dimension = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Dimension - StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountRegenerateKeyParameters - ServiceSpecification = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSpecification - StorageAccountUpdateParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountUpdateParameters - OperationListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationListResult - UsageName = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageName - SKUCapability = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SKUCapability - Usage = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Usage - Sku = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Sku - UsageListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageListResult - CheckNameAvailabilityResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityResult - AccountSasParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountSasParameters - EncryptionService = Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionService - ListAccountSasResponse = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListAccountSasResponse - KeyVaultProperties = Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyVaultProperties - ServiceSasParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSasParameters - VirtualNetworkRule = Azure::Storage::Mgmt::V2018_03_01_preview::Models::VirtualNetworkRule - ListServiceSasResponse = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListServiceSasResponse - NetworkRuleSet = Azure::Storage::Mgmt::V2018_03_01_preview::Models::NetworkRuleSet - EncryptionServices = Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionServices - Encryption = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Encryption - Endpoints = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Endpoints - IPRule = Azure::Storage::Mgmt::V2018_03_01_preview::Models::IPRule - StorageAccountKey = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountKey - Identity = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Identity - MetricSpecification = Azure::Storage::Mgmt::V2018_03_01_preview::Models::MetricSpecification - StorageAccountCheckNameAvailabilityParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCheckNameAvailabilityParameters ManagementPoliciesRulesSetParameter = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ManagementPoliciesRulesSetParameter - StorageSkuListResult = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageSkuListResult - ListContainerItems = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItems - StorageAccountCreateParameters = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCreateParameters - LegalHold = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold - OperationDisplay = Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationDisplay - LegalHoldProperties = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHoldProperties - Restriction = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Restriction - Resource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Resource - TagProperty = Azure::Storage::Mgmt::V2018_03_01_preview::Models::TagProperty - Operation = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Operation - UpdateHistoryProperty = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UpdateHistoryProperty - CustomDomain = Azure::Storage::Mgmt::V2018_03_01_preview::Models::CustomDomain - ImmutabilityPolicyProperties = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyProperties - StorageAccount = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccount StorageAccountManagementPolicies = Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountManagementPolicies - ProxyResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProxyResource - TrackedResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::TrackedResource - AzureEntityResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AzureEntityResource - BlobContainer = Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer - ImmutabilityPolicy = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy - ListContainerItem = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItem - ReasonCode = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ReasonCode - SkuName = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuName - SkuTier = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuTier - Kind = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Kind - Reason = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Reason - KeySource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeySource - Action = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Action - State = Azure::Storage::Mgmt::V2018_03_01_preview::Models::State - Bypass = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Bypass - DefaultAction = Azure::Storage::Mgmt::V2018_03_01_preview::Models::DefaultAction - AccessTier = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccessTier - ProvisioningState = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProvisioningState - AccountStatus = Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountStatus - KeyPermission = Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyPermission - UsageUnit = Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageUnit - Services = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Services - SignedResourceTypes = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResourceTypes - Permissions = Azure::Storage::Mgmt::V2018_03_01_preview::Models::Permissions - HttpProtocol = Azure::Storage::Mgmt::V2018_03_01_preview::Models::HttpProtocol - SignedResource = Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResource - PublicAccess = Azure::Storage::Mgmt::V2018_03_01_preview::Models::PublicAccess - LeaseStatus = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseStatus - LeaseState = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseState - LeaseDuration = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseDuration - ImmutabilityPolicyState = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyState - ImmutabilityPolicyUpdateType = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyUpdateType + StorageAccountKey = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountKey + StorageAccountListResult = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListResult + Dimension = Azure::Storage::Mgmt::V2018_07_01::Models::Dimension + StorageAccountListKeysResult = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListKeysResult + ServiceSpecification = Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSpecification + StorageAccountRegenerateKeyParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountRegenerateKeyParameters + OperationListResult = Azure::Storage::Mgmt::V2018_07_01::Models::OperationListResult + StorageAccountUpdateParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountUpdateParameters + SKUCapability = Azure::Storage::Mgmt::V2018_07_01::Models::SKUCapability + UsageName = Azure::Storage::Mgmt::V2018_07_01::Models::UsageName + Sku = Azure::Storage::Mgmt::V2018_07_01::Models::Sku + Usage = Azure::Storage::Mgmt::V2018_07_01::Models::Usage + CheckNameAvailabilityResult = Azure::Storage::Mgmt::V2018_07_01::Models::CheckNameAvailabilityResult + UsageListResult = Azure::Storage::Mgmt::V2018_07_01::Models::UsageListResult + EncryptionService = Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionService + AccountSasParameters = Azure::Storage::Mgmt::V2018_07_01::Models::AccountSasParameters + KeyVaultProperties = Azure::Storage::Mgmt::V2018_07_01::Models::KeyVaultProperties + ListAccountSasResponse = Azure::Storage::Mgmt::V2018_07_01::Models::ListAccountSasResponse + VirtualNetworkRule = Azure::Storage::Mgmt::V2018_07_01::Models::VirtualNetworkRule + ServiceSasParameters = Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSasParameters + NetworkRuleSet = Azure::Storage::Mgmt::V2018_07_01::Models::NetworkRuleSet + ListServiceSasResponse = Azure::Storage::Mgmt::V2018_07_01::Models::ListServiceSasResponse + StorageAccountCreateParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCreateParameters + IPRule = Azure::Storage::Mgmt::V2018_07_01::Models::IPRule + LegalHoldProperties = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHoldProperties + OperationDisplay = Azure::Storage::Mgmt::V2018_07_01::Models::OperationDisplay + Identity = Azure::Storage::Mgmt::V2018_07_01::Models::Identity + Operation = Azure::Storage::Mgmt::V2018_07_01::Models::Operation + Endpoints = Azure::Storage::Mgmt::V2018_07_01::Models::Endpoints + Restriction = Azure::Storage::Mgmt::V2018_07_01::Models::Restriction + CustomDomain = Azure::Storage::Mgmt::V2018_07_01::Models::CustomDomain + ListContainerItems = Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItems + Encryption = Azure::Storage::Mgmt::V2018_07_01::Models::Encryption + Resource = Azure::Storage::Mgmt::V2018_07_01::Models::Resource + StorageAccountCheckNameAvailabilityParameters = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCheckNameAvailabilityParameters + LegalHold = Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold + EncryptionServices = Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionServices + UpdateHistoryProperty = Azure::Storage::Mgmt::V2018_07_01::Models::UpdateHistoryProperty + StorageSkuListResult = Azure::Storage::Mgmt::V2018_07_01::Models::StorageSkuListResult + ImmutabilityPolicyProperties = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyProperties + MetricSpecification = Azure::Storage::Mgmt::V2018_07_01::Models::MetricSpecification + TagProperty = Azure::Storage::Mgmt::V2018_07_01::Models::TagProperty + StorageAccount = Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount + ProxyResource = Azure::Storage::Mgmt::V2018_07_01::Models::ProxyResource + AzureEntityResource = Azure::Storage::Mgmt::V2018_07_01::Models::AzureEntityResource + TrackedResource = Azure::Storage::Mgmt::V2018_07_01::Models::TrackedResource + BlobContainer = Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer + ImmutabilityPolicy = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy + ListContainerItem = Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItem + ReasonCode = Azure::Storage::Mgmt::V2018_07_01::Models::ReasonCode + SkuName = Azure::Storage::Mgmt::V2018_07_01::Models::SkuName + SkuTier = Azure::Storage::Mgmt::V2018_07_01::Models::SkuTier + Kind = Azure::Storage::Mgmt::V2018_07_01::Models::Kind + Reason = Azure::Storage::Mgmt::V2018_07_01::Models::Reason + KeySource = Azure::Storage::Mgmt::V2018_07_01::Models::KeySource + Action = Azure::Storage::Mgmt::V2018_07_01::Models::Action + State = Azure::Storage::Mgmt::V2018_07_01::Models::State + Bypass = Azure::Storage::Mgmt::V2018_07_01::Models::Bypass + DefaultAction = Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction + AccessTier = Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier + ProvisioningState = Azure::Storage::Mgmt::V2018_07_01::Models::ProvisioningState + AccountStatus = Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus + KeyPermission = Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission + UsageUnit = Azure::Storage::Mgmt::V2018_07_01::Models::UsageUnit + Services = Azure::Storage::Mgmt::V2018_07_01::Models::Services + SignedResourceTypes = Azure::Storage::Mgmt::V2018_07_01::Models::SignedResourceTypes + Permissions = Azure::Storage::Mgmt::V2018_07_01::Models::Permissions + HttpProtocol = Azure::Storage::Mgmt::V2018_07_01::Models::HttpProtocol + SignedResource = Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource + PublicAccess = Azure::Storage::Mgmt::V2018_07_01::Models::PublicAccess + LeaseStatus = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus + LeaseState = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseState + LeaseDuration = Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration + ImmutabilityPolicyState = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyState + ImmutabilityPolicyUpdateType = Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyUpdateType end # @@ -116,11 +116,17 @@ module Azure::Storage::Profiles::Latest @client_0.subscription_id = configurable.subscription_id end add_telemetry(@client_0) - @operations = @client_0.operations - @skus = @client_0.skus - @storage_accounts = @client_0.storage_accounts - @usages = @client_0.usages - @blob_containers = @client_0.blob_containers + + @client_1 = Azure::Storage::Mgmt::V2018_07_01::StorageManagementClient.new(configurable.credentials, base_url, options) + if(@client_1.respond_to?(:subscription_id)) + @client_1.subscription_id = configurable.subscription_id + end + add_telemetry(@client_1) + @operations = @client_1.operations + @skus = @client_1.skus + @storage_accounts = @client_1.storage_accounts + @usages = @client_1.usages + @blob_containers = @client_1.blob_containers @model_classes = ModelClasses.new end @@ -131,7 +137,9 @@ module Azure::Storage::Profiles::Latest end def method_missing(method, *args) - if @client_0.respond_to?method + if @client_1.respond_to?method + @client_1.send(method, *args) + elsif @client_0.respond_to?method @client_0.send(method, *args) else super @@ -141,236 +149,236 @@ module Azure::Storage::Profiles::Latest end class ModelClasses - def storage_account_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListResult - end - def storage_account_list_keys_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountListKeysResult - end - def dimension - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Dimension - end - def storage_account_regenerate_key_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountRegenerateKeyParameters - end - def service_specification - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSpecification - end - def storage_account_update_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountUpdateParameters - end - def operation_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationListResult - end - def usage_name - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageName - end - def skucapability - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SKUCapability - end - def usage - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Usage - end - def sku - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Sku - end - def usage_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageListResult - end - def check_name_availability_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::CheckNameAvailabilityResult - end - def account_sas_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountSasParameters - end - def encryption_service - Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionService - end - def list_account_sas_response - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListAccountSasResponse - end - def key_vault_properties - Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyVaultProperties - end - def service_sas_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ServiceSasParameters - end - def virtual_network_rule - Azure::Storage::Mgmt::V2018_03_01_preview::Models::VirtualNetworkRule - end - def list_service_sas_response - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListServiceSasResponse - end - def network_rule_set - Azure::Storage::Mgmt::V2018_03_01_preview::Models::NetworkRuleSet - end - def encryption_services - Azure::Storage::Mgmt::V2018_03_01_preview::Models::EncryptionServices - end - def encryption - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Encryption - end - def endpoints - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Endpoints - end - def iprule - Azure::Storage::Mgmt::V2018_03_01_preview::Models::IPRule - end - def storage_account_key - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountKey - end - def identity - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Identity - end - def metric_specification - Azure::Storage::Mgmt::V2018_03_01_preview::Models::MetricSpecification - end - def storage_account_check_name_availability_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCheckNameAvailabilityParameters - end def management_policies_rules_set_parameter Azure::Storage::Mgmt::V2018_03_01_preview::Models::ManagementPoliciesRulesSetParameter end - def storage_sku_list_result - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageSkuListResult - end - def list_container_items - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItems - end - def storage_account_create_parameters - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountCreateParameters - end - def legal_hold - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold - end - def operation_display - Azure::Storage::Mgmt::V2018_03_01_preview::Models::OperationDisplay - end - def legal_hold_properties - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHoldProperties - end - def restriction - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Restriction - end - def resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Resource - end - def tag_property - Azure::Storage::Mgmt::V2018_03_01_preview::Models::TagProperty - end - def operation - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Operation - end - def update_history_property - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UpdateHistoryProperty - end - def custom_domain - Azure::Storage::Mgmt::V2018_03_01_preview::Models::CustomDomain - end - def immutability_policy_properties - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyProperties - end - def storage_account - Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccount - end def storage_account_management_policies Azure::Storage::Mgmt::V2018_03_01_preview::Models::StorageAccountManagementPolicies end - def proxy_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProxyResource + def storage_account_key + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountKey end - def tracked_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::TrackedResource + def storage_account_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListResult + end + def dimension + Azure::Storage::Mgmt::V2018_07_01::Models::Dimension + end + def storage_account_list_keys_result + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountListKeysResult + end + def service_specification + Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSpecification + end + def storage_account_regenerate_key_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountRegenerateKeyParameters + end + def operation_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::OperationListResult + end + def storage_account_update_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountUpdateParameters + end + def skucapability + Azure::Storage::Mgmt::V2018_07_01::Models::SKUCapability + end + def usage_name + Azure::Storage::Mgmt::V2018_07_01::Models::UsageName + end + def sku + Azure::Storage::Mgmt::V2018_07_01::Models::Sku + end + def usage + Azure::Storage::Mgmt::V2018_07_01::Models::Usage + end + def check_name_availability_result + Azure::Storage::Mgmt::V2018_07_01::Models::CheckNameAvailabilityResult + end + def usage_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::UsageListResult + end + def encryption_service + Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionService + end + def account_sas_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::AccountSasParameters + end + def key_vault_properties + Azure::Storage::Mgmt::V2018_07_01::Models::KeyVaultProperties + end + def list_account_sas_response + Azure::Storage::Mgmt::V2018_07_01::Models::ListAccountSasResponse + end + def virtual_network_rule + Azure::Storage::Mgmt::V2018_07_01::Models::VirtualNetworkRule + end + def service_sas_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::ServiceSasParameters + end + def network_rule_set + Azure::Storage::Mgmt::V2018_07_01::Models::NetworkRuleSet + end + def list_service_sas_response + Azure::Storage::Mgmt::V2018_07_01::Models::ListServiceSasResponse + end + def storage_account_create_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCreateParameters + end + def iprule + Azure::Storage::Mgmt::V2018_07_01::Models::IPRule + end + def legal_hold_properties + Azure::Storage::Mgmt::V2018_07_01::Models::LegalHoldProperties + end + def operation_display + Azure::Storage::Mgmt::V2018_07_01::Models::OperationDisplay + end + def identity + Azure::Storage::Mgmt::V2018_07_01::Models::Identity + end + def operation + Azure::Storage::Mgmt::V2018_07_01::Models::Operation + end + def endpoints + Azure::Storage::Mgmt::V2018_07_01::Models::Endpoints + end + def restriction + Azure::Storage::Mgmt::V2018_07_01::Models::Restriction + end + def custom_domain + Azure::Storage::Mgmt::V2018_07_01::Models::CustomDomain + end + def list_container_items + Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItems + end + def encryption + Azure::Storage::Mgmt::V2018_07_01::Models::Encryption + end + def resource + Azure::Storage::Mgmt::V2018_07_01::Models::Resource + end + def storage_account_check_name_availability_parameters + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccountCheckNameAvailabilityParameters + end + def legal_hold + Azure::Storage::Mgmt::V2018_07_01::Models::LegalHold + end + def encryption_services + Azure::Storage::Mgmt::V2018_07_01::Models::EncryptionServices + end + def update_history_property + Azure::Storage::Mgmt::V2018_07_01::Models::UpdateHistoryProperty + end + def storage_sku_list_result + Azure::Storage::Mgmt::V2018_07_01::Models::StorageSkuListResult + end + def immutability_policy_properties + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyProperties + end + def metric_specification + Azure::Storage::Mgmt::V2018_07_01::Models::MetricSpecification + end + def tag_property + Azure::Storage::Mgmt::V2018_07_01::Models::TagProperty + end + def storage_account + Azure::Storage::Mgmt::V2018_07_01::Models::StorageAccount + end + def proxy_resource + Azure::Storage::Mgmt::V2018_07_01::Models::ProxyResource end def azure_entity_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AzureEntityResource + Azure::Storage::Mgmt::V2018_07_01::Models::AzureEntityResource + end + def tracked_resource + Azure::Storage::Mgmt::V2018_07_01::Models::TrackedResource end def blob_container - Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer + Azure::Storage::Mgmt::V2018_07_01::Models::BlobContainer end def immutability_policy - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicy end def list_container_item - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItem + Azure::Storage::Mgmt::V2018_07_01::Models::ListContainerItem end def reason_code - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ReasonCode + Azure::Storage::Mgmt::V2018_07_01::Models::ReasonCode end def sku_name - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuName + Azure::Storage::Mgmt::V2018_07_01::Models::SkuName end def sku_tier - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SkuTier + Azure::Storage::Mgmt::V2018_07_01::Models::SkuTier end def kind - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Kind + Azure::Storage::Mgmt::V2018_07_01::Models::Kind end def reason - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Reason + Azure::Storage::Mgmt::V2018_07_01::Models::Reason end def key_source - Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeySource + Azure::Storage::Mgmt::V2018_07_01::Models::KeySource end def action - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Action + Azure::Storage::Mgmt::V2018_07_01::Models::Action end def state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::State + Azure::Storage::Mgmt::V2018_07_01::Models::State end def bypass - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Bypass + Azure::Storage::Mgmt::V2018_07_01::Models::Bypass end def default_action - Azure::Storage::Mgmt::V2018_03_01_preview::Models::DefaultAction + Azure::Storage::Mgmt::V2018_07_01::Models::DefaultAction end def access_tier - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccessTier + Azure::Storage::Mgmt::V2018_07_01::Models::AccessTier end def provisioning_state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ProvisioningState + Azure::Storage::Mgmt::V2018_07_01::Models::ProvisioningState end def account_status - Azure::Storage::Mgmt::V2018_03_01_preview::Models::AccountStatus + Azure::Storage::Mgmt::V2018_07_01::Models::AccountStatus end def key_permission - Azure::Storage::Mgmt::V2018_03_01_preview::Models::KeyPermission + Azure::Storage::Mgmt::V2018_07_01::Models::KeyPermission end def usage_unit - Azure::Storage::Mgmt::V2018_03_01_preview::Models::UsageUnit + Azure::Storage::Mgmt::V2018_07_01::Models::UsageUnit end def services - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Services + Azure::Storage::Mgmt::V2018_07_01::Models::Services end def signed_resource_types - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResourceTypes + Azure::Storage::Mgmt::V2018_07_01::Models::SignedResourceTypes end def permissions - Azure::Storage::Mgmt::V2018_03_01_preview::Models::Permissions + Azure::Storage::Mgmt::V2018_07_01::Models::Permissions end def http_protocol - Azure::Storage::Mgmt::V2018_03_01_preview::Models::HttpProtocol + Azure::Storage::Mgmt::V2018_07_01::Models::HttpProtocol end def signed_resource - Azure::Storage::Mgmt::V2018_03_01_preview::Models::SignedResource + Azure::Storage::Mgmt::V2018_07_01::Models::SignedResource end def public_access - Azure::Storage::Mgmt::V2018_03_01_preview::Models::PublicAccess + Azure::Storage::Mgmt::V2018_07_01::Models::PublicAccess end def lease_status - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseStatus + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseStatus end def lease_state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseState + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseState end def lease_duration - Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseDuration + Azure::Storage::Mgmt::V2018_07_01::Models::LeaseDuration end def immutability_policy_state - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyState + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyState end def immutability_policy_update_type - Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicyUpdateType + Azure::Storage::Mgmt::V2018_07_01::Models::ImmutabilityPolicyUpdateType end end end diff --git a/management/azure_mgmt_storage/lib/version.rb b/management/azure_mgmt_storage/lib/version.rb index b6f17127b..2c38b33fd 100644 --- a/management/azure_mgmt_storage/lib/version.rb +++ b/management/azure_mgmt_storage/lib/version.rb @@ -3,5 +3,5 @@ # Licensed under the MIT License. See License.txt in the project root for license information. module Azure::Storage::Mgmt - VERSION = '0.17.1' + VERSION = '0.17.2' end