azure_mgmt_storage 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-11-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2019-04-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2019-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2020-08-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2021-01-01/generated/azure_mgmt_storage.rb +223 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/blob_containers.rb +2046 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/blob_inventory_policies.rb +474 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/blob_services.rb +383 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/deleted_accounts.rb +321 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/encryption_scopes.rb +691 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/file_services.rb +377 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/file_shares.rb +957 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/management_policies.rb +361 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/access_tier.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb +136 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/account_status.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/action.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/active_directory_properties.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/azure_files_identity_based_authentication.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_container.rb +290 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_definition.rb +49 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_filter.rb +100 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_rule.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_schema.rb +93 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_parameters.rb +66 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_progress_status.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_range.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_status.rb +88 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_service_items.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_service_properties.rb +191 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/bypass.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/change_feed.rb +65 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/cors_rule.rb +128 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/cors_rules.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/created_by_type.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/custom_domain.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/date_after_creation.rb +50 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/date_after_modification.rb +70 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/default_action.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb +63 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_account.rb +123 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_account_list_result.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_share.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/dimension.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/directory_service_options.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/enabled_protocols.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption.rb +100 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_identity.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope.rb +142 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_key_vault_properties.rb +76 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_list_result.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_source.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_state.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_service.rb +76 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_services.rb +87 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/endpoints.rb +134 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/error_response.rb +48 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/error_response_body.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/extended_location.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/extended_location_types.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_service_items.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_service_properties.rb +115 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share.rb +264 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share_item.rb +263 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share_items.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb +85 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/geo_replication_status.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/get_share_expand.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/http_protocol.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/identity.rb +95 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/identity_type.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy.rb +114 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb +111 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/iprule.rb +61 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_permission.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_source.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_type.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_vault_properties.rb +93 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/kind.rb +19 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/large_file_shares_state.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/last_access_time_tracking_policy.rb +94 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_container_request.rb +97 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_container_response.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_duration.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_state.rb +19 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_status.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/legal_hold.rb +71 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb +72 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_blob_inventory_policy.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_container_item.rb +289 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_container_items.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_containers_include.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_key_expand.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue.rb +83 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue_resource.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue_services.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_shares_expand.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_table_resource.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_table_services.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy.rb +89 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_action.rb +75 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_base_blob.rb +86 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_definition.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_filter.rb +98 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_rule.rb +87 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_schema.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_version.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/metric_specification.rb +145 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/minimum_tls_version.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/multichannel.rb +46 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/name.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/network_rule_set.rb +126 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policies.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy.rb +131 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_filter.rb +70 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_rule.rb +82 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation.rb +83 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation_display.rb +79 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation_list_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/permissions.rb +22 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_list_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_provisioning_state.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_service_connection_status.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_resource.rb +115 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_resource_list_result.rb +55 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_service_connection_state.rb +72 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/protocol_settings.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/proxy_resource.rb +65 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/public_access.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/put_shares_expand.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/queue_service_properties.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/reason.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/reason_code.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/resource.rb +86 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/resource_access_rule.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/restore_policy_properties.rb +87 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/restriction.rb +85 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/root_squash_type.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/routing_choice.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/routing_preference.rb +74 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +247 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/service_specification.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/services.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/share_access_tier.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/signed_resource.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/signed_resource_types.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_information.rb +153 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_name.rb +22 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_tier.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/skucapability.rb +63 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/smb_setting.rb +100 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/state.rb +19 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account.rb +500 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +63 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +294 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_expand.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_internet_endpoints.rb +84 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_key.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_microsoft_endpoints.rb +108 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +246 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_queue.rb +97 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/system_data.rb +105 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/table.rb +74 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/table_service_properties.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/tag_filter.rb +80 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/tag_property.rb +97 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/tracked_resource.rb +95 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/update_history_property.rb +114 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage.rb +89 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_list_result.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_name.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/user_assigned_identity.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb +74 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/object_replication_policies_operations.rb +495 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/operations.rb +110 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/private_endpoint_connections.rb +501 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/private_link_resources.rb +138 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/queue.rb +805 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/queue_services.rb +386 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/skus.rb +116 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/storage_accounts.rb +2059 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/storage_management_client.rb +204 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/table_operations.rb +743 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/table_services.rb +386 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/usages.rb +120 -0
- data/lib/azure_mgmt_storage.rb +1 -0
- data/lib/profiles/latest/modules/storage_profile_module.rb +480 -394
- data/lib/version.rb +1 -1
- metadata +201 -2
@@ -0,0 +1,386 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Storage::Mgmt::V2021_01_01
|
7
|
+
#
|
8
|
+
# The Azure Storage Management API.
|
9
|
+
#
|
10
|
+
class TableServices
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the TableServices class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [StorageManagementClient] reference to the StorageManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# List all table services for the storage account.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group within the
|
28
|
+
# user's subscription. The name is case insensitive.
|
29
|
+
# @param account_name [String] The name of the storage account within the
|
30
|
+
# specified resource group. Storage account names must be between 3 and 24
|
31
|
+
# characters in length and use numbers and lower-case letters only.
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [ListTableServices] operation results.
|
36
|
+
#
|
37
|
+
def list(resource_group_name, account_name, custom_headers:nil)
|
38
|
+
response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# List all table services for the storage account.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The name of the resource group within the
|
46
|
+
# user's subscription. The name is case insensitive.
|
47
|
+
# @param account_name [String] The name of the storage account within the
|
48
|
+
# specified resource group. Storage account names must be between 3 and 24
|
49
|
+
# characters in length and use numbers and lower-case letters only.
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
|
+
#
|
55
|
+
def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
56
|
+
list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# List all table services for the storage account.
|
61
|
+
#
|
62
|
+
# @param resource_group_name [String] The name of the resource group within the
|
63
|
+
# user's subscription. The name is case insensitive.
|
64
|
+
# @param account_name [String] The name of the storage account within the
|
65
|
+
# specified resource group. Storage account names must be between 3 and 24
|
66
|
+
# characters in length and use numbers and lower-case letters only.
|
67
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
68
|
+
# to the HTTP request.
|
69
|
+
#
|
70
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
#
|
72
|
+
def list_async(resource_group_name, account_name, custom_headers:nil)
|
73
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
74
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
75
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
76
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
77
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
78
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
79
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
80
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
81
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
82
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
83
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
84
|
+
|
85
|
+
|
86
|
+
request_headers = {}
|
87
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
88
|
+
|
89
|
+
# Set Headers
|
90
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
91
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
92
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices'
|
93
|
+
|
94
|
+
request_url = @base_url || @client.base_url
|
95
|
+
|
96
|
+
options = {
|
97
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
98
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
99
|
+
query_params: {'api-version' => @client.api_version},
|
100
|
+
headers: request_headers.merge(custom_headers || {}),
|
101
|
+
base_url: request_url
|
102
|
+
}
|
103
|
+
promise = @client.make_request_async(:get, path_template, options)
|
104
|
+
|
105
|
+
promise = promise.then do |result|
|
106
|
+
http_response = result.response
|
107
|
+
status_code = http_response.status
|
108
|
+
response_content = http_response.body
|
109
|
+
unless status_code == 200
|
110
|
+
error_model = JSON.load(response_content)
|
111
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
112
|
+
end
|
113
|
+
|
114
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
115
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
116
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
117
|
+
# Deserialize Response
|
118
|
+
if status_code == 200
|
119
|
+
begin
|
120
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
121
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ListTableServices.mapper()
|
122
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
123
|
+
rescue Exception => e
|
124
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
result
|
129
|
+
end
|
130
|
+
|
131
|
+
promise.execute
|
132
|
+
end
|
133
|
+
|
134
|
+
#
|
135
|
+
# Sets the properties of a storage account’s Table service, including
|
136
|
+
# properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
|
137
|
+
# rules.
|
138
|
+
#
|
139
|
+
# @param resource_group_name [String] The name of the resource group within the
|
140
|
+
# user's subscription. The name is case insensitive.
|
141
|
+
# @param account_name [String] The name of the storage account within the
|
142
|
+
# specified resource group. Storage account names must be between 3 and 24
|
143
|
+
# characters in length and use numbers and lower-case letters only.
|
144
|
+
# @param parameters [TableServiceProperties] The properties of a storage
|
145
|
+
# account’s Table service, only properties for Storage Analytics and CORS
|
146
|
+
# (Cross-Origin Resource Sharing) rules can be specified.
|
147
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
148
|
+
# will be added to the HTTP request.
|
149
|
+
#
|
150
|
+
# @return [TableServiceProperties] operation results.
|
151
|
+
#
|
152
|
+
def set_service_properties(resource_group_name, account_name, parameters, custom_headers:nil)
|
153
|
+
response = set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
|
154
|
+
response.body unless response.nil?
|
155
|
+
end
|
156
|
+
|
157
|
+
#
|
158
|
+
# Sets the properties of a storage account’s Table service, including
|
159
|
+
# properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
|
160
|
+
# rules.
|
161
|
+
#
|
162
|
+
# @param resource_group_name [String] The name of the resource group within the
|
163
|
+
# user's subscription. The name is case insensitive.
|
164
|
+
# @param account_name [String] The name of the storage account within the
|
165
|
+
# specified resource group. Storage account names must be between 3 and 24
|
166
|
+
# characters in length and use numbers and lower-case letters only.
|
167
|
+
# @param parameters [TableServiceProperties] The properties of a storage
|
168
|
+
# account’s Table service, only properties for Storage Analytics and CORS
|
169
|
+
# (Cross-Origin Resource Sharing) rules can be specified.
|
170
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
171
|
+
# will be added to the HTTP request.
|
172
|
+
#
|
173
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
174
|
+
#
|
175
|
+
def set_service_properties_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
|
176
|
+
set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
|
177
|
+
end
|
178
|
+
|
179
|
+
#
|
180
|
+
# Sets the properties of a storage account’s Table service, including
|
181
|
+
# properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
|
182
|
+
# rules.
|
183
|
+
#
|
184
|
+
# @param resource_group_name [String] The name of the resource group within the
|
185
|
+
# user's subscription. The name is case insensitive.
|
186
|
+
# @param account_name [String] The name of the storage account within the
|
187
|
+
# specified resource group. Storage account names must be between 3 and 24
|
188
|
+
# characters in length and use numbers and lower-case letters only.
|
189
|
+
# @param parameters [TableServiceProperties] The properties of a storage
|
190
|
+
# account’s Table service, only properties for Storage Analytics and CORS
|
191
|
+
# (Cross-Origin Resource Sharing) rules can be specified.
|
192
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
193
|
+
# to the HTTP request.
|
194
|
+
#
|
195
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
196
|
+
#
|
197
|
+
def set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:nil)
|
198
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
199
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
200
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
201
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
202
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
203
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
204
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
205
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
206
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
207
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
208
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
209
|
+
table_service_name = 'default'
|
210
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
211
|
+
|
212
|
+
|
213
|
+
request_headers = {}
|
214
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
215
|
+
|
216
|
+
# Set Headers
|
217
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
218
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
219
|
+
|
220
|
+
# Serialize Request
|
221
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::TableServiceProperties.mapper()
|
222
|
+
request_content = @client.serialize(request_mapper, parameters)
|
223
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
224
|
+
|
225
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}'
|
226
|
+
|
227
|
+
request_url = @base_url || @client.base_url
|
228
|
+
|
229
|
+
options = {
|
230
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
231
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'tableServiceName' => table_service_name},
|
232
|
+
query_params: {'api-version' => @client.api_version},
|
233
|
+
body: request_content,
|
234
|
+
headers: request_headers.merge(custom_headers || {}),
|
235
|
+
base_url: request_url
|
236
|
+
}
|
237
|
+
promise = @client.make_request_async(:put, path_template, options)
|
238
|
+
|
239
|
+
promise = promise.then do |result|
|
240
|
+
http_response = result.response
|
241
|
+
status_code = http_response.status
|
242
|
+
response_content = http_response.body
|
243
|
+
unless status_code == 200
|
244
|
+
error_model = JSON.load(response_content)
|
245
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
246
|
+
end
|
247
|
+
|
248
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
249
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
250
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
251
|
+
# Deserialize Response
|
252
|
+
if status_code == 200
|
253
|
+
begin
|
254
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
255
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::TableServiceProperties.mapper()
|
256
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
257
|
+
rescue Exception => e
|
258
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
result
|
263
|
+
end
|
264
|
+
|
265
|
+
promise.execute
|
266
|
+
end
|
267
|
+
|
268
|
+
#
|
269
|
+
# Gets the properties of a storage account’s Table service, including
|
270
|
+
# properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
|
271
|
+
# rules.
|
272
|
+
#
|
273
|
+
# @param resource_group_name [String] The name of the resource group within the
|
274
|
+
# user's subscription. The name is case insensitive.
|
275
|
+
# @param account_name [String] The name of the storage account within the
|
276
|
+
# specified resource group. Storage account names must be between 3 and 24
|
277
|
+
# characters in length and use numbers and lower-case letters only.
|
278
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
279
|
+
# will be added to the HTTP request.
|
280
|
+
#
|
281
|
+
# @return [TableServiceProperties] operation results.
|
282
|
+
#
|
283
|
+
def get_service_properties(resource_group_name, account_name, custom_headers:nil)
|
284
|
+
response = get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
285
|
+
response.body unless response.nil?
|
286
|
+
end
|
287
|
+
|
288
|
+
#
|
289
|
+
# Gets the properties of a storage account’s Table service, including
|
290
|
+
# properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
|
291
|
+
# rules.
|
292
|
+
#
|
293
|
+
# @param resource_group_name [String] The name of the resource group within the
|
294
|
+
# user's subscription. The name is case insensitive.
|
295
|
+
# @param account_name [String] The name of the storage account within the
|
296
|
+
# specified resource group. Storage account names must be between 3 and 24
|
297
|
+
# characters in length and use numbers and lower-case letters only.
|
298
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
299
|
+
# will be added to the HTTP request.
|
300
|
+
#
|
301
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
302
|
+
#
|
303
|
+
def get_service_properties_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
304
|
+
get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
305
|
+
end
|
306
|
+
|
307
|
+
#
|
308
|
+
# Gets the properties of a storage account’s Table service, including
|
309
|
+
# properties for Storage Analytics and CORS (Cross-Origin Resource Sharing)
|
310
|
+
# rules.
|
311
|
+
#
|
312
|
+
# @param resource_group_name [String] The name of the resource group within the
|
313
|
+
# user's subscription. The name is case insensitive.
|
314
|
+
# @param account_name [String] The name of the storage account within the
|
315
|
+
# specified resource group. Storage account names must be between 3 and 24
|
316
|
+
# characters in length and use numbers and lower-case letters only.
|
317
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
318
|
+
# to the HTTP request.
|
319
|
+
#
|
320
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
321
|
+
#
|
322
|
+
def get_service_properties_async(resource_group_name, account_name, custom_headers:nil)
|
323
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
324
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
325
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
326
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
327
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
328
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
329
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
330
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
331
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
332
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
333
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
334
|
+
table_service_name = 'default'
|
335
|
+
|
336
|
+
|
337
|
+
request_headers = {}
|
338
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
339
|
+
|
340
|
+
# Set Headers
|
341
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
342
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
343
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/{tableServiceName}'
|
344
|
+
|
345
|
+
request_url = @base_url || @client.base_url
|
346
|
+
|
347
|
+
options = {
|
348
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
349
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'tableServiceName' => table_service_name},
|
350
|
+
query_params: {'api-version' => @client.api_version},
|
351
|
+
headers: request_headers.merge(custom_headers || {}),
|
352
|
+
base_url: request_url
|
353
|
+
}
|
354
|
+
promise = @client.make_request_async(:get, path_template, options)
|
355
|
+
|
356
|
+
promise = promise.then do |result|
|
357
|
+
http_response = result.response
|
358
|
+
status_code = http_response.status
|
359
|
+
response_content = http_response.body
|
360
|
+
unless status_code == 200
|
361
|
+
error_model = JSON.load(response_content)
|
362
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
363
|
+
end
|
364
|
+
|
365
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
366
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
367
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
368
|
+
# Deserialize Response
|
369
|
+
if status_code == 200
|
370
|
+
begin
|
371
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
372
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::TableServiceProperties.mapper()
|
373
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
374
|
+
rescue Exception => e
|
375
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
376
|
+
end
|
377
|
+
end
|
378
|
+
|
379
|
+
result
|
380
|
+
end
|
381
|
+
|
382
|
+
promise.execute
|
383
|
+
end
|
384
|
+
|
385
|
+
end
|
386
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Storage::Mgmt::V2021_01_01
|
7
|
+
#
|
8
|
+
# The Azure Storage Management API.
|
9
|
+
#
|
10
|
+
class Usages
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Usages class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [StorageManagementClient] reference to the StorageManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Gets the current usage count and the limit for the resources of the location
|
26
|
+
# under the subscription.
|
27
|
+
#
|
28
|
+
# @param location [String] The location of the Azure Storage resource.
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
|
+
# will be added to the HTTP request.
|
31
|
+
#
|
32
|
+
# @return [UsageListResult] operation results.
|
33
|
+
#
|
34
|
+
def list_by_location(location, custom_headers:nil)
|
35
|
+
response = list_by_location_async(location, custom_headers:custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Gets the current usage count and the limit for the resources of the location
|
41
|
+
# under the subscription.
|
42
|
+
#
|
43
|
+
# @param location [String] The location of the Azure Storage resource.
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
|
+
#
|
49
|
+
def list_by_location_with_http_info(location, custom_headers:nil)
|
50
|
+
list_by_location_async(location, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Gets the current usage count and the limit for the resources of the location
|
55
|
+
# under the subscription.
|
56
|
+
#
|
57
|
+
# @param location [String] The location of the Azure Storage resource.
|
58
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
|
+
# to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
|
+
#
|
63
|
+
def list_by_location_async(location, custom_headers:nil)
|
64
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
65
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
66
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
67
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
68
|
+
fail ArgumentError, 'location is nil' if location.nil?
|
69
|
+
|
70
|
+
|
71
|
+
request_headers = {}
|
72
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
73
|
+
|
74
|
+
# Set Headers
|
75
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
76
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
77
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages'
|
78
|
+
|
79
|
+
request_url = @base_url || @client.base_url
|
80
|
+
|
81
|
+
options = {
|
82
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
83
|
+
path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
|
84
|
+
query_params: {'api-version' => @client.api_version},
|
85
|
+
headers: request_headers.merge(custom_headers || {}),
|
86
|
+
base_url: request_url
|
87
|
+
}
|
88
|
+
promise = @client.make_request_async(:get, path_template, options)
|
89
|
+
|
90
|
+
promise = promise.then do |result|
|
91
|
+
http_response = result.response
|
92
|
+
status_code = http_response.status
|
93
|
+
response_content = http_response.body
|
94
|
+
unless status_code == 200
|
95
|
+
error_model = JSON.load(response_content)
|
96
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
97
|
+
end
|
98
|
+
|
99
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
100
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
101
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
102
|
+
# Deserialize Response
|
103
|
+
if status_code == 200
|
104
|
+
begin
|
105
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
106
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::UsageListResult.mapper()
|
107
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
108
|
+
rescue Exception => e
|
109
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
result
|
114
|
+
end
|
115
|
+
|
116
|
+
promise.execute
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
end
|