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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6457d2692def37072aec97fc07860467d05f877ba1863dd471e9a13177df3d7
|
4
|
+
data.tar.gz: b835d24aaa9e5bb2532e43f34efd5051af76837302ac4b3bcc5a9eaa111d2ad7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3912f4a755841b047590390a326729b59a93cf2985f75626f6525bcd4c5e9858d2db5a2f26a42d8760a863e08e0e6a9dc5e005d8ebc7902d9746a1f7d58eba8f
|
7
|
+
data.tar.gz: d614c02e88cdf7b6b413d22f13b9286c73513e233ea1fc999f17609a4a572351106c53b4a4a3e1b2900008f089101e9089997cd5f5fb88c6acdefb63510f69bf
|
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2015_05_01_preview
|
|
130
130
|
#
|
131
131
|
def add_telemetry
|
132
132
|
sdk_information = 'azure_mgmt_storage'
|
133
|
-
sdk_information = "#{sdk_information}/0.
|
133
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
134
134
|
add_user_agent_information(sdk_information)
|
135
135
|
end
|
136
136
|
end
|
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2015_06_15
|
|
130
130
|
#
|
131
131
|
def add_telemetry
|
132
132
|
sdk_information = 'azure_mgmt_storage'
|
133
|
-
sdk_information = "#{sdk_information}/0.
|
133
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
134
134
|
add_user_agent_information(sdk_information)
|
135
135
|
end
|
136
136
|
end
|
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2016_01_01
|
|
130
130
|
#
|
131
131
|
def add_telemetry
|
132
132
|
sdk_information = 'azure_mgmt_storage'
|
133
|
-
sdk_information = "#{sdk_information}/0.
|
133
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
134
134
|
add_user_agent_information(sdk_information)
|
135
135
|
end
|
136
136
|
end
|
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2016_12_01
|
|
130
130
|
#
|
131
131
|
def add_telemetry
|
132
132
|
sdk_information = 'azure_mgmt_storage'
|
133
|
-
sdk_information = "#{sdk_information}/0.
|
133
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
134
134
|
add_user_agent_information(sdk_information)
|
135
135
|
end
|
136
136
|
end
|
@@ -138,7 +138,7 @@ module Azure::Storage::Mgmt::V2017_06_01
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_storage'
|
141
|
-
sdk_information = "#{sdk_information}/0.
|
141
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -138,7 +138,7 @@ module Azure::Storage::Mgmt::V2017_10_01
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_storage'
|
141
|
-
sdk_information = "#{sdk_information}/0.
|
141
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -140,7 +140,7 @@ module Azure::Storage::Mgmt::V2018_02_01
|
|
140
140
|
#
|
141
141
|
def add_telemetry
|
142
142
|
sdk_information = 'azure_mgmt_storage'
|
143
|
-
sdk_information = "#{sdk_information}/0.
|
143
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
144
144
|
add_user_agent_information(sdk_information)
|
145
145
|
end
|
146
146
|
end
|
@@ -140,7 +140,7 @@ module Azure::Storage::Mgmt::V2018_03_01_preview
|
|
140
140
|
#
|
141
141
|
def add_telemetry
|
142
142
|
sdk_information = 'azure_mgmt_storage'
|
143
|
-
sdk_information = "#{sdk_information}/0.
|
143
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
144
144
|
add_user_agent_information(sdk_information)
|
145
145
|
end
|
146
146
|
end
|
@@ -144,7 +144,7 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
144
144
|
#
|
145
145
|
def add_telemetry
|
146
146
|
sdk_information = 'azure_mgmt_storage'
|
147
|
-
sdk_information = "#{sdk_information}/0.
|
147
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
148
148
|
add_user_agent_information(sdk_information)
|
149
149
|
end
|
150
150
|
end
|
@@ -148,7 +148,7 @@ module Azure::Storage::Mgmt::V2018_11_01
|
|
148
148
|
#
|
149
149
|
def add_telemetry
|
150
150
|
sdk_information = 'azure_mgmt_storage'
|
151
|
-
sdk_information = "#{sdk_information}/0.
|
151
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
152
152
|
add_user_agent_information(sdk_information)
|
153
153
|
end
|
154
154
|
end
|
@@ -156,7 +156,7 @@ module Azure::Storage::Mgmt::V2019_04_01
|
|
156
156
|
#
|
157
157
|
def add_telemetry
|
158
158
|
sdk_information = 'azure_mgmt_storage'
|
159
|
-
sdk_information = "#{sdk_information}/0.
|
159
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
160
160
|
add_user_agent_information(sdk_information)
|
161
161
|
end
|
162
162
|
end
|
@@ -189,7 +189,7 @@ module Azure::Storage::Mgmt::V2019_06_01
|
|
189
189
|
#
|
190
190
|
def add_telemetry
|
191
191
|
sdk_information = 'azure_mgmt_storage'
|
192
|
-
sdk_information = "#{sdk_information}/0.
|
192
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
193
193
|
add_user_agent_information(sdk_information)
|
194
194
|
end
|
195
195
|
end
|
@@ -193,7 +193,7 @@ module Azure::Storage::Mgmt::V2020_08_01_preview
|
|
193
193
|
#
|
194
194
|
def add_telemetry
|
195
195
|
sdk_information = 'azure_mgmt_storage'
|
196
|
-
sdk_information = "#{sdk_information}/0.
|
196
|
+
sdk_information = "#{sdk_information}/0.23.0"
|
197
197
|
add_user_agent_information(sdk_information)
|
198
198
|
end
|
199
199
|
end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2021-01-01/generated/azure_mgmt_storage/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Storage::Mgmt::V2021_01_01
|
23
|
+
autoload :Operations, '2021-01-01/generated/azure_mgmt_storage/operations.rb'
|
24
|
+
autoload :Skus, '2021-01-01/generated/azure_mgmt_storage/skus.rb'
|
25
|
+
autoload :StorageAccounts, '2021-01-01/generated/azure_mgmt_storage/storage_accounts.rb'
|
26
|
+
autoload :DeletedAccounts, '2021-01-01/generated/azure_mgmt_storage/deleted_accounts.rb'
|
27
|
+
autoload :Usages, '2021-01-01/generated/azure_mgmt_storage/usages.rb'
|
28
|
+
autoload :ManagementPolicies, '2021-01-01/generated/azure_mgmt_storage/management_policies.rb'
|
29
|
+
autoload :BlobInventoryPolicies, '2021-01-01/generated/azure_mgmt_storage/blob_inventory_policies.rb'
|
30
|
+
autoload :PrivateEndpointConnections, '2021-01-01/generated/azure_mgmt_storage/private_endpoint_connections.rb'
|
31
|
+
autoload :PrivateLinkResources, '2021-01-01/generated/azure_mgmt_storage/private_link_resources.rb'
|
32
|
+
autoload :ObjectReplicationPoliciesOperations, '2021-01-01/generated/azure_mgmt_storage/object_replication_policies_operations.rb'
|
33
|
+
autoload :EncryptionScopes, '2021-01-01/generated/azure_mgmt_storage/encryption_scopes.rb'
|
34
|
+
autoload :BlobServices, '2021-01-01/generated/azure_mgmt_storage/blob_services.rb'
|
35
|
+
autoload :BlobContainers, '2021-01-01/generated/azure_mgmt_storage/blob_containers.rb'
|
36
|
+
autoload :FileServices, '2021-01-01/generated/azure_mgmt_storage/file_services.rb'
|
37
|
+
autoload :FileShares, '2021-01-01/generated/azure_mgmt_storage/file_shares.rb'
|
38
|
+
autoload :QueueServices, '2021-01-01/generated/azure_mgmt_storage/queue_services.rb'
|
39
|
+
autoload :Queue, '2021-01-01/generated/azure_mgmt_storage/queue.rb'
|
40
|
+
autoload :TableServices, '2021-01-01/generated/azure_mgmt_storage/table_services.rb'
|
41
|
+
autoload :TableOperations, '2021-01-01/generated/azure_mgmt_storage/table_operations.rb'
|
42
|
+
autoload :StorageManagementClient, '2021-01-01/generated/azure_mgmt_storage/storage_management_client.rb'
|
43
|
+
|
44
|
+
module Models
|
45
|
+
autoload :ManagementPolicyRule, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_rule.rb'
|
46
|
+
autoload :OperationDisplay, '2021-01-01/generated/azure_mgmt_storage/models/operation_display.rb'
|
47
|
+
autoload :ManagementPolicySchema, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_schema.rb'
|
48
|
+
autoload :MetricSpecification, '2021-01-01/generated/azure_mgmt_storage/models/metric_specification.rb'
|
49
|
+
autoload :ManagementPolicyBaseBlob, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_base_blob.rb'
|
50
|
+
autoload :Operation, '2021-01-01/generated/azure_mgmt_storage/models/operation.rb'
|
51
|
+
autoload :DateAfterCreation, '2021-01-01/generated/azure_mgmt_storage/models/date_after_creation.rb'
|
52
|
+
autoload :StorageAccountCheckNameAvailabilityParameters, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb'
|
53
|
+
autoload :ManagementPolicySnapShot, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb'
|
54
|
+
autoload :Restriction, '2021-01-01/generated/azure_mgmt_storage/models/restriction.rb'
|
55
|
+
autoload :ManagementPolicyVersion, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_version.rb'
|
56
|
+
autoload :StorageSkuListResult, '2021-01-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb'
|
57
|
+
autoload :ManagementPolicyAction, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_action.rb'
|
58
|
+
autoload :CustomDomain, '2021-01-01/generated/azure_mgmt_storage/models/custom_domain.rb'
|
59
|
+
autoload :TagFilter, '2021-01-01/generated/azure_mgmt_storage/models/tag_filter.rb'
|
60
|
+
autoload :EncryptionServices, '2021-01-01/generated/azure_mgmt_storage/models/encryption_services.rb'
|
61
|
+
autoload :ManagementPolicyFilter, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_filter.rb'
|
62
|
+
autoload :EncryptionIdentity, '2021-01-01/generated/azure_mgmt_storage/models/encryption_identity.rb'
|
63
|
+
autoload :ManagementPolicyDefinition, '2021-01-01/generated/azure_mgmt_storage/models/management_policy_definition.rb'
|
64
|
+
autoload :UserAssignedIdentity, '2021-01-01/generated/azure_mgmt_storage/models/user_assigned_identity.rb'
|
65
|
+
autoload :Dimension, '2021-01-01/generated/azure_mgmt_storage/models/dimension.rb'
|
66
|
+
autoload :VirtualNetworkRule, '2021-01-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb'
|
67
|
+
autoload :ServiceSpecification, '2021-01-01/generated/azure_mgmt_storage/models/service_specification.rb'
|
68
|
+
autoload :NetworkRuleSet, '2021-01-01/generated/azure_mgmt_storage/models/network_rule_set.rb'
|
69
|
+
autoload :ListTableResource, '2021-01-01/generated/azure_mgmt_storage/models/list_table_resource.rb'
|
70
|
+
autoload :AzureFilesIdentityBasedAuthentication, '2021-01-01/generated/azure_mgmt_storage/models/azure_files_identity_based_authentication.rb'
|
71
|
+
autoload :EncryptionScopeKeyVaultProperties, '2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_key_vault_properties.rb'
|
72
|
+
autoload :Identity, '2021-01-01/generated/azure_mgmt_storage/models/identity.rb'
|
73
|
+
autoload :ListTableServices, '2021-01-01/generated/azure_mgmt_storage/models/list_table_services.rb'
|
74
|
+
autoload :Sku, '2021-01-01/generated/azure_mgmt_storage/models/sku.rb'
|
75
|
+
autoload :EncryptionScopeListResult, '2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_list_result.rb'
|
76
|
+
autoload :StorageAccountMicrosoftEndpoints, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_microsoft_endpoints.rb'
|
77
|
+
autoload :ObjectReplicationPolicyFilter, '2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_filter.rb'
|
78
|
+
autoload :Endpoints, '2021-01-01/generated/azure_mgmt_storage/models/endpoints.rb'
|
79
|
+
autoload :ObjectReplicationPolicyRule, '2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_rule.rb'
|
80
|
+
autoload :BlobRestoreRange, '2021-01-01/generated/azure_mgmt_storage/models/blob_restore_range.rb'
|
81
|
+
autoload :ListQueueResource, '2021-01-01/generated/azure_mgmt_storage/models/list_queue_resource.rb'
|
82
|
+
autoload :BlobRestoreStatus, '2021-01-01/generated/azure_mgmt_storage/models/blob_restore_status.rb'
|
83
|
+
autoload :ObjectReplicationPolicies, '2021-01-01/generated/azure_mgmt_storage/models/object_replication_policies.rb'
|
84
|
+
autoload :PrivateLinkServiceConnectionState, '2021-01-01/generated/azure_mgmt_storage/models/private_link_service_connection_state.rb'
|
85
|
+
autoload :BlobInventoryPolicyFilter, '2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_filter.rb'
|
86
|
+
autoload :BlobServiceItems, '2021-01-01/generated/azure_mgmt_storage/models/blob_service_items.rb'
|
87
|
+
autoload :LeaseContainerResponse, '2021-01-01/generated/azure_mgmt_storage/models/lease_container_response.rb'
|
88
|
+
autoload :LeaseContainerRequest, '2021-01-01/generated/azure_mgmt_storage/models/lease_container_request.rb'
|
89
|
+
autoload :StorageAccountListResult, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb'
|
90
|
+
autoload :BlobInventoryPolicyDefinition, '2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_definition.rb'
|
91
|
+
autoload :StorageAccountListKeysResult, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb'
|
92
|
+
autoload :BlobInventoryPolicyRule, '2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_rule.rb'
|
93
|
+
autoload :StorageAccountUpdateParameters, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb'
|
94
|
+
autoload :BlobInventoryPolicySchema, '2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_schema.rb'
|
95
|
+
autoload :Usage, '2021-01-01/generated/azure_mgmt_storage/models/usage.rb'
|
96
|
+
autoload :SystemData, '2021-01-01/generated/azure_mgmt_storage/models/system_data.rb'
|
97
|
+
autoload :AccountSasParameters, '2021-01-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb'
|
98
|
+
autoload :ListQueueServices, '2021-01-01/generated/azure_mgmt_storage/models/list_queue_services.rb'
|
99
|
+
autoload :ServiceSasParameters, '2021-01-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb'
|
100
|
+
autoload :ListBlobInventoryPolicy, '2021-01-01/generated/azure_mgmt_storage/models/list_blob_inventory_policy.rb'
|
101
|
+
autoload :DateAfterModification, '2021-01-01/generated/azure_mgmt_storage/models/date_after_modification.rb'
|
102
|
+
autoload :ErrorResponseBody, '2021-01-01/generated/azure_mgmt_storage/models/error_response_body.rb'
|
103
|
+
autoload :SKUCapability, '2021-01-01/generated/azure_mgmt_storage/models/skucapability.rb'
|
104
|
+
autoload :ErrorResponse, '2021-01-01/generated/azure_mgmt_storage/models/error_response.rb'
|
105
|
+
autoload :CheckNameAvailabilityResult, '2021-01-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb'
|
106
|
+
autoload :KeyVaultProperties, '2021-01-01/generated/azure_mgmt_storage/models/key_vault_properties.rb'
|
107
|
+
autoload :ResourceAccessRule, '2021-01-01/generated/azure_mgmt_storage/models/resource_access_rule.rb'
|
108
|
+
autoload :FileShareItems, '2021-01-01/generated/azure_mgmt_storage/models/file_share_items.rb'
|
109
|
+
autoload :ActiveDirectoryProperties, '2021-01-01/generated/azure_mgmt_storage/models/active_directory_properties.rb'
|
110
|
+
autoload :Resource, '2021-01-01/generated/azure_mgmt_storage/models/resource.rb'
|
111
|
+
autoload :ExtendedLocation, '2021-01-01/generated/azure_mgmt_storage/models/extended_location.rb'
|
112
|
+
autoload :DeletedShare, '2021-01-01/generated/azure_mgmt_storage/models/deleted_share.rb'
|
113
|
+
autoload :StorageAccountInternetEndpoints, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_internet_endpoints.rb'
|
114
|
+
autoload :PrivateLinkResourceListResult, '2021-01-01/generated/azure_mgmt_storage/models/private_link_resource_list_result.rb'
|
115
|
+
autoload :BlobRestoreParameters, '2021-01-01/generated/azure_mgmt_storage/models/blob_restore_parameters.rb'
|
116
|
+
autoload :PrivateEndpointConnectionListResult, '2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_list_result.rb'
|
117
|
+
autoload :StorageAccountKey, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_key.rb'
|
118
|
+
autoload :UpdateHistoryProperty, '2021-01-01/generated/azure_mgmt_storage/models/update_history_property.rb'
|
119
|
+
autoload :StorageAccountRegenerateKeyParameters, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb'
|
120
|
+
autoload :ImmutabilityPolicyProperties, '2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb'
|
121
|
+
autoload :UsageListResult, '2021-01-01/generated/azure_mgmt_storage/models/usage_list_result.rb'
|
122
|
+
autoload :TagProperty, '2021-01-01/generated/azure_mgmt_storage/models/tag_property.rb'
|
123
|
+
autoload :ListServiceSasResponse, '2021-01-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb'
|
124
|
+
autoload :LegalHoldProperties, '2021-01-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb'
|
125
|
+
autoload :SkuInformation, '2021-01-01/generated/azure_mgmt_storage/models/sku_information.rb'
|
126
|
+
autoload :FileServiceItems, '2021-01-01/generated/azure_mgmt_storage/models/file_service_items.rb'
|
127
|
+
autoload :Encryption, '2021-01-01/generated/azure_mgmt_storage/models/encryption.rb'
|
128
|
+
autoload :ProtocolSettings, '2021-01-01/generated/azure_mgmt_storage/models/protocol_settings.rb'
|
129
|
+
autoload :RoutingPreference, '2021-01-01/generated/azure_mgmt_storage/models/routing_preference.rb'
|
130
|
+
autoload :LegalHold, '2021-01-01/generated/azure_mgmt_storage/models/legal_hold.rb'
|
131
|
+
autoload :GeoReplicationStats, '2021-01-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb'
|
132
|
+
autoload :SmbSetting, '2021-01-01/generated/azure_mgmt_storage/models/smb_setting.rb'
|
133
|
+
autoload :DeletedAccountListResult, '2021-01-01/generated/azure_mgmt_storage/models/deleted_account_list_result.rb'
|
134
|
+
autoload :ListContainerItems, '2021-01-01/generated/azure_mgmt_storage/models/list_container_items.rb'
|
135
|
+
autoload :ListAccountSasResponse, '2021-01-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb'
|
136
|
+
autoload :CorsRule, '2021-01-01/generated/azure_mgmt_storage/models/cors_rule.rb'
|
137
|
+
autoload :EncryptionService, '2021-01-01/generated/azure_mgmt_storage/models/encryption_service.rb'
|
138
|
+
autoload :CorsRules, '2021-01-01/generated/azure_mgmt_storage/models/cors_rules.rb'
|
139
|
+
autoload :StorageAccountCreateParameters, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb'
|
140
|
+
autoload :DeleteRetentionPolicy, '2021-01-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb'
|
141
|
+
autoload :UsageName, '2021-01-01/generated/azure_mgmt_storage/models/usage_name.rb'
|
142
|
+
autoload :ChangeFeed, '2021-01-01/generated/azure_mgmt_storage/models/change_feed.rb'
|
143
|
+
autoload :IPRule, '2021-01-01/generated/azure_mgmt_storage/models/iprule.rb'
|
144
|
+
autoload :RestorePolicyProperties, '2021-01-01/generated/azure_mgmt_storage/models/restore_policy_properties.rb'
|
145
|
+
autoload :OperationListResult, '2021-01-01/generated/azure_mgmt_storage/models/operation_list_result.rb'
|
146
|
+
autoload :LastAccessTimeTrackingPolicy, '2021-01-01/generated/azure_mgmt_storage/models/last_access_time_tracking_policy.rb'
|
147
|
+
autoload :PrivateEndpoint, '2021-01-01/generated/azure_mgmt_storage/models/private_endpoint.rb'
|
148
|
+
autoload :Multichannel, '2021-01-01/generated/azure_mgmt_storage/models/multichannel.rb'
|
149
|
+
autoload :PrivateEndpointConnection, '2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection.rb'
|
150
|
+
autoload :DeletedAccount, '2021-01-01/generated/azure_mgmt_storage/models/deleted_account.rb'
|
151
|
+
autoload :StorageAccount, '2021-01-01/generated/azure_mgmt_storage/models/storage_account.rb'
|
152
|
+
autoload :ManagementPolicy, '2021-01-01/generated/azure_mgmt_storage/models/management_policy.rb'
|
153
|
+
autoload :EncryptionScope, '2021-01-01/generated/azure_mgmt_storage/models/encryption_scope.rb'
|
154
|
+
autoload :ObjectReplicationPolicy, '2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy.rb'
|
155
|
+
autoload :BlobInventoryPolicy, '2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy.rb'
|
156
|
+
autoload :ProxyResource, '2021-01-01/generated/azure_mgmt_storage/models/proxy_resource.rb'
|
157
|
+
autoload :TrackedResource, '2021-01-01/generated/azure_mgmt_storage/models/tracked_resource.rb'
|
158
|
+
autoload :AzureEntityResource, '2021-01-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb'
|
159
|
+
autoload :PrivateLinkResource, '2021-01-01/generated/azure_mgmt_storage/models/private_link_resource.rb'
|
160
|
+
autoload :BlobContainer, '2021-01-01/generated/azure_mgmt_storage/models/blob_container.rb'
|
161
|
+
autoload :ImmutabilityPolicy, '2021-01-01/generated/azure_mgmt_storage/models/immutability_policy.rb'
|
162
|
+
autoload :ListContainerItem, '2021-01-01/generated/azure_mgmt_storage/models/list_container_item.rb'
|
163
|
+
autoload :BlobServiceProperties, '2021-01-01/generated/azure_mgmt_storage/models/blob_service_properties.rb'
|
164
|
+
autoload :FileServiceProperties, '2021-01-01/generated/azure_mgmt_storage/models/file_service_properties.rb'
|
165
|
+
autoload :FileShare, '2021-01-01/generated/azure_mgmt_storage/models/file_share.rb'
|
166
|
+
autoload :FileShareItem, '2021-01-01/generated/azure_mgmt_storage/models/file_share_item.rb'
|
167
|
+
autoload :QueueServiceProperties, '2021-01-01/generated/azure_mgmt_storage/models/queue_service_properties.rb'
|
168
|
+
autoload :StorageQueue, '2021-01-01/generated/azure_mgmt_storage/models/storage_queue.rb'
|
169
|
+
autoload :ListQueue, '2021-01-01/generated/azure_mgmt_storage/models/list_queue.rb'
|
170
|
+
autoload :TableServiceProperties, '2021-01-01/generated/azure_mgmt_storage/models/table_service_properties.rb'
|
171
|
+
autoload :Table, '2021-01-01/generated/azure_mgmt_storage/models/table.rb'
|
172
|
+
autoload :ReasonCode, '2021-01-01/generated/azure_mgmt_storage/models/reason_code.rb'
|
173
|
+
autoload :SkuName, '2021-01-01/generated/azure_mgmt_storage/models/sku_name.rb'
|
174
|
+
autoload :SkuTier, '2021-01-01/generated/azure_mgmt_storage/models/sku_tier.rb'
|
175
|
+
autoload :Kind, '2021-01-01/generated/azure_mgmt_storage/models/kind.rb'
|
176
|
+
autoload :Reason, '2021-01-01/generated/azure_mgmt_storage/models/reason.rb'
|
177
|
+
autoload :KeyType, '2021-01-01/generated/azure_mgmt_storage/models/key_type.rb'
|
178
|
+
autoload :KeySource, '2021-01-01/generated/azure_mgmt_storage/models/key_source.rb'
|
179
|
+
autoload :Action, '2021-01-01/generated/azure_mgmt_storage/models/action.rb'
|
180
|
+
autoload :State, '2021-01-01/generated/azure_mgmt_storage/models/state.rb'
|
181
|
+
autoload :Bypass, '2021-01-01/generated/azure_mgmt_storage/models/bypass.rb'
|
182
|
+
autoload :DefaultAction, '2021-01-01/generated/azure_mgmt_storage/models/default_action.rb'
|
183
|
+
autoload :DirectoryServiceOptions, '2021-01-01/generated/azure_mgmt_storage/models/directory_service_options.rb'
|
184
|
+
autoload :AccessTier, '2021-01-01/generated/azure_mgmt_storage/models/access_tier.rb'
|
185
|
+
autoload :LargeFileSharesState, '2021-01-01/generated/azure_mgmt_storage/models/large_file_shares_state.rb'
|
186
|
+
autoload :RoutingChoice, '2021-01-01/generated/azure_mgmt_storage/models/routing_choice.rb'
|
187
|
+
autoload :MinimumTlsVersion, '2021-01-01/generated/azure_mgmt_storage/models/minimum_tls_version.rb'
|
188
|
+
autoload :IdentityType, '2021-01-01/generated/azure_mgmt_storage/models/identity_type.rb'
|
189
|
+
autoload :ExtendedLocationTypes, '2021-01-01/generated/azure_mgmt_storage/models/extended_location_types.rb'
|
190
|
+
autoload :GeoReplicationStatus, '2021-01-01/generated/azure_mgmt_storage/models/geo_replication_status.rb'
|
191
|
+
autoload :BlobRestoreProgressStatus, '2021-01-01/generated/azure_mgmt_storage/models/blob_restore_progress_status.rb'
|
192
|
+
autoload :ProvisioningState, '2021-01-01/generated/azure_mgmt_storage/models/provisioning_state.rb'
|
193
|
+
autoload :AccountStatus, '2021-01-01/generated/azure_mgmt_storage/models/account_status.rb'
|
194
|
+
autoload :PrivateEndpointServiceConnectionStatus, '2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_service_connection_status.rb'
|
195
|
+
autoload :PrivateEndpointConnectionProvisioningState, '2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_provisioning_state.rb'
|
196
|
+
autoload :KeyPermission, '2021-01-01/generated/azure_mgmt_storage/models/key_permission.rb'
|
197
|
+
autoload :UsageUnit, '2021-01-01/generated/azure_mgmt_storage/models/usage_unit.rb'
|
198
|
+
autoload :Services, '2021-01-01/generated/azure_mgmt_storage/models/services.rb'
|
199
|
+
autoload :SignedResourceTypes, '2021-01-01/generated/azure_mgmt_storage/models/signed_resource_types.rb'
|
200
|
+
autoload :Permissions, '2021-01-01/generated/azure_mgmt_storage/models/permissions.rb'
|
201
|
+
autoload :HttpProtocol, '2021-01-01/generated/azure_mgmt_storage/models/http_protocol.rb'
|
202
|
+
autoload :SignedResource, '2021-01-01/generated/azure_mgmt_storage/models/signed_resource.rb'
|
203
|
+
autoload :EncryptionScopeSource, '2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_source.rb'
|
204
|
+
autoload :EncryptionScopeState, '2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_state.rb'
|
205
|
+
autoload :CreatedByType, '2021-01-01/generated/azure_mgmt_storage/models/created_by_type.rb'
|
206
|
+
autoload :PublicAccess, '2021-01-01/generated/azure_mgmt_storage/models/public_access.rb'
|
207
|
+
autoload :LeaseStatus, '2021-01-01/generated/azure_mgmt_storage/models/lease_status.rb'
|
208
|
+
autoload :LeaseState, '2021-01-01/generated/azure_mgmt_storage/models/lease_state.rb'
|
209
|
+
autoload :LeaseDuration, '2021-01-01/generated/azure_mgmt_storage/models/lease_duration.rb'
|
210
|
+
autoload :ImmutabilityPolicyState, '2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb'
|
211
|
+
autoload :ImmutabilityPolicyUpdateType, '2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb'
|
212
|
+
autoload :Name, '2021-01-01/generated/azure_mgmt_storage/models/name.rb'
|
213
|
+
autoload :EnabledProtocols, '2021-01-01/generated/azure_mgmt_storage/models/enabled_protocols.rb'
|
214
|
+
autoload :RootSquashType, '2021-01-01/generated/azure_mgmt_storage/models/root_squash_type.rb'
|
215
|
+
autoload :ShareAccessTier, '2021-01-01/generated/azure_mgmt_storage/models/share_access_tier.rb'
|
216
|
+
autoload :StorageAccountExpand, '2021-01-01/generated/azure_mgmt_storage/models/storage_account_expand.rb'
|
217
|
+
autoload :ListKeyExpand, '2021-01-01/generated/azure_mgmt_storage/models/list_key_expand.rb'
|
218
|
+
autoload :ListContainersInclude, '2021-01-01/generated/azure_mgmt_storage/models/list_containers_include.rb'
|
219
|
+
autoload :ListSharesExpand, '2021-01-01/generated/azure_mgmt_storage/models/list_shares_expand.rb'
|
220
|
+
autoload :PutSharesExpand, '2021-01-01/generated/azure_mgmt_storage/models/put_shares_expand.rb'
|
221
|
+
autoload :GetShareExpand, '2021-01-01/generated/azure_mgmt_storage/models/get_share_expand.rb'
|
222
|
+
end
|
223
|
+
end
|
@@ -0,0 +1,2046 @@
|
|
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 BlobContainers
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the BlobContainers 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
|
+
# Lists all containers and does not support a prefix like data plane. Also SRP
|
26
|
+
# today does not return continuation token.
|
27
|
+
#
|
28
|
+
# @param resource_group_name [String] The name of the resource group within the
|
29
|
+
# user's subscription. The name is case insensitive.
|
30
|
+
# @param account_name [String] The name of the storage account within the
|
31
|
+
# specified resource group. Storage account names must be between 3 and 24
|
32
|
+
# characters in length and use numbers and lower-case letters only.
|
33
|
+
# @param maxpagesize [String] Optional. Specified maximum number of containers
|
34
|
+
# that can be included in the list.
|
35
|
+
# @param filter [String] Optional. When specified, only container names
|
36
|
+
# starting with the filter will be listed.
|
37
|
+
# @param include [ListContainersInclude] Optional, used to include the
|
38
|
+
# properties for soft deleted blob containers. Possible values include:
|
39
|
+
# 'deleted'
|
40
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
41
|
+
# will be added to the HTTP request.
|
42
|
+
#
|
43
|
+
# @return [Array<ListContainerItem>] operation results.
|
44
|
+
#
|
45
|
+
def list(resource_group_name, account_name, maxpagesize:nil, filter:nil, include:nil, custom_headers:nil)
|
46
|
+
first_page = list_as_lazy(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, include:include, custom_headers:custom_headers)
|
47
|
+
first_page.get_all_items
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# Lists all containers and does not support a prefix like data plane. Also SRP
|
52
|
+
# today does not return continuation token.
|
53
|
+
#
|
54
|
+
# @param resource_group_name [String] The name of the resource group within the
|
55
|
+
# user's subscription. The name is case insensitive.
|
56
|
+
# @param account_name [String] The name of the storage account within the
|
57
|
+
# specified resource group. Storage account names must be between 3 and 24
|
58
|
+
# characters in length and use numbers and lower-case letters only.
|
59
|
+
# @param maxpagesize [String] Optional. Specified maximum number of containers
|
60
|
+
# that can be included in the list.
|
61
|
+
# @param filter [String] Optional. When specified, only container names
|
62
|
+
# starting with the filter will be listed.
|
63
|
+
# @param include [ListContainersInclude] Optional, used to include the
|
64
|
+
# properties for soft deleted blob containers. Possible values include:
|
65
|
+
# 'deleted'
|
66
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
67
|
+
# will be added to the HTTP request.
|
68
|
+
#
|
69
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
70
|
+
#
|
71
|
+
def list_with_http_info(resource_group_name, account_name, maxpagesize:nil, filter:nil, include:nil, custom_headers:nil)
|
72
|
+
list_async(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, include:include, custom_headers:custom_headers).value!
|
73
|
+
end
|
74
|
+
|
75
|
+
#
|
76
|
+
# Lists all containers and does not support a prefix like data plane. Also SRP
|
77
|
+
# today does not return continuation token.
|
78
|
+
#
|
79
|
+
# @param resource_group_name [String] The name of the resource group within the
|
80
|
+
# user's subscription. The name is case insensitive.
|
81
|
+
# @param account_name [String] The name of the storage account within the
|
82
|
+
# specified resource group. Storage account names must be between 3 and 24
|
83
|
+
# characters in length and use numbers and lower-case letters only.
|
84
|
+
# @param maxpagesize [String] Optional. Specified maximum number of containers
|
85
|
+
# that can be included in the list.
|
86
|
+
# @param filter [String] Optional. When specified, only container names
|
87
|
+
# starting with the filter will be listed.
|
88
|
+
# @param include [ListContainersInclude] Optional, used to include the
|
89
|
+
# properties for soft deleted blob containers. Possible values include:
|
90
|
+
# 'deleted'
|
91
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
92
|
+
# to the HTTP request.
|
93
|
+
#
|
94
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
95
|
+
#
|
96
|
+
def list_async(resource_group_name, account_name, maxpagesize:nil, filter:nil, include:nil, custom_headers:nil)
|
97
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
98
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
99
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
100
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
101
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
102
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
103
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
104
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
105
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
106
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
107
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
108
|
+
|
109
|
+
|
110
|
+
request_headers = {}
|
111
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
112
|
+
|
113
|
+
# Set Headers
|
114
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
115
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
116
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers'
|
117
|
+
|
118
|
+
request_url = @base_url || @client.base_url
|
119
|
+
|
120
|
+
options = {
|
121
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
122
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
123
|
+
query_params: {'api-version' => @client.api_version,'$maxpagesize' => maxpagesize,'$filter' => filter,'$include' => include},
|
124
|
+
headers: request_headers.merge(custom_headers || {}),
|
125
|
+
base_url: request_url
|
126
|
+
}
|
127
|
+
promise = @client.make_request_async(:get, path_template, options)
|
128
|
+
|
129
|
+
promise = promise.then do |result|
|
130
|
+
http_response = result.response
|
131
|
+
status_code = http_response.status
|
132
|
+
response_content = http_response.body
|
133
|
+
unless status_code == 200
|
134
|
+
error_model = JSON.load(response_content)
|
135
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
136
|
+
end
|
137
|
+
|
138
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
139
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
140
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
141
|
+
# Deserialize Response
|
142
|
+
if status_code == 200
|
143
|
+
begin
|
144
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
145
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ListContainerItems.mapper()
|
146
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
147
|
+
rescue Exception => e
|
148
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
result
|
153
|
+
end
|
154
|
+
|
155
|
+
promise.execute
|
156
|
+
end
|
157
|
+
|
158
|
+
#
|
159
|
+
# Creates a new container under the specified account as described by request
|
160
|
+
# body. The container resource includes metadata and properties for that
|
161
|
+
# container. It does not include a list of the blobs contained by the
|
162
|
+
# container.
|
163
|
+
#
|
164
|
+
# @param resource_group_name [String] The name of the resource group within the
|
165
|
+
# user's subscription. The name is case insensitive.
|
166
|
+
# @param account_name [String] The name of the storage account within the
|
167
|
+
# specified resource group. Storage account names must be between 3 and 24
|
168
|
+
# characters in length and use numbers and lower-case letters only.
|
169
|
+
# @param container_name [String] The name of the blob container within the
|
170
|
+
# specified storage account. Blob container names must be between 3 and 63
|
171
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
172
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
173
|
+
# letter or number.
|
174
|
+
# @param blob_container [BlobContainer] Properties of the blob container to
|
175
|
+
# create.
|
176
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
177
|
+
# will be added to the HTTP request.
|
178
|
+
#
|
179
|
+
# @return [BlobContainer] operation results.
|
180
|
+
#
|
181
|
+
def create(resource_group_name, account_name, container_name, blob_container, custom_headers:nil)
|
182
|
+
response = create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value!
|
183
|
+
response.body unless response.nil?
|
184
|
+
end
|
185
|
+
|
186
|
+
#
|
187
|
+
# Creates a new container under the specified account as described by request
|
188
|
+
# body. The container resource includes metadata and properties for that
|
189
|
+
# container. It does not include a list of the blobs contained by the
|
190
|
+
# container.
|
191
|
+
#
|
192
|
+
# @param resource_group_name [String] The name of the resource group within the
|
193
|
+
# user's subscription. The name is case insensitive.
|
194
|
+
# @param account_name [String] The name of the storage account within the
|
195
|
+
# specified resource group. Storage account names must be between 3 and 24
|
196
|
+
# characters in length and use numbers and lower-case letters only.
|
197
|
+
# @param container_name [String] The name of the blob container within the
|
198
|
+
# specified storage account. Blob container names must be between 3 and 63
|
199
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
200
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
201
|
+
# letter or number.
|
202
|
+
# @param blob_container [BlobContainer] Properties of the blob container to
|
203
|
+
# create.
|
204
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
205
|
+
# will be added to the HTTP request.
|
206
|
+
#
|
207
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
208
|
+
#
|
209
|
+
def create_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers:nil)
|
210
|
+
create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value!
|
211
|
+
end
|
212
|
+
|
213
|
+
#
|
214
|
+
# Creates a new container under the specified account as described by request
|
215
|
+
# body. The container resource includes metadata and properties for that
|
216
|
+
# container. It does not include a list of the blobs contained by the
|
217
|
+
# container.
|
218
|
+
#
|
219
|
+
# @param resource_group_name [String] The name of the resource group within the
|
220
|
+
# user's subscription. The name is case insensitive.
|
221
|
+
# @param account_name [String] The name of the storage account within the
|
222
|
+
# specified resource group. Storage account names must be between 3 and 24
|
223
|
+
# characters in length and use numbers and lower-case letters only.
|
224
|
+
# @param container_name [String] The name of the blob container within the
|
225
|
+
# specified storage account. Blob container names must be between 3 and 63
|
226
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
227
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
228
|
+
# letter or number.
|
229
|
+
# @param blob_container [BlobContainer] Properties of the blob container to
|
230
|
+
# create.
|
231
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
232
|
+
# to the HTTP request.
|
233
|
+
#
|
234
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
235
|
+
#
|
236
|
+
def create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:nil)
|
237
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
238
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
239
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
240
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
241
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
242
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
243
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
244
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
245
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
246
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
247
|
+
fail ArgumentError, 'blob_container is nil' if blob_container.nil?
|
248
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
249
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
250
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
251
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
252
|
+
|
253
|
+
|
254
|
+
request_headers = {}
|
255
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
256
|
+
|
257
|
+
# Set Headers
|
258
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
259
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
260
|
+
|
261
|
+
# Serialize Request
|
262
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::BlobContainer.mapper()
|
263
|
+
request_content = @client.serialize(request_mapper, blob_container)
|
264
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
265
|
+
|
266
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'
|
267
|
+
|
268
|
+
request_url = @base_url || @client.base_url
|
269
|
+
|
270
|
+
options = {
|
271
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
272
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
273
|
+
query_params: {'api-version' => @client.api_version},
|
274
|
+
body: request_content,
|
275
|
+
headers: request_headers.merge(custom_headers || {}),
|
276
|
+
base_url: request_url
|
277
|
+
}
|
278
|
+
promise = @client.make_request_async(:put, path_template, options)
|
279
|
+
|
280
|
+
promise = promise.then do |result|
|
281
|
+
http_response = result.response
|
282
|
+
status_code = http_response.status
|
283
|
+
response_content = http_response.body
|
284
|
+
unless status_code == 201 || status_code == 200
|
285
|
+
error_model = JSON.load(response_content)
|
286
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
287
|
+
end
|
288
|
+
|
289
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
290
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
291
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
292
|
+
# Deserialize Response
|
293
|
+
if status_code == 201
|
294
|
+
begin
|
295
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
296
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::BlobContainer.mapper()
|
297
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
298
|
+
rescue Exception => e
|
299
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
300
|
+
end
|
301
|
+
end
|
302
|
+
# Deserialize Response
|
303
|
+
if status_code == 200
|
304
|
+
begin
|
305
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
306
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::BlobContainer.mapper()
|
307
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
308
|
+
rescue Exception => e
|
309
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
result
|
314
|
+
end
|
315
|
+
|
316
|
+
promise.execute
|
317
|
+
end
|
318
|
+
|
319
|
+
#
|
320
|
+
# Updates container properties as specified in request body. Properties not
|
321
|
+
# mentioned in the request will be unchanged. Update fails if the specified
|
322
|
+
# container doesn't already exist.
|
323
|
+
#
|
324
|
+
# @param resource_group_name [String] The name of the resource group within the
|
325
|
+
# user's subscription. The name is case insensitive.
|
326
|
+
# @param account_name [String] The name of the storage account within the
|
327
|
+
# specified resource group. Storage account names must be between 3 and 24
|
328
|
+
# characters in length and use numbers and lower-case letters only.
|
329
|
+
# @param container_name [String] The name of the blob container within the
|
330
|
+
# specified storage account. Blob container names must be between 3 and 63
|
331
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
332
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
333
|
+
# letter or number.
|
334
|
+
# @param blob_container [BlobContainer] Properties to update for the blob
|
335
|
+
# container.
|
336
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
337
|
+
# will be added to the HTTP request.
|
338
|
+
#
|
339
|
+
# @return [BlobContainer] operation results.
|
340
|
+
#
|
341
|
+
def update(resource_group_name, account_name, container_name, blob_container, custom_headers:nil)
|
342
|
+
response = update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value!
|
343
|
+
response.body unless response.nil?
|
344
|
+
end
|
345
|
+
|
346
|
+
#
|
347
|
+
# Updates container properties as specified in request body. Properties not
|
348
|
+
# mentioned in the request will be unchanged. Update fails if the specified
|
349
|
+
# container doesn't already exist.
|
350
|
+
#
|
351
|
+
# @param resource_group_name [String] The name of the resource group within the
|
352
|
+
# user's subscription. The name is case insensitive.
|
353
|
+
# @param account_name [String] The name of the storage account within the
|
354
|
+
# specified resource group. Storage account names must be between 3 and 24
|
355
|
+
# characters in length and use numbers and lower-case letters only.
|
356
|
+
# @param container_name [String] The name of the blob container within the
|
357
|
+
# specified storage account. Blob container names must be between 3 and 63
|
358
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
359
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
360
|
+
# letter or number.
|
361
|
+
# @param blob_container [BlobContainer] Properties to update for the blob
|
362
|
+
# container.
|
363
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
364
|
+
# will be added to the HTTP request.
|
365
|
+
#
|
366
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
367
|
+
#
|
368
|
+
def update_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers:nil)
|
369
|
+
update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value!
|
370
|
+
end
|
371
|
+
|
372
|
+
#
|
373
|
+
# Updates container properties as specified in request body. Properties not
|
374
|
+
# mentioned in the request will be unchanged. Update fails if the specified
|
375
|
+
# container doesn't already exist.
|
376
|
+
#
|
377
|
+
# @param resource_group_name [String] The name of the resource group within the
|
378
|
+
# user's subscription. The name is case insensitive.
|
379
|
+
# @param account_name [String] The name of the storage account within the
|
380
|
+
# specified resource group. Storage account names must be between 3 and 24
|
381
|
+
# characters in length and use numbers and lower-case letters only.
|
382
|
+
# @param container_name [String] The name of the blob container within the
|
383
|
+
# specified storage account. Blob container names must be between 3 and 63
|
384
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
385
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
386
|
+
# letter or number.
|
387
|
+
# @param blob_container [BlobContainer] Properties to update for the blob
|
388
|
+
# container.
|
389
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
390
|
+
# to the HTTP request.
|
391
|
+
#
|
392
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
393
|
+
#
|
394
|
+
def update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:nil)
|
395
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
396
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
397
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
398
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
399
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
400
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
401
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
402
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
403
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
404
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
405
|
+
fail ArgumentError, 'blob_container is nil' if blob_container.nil?
|
406
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
407
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
408
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
409
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
410
|
+
|
411
|
+
|
412
|
+
request_headers = {}
|
413
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
414
|
+
|
415
|
+
# Set Headers
|
416
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
417
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
418
|
+
|
419
|
+
# Serialize Request
|
420
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::BlobContainer.mapper()
|
421
|
+
request_content = @client.serialize(request_mapper, blob_container)
|
422
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
423
|
+
|
424
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'
|
425
|
+
|
426
|
+
request_url = @base_url || @client.base_url
|
427
|
+
|
428
|
+
options = {
|
429
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
430
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
431
|
+
query_params: {'api-version' => @client.api_version},
|
432
|
+
body: request_content,
|
433
|
+
headers: request_headers.merge(custom_headers || {}),
|
434
|
+
base_url: request_url
|
435
|
+
}
|
436
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
437
|
+
|
438
|
+
promise = promise.then do |result|
|
439
|
+
http_response = result.response
|
440
|
+
status_code = http_response.status
|
441
|
+
response_content = http_response.body
|
442
|
+
unless status_code == 200
|
443
|
+
error_model = JSON.load(response_content)
|
444
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
445
|
+
end
|
446
|
+
|
447
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
448
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
449
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
450
|
+
# Deserialize Response
|
451
|
+
if status_code == 200
|
452
|
+
begin
|
453
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
454
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::BlobContainer.mapper()
|
455
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
456
|
+
rescue Exception => e
|
457
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
458
|
+
end
|
459
|
+
end
|
460
|
+
|
461
|
+
result
|
462
|
+
end
|
463
|
+
|
464
|
+
promise.execute
|
465
|
+
end
|
466
|
+
|
467
|
+
#
|
468
|
+
# Gets properties of a specified container.
|
469
|
+
#
|
470
|
+
# @param resource_group_name [String] The name of the resource group within the
|
471
|
+
# user's subscription. The name is case insensitive.
|
472
|
+
# @param account_name [String] The name of the storage account within the
|
473
|
+
# specified resource group. Storage account names must be between 3 and 24
|
474
|
+
# characters in length and use numbers and lower-case letters only.
|
475
|
+
# @param container_name [String] The name of the blob container within the
|
476
|
+
# specified storage account. Blob container names must be between 3 and 63
|
477
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
478
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
479
|
+
# letter or number.
|
480
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
481
|
+
# will be added to the HTTP request.
|
482
|
+
#
|
483
|
+
# @return [BlobContainer] operation results.
|
484
|
+
#
|
485
|
+
def get(resource_group_name, account_name, container_name, custom_headers:nil)
|
486
|
+
response = get_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value!
|
487
|
+
response.body unless response.nil?
|
488
|
+
end
|
489
|
+
|
490
|
+
#
|
491
|
+
# Gets properties of a specified container.
|
492
|
+
#
|
493
|
+
# @param resource_group_name [String] The name of the resource group within the
|
494
|
+
# user's subscription. The name is case insensitive.
|
495
|
+
# @param account_name [String] The name of the storage account within the
|
496
|
+
# specified resource group. Storage account names must be between 3 and 24
|
497
|
+
# characters in length and use numbers and lower-case letters only.
|
498
|
+
# @param container_name [String] The name of the blob container within the
|
499
|
+
# specified storage account. Blob container names must be between 3 and 63
|
500
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
501
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
502
|
+
# letter or number.
|
503
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
504
|
+
# will be added to the HTTP request.
|
505
|
+
#
|
506
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
507
|
+
#
|
508
|
+
def get_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil)
|
509
|
+
get_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value!
|
510
|
+
end
|
511
|
+
|
512
|
+
#
|
513
|
+
# Gets properties of a specified container.
|
514
|
+
#
|
515
|
+
# @param resource_group_name [String] The name of the resource group within the
|
516
|
+
# user's subscription. The name is case insensitive.
|
517
|
+
# @param account_name [String] The name of the storage account within the
|
518
|
+
# specified resource group. Storage account names must be between 3 and 24
|
519
|
+
# characters in length and use numbers and lower-case letters only.
|
520
|
+
# @param container_name [String] The name of the blob container within the
|
521
|
+
# specified storage account. Blob container names must be between 3 and 63
|
522
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
523
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
524
|
+
# letter or number.
|
525
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
526
|
+
# to the HTTP request.
|
527
|
+
#
|
528
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
529
|
+
#
|
530
|
+
def get_async(resource_group_name, account_name, container_name, custom_headers:nil)
|
531
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
532
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
533
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
534
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
535
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
536
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
537
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
538
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
539
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
540
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
541
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
542
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
543
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
544
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
545
|
+
|
546
|
+
|
547
|
+
request_headers = {}
|
548
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
549
|
+
|
550
|
+
# Set Headers
|
551
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
552
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
553
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'
|
554
|
+
|
555
|
+
request_url = @base_url || @client.base_url
|
556
|
+
|
557
|
+
options = {
|
558
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
559
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
560
|
+
query_params: {'api-version' => @client.api_version},
|
561
|
+
headers: request_headers.merge(custom_headers || {}),
|
562
|
+
base_url: request_url
|
563
|
+
}
|
564
|
+
promise = @client.make_request_async(:get, path_template, options)
|
565
|
+
|
566
|
+
promise = promise.then do |result|
|
567
|
+
http_response = result.response
|
568
|
+
status_code = http_response.status
|
569
|
+
response_content = http_response.body
|
570
|
+
unless status_code == 200
|
571
|
+
error_model = JSON.load(response_content)
|
572
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
573
|
+
end
|
574
|
+
|
575
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
576
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
577
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
578
|
+
# Deserialize Response
|
579
|
+
if status_code == 200
|
580
|
+
begin
|
581
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
582
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::BlobContainer.mapper()
|
583
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
584
|
+
rescue Exception => e
|
585
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
586
|
+
end
|
587
|
+
end
|
588
|
+
|
589
|
+
result
|
590
|
+
end
|
591
|
+
|
592
|
+
promise.execute
|
593
|
+
end
|
594
|
+
|
595
|
+
#
|
596
|
+
# Deletes specified container under its account.
|
597
|
+
#
|
598
|
+
# @param resource_group_name [String] The name of the resource group within the
|
599
|
+
# user's subscription. The name is case insensitive.
|
600
|
+
# @param account_name [String] The name of the storage account within the
|
601
|
+
# specified resource group. Storage account names must be between 3 and 24
|
602
|
+
# characters in length and use numbers and lower-case letters only.
|
603
|
+
# @param container_name [String] The name of the blob container within the
|
604
|
+
# specified storage account. Blob container names must be between 3 and 63
|
605
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
606
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
607
|
+
# letter or number.
|
608
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
609
|
+
# will be added to the HTTP request.
|
610
|
+
#
|
611
|
+
#
|
612
|
+
def delete(resource_group_name, account_name, container_name, custom_headers:nil)
|
613
|
+
response = delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value!
|
614
|
+
nil
|
615
|
+
end
|
616
|
+
|
617
|
+
#
|
618
|
+
# Deletes specified container under its account.
|
619
|
+
#
|
620
|
+
# @param resource_group_name [String] The name of the resource group within the
|
621
|
+
# user's subscription. The name is case insensitive.
|
622
|
+
# @param account_name [String] The name of the storage account within the
|
623
|
+
# specified resource group. Storage account names must be between 3 and 24
|
624
|
+
# characters in length and use numbers and lower-case letters only.
|
625
|
+
# @param container_name [String] The name of the blob container within the
|
626
|
+
# specified storage account. Blob container names must be between 3 and 63
|
627
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
628
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
629
|
+
# letter or number.
|
630
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
631
|
+
# will be added to the HTTP request.
|
632
|
+
#
|
633
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
634
|
+
#
|
635
|
+
def delete_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil)
|
636
|
+
delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value!
|
637
|
+
end
|
638
|
+
|
639
|
+
#
|
640
|
+
# Deletes specified container under its account.
|
641
|
+
#
|
642
|
+
# @param resource_group_name [String] The name of the resource group within the
|
643
|
+
# user's subscription. The name is case insensitive.
|
644
|
+
# @param account_name [String] The name of the storage account within the
|
645
|
+
# specified resource group. Storage account names must be between 3 and 24
|
646
|
+
# characters in length and use numbers and lower-case letters only.
|
647
|
+
# @param container_name [String] The name of the blob container within the
|
648
|
+
# specified storage account. Blob container names must be between 3 and 63
|
649
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
650
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
651
|
+
# letter or number.
|
652
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
653
|
+
# to the HTTP request.
|
654
|
+
#
|
655
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
656
|
+
#
|
657
|
+
def delete_async(resource_group_name, account_name, container_name, custom_headers:nil)
|
658
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
659
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
660
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
661
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
662
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
663
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
664
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
665
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
666
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
667
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
668
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
669
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
670
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
671
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
672
|
+
|
673
|
+
|
674
|
+
request_headers = {}
|
675
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
676
|
+
|
677
|
+
# Set Headers
|
678
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
679
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
680
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}'
|
681
|
+
|
682
|
+
request_url = @base_url || @client.base_url
|
683
|
+
|
684
|
+
options = {
|
685
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
686
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
687
|
+
query_params: {'api-version' => @client.api_version},
|
688
|
+
headers: request_headers.merge(custom_headers || {}),
|
689
|
+
base_url: request_url
|
690
|
+
}
|
691
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
692
|
+
|
693
|
+
promise = promise.then do |result|
|
694
|
+
http_response = result.response
|
695
|
+
status_code = http_response.status
|
696
|
+
response_content = http_response.body
|
697
|
+
unless status_code == 200 || status_code == 204
|
698
|
+
error_model = JSON.load(response_content)
|
699
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
700
|
+
end
|
701
|
+
|
702
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
703
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
704
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
705
|
+
|
706
|
+
result
|
707
|
+
end
|
708
|
+
|
709
|
+
promise.execute
|
710
|
+
end
|
711
|
+
|
712
|
+
#
|
713
|
+
# Sets legal hold tags. Setting the same tag results in an idempotent
|
714
|
+
# operation. SetLegalHold follows an append pattern and does not clear out the
|
715
|
+
# existing tags that are not specified in the request.
|
716
|
+
#
|
717
|
+
# @param resource_group_name [String] The name of the resource group within the
|
718
|
+
# user's subscription. The name is case insensitive.
|
719
|
+
# @param account_name [String] The name of the storage account within the
|
720
|
+
# specified resource group. Storage account names must be between 3 and 24
|
721
|
+
# characters in length and use numbers and lower-case letters only.
|
722
|
+
# @param container_name [String] The name of the blob container within the
|
723
|
+
# specified storage account. Blob container names must be between 3 and 63
|
724
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
725
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
726
|
+
# letter or number.
|
727
|
+
# @param legal_hold [LegalHold] The LegalHold property that will be set to a
|
728
|
+
# blob container.
|
729
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
730
|
+
# will be added to the HTTP request.
|
731
|
+
#
|
732
|
+
# @return [LegalHold] operation results.
|
733
|
+
#
|
734
|
+
def set_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
|
735
|
+
response = set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value!
|
736
|
+
response.body unless response.nil?
|
737
|
+
end
|
738
|
+
|
739
|
+
#
|
740
|
+
# Sets legal hold tags. Setting the same tag results in an idempotent
|
741
|
+
# operation. SetLegalHold follows an append pattern and does not clear out the
|
742
|
+
# existing tags that are not specified in the request.
|
743
|
+
#
|
744
|
+
# @param resource_group_name [String] The name of the resource group within the
|
745
|
+
# user's subscription. The name is case insensitive.
|
746
|
+
# @param account_name [String] The name of the storage account within the
|
747
|
+
# specified resource group. Storage account names must be between 3 and 24
|
748
|
+
# characters in length and use numbers and lower-case letters only.
|
749
|
+
# @param container_name [String] The name of the blob container within the
|
750
|
+
# specified storage account. Blob container names must be between 3 and 63
|
751
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
752
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
753
|
+
# letter or number.
|
754
|
+
# @param legal_hold [LegalHold] The LegalHold property that will be set to a
|
755
|
+
# blob container.
|
756
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
757
|
+
# will be added to the HTTP request.
|
758
|
+
#
|
759
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
760
|
+
#
|
761
|
+
def set_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
|
762
|
+
set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value!
|
763
|
+
end
|
764
|
+
|
765
|
+
#
|
766
|
+
# Sets legal hold tags. Setting the same tag results in an idempotent
|
767
|
+
# operation. SetLegalHold follows an append pattern and does not clear out the
|
768
|
+
# existing tags that are not specified in the request.
|
769
|
+
#
|
770
|
+
# @param resource_group_name [String] The name of the resource group within the
|
771
|
+
# user's subscription. The name is case insensitive.
|
772
|
+
# @param account_name [String] The name of the storage account within the
|
773
|
+
# specified resource group. Storage account names must be between 3 and 24
|
774
|
+
# characters in length and use numbers and lower-case letters only.
|
775
|
+
# @param container_name [String] The name of the blob container within the
|
776
|
+
# specified storage account. Blob container names must be between 3 and 63
|
777
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
778
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
779
|
+
# letter or number.
|
780
|
+
# @param legal_hold [LegalHold] The LegalHold property that will be set to a
|
781
|
+
# blob container.
|
782
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
783
|
+
# to the HTTP request.
|
784
|
+
#
|
785
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
786
|
+
#
|
787
|
+
def set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
|
788
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
789
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
790
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
791
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
792
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
793
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
794
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
795
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
796
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
797
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
798
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
799
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
800
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
801
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
802
|
+
fail ArgumentError, 'legal_hold is nil' if legal_hold.nil?
|
803
|
+
|
804
|
+
|
805
|
+
request_headers = {}
|
806
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
807
|
+
|
808
|
+
# Set Headers
|
809
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
810
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
811
|
+
|
812
|
+
# Serialize Request
|
813
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::LegalHold.mapper()
|
814
|
+
request_content = @client.serialize(request_mapper, legal_hold)
|
815
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
816
|
+
|
817
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold'
|
818
|
+
|
819
|
+
request_url = @base_url || @client.base_url
|
820
|
+
|
821
|
+
options = {
|
822
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
823
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
824
|
+
query_params: {'api-version' => @client.api_version},
|
825
|
+
body: request_content,
|
826
|
+
headers: request_headers.merge(custom_headers || {}),
|
827
|
+
base_url: request_url
|
828
|
+
}
|
829
|
+
promise = @client.make_request_async(:post, path_template, options)
|
830
|
+
|
831
|
+
promise = promise.then do |result|
|
832
|
+
http_response = result.response
|
833
|
+
status_code = http_response.status
|
834
|
+
response_content = http_response.body
|
835
|
+
unless status_code == 200
|
836
|
+
error_model = JSON.load(response_content)
|
837
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
838
|
+
end
|
839
|
+
|
840
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
841
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
842
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
843
|
+
# Deserialize Response
|
844
|
+
if status_code == 200
|
845
|
+
begin
|
846
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
847
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::LegalHold.mapper()
|
848
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
849
|
+
rescue Exception => e
|
850
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
851
|
+
end
|
852
|
+
end
|
853
|
+
|
854
|
+
result
|
855
|
+
end
|
856
|
+
|
857
|
+
promise.execute
|
858
|
+
end
|
859
|
+
|
860
|
+
#
|
861
|
+
# Clears legal hold tags. Clearing the same or non-existent tag results in an
|
862
|
+
# idempotent operation. ClearLegalHold clears out only the specified tags in
|
863
|
+
# the request.
|
864
|
+
#
|
865
|
+
# @param resource_group_name [String] The name of the resource group within the
|
866
|
+
# user's subscription. The name is case insensitive.
|
867
|
+
# @param account_name [String] The name of the storage account within the
|
868
|
+
# specified resource group. Storage account names must be between 3 and 24
|
869
|
+
# characters in length and use numbers and lower-case letters only.
|
870
|
+
# @param container_name [String] The name of the blob container within the
|
871
|
+
# specified storage account. Blob container names must be between 3 and 63
|
872
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
873
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
874
|
+
# letter or number.
|
875
|
+
# @param legal_hold [LegalHold] The LegalHold property that will be clear from
|
876
|
+
# a blob container.
|
877
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
878
|
+
# will be added to the HTTP request.
|
879
|
+
#
|
880
|
+
# @return [LegalHold] operation results.
|
881
|
+
#
|
882
|
+
def clear_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
|
883
|
+
response = clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value!
|
884
|
+
response.body unless response.nil?
|
885
|
+
end
|
886
|
+
|
887
|
+
#
|
888
|
+
# Clears legal hold tags. Clearing the same or non-existent tag results in an
|
889
|
+
# idempotent operation. ClearLegalHold clears out only the specified tags in
|
890
|
+
# the request.
|
891
|
+
#
|
892
|
+
# @param resource_group_name [String] The name of the resource group within the
|
893
|
+
# user's subscription. The name is case insensitive.
|
894
|
+
# @param account_name [String] The name of the storage account within the
|
895
|
+
# specified resource group. Storage account names must be between 3 and 24
|
896
|
+
# characters in length and use numbers and lower-case letters only.
|
897
|
+
# @param container_name [String] The name of the blob container within the
|
898
|
+
# specified storage account. Blob container names must be between 3 and 63
|
899
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
900
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
901
|
+
# letter or number.
|
902
|
+
# @param legal_hold [LegalHold] The LegalHold property that will be clear from
|
903
|
+
# a blob container.
|
904
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
905
|
+
# will be added to the HTTP request.
|
906
|
+
#
|
907
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
908
|
+
#
|
909
|
+
def clear_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
|
910
|
+
clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value!
|
911
|
+
end
|
912
|
+
|
913
|
+
#
|
914
|
+
# Clears legal hold tags. Clearing the same or non-existent tag results in an
|
915
|
+
# idempotent operation. ClearLegalHold clears out only the specified tags in
|
916
|
+
# the request.
|
917
|
+
#
|
918
|
+
# @param resource_group_name [String] The name of the resource group within the
|
919
|
+
# user's subscription. The name is case insensitive.
|
920
|
+
# @param account_name [String] The name of the storage account within the
|
921
|
+
# specified resource group. Storage account names must be between 3 and 24
|
922
|
+
# characters in length and use numbers and lower-case letters only.
|
923
|
+
# @param container_name [String] The name of the blob container within the
|
924
|
+
# specified storage account. Blob container names must be between 3 and 63
|
925
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
926
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
927
|
+
# letter or number.
|
928
|
+
# @param legal_hold [LegalHold] The LegalHold property that will be clear from
|
929
|
+
# a blob container.
|
930
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
931
|
+
# to the HTTP request.
|
932
|
+
#
|
933
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
934
|
+
#
|
935
|
+
def clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil)
|
936
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
937
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
938
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
939
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
940
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
941
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
942
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
943
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
944
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
945
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
946
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
947
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
948
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
949
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
950
|
+
fail ArgumentError, 'legal_hold is nil' if legal_hold.nil?
|
951
|
+
|
952
|
+
|
953
|
+
request_headers = {}
|
954
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
955
|
+
|
956
|
+
# Set Headers
|
957
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
958
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
959
|
+
|
960
|
+
# Serialize Request
|
961
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::LegalHold.mapper()
|
962
|
+
request_content = @client.serialize(request_mapper, legal_hold)
|
963
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
964
|
+
|
965
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold'
|
966
|
+
|
967
|
+
request_url = @base_url || @client.base_url
|
968
|
+
|
969
|
+
options = {
|
970
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
971
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
972
|
+
query_params: {'api-version' => @client.api_version},
|
973
|
+
body: request_content,
|
974
|
+
headers: request_headers.merge(custom_headers || {}),
|
975
|
+
base_url: request_url
|
976
|
+
}
|
977
|
+
promise = @client.make_request_async(:post, path_template, options)
|
978
|
+
|
979
|
+
promise = promise.then do |result|
|
980
|
+
http_response = result.response
|
981
|
+
status_code = http_response.status
|
982
|
+
response_content = http_response.body
|
983
|
+
unless status_code == 200
|
984
|
+
error_model = JSON.load(response_content)
|
985
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
986
|
+
end
|
987
|
+
|
988
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
989
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
990
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
991
|
+
# Deserialize Response
|
992
|
+
if status_code == 200
|
993
|
+
begin
|
994
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
995
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::LegalHold.mapper()
|
996
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
997
|
+
rescue Exception => e
|
998
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
999
|
+
end
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
result
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
promise.execute
|
1006
|
+
end
|
1007
|
+
|
1008
|
+
#
|
1009
|
+
# Creates or updates an unlocked immutability policy. ETag in If-Match is
|
1010
|
+
# honored if given but not required for this operation.
|
1011
|
+
#
|
1012
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1013
|
+
# user's subscription. The name is case insensitive.
|
1014
|
+
# @param account_name [String] The name of the storage account within the
|
1015
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1016
|
+
# characters in length and use numbers and lower-case letters only.
|
1017
|
+
# @param container_name [String] The name of the blob container within the
|
1018
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1019
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1020
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1021
|
+
# letter or number.
|
1022
|
+
# @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
|
1023
|
+
# will be created or updated to a blob container.
|
1024
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1025
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1026
|
+
# the immutability policy already exists. If omitted, this operation will
|
1027
|
+
# always be applied.
|
1028
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1029
|
+
# will be added to the HTTP request.
|
1030
|
+
#
|
1031
|
+
# @return [ImmutabilityPolicy] operation results.
|
1032
|
+
#
|
1033
|
+
def create_or_update_immutability_policy(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil)
|
1034
|
+
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!
|
1035
|
+
response.body unless response.nil?
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
#
|
1039
|
+
# Creates or updates an unlocked immutability policy. ETag in If-Match is
|
1040
|
+
# honored if given but not required for this operation.
|
1041
|
+
#
|
1042
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1043
|
+
# user's subscription. The name is case insensitive.
|
1044
|
+
# @param account_name [String] The name of the storage account within the
|
1045
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1046
|
+
# characters in length and use numbers and lower-case letters only.
|
1047
|
+
# @param container_name [String] The name of the blob container within the
|
1048
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1049
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1050
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1051
|
+
# letter or number.
|
1052
|
+
# @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
|
1053
|
+
# will be created or updated to a blob container.
|
1054
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1055
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1056
|
+
# the immutability policy already exists. If omitted, this operation will
|
1057
|
+
# always be applied.
|
1058
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1059
|
+
# will be added to the HTTP request.
|
1060
|
+
#
|
1061
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1062
|
+
#
|
1063
|
+
def create_or_update_immutability_policy_with_http_info(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil)
|
1064
|
+
create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:parameters, if_match:if_match, custom_headers:custom_headers).value!
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
#
|
1068
|
+
# Creates or updates an unlocked immutability policy. ETag in If-Match is
|
1069
|
+
# honored if given but not required for this operation.
|
1070
|
+
#
|
1071
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1072
|
+
# user's subscription. The name is case insensitive.
|
1073
|
+
# @param account_name [String] The name of the storage account within the
|
1074
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1075
|
+
# characters in length and use numbers and lower-case letters only.
|
1076
|
+
# @param container_name [String] The name of the blob container within the
|
1077
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1078
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1079
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1080
|
+
# letter or number.
|
1081
|
+
# @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
|
1082
|
+
# will be created or updated to a blob container.
|
1083
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1084
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1085
|
+
# the immutability policy already exists. If omitted, this operation will
|
1086
|
+
# always be applied.
|
1087
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1088
|
+
# to the HTTP request.
|
1089
|
+
#
|
1090
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1091
|
+
#
|
1092
|
+
def create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil)
|
1093
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1094
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1095
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1096
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1097
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1098
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
1099
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
1100
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
1101
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
1102
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
1103
|
+
immutability_policy_name = 'default'
|
1104
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1105
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1106
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1107
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1108
|
+
|
1109
|
+
|
1110
|
+
request_headers = {}
|
1111
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1112
|
+
|
1113
|
+
# Set Headers
|
1114
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1115
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
1116
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1117
|
+
|
1118
|
+
# Serialize Request
|
1119
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ImmutabilityPolicy.mapper()
|
1120
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1121
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1122
|
+
|
1123
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'
|
1124
|
+
|
1125
|
+
request_url = @base_url || @client.base_url
|
1126
|
+
|
1127
|
+
options = {
|
1128
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1129
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id},
|
1130
|
+
query_params: {'api-version' => @client.api_version},
|
1131
|
+
body: request_content,
|
1132
|
+
headers: request_headers.merge(custom_headers || {}),
|
1133
|
+
base_url: request_url
|
1134
|
+
}
|
1135
|
+
promise = @client.make_request_async(:put, path_template, options)
|
1136
|
+
|
1137
|
+
promise = promise.then do |result|
|
1138
|
+
http_response = result.response
|
1139
|
+
status_code = http_response.status
|
1140
|
+
response_content = http_response.body
|
1141
|
+
unless status_code == 200
|
1142
|
+
error_model = JSON.load(response_content)
|
1143
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1147
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1148
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1149
|
+
# Deserialize Response
|
1150
|
+
if status_code == 200
|
1151
|
+
begin
|
1152
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1153
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ImmutabilityPolicy.mapper()
|
1154
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1155
|
+
rescue Exception => e
|
1156
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1157
|
+
end
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
result
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
promise.execute
|
1164
|
+
end
|
1165
|
+
|
1166
|
+
#
|
1167
|
+
# Gets the existing immutability policy along with the corresponding ETag in
|
1168
|
+
# response headers and body.
|
1169
|
+
#
|
1170
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1171
|
+
# user's subscription. The name is case insensitive.
|
1172
|
+
# @param account_name [String] The name of the storage account within the
|
1173
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1174
|
+
# characters in length and use numbers and lower-case letters only.
|
1175
|
+
# @param container_name [String] The name of the blob container within the
|
1176
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1177
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1178
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1179
|
+
# letter or number.
|
1180
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1181
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1182
|
+
# the immutability policy already exists. If omitted, this operation will
|
1183
|
+
# always be applied.
|
1184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1185
|
+
# will be added to the HTTP request.
|
1186
|
+
#
|
1187
|
+
# @return [ImmutabilityPolicy] operation results.
|
1188
|
+
#
|
1189
|
+
def get_immutability_policy(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil)
|
1190
|
+
response = get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value!
|
1191
|
+
response.body unless response.nil?
|
1192
|
+
end
|
1193
|
+
|
1194
|
+
#
|
1195
|
+
# Gets the existing immutability policy along with the corresponding ETag in
|
1196
|
+
# response headers and body.
|
1197
|
+
#
|
1198
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1199
|
+
# user's subscription. The name is case insensitive.
|
1200
|
+
# @param account_name [String] The name of the storage account within the
|
1201
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1202
|
+
# characters in length and use numbers and lower-case letters only.
|
1203
|
+
# @param container_name [String] The name of the blob container within the
|
1204
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1205
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1206
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1207
|
+
# letter or number.
|
1208
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1209
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1210
|
+
# the immutability policy already exists. If omitted, this operation will
|
1211
|
+
# always be applied.
|
1212
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1213
|
+
# will be added to the HTTP request.
|
1214
|
+
#
|
1215
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1216
|
+
#
|
1217
|
+
def get_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil)
|
1218
|
+
get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value!
|
1219
|
+
end
|
1220
|
+
|
1221
|
+
#
|
1222
|
+
# Gets the existing immutability policy along with the corresponding ETag in
|
1223
|
+
# response headers and body.
|
1224
|
+
#
|
1225
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1226
|
+
# user's subscription. The name is case insensitive.
|
1227
|
+
# @param account_name [String] The name of the storage account within the
|
1228
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1229
|
+
# characters in length and use numbers and lower-case letters only.
|
1230
|
+
# @param container_name [String] The name of the blob container within the
|
1231
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1232
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1233
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1234
|
+
# letter or number.
|
1235
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1236
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1237
|
+
# the immutability policy already exists. If omitted, this operation will
|
1238
|
+
# always be applied.
|
1239
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1240
|
+
# to the HTTP request.
|
1241
|
+
#
|
1242
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1243
|
+
#
|
1244
|
+
def get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil)
|
1245
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1246
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1247
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1248
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1249
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1250
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
1251
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
1252
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
1253
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
1254
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
1255
|
+
immutability_policy_name = 'default'
|
1256
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1257
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1258
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1259
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1260
|
+
|
1261
|
+
|
1262
|
+
request_headers = {}
|
1263
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1264
|
+
|
1265
|
+
# Set Headers
|
1266
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1267
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
1268
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1269
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'
|
1270
|
+
|
1271
|
+
request_url = @base_url || @client.base_url
|
1272
|
+
|
1273
|
+
options = {
|
1274
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1275
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id},
|
1276
|
+
query_params: {'api-version' => @client.api_version},
|
1277
|
+
headers: request_headers.merge(custom_headers || {}),
|
1278
|
+
base_url: request_url
|
1279
|
+
}
|
1280
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1281
|
+
|
1282
|
+
promise = promise.then do |result|
|
1283
|
+
http_response = result.response
|
1284
|
+
status_code = http_response.status
|
1285
|
+
response_content = http_response.body
|
1286
|
+
unless status_code == 200
|
1287
|
+
error_model = JSON.load(response_content)
|
1288
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1292
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1293
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1294
|
+
# Deserialize Response
|
1295
|
+
if status_code == 200
|
1296
|
+
begin
|
1297
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1298
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ImmutabilityPolicy.mapper()
|
1299
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1300
|
+
rescue Exception => e
|
1301
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1302
|
+
end
|
1303
|
+
end
|
1304
|
+
|
1305
|
+
result
|
1306
|
+
end
|
1307
|
+
|
1308
|
+
promise.execute
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
#
|
1312
|
+
# Aborts an unlocked immutability policy. The response of delete has
|
1313
|
+
# immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required
|
1314
|
+
# for this operation. Deleting a locked immutability policy is not allowed, the
|
1315
|
+
# only way is to delete the container after deleting all expired blobs inside
|
1316
|
+
# the policy locked container.
|
1317
|
+
#
|
1318
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1319
|
+
# user's subscription. The name is case insensitive.
|
1320
|
+
# @param account_name [String] The name of the storage account within the
|
1321
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1322
|
+
# characters in length and use numbers and lower-case letters only.
|
1323
|
+
# @param container_name [String] The name of the blob container within the
|
1324
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1325
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1326
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1327
|
+
# letter or number.
|
1328
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1329
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1330
|
+
# the immutability policy already exists. If omitted, this operation will
|
1331
|
+
# always be applied.
|
1332
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1333
|
+
# will be added to the HTTP request.
|
1334
|
+
#
|
1335
|
+
# @return [ImmutabilityPolicy] operation results.
|
1336
|
+
#
|
1337
|
+
def delete_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers:nil)
|
1338
|
+
response = delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value!
|
1339
|
+
response.body unless response.nil?
|
1340
|
+
end
|
1341
|
+
|
1342
|
+
#
|
1343
|
+
# Aborts an unlocked immutability policy. The response of delete has
|
1344
|
+
# immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required
|
1345
|
+
# for this operation. Deleting a locked immutability policy is not allowed, the
|
1346
|
+
# only way is to delete the container after deleting all expired blobs inside
|
1347
|
+
# the policy locked container.
|
1348
|
+
#
|
1349
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1350
|
+
# user's subscription. The name is case insensitive.
|
1351
|
+
# @param account_name [String] The name of the storage account within the
|
1352
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1353
|
+
# characters in length and use numbers and lower-case letters only.
|
1354
|
+
# @param container_name [String] The name of the blob container within the
|
1355
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1356
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1357
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1358
|
+
# letter or number.
|
1359
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1360
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1361
|
+
# the immutability policy already exists. If omitted, this operation will
|
1362
|
+
# always be applied.
|
1363
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1364
|
+
# will be added to the HTTP request.
|
1365
|
+
#
|
1366
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1367
|
+
#
|
1368
|
+
def delete_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil)
|
1369
|
+
delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value!
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
#
|
1373
|
+
# Aborts an unlocked immutability policy. The response of delete has
|
1374
|
+
# immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required
|
1375
|
+
# for this operation. Deleting a locked immutability policy is not allowed, the
|
1376
|
+
# only way is to delete the container after deleting all expired blobs inside
|
1377
|
+
# the policy locked container.
|
1378
|
+
#
|
1379
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1380
|
+
# user's subscription. The name is case insensitive.
|
1381
|
+
# @param account_name [String] The name of the storage account within the
|
1382
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1383
|
+
# characters in length and use numbers and lower-case letters only.
|
1384
|
+
# @param container_name [String] The name of the blob container within the
|
1385
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1386
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1387
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1388
|
+
# letter or number.
|
1389
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1390
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1391
|
+
# the immutability policy already exists. If omitted, this operation will
|
1392
|
+
# always be applied.
|
1393
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1394
|
+
# to the HTTP request.
|
1395
|
+
#
|
1396
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1397
|
+
#
|
1398
|
+
def delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:nil)
|
1399
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1400
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1401
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1402
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1403
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1404
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
1405
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
1406
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
1407
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
1408
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
1409
|
+
immutability_policy_name = 'default'
|
1410
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1411
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1412
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1413
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1414
|
+
fail ArgumentError, 'if_match is nil' if if_match.nil?
|
1415
|
+
|
1416
|
+
|
1417
|
+
request_headers = {}
|
1418
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1419
|
+
|
1420
|
+
# Set Headers
|
1421
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1422
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
1423
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1424
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}'
|
1425
|
+
|
1426
|
+
request_url = @base_url || @client.base_url
|
1427
|
+
|
1428
|
+
options = {
|
1429
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1430
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id},
|
1431
|
+
query_params: {'api-version' => @client.api_version},
|
1432
|
+
headers: request_headers.merge(custom_headers || {}),
|
1433
|
+
base_url: request_url
|
1434
|
+
}
|
1435
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
1436
|
+
|
1437
|
+
promise = promise.then do |result|
|
1438
|
+
http_response = result.response
|
1439
|
+
status_code = http_response.status
|
1440
|
+
response_content = http_response.body
|
1441
|
+
unless status_code == 200
|
1442
|
+
error_model = JSON.load(response_content)
|
1443
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1444
|
+
end
|
1445
|
+
|
1446
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1447
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1448
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1449
|
+
# Deserialize Response
|
1450
|
+
if status_code == 200
|
1451
|
+
begin
|
1452
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1453
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ImmutabilityPolicy.mapper()
|
1454
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1455
|
+
rescue Exception => e
|
1456
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1457
|
+
end
|
1458
|
+
end
|
1459
|
+
|
1460
|
+
result
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
promise.execute
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
#
|
1467
|
+
# Sets the ImmutabilityPolicy to Locked state. The only action allowed on a
|
1468
|
+
# Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is
|
1469
|
+
# required for this operation.
|
1470
|
+
#
|
1471
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1472
|
+
# user's subscription. The name is case insensitive.
|
1473
|
+
# @param account_name [String] The name of the storage account within the
|
1474
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1475
|
+
# characters in length and use numbers and lower-case letters only.
|
1476
|
+
# @param container_name [String] The name of the blob container within the
|
1477
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1478
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1479
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1480
|
+
# letter or number.
|
1481
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1482
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1483
|
+
# the immutability policy already exists. If omitted, this operation will
|
1484
|
+
# always be applied.
|
1485
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1486
|
+
# will be added to the HTTP request.
|
1487
|
+
#
|
1488
|
+
# @return [ImmutabilityPolicy] operation results.
|
1489
|
+
#
|
1490
|
+
def lock_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers:nil)
|
1491
|
+
response = lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value!
|
1492
|
+
response.body unless response.nil?
|
1493
|
+
end
|
1494
|
+
|
1495
|
+
#
|
1496
|
+
# Sets the ImmutabilityPolicy to Locked state. The only action allowed on a
|
1497
|
+
# Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is
|
1498
|
+
# required for this operation.
|
1499
|
+
#
|
1500
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1501
|
+
# user's subscription. The name is case insensitive.
|
1502
|
+
# @param account_name [String] The name of the storage account within the
|
1503
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1504
|
+
# characters in length and use numbers and lower-case letters only.
|
1505
|
+
# @param container_name [String] The name of the blob container within the
|
1506
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1507
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1508
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1509
|
+
# letter or number.
|
1510
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1511
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1512
|
+
# the immutability policy already exists. If omitted, this operation will
|
1513
|
+
# always be applied.
|
1514
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1515
|
+
# will be added to the HTTP request.
|
1516
|
+
#
|
1517
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1518
|
+
#
|
1519
|
+
def lock_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil)
|
1520
|
+
lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value!
|
1521
|
+
end
|
1522
|
+
|
1523
|
+
#
|
1524
|
+
# Sets the ImmutabilityPolicy to Locked state. The only action allowed on a
|
1525
|
+
# Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is
|
1526
|
+
# required for this operation.
|
1527
|
+
#
|
1528
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1529
|
+
# user's subscription. The name is case insensitive.
|
1530
|
+
# @param account_name [String] The name of the storage account within the
|
1531
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1532
|
+
# characters in length and use numbers and lower-case letters only.
|
1533
|
+
# @param container_name [String] The name of the blob container within the
|
1534
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1535
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1536
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1537
|
+
# letter or number.
|
1538
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1539
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1540
|
+
# the immutability policy already exists. If omitted, this operation will
|
1541
|
+
# always be applied.
|
1542
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1543
|
+
# to the HTTP request.
|
1544
|
+
#
|
1545
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1546
|
+
#
|
1547
|
+
def lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:nil)
|
1548
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1549
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1550
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1551
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1552
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1553
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
1554
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
1555
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
1556
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
1557
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
1558
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1559
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1560
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1561
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1562
|
+
fail ArgumentError, 'if_match is nil' if if_match.nil?
|
1563
|
+
|
1564
|
+
|
1565
|
+
request_headers = {}
|
1566
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1567
|
+
|
1568
|
+
# Set Headers
|
1569
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1570
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
1571
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1572
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock'
|
1573
|
+
|
1574
|
+
request_url = @base_url || @client.base_url
|
1575
|
+
|
1576
|
+
options = {
|
1577
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1578
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
1579
|
+
query_params: {'api-version' => @client.api_version},
|
1580
|
+
headers: request_headers.merge(custom_headers || {}),
|
1581
|
+
base_url: request_url
|
1582
|
+
}
|
1583
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1584
|
+
|
1585
|
+
promise = promise.then do |result|
|
1586
|
+
http_response = result.response
|
1587
|
+
status_code = http_response.status
|
1588
|
+
response_content = http_response.body
|
1589
|
+
unless status_code == 200
|
1590
|
+
error_model = JSON.load(response_content)
|
1591
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1592
|
+
end
|
1593
|
+
|
1594
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1595
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1596
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1597
|
+
# Deserialize Response
|
1598
|
+
if status_code == 200
|
1599
|
+
begin
|
1600
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1601
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ImmutabilityPolicy.mapper()
|
1602
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1603
|
+
rescue Exception => e
|
1604
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1605
|
+
end
|
1606
|
+
end
|
1607
|
+
|
1608
|
+
result
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
promise.execute
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
#
|
1615
|
+
# Extends the immutabilityPeriodSinceCreationInDays of a locked
|
1616
|
+
# immutabilityPolicy. The only action allowed on a Locked policy will be this
|
1617
|
+
# action. ETag in If-Match is required for this operation.
|
1618
|
+
#
|
1619
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1620
|
+
# user's subscription. The name is case insensitive.
|
1621
|
+
# @param account_name [String] The name of the storage account within the
|
1622
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1623
|
+
# characters in length and use numbers and lower-case letters only.
|
1624
|
+
# @param container_name [String] The name of the blob container within the
|
1625
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1626
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1627
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1628
|
+
# letter or number.
|
1629
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1630
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1631
|
+
# the immutability policy already exists. If omitted, this operation will
|
1632
|
+
# always be applied.
|
1633
|
+
# @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
|
1634
|
+
# will be extended for a blob container.
|
1635
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1636
|
+
# will be added to the HTTP request.
|
1637
|
+
#
|
1638
|
+
# @return [ImmutabilityPolicy] operation results.
|
1639
|
+
#
|
1640
|
+
def extend_immutability_policy(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil)
|
1641
|
+
response = extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value!
|
1642
|
+
response.body unless response.nil?
|
1643
|
+
end
|
1644
|
+
|
1645
|
+
#
|
1646
|
+
# Extends the immutabilityPeriodSinceCreationInDays of a locked
|
1647
|
+
# immutabilityPolicy. The only action allowed on a Locked policy will be this
|
1648
|
+
# action. ETag in If-Match is required for this operation.
|
1649
|
+
#
|
1650
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1651
|
+
# user's subscription. The name is case insensitive.
|
1652
|
+
# @param account_name [String] The name of the storage account within the
|
1653
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1654
|
+
# characters in length and use numbers and lower-case letters only.
|
1655
|
+
# @param container_name [String] The name of the blob container within the
|
1656
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1657
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1658
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1659
|
+
# letter or number.
|
1660
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1661
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1662
|
+
# the immutability policy already exists. If omitted, this operation will
|
1663
|
+
# always be applied.
|
1664
|
+
# @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
|
1665
|
+
# will be extended for a blob container.
|
1666
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1667
|
+
# will be added to the HTTP request.
|
1668
|
+
#
|
1669
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1670
|
+
#
|
1671
|
+
def extend_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil)
|
1672
|
+
extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value!
|
1673
|
+
end
|
1674
|
+
|
1675
|
+
#
|
1676
|
+
# Extends the immutabilityPeriodSinceCreationInDays of a locked
|
1677
|
+
# immutabilityPolicy. The only action allowed on a Locked policy will be this
|
1678
|
+
# action. ETag in If-Match is required for this operation.
|
1679
|
+
#
|
1680
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1681
|
+
# user's subscription. The name is case insensitive.
|
1682
|
+
# @param account_name [String] The name of the storage account within the
|
1683
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1684
|
+
# characters in length and use numbers and lower-case letters only.
|
1685
|
+
# @param container_name [String] The name of the blob container within the
|
1686
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1687
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1688
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1689
|
+
# letter or number.
|
1690
|
+
# @param if_match [String] The entity state (ETag) version of the immutability
|
1691
|
+
# policy to update. A value of "*" can be used to apply the operation only if
|
1692
|
+
# the immutability policy already exists. If omitted, this operation will
|
1693
|
+
# always be applied.
|
1694
|
+
# @param parameters [ImmutabilityPolicy] The ImmutabilityPolicy Properties that
|
1695
|
+
# will be extended for a blob container.
|
1696
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1697
|
+
# to the HTTP request.
|
1698
|
+
#
|
1699
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1700
|
+
#
|
1701
|
+
def extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil)
|
1702
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1703
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1704
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1705
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1706
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1707
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
1708
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
1709
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
1710
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
1711
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
1712
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1713
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1714
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1715
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1716
|
+
fail ArgumentError, 'if_match is nil' if if_match.nil?
|
1717
|
+
|
1718
|
+
|
1719
|
+
request_headers = {}
|
1720
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1721
|
+
|
1722
|
+
# Set Headers
|
1723
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1724
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
1725
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1726
|
+
|
1727
|
+
# Serialize Request
|
1728
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ImmutabilityPolicy.mapper()
|
1729
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1730
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1731
|
+
|
1732
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend'
|
1733
|
+
|
1734
|
+
request_url = @base_url || @client.base_url
|
1735
|
+
|
1736
|
+
options = {
|
1737
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1738
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
1739
|
+
query_params: {'api-version' => @client.api_version},
|
1740
|
+
body: request_content,
|
1741
|
+
headers: request_headers.merge(custom_headers || {}),
|
1742
|
+
base_url: request_url
|
1743
|
+
}
|
1744
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1745
|
+
|
1746
|
+
promise = promise.then do |result|
|
1747
|
+
http_response = result.response
|
1748
|
+
status_code = http_response.status
|
1749
|
+
response_content = http_response.body
|
1750
|
+
unless status_code == 200
|
1751
|
+
error_model = JSON.load(response_content)
|
1752
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1756
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1757
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1758
|
+
# Deserialize Response
|
1759
|
+
if status_code == 200
|
1760
|
+
begin
|
1761
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1762
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ImmutabilityPolicy.mapper()
|
1763
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1764
|
+
rescue Exception => e
|
1765
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1766
|
+
end
|
1767
|
+
end
|
1768
|
+
|
1769
|
+
result
|
1770
|
+
end
|
1771
|
+
|
1772
|
+
promise.execute
|
1773
|
+
end
|
1774
|
+
|
1775
|
+
#
|
1776
|
+
# The Lease Container operation establishes and manages a lock on a container
|
1777
|
+
# for delete operations. The lock duration can be 15 to 60 seconds, or can be
|
1778
|
+
# infinite.
|
1779
|
+
#
|
1780
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1781
|
+
# user's subscription. The name is case insensitive.
|
1782
|
+
# @param account_name [String] The name of the storage account within the
|
1783
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1784
|
+
# characters in length and use numbers and lower-case letters only.
|
1785
|
+
# @param container_name [String] The name of the blob container within the
|
1786
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1787
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1788
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1789
|
+
# letter or number.
|
1790
|
+
# @param parameters [LeaseContainerRequest] Lease Container request body.
|
1791
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1792
|
+
# will be added to the HTTP request.
|
1793
|
+
#
|
1794
|
+
# @return [LeaseContainerResponse] operation results.
|
1795
|
+
#
|
1796
|
+
def lease(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil)
|
1797
|
+
response = lease_async(resource_group_name, account_name, container_name, parameters:parameters, custom_headers:custom_headers).value!
|
1798
|
+
response.body unless response.nil?
|
1799
|
+
end
|
1800
|
+
|
1801
|
+
#
|
1802
|
+
# The Lease Container operation establishes and manages a lock on a container
|
1803
|
+
# for delete operations. The lock duration can be 15 to 60 seconds, or can be
|
1804
|
+
# infinite.
|
1805
|
+
#
|
1806
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1807
|
+
# user's subscription. The name is case insensitive.
|
1808
|
+
# @param account_name [String] The name of the storage account within the
|
1809
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1810
|
+
# characters in length and use numbers and lower-case letters only.
|
1811
|
+
# @param container_name [String] The name of the blob container within the
|
1812
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1813
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1814
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1815
|
+
# letter or number.
|
1816
|
+
# @param parameters [LeaseContainerRequest] Lease Container request body.
|
1817
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1818
|
+
# will be added to the HTTP request.
|
1819
|
+
#
|
1820
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1821
|
+
#
|
1822
|
+
def lease_with_http_info(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil)
|
1823
|
+
lease_async(resource_group_name, account_name, container_name, parameters:parameters, custom_headers:custom_headers).value!
|
1824
|
+
end
|
1825
|
+
|
1826
|
+
#
|
1827
|
+
# The Lease Container operation establishes and manages a lock on a container
|
1828
|
+
# for delete operations. The lock duration can be 15 to 60 seconds, or can be
|
1829
|
+
# infinite.
|
1830
|
+
#
|
1831
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1832
|
+
# user's subscription. The name is case insensitive.
|
1833
|
+
# @param account_name [String] The name of the storage account within the
|
1834
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1835
|
+
# characters in length and use numbers and lower-case letters only.
|
1836
|
+
# @param container_name [String] The name of the blob container within the
|
1837
|
+
# specified storage account. Blob container names must be between 3 and 63
|
1838
|
+
# characters in length and use numbers, lower-case letters and dash (-) only.
|
1839
|
+
# Every dash (-) character must be immediately preceded and followed by a
|
1840
|
+
# letter or number.
|
1841
|
+
# @param parameters [LeaseContainerRequest] Lease Container request body.
|
1842
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1843
|
+
# to the HTTP request.
|
1844
|
+
#
|
1845
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1846
|
+
#
|
1847
|
+
def lease_async(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil)
|
1848
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1849
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1850
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1851
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1852
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1853
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
1854
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
1855
|
+
fail ArgumentError, 'container_name is nil' if container_name.nil?
|
1856
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63
|
1857
|
+
fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3
|
1858
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1859
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1860
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1861
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1862
|
+
|
1863
|
+
|
1864
|
+
request_headers = {}
|
1865
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1866
|
+
|
1867
|
+
# Set Headers
|
1868
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1869
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1870
|
+
|
1871
|
+
# Serialize Request
|
1872
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::LeaseContainerRequest.mapper()
|
1873
|
+
request_content = @client.serialize(request_mapper, parameters)
|
1874
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1875
|
+
|
1876
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease'
|
1877
|
+
|
1878
|
+
request_url = @base_url || @client.base_url
|
1879
|
+
|
1880
|
+
options = {
|
1881
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1882
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
|
1883
|
+
query_params: {'api-version' => @client.api_version},
|
1884
|
+
body: request_content,
|
1885
|
+
headers: request_headers.merge(custom_headers || {}),
|
1886
|
+
base_url: request_url
|
1887
|
+
}
|
1888
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1889
|
+
|
1890
|
+
promise = promise.then do |result|
|
1891
|
+
http_response = result.response
|
1892
|
+
status_code = http_response.status
|
1893
|
+
response_content = http_response.body
|
1894
|
+
unless status_code == 200
|
1895
|
+
error_model = JSON.load(response_content)
|
1896
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1897
|
+
end
|
1898
|
+
|
1899
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1900
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1901
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1902
|
+
# Deserialize Response
|
1903
|
+
if status_code == 200
|
1904
|
+
begin
|
1905
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1906
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::LeaseContainerResponse.mapper()
|
1907
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1908
|
+
rescue Exception => e
|
1909
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1910
|
+
end
|
1911
|
+
end
|
1912
|
+
|
1913
|
+
result
|
1914
|
+
end
|
1915
|
+
|
1916
|
+
promise.execute
|
1917
|
+
end
|
1918
|
+
|
1919
|
+
#
|
1920
|
+
# Lists all containers and does not support a prefix like data plane. Also SRP
|
1921
|
+
# today does not return continuation token.
|
1922
|
+
#
|
1923
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1924
|
+
# to List operation.
|
1925
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1926
|
+
# will be added to the HTTP request.
|
1927
|
+
#
|
1928
|
+
# @return [ListContainerItems] operation results.
|
1929
|
+
#
|
1930
|
+
def list_next(next_page_link, custom_headers:nil)
|
1931
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
1932
|
+
response.body unless response.nil?
|
1933
|
+
end
|
1934
|
+
|
1935
|
+
#
|
1936
|
+
# Lists all containers and does not support a prefix like data plane. Also SRP
|
1937
|
+
# today does not return continuation token.
|
1938
|
+
#
|
1939
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1940
|
+
# to List operation.
|
1941
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1942
|
+
# will be added to the HTTP request.
|
1943
|
+
#
|
1944
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1945
|
+
#
|
1946
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
1947
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
1948
|
+
end
|
1949
|
+
|
1950
|
+
#
|
1951
|
+
# Lists all containers and does not support a prefix like data plane. Also SRP
|
1952
|
+
# today does not return continuation token.
|
1953
|
+
#
|
1954
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1955
|
+
# to List operation.
|
1956
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1957
|
+
# to the HTTP request.
|
1958
|
+
#
|
1959
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1960
|
+
#
|
1961
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
1962
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1963
|
+
|
1964
|
+
|
1965
|
+
request_headers = {}
|
1966
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1967
|
+
|
1968
|
+
# Set Headers
|
1969
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1970
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1971
|
+
path_template = '{nextLink}'
|
1972
|
+
|
1973
|
+
request_url = @base_url || @client.base_url
|
1974
|
+
|
1975
|
+
options = {
|
1976
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1977
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1978
|
+
headers: request_headers.merge(custom_headers || {}),
|
1979
|
+
base_url: request_url
|
1980
|
+
}
|
1981
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1982
|
+
|
1983
|
+
promise = promise.then do |result|
|
1984
|
+
http_response = result.response
|
1985
|
+
status_code = http_response.status
|
1986
|
+
response_content = http_response.body
|
1987
|
+
unless status_code == 200
|
1988
|
+
error_model = JSON.load(response_content)
|
1989
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1990
|
+
end
|
1991
|
+
|
1992
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1993
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1994
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1995
|
+
# Deserialize Response
|
1996
|
+
if status_code == 200
|
1997
|
+
begin
|
1998
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1999
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ListContainerItems.mapper()
|
2000
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
2001
|
+
rescue Exception => e
|
2002
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
2003
|
+
end
|
2004
|
+
end
|
2005
|
+
|
2006
|
+
result
|
2007
|
+
end
|
2008
|
+
|
2009
|
+
promise.execute
|
2010
|
+
end
|
2011
|
+
|
2012
|
+
#
|
2013
|
+
# Lists all containers and does not support a prefix like data plane. Also SRP
|
2014
|
+
# today does not return continuation token.
|
2015
|
+
#
|
2016
|
+
# @param resource_group_name [String] The name of the resource group within the
|
2017
|
+
# user's subscription. The name is case insensitive.
|
2018
|
+
# @param account_name [String] The name of the storage account within the
|
2019
|
+
# specified resource group. Storage account names must be between 3 and 24
|
2020
|
+
# characters in length and use numbers and lower-case letters only.
|
2021
|
+
# @param maxpagesize [String] Optional. Specified maximum number of containers
|
2022
|
+
# that can be included in the list.
|
2023
|
+
# @param filter [String] Optional. When specified, only container names
|
2024
|
+
# starting with the filter will be listed.
|
2025
|
+
# @param include [ListContainersInclude] Optional, used to include the
|
2026
|
+
# properties for soft deleted blob containers. Possible values include:
|
2027
|
+
# 'deleted'
|
2028
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2029
|
+
# will be added to the HTTP request.
|
2030
|
+
#
|
2031
|
+
# @return [ListContainerItems] which provide lazy access to pages of the
|
2032
|
+
# response.
|
2033
|
+
#
|
2034
|
+
def list_as_lazy(resource_group_name, account_name, maxpagesize:nil, filter:nil, include:nil, custom_headers:nil)
|
2035
|
+
response = list_async(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, include:include, custom_headers:custom_headers).value!
|
2036
|
+
unless response.nil?
|
2037
|
+
page = response.body
|
2038
|
+
page.next_method = Proc.new do |next_page_link|
|
2039
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
2040
|
+
end
|
2041
|
+
page
|
2042
|
+
end
|
2043
|
+
end
|
2044
|
+
|
2045
|
+
end
|
2046
|
+
end
|