azure_mgmt_storage 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-11-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2019-04-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2019-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2020-08-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2021-01-01/generated/azure_mgmt_storage.rb +223 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/blob_containers.rb +2046 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/blob_inventory_policies.rb +474 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/blob_services.rb +383 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/deleted_accounts.rb +321 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/encryption_scopes.rb +691 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/file_services.rb +377 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/file_shares.rb +957 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/management_policies.rb +361 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/access_tier.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb +136 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/account_status.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/action.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/active_directory_properties.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/azure_files_identity_based_authentication.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_container.rb +290 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_definition.rb +49 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_filter.rb +100 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_rule.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_schema.rb +93 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_parameters.rb +66 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_progress_status.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_range.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_status.rb +88 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_service_items.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_service_properties.rb +191 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/bypass.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/change_feed.rb +65 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/cors_rule.rb +128 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/cors_rules.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/created_by_type.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/custom_domain.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/date_after_creation.rb +50 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/date_after_modification.rb +70 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/default_action.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb +63 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_account.rb +123 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_account_list_result.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_share.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/dimension.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/directory_service_options.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/enabled_protocols.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption.rb +100 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_identity.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope.rb +142 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_key_vault_properties.rb +76 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_list_result.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_source.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_state.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_service.rb +76 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_services.rb +87 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/endpoints.rb +134 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/error_response.rb +48 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/error_response_body.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/extended_location.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/extended_location_types.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_service_items.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_service_properties.rb +115 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share.rb +264 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share_item.rb +263 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share_items.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb +85 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/geo_replication_status.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/get_share_expand.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/http_protocol.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/identity.rb +95 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/identity_type.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy.rb +114 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb +111 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/iprule.rb +61 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_permission.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_source.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_type.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_vault_properties.rb +93 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/kind.rb +19 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/large_file_shares_state.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/last_access_time_tracking_policy.rb +94 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_container_request.rb +97 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_container_response.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_duration.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_state.rb +19 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_status.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/legal_hold.rb +71 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb +72 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_blob_inventory_policy.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_container_item.rb +289 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_container_items.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_containers_include.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_key_expand.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue.rb +83 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue_resource.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue_services.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_shares_expand.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_table_resource.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_table_services.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy.rb +89 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_action.rb +75 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_base_blob.rb +86 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_definition.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_filter.rb +98 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_rule.rb +87 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_schema.rb +58 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_version.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/metric_specification.rb +145 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/minimum_tls_version.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/multichannel.rb +46 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/name.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/network_rule_set.rb +126 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policies.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy.rb +131 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_filter.rb +70 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_rule.rb +82 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation.rb +83 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation_display.rb +79 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation_list_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/permissions.rb +22 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection.rb +101 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_list_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_provisioning_state.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_service_connection_status.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_resource.rb +115 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_resource_list_result.rb +55 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_service_connection_state.rb +72 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/protocol_settings.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/proxy_resource.rb +65 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/public_access.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/put_shares_expand.rb +15 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/queue_service_properties.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/reason.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/reason_code.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/resource.rb +86 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/resource_access_rule.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/restore_policy_properties.rb +87 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/restriction.rb +85 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/root_squash_type.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/routing_choice.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/routing_preference.rb +74 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +247 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/service_specification.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/services.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/share_access_tier.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/signed_resource.rb +18 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/signed_resource_types.rb +17 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku.rb +60 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_information.rb +153 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_name.rb +22 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_tier.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/skucapability.rb +63 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/smb_setting.rb +100 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/state.rb +19 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account.rb +500 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +63 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +294 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_expand.rb +16 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_internet_endpoints.rb +84 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_key.rb +73 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb +103 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_microsoft_endpoints.rb +108 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +47 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +246 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_queue.rb +97 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb +57 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/system_data.rb +105 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/table.rb +74 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/table_service_properties.rb +77 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/tag_filter.rb +80 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/tag_property.rb +97 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/tracked_resource.rb +95 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/update_history_property.rb +114 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage.rb +89 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_list_result.rb +56 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_name.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/user_assigned_identity.rb +59 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb +74 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/module_definition.rb +9 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/object_replication_policies_operations.rb +495 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/operations.rb +110 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/private_endpoint_connections.rb +501 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/private_link_resources.rb +138 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/queue.rb +805 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/queue_services.rb +386 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/skus.rb +116 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/storage_accounts.rb +2059 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/storage_management_client.rb +204 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/table_operations.rb +743 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/table_services.rb +386 -0
- data/lib/2021-01-01/generated/azure_mgmt_storage/usages.rb +120 -0
- data/lib/azure_mgmt_storage.rb +1 -0
- data/lib/profiles/latest/modules/storage_profile_module.rb +480 -394
- data/lib/version.rb +1 -1
- metadata +201 -2
@@ -0,0 +1,59 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# The usage names that can be used; currently limited to StorageAccount.
|
10
|
+
#
|
11
|
+
class UsageName
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets a string describing the resource name.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# @return [String] Gets a localized string describing the resource name.
|
19
|
+
attr_accessor :localized_value
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for UsageName class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'UsageName',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'UsageName',
|
34
|
+
model_properties: {
|
35
|
+
value: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
read_only: true,
|
39
|
+
serialized_name: 'value',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
localized_value: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
read_only: true,
|
48
|
+
serialized_name: 'localizedValue',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Storage::Mgmt::V2021_01_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for UsageUnit
|
10
|
+
#
|
11
|
+
module UsageUnit
|
12
|
+
Count = "Count"
|
13
|
+
Bytes = "Bytes"
|
14
|
+
Seconds = "Seconds"
|
15
|
+
Percent = "Percent"
|
16
|
+
CountsPerSecond = "CountsPerSecond"
|
17
|
+
BytesPerSecond = "BytesPerSecond"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# UserAssignedIdentity for the resource.
|
10
|
+
#
|
11
|
+
class UserAssignedIdentity
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The principal ID of the identity.
|
16
|
+
attr_accessor :principal_id
|
17
|
+
|
18
|
+
# @return [String] The client ID of the identity.
|
19
|
+
attr_accessor :client_id
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for UserAssignedIdentity class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'UserAssignedIdentity',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'UserAssignedIdentity',
|
34
|
+
model_properties: {
|
35
|
+
principal_id: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
read_only: true,
|
39
|
+
serialized_name: 'principalId',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
client_id: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
read_only: true,
|
48
|
+
serialized_name: 'clientId',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,74 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# Virtual Network rule.
|
10
|
+
#
|
11
|
+
class VirtualNetworkRule
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Resource ID of a subnet, for example:
|
16
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
|
17
|
+
attr_accessor :virtual_network_resource_id
|
18
|
+
|
19
|
+
# @return [Action] The action of virtual network rule. Possible values
|
20
|
+
# include: 'Allow'. Default value: 'Allow' .
|
21
|
+
attr_accessor :action
|
22
|
+
|
23
|
+
# @return [State] Gets the state of virtual network rule. Possible values
|
24
|
+
# include: 'provisioning', 'deprovisioning', 'succeeded', 'failed',
|
25
|
+
# 'networkSourceDeleted'
|
26
|
+
attr_accessor :state
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# Mapper for VirtualNetworkRule class as Ruby Hash.
|
31
|
+
# This will be used for serialization/deserialization.
|
32
|
+
#
|
33
|
+
def self.mapper()
|
34
|
+
{
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'VirtualNetworkRule',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'VirtualNetworkRule',
|
41
|
+
model_properties: {
|
42
|
+
virtual_network_resource_id: {
|
43
|
+
client_side_validation: true,
|
44
|
+
required: true,
|
45
|
+
serialized_name: 'id',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
action: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
serialized_name: 'action',
|
54
|
+
default_value: 'Allow',
|
55
|
+
type: {
|
56
|
+
name: 'Enum',
|
57
|
+
module: 'Action'
|
58
|
+
}
|
59
|
+
},
|
60
|
+
state: {
|
61
|
+
client_side_validation: true,
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'state',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure end
|
7
|
+
module Azure::Storage end
|
8
|
+
module Azure::Storage::Mgmt end
|
9
|
+
module Azure::Storage::Mgmt::V2021_01_01 end
|
@@ -0,0 +1,495 @@
|
|
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 ObjectReplicationPoliciesOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the ObjectReplicationPoliciesOperations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [StorageManagementClient] reference to the StorageManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# List the object replication policies associated with the storage account.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group within the
|
28
|
+
# user's subscription. The name is case insensitive.
|
29
|
+
# @param account_name [String] The name of the storage account within the
|
30
|
+
# specified resource group. Storage account names must be between 3 and 24
|
31
|
+
# characters in length and use numbers and lower-case letters only.
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [ObjectReplicationPolicies] operation results.
|
36
|
+
#
|
37
|
+
def list(resource_group_name, account_name, custom_headers:nil)
|
38
|
+
response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# List the object replication policies associated with the storage account.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The name of the resource group within the
|
46
|
+
# user's subscription. The name is case insensitive.
|
47
|
+
# @param account_name [String] The name of the storage account within the
|
48
|
+
# specified resource group. Storage account names must be between 3 and 24
|
49
|
+
# characters in length and use numbers and lower-case letters only.
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
|
+
#
|
55
|
+
def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
56
|
+
list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# List the object replication policies associated with the storage account.
|
61
|
+
#
|
62
|
+
# @param resource_group_name [String] The name of the resource group within the
|
63
|
+
# user's subscription. The name is case insensitive.
|
64
|
+
# @param account_name [String] The name of the storage account within the
|
65
|
+
# specified resource group. Storage account names must be between 3 and 24
|
66
|
+
# characters in length and use numbers and lower-case letters only.
|
67
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
68
|
+
# to the HTTP request.
|
69
|
+
#
|
70
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
#
|
72
|
+
def list_async(resource_group_name, account_name, custom_headers:nil)
|
73
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
74
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
75
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
76
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
77
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
78
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
79
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
80
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
81
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
82
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
83
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
84
|
+
|
85
|
+
|
86
|
+
request_headers = {}
|
87
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
88
|
+
|
89
|
+
# Set Headers
|
90
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
91
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
92
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies'
|
93
|
+
|
94
|
+
request_url = @base_url || @client.base_url
|
95
|
+
|
96
|
+
options = {
|
97
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
98
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
99
|
+
query_params: {'api-version' => @client.api_version},
|
100
|
+
headers: request_headers.merge(custom_headers || {}),
|
101
|
+
base_url: request_url
|
102
|
+
}
|
103
|
+
promise = @client.make_request_async(:get, path_template, options)
|
104
|
+
|
105
|
+
promise = promise.then do |result|
|
106
|
+
http_response = result.response
|
107
|
+
status_code = http_response.status
|
108
|
+
response_content = http_response.body
|
109
|
+
unless status_code == 200
|
110
|
+
error_model = JSON.load(response_content)
|
111
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
112
|
+
end
|
113
|
+
|
114
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
115
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
116
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
117
|
+
# Deserialize Response
|
118
|
+
if status_code == 200
|
119
|
+
begin
|
120
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
121
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ObjectReplicationPolicies.mapper()
|
122
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
123
|
+
rescue Exception => e
|
124
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
result
|
129
|
+
end
|
130
|
+
|
131
|
+
promise.execute
|
132
|
+
end
|
133
|
+
|
134
|
+
#
|
135
|
+
# Get the object replication policy of the storage account by policy ID.
|
136
|
+
#
|
137
|
+
# @param resource_group_name [String] The name of the resource group within the
|
138
|
+
# user's subscription. The name is case insensitive.
|
139
|
+
# @param account_name [String] The name of the storage account within the
|
140
|
+
# specified resource group. Storage account names must be between 3 and 24
|
141
|
+
# characters in length and use numbers and lower-case letters only.
|
142
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
143
|
+
# policy or 'default' if the policy ID is unknown.
|
144
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
145
|
+
# will be added to the HTTP request.
|
146
|
+
#
|
147
|
+
# @return [ObjectReplicationPolicy] operation results.
|
148
|
+
#
|
149
|
+
def get(resource_group_name, account_name, object_replication_policy_id, custom_headers:nil)
|
150
|
+
response = get_async(resource_group_name, account_name, object_replication_policy_id, custom_headers:custom_headers).value!
|
151
|
+
response.body unless response.nil?
|
152
|
+
end
|
153
|
+
|
154
|
+
#
|
155
|
+
# Get the object replication policy of the storage account by policy ID.
|
156
|
+
#
|
157
|
+
# @param resource_group_name [String] The name of the resource group within the
|
158
|
+
# user's subscription. The name is case insensitive.
|
159
|
+
# @param account_name [String] The name of the storage account within the
|
160
|
+
# specified resource group. Storage account names must be between 3 and 24
|
161
|
+
# characters in length and use numbers and lower-case letters only.
|
162
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
163
|
+
# policy or 'default' if the policy ID is unknown.
|
164
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
165
|
+
# will be added to the HTTP request.
|
166
|
+
#
|
167
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
168
|
+
#
|
169
|
+
def get_with_http_info(resource_group_name, account_name, object_replication_policy_id, custom_headers:nil)
|
170
|
+
get_async(resource_group_name, account_name, object_replication_policy_id, custom_headers:custom_headers).value!
|
171
|
+
end
|
172
|
+
|
173
|
+
#
|
174
|
+
# Get the object replication policy of the storage account by policy ID.
|
175
|
+
#
|
176
|
+
# @param resource_group_name [String] The name of the resource group within the
|
177
|
+
# user's subscription. The name is case insensitive.
|
178
|
+
# @param account_name [String] The name of the storage account within the
|
179
|
+
# specified resource group. Storage account names must be between 3 and 24
|
180
|
+
# characters in length and use numbers and lower-case letters only.
|
181
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
182
|
+
# policy or 'default' if the policy ID is unknown.
|
183
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
184
|
+
# to the HTTP request.
|
185
|
+
#
|
186
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
187
|
+
#
|
188
|
+
def get_async(resource_group_name, account_name, object_replication_policy_id, custom_headers:nil)
|
189
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
190
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
191
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
192
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
193
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
194
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
195
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
196
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
197
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
198
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
199
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
200
|
+
fail ArgumentError, 'object_replication_policy_id is nil' if object_replication_policy_id.nil?
|
201
|
+
fail ArgumentError, "'object_replication_policy_id' should satisfy the constraint - 'MinLength': '1'" if !object_replication_policy_id.nil? && object_replication_policy_id.length < 1
|
202
|
+
|
203
|
+
|
204
|
+
request_headers = {}
|
205
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
206
|
+
|
207
|
+
# Set Headers
|
208
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
209
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
210
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}'
|
211
|
+
|
212
|
+
request_url = @base_url || @client.base_url
|
213
|
+
|
214
|
+
options = {
|
215
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
216
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'objectReplicationPolicyId' => object_replication_policy_id},
|
217
|
+
query_params: {'api-version' => @client.api_version},
|
218
|
+
headers: request_headers.merge(custom_headers || {}),
|
219
|
+
base_url: request_url
|
220
|
+
}
|
221
|
+
promise = @client.make_request_async(:get, path_template, options)
|
222
|
+
|
223
|
+
promise = promise.then do |result|
|
224
|
+
http_response = result.response
|
225
|
+
status_code = http_response.status
|
226
|
+
response_content = http_response.body
|
227
|
+
unless status_code == 200
|
228
|
+
error_model = JSON.load(response_content)
|
229
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
230
|
+
end
|
231
|
+
|
232
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
233
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
234
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
235
|
+
# Deserialize Response
|
236
|
+
if status_code == 200
|
237
|
+
begin
|
238
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
239
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ObjectReplicationPolicy.mapper()
|
240
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
241
|
+
rescue Exception => e
|
242
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
result
|
247
|
+
end
|
248
|
+
|
249
|
+
promise.execute
|
250
|
+
end
|
251
|
+
|
252
|
+
#
|
253
|
+
# Create or update the object replication policy of the storage account.
|
254
|
+
#
|
255
|
+
# @param resource_group_name [String] The name of the resource group within the
|
256
|
+
# user's subscription. The name is case insensitive.
|
257
|
+
# @param account_name [String] The name of the storage account within the
|
258
|
+
# specified resource group. Storage account names must be between 3 and 24
|
259
|
+
# characters in length and use numbers and lower-case letters only.
|
260
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
261
|
+
# policy or 'default' if the policy ID is unknown.
|
262
|
+
# @param properties [ObjectReplicationPolicy] The object replication policy set
|
263
|
+
# to a storage account. A unique policy ID will be created if absent.
|
264
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
265
|
+
# will be added to the HTTP request.
|
266
|
+
#
|
267
|
+
# @return [ObjectReplicationPolicy] operation results.
|
268
|
+
#
|
269
|
+
def create_or_update(resource_group_name, account_name, object_replication_policy_id, properties, custom_headers:nil)
|
270
|
+
response = create_or_update_async(resource_group_name, account_name, object_replication_policy_id, properties, custom_headers:custom_headers).value!
|
271
|
+
response.body unless response.nil?
|
272
|
+
end
|
273
|
+
|
274
|
+
#
|
275
|
+
# Create or update the object replication policy of the storage account.
|
276
|
+
#
|
277
|
+
# @param resource_group_name [String] The name of the resource group within the
|
278
|
+
# user's subscription. The name is case insensitive.
|
279
|
+
# @param account_name [String] The name of the storage account within the
|
280
|
+
# specified resource group. Storage account names must be between 3 and 24
|
281
|
+
# characters in length and use numbers and lower-case letters only.
|
282
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
283
|
+
# policy or 'default' if the policy ID is unknown.
|
284
|
+
# @param properties [ObjectReplicationPolicy] The object replication policy set
|
285
|
+
# to a storage account. A unique policy ID will be created if absent.
|
286
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
287
|
+
# will be added to the HTTP request.
|
288
|
+
#
|
289
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
290
|
+
#
|
291
|
+
def create_or_update_with_http_info(resource_group_name, account_name, object_replication_policy_id, properties, custom_headers:nil)
|
292
|
+
create_or_update_async(resource_group_name, account_name, object_replication_policy_id, properties, custom_headers:custom_headers).value!
|
293
|
+
end
|
294
|
+
|
295
|
+
#
|
296
|
+
# Create or update the object replication policy of the storage account.
|
297
|
+
#
|
298
|
+
# @param resource_group_name [String] The name of the resource group within the
|
299
|
+
# user's subscription. The name is case insensitive.
|
300
|
+
# @param account_name [String] The name of the storage account within the
|
301
|
+
# specified resource group. Storage account names must be between 3 and 24
|
302
|
+
# characters in length and use numbers and lower-case letters only.
|
303
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
304
|
+
# policy or 'default' if the policy ID is unknown.
|
305
|
+
# @param properties [ObjectReplicationPolicy] The object replication policy set
|
306
|
+
# to a storage account. A unique policy ID will be created if absent.
|
307
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
308
|
+
# to the HTTP request.
|
309
|
+
#
|
310
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
311
|
+
#
|
312
|
+
def create_or_update_async(resource_group_name, account_name, object_replication_policy_id, properties, custom_headers:nil)
|
313
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
314
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
315
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
316
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
317
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
318
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
319
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
320
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
321
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
322
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
323
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
324
|
+
fail ArgumentError, 'object_replication_policy_id is nil' if object_replication_policy_id.nil?
|
325
|
+
fail ArgumentError, "'object_replication_policy_id' should satisfy the constraint - 'MinLength': '1'" if !object_replication_policy_id.nil? && object_replication_policy_id.length < 1
|
326
|
+
fail ArgumentError, 'properties is nil' if properties.nil?
|
327
|
+
|
328
|
+
|
329
|
+
request_headers = {}
|
330
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
331
|
+
|
332
|
+
# Set Headers
|
333
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
334
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
335
|
+
|
336
|
+
# Serialize Request
|
337
|
+
request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ObjectReplicationPolicy.mapper()
|
338
|
+
request_content = @client.serialize(request_mapper, properties)
|
339
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
340
|
+
|
341
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}'
|
342
|
+
|
343
|
+
request_url = @base_url || @client.base_url
|
344
|
+
|
345
|
+
options = {
|
346
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
347
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'objectReplicationPolicyId' => object_replication_policy_id},
|
348
|
+
query_params: {'api-version' => @client.api_version},
|
349
|
+
body: request_content,
|
350
|
+
headers: request_headers.merge(custom_headers || {}),
|
351
|
+
base_url: request_url
|
352
|
+
}
|
353
|
+
promise = @client.make_request_async(:put, path_template, options)
|
354
|
+
|
355
|
+
promise = promise.then do |result|
|
356
|
+
http_response = result.response
|
357
|
+
status_code = http_response.status
|
358
|
+
response_content = http_response.body
|
359
|
+
unless status_code == 200
|
360
|
+
error_model = JSON.load(response_content)
|
361
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
362
|
+
end
|
363
|
+
|
364
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
365
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
366
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
367
|
+
# Deserialize Response
|
368
|
+
if status_code == 200
|
369
|
+
begin
|
370
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
371
|
+
result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ObjectReplicationPolicy.mapper()
|
372
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
373
|
+
rescue Exception => e
|
374
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
378
|
+
result
|
379
|
+
end
|
380
|
+
|
381
|
+
promise.execute
|
382
|
+
end
|
383
|
+
|
384
|
+
#
|
385
|
+
# Deletes the object replication policy associated with the specified storage
|
386
|
+
# account.
|
387
|
+
#
|
388
|
+
# @param resource_group_name [String] The name of the resource group within the
|
389
|
+
# user's subscription. The name is case insensitive.
|
390
|
+
# @param account_name [String] The name of the storage account within the
|
391
|
+
# specified resource group. Storage account names must be between 3 and 24
|
392
|
+
# characters in length and use numbers and lower-case letters only.
|
393
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
394
|
+
# policy or 'default' if the policy ID is unknown.
|
395
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
396
|
+
# will be added to the HTTP request.
|
397
|
+
#
|
398
|
+
#
|
399
|
+
def delete(resource_group_name, account_name, object_replication_policy_id, custom_headers:nil)
|
400
|
+
response = delete_async(resource_group_name, account_name, object_replication_policy_id, custom_headers:custom_headers).value!
|
401
|
+
nil
|
402
|
+
end
|
403
|
+
|
404
|
+
#
|
405
|
+
# Deletes the object replication policy associated with the specified storage
|
406
|
+
# account.
|
407
|
+
#
|
408
|
+
# @param resource_group_name [String] The name of the resource group within the
|
409
|
+
# user's subscription. The name is case insensitive.
|
410
|
+
# @param account_name [String] The name of the storage account within the
|
411
|
+
# specified resource group. Storage account names must be between 3 and 24
|
412
|
+
# characters in length and use numbers and lower-case letters only.
|
413
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
414
|
+
# policy or 'default' if the policy ID is unknown.
|
415
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
416
|
+
# will be added to the HTTP request.
|
417
|
+
#
|
418
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
419
|
+
#
|
420
|
+
def delete_with_http_info(resource_group_name, account_name, object_replication_policy_id, custom_headers:nil)
|
421
|
+
delete_async(resource_group_name, account_name, object_replication_policy_id, custom_headers:custom_headers).value!
|
422
|
+
end
|
423
|
+
|
424
|
+
#
|
425
|
+
# Deletes the object replication policy associated with the specified storage
|
426
|
+
# account.
|
427
|
+
#
|
428
|
+
# @param resource_group_name [String] The name of the resource group within the
|
429
|
+
# user's subscription. The name is case insensitive.
|
430
|
+
# @param account_name [String] The name of the storage account within the
|
431
|
+
# specified resource group. Storage account names must be between 3 and 24
|
432
|
+
# characters in length and use numbers and lower-case letters only.
|
433
|
+
# @param object_replication_policy_id [String] The ID of object replication
|
434
|
+
# policy or 'default' if the policy ID is unknown.
|
435
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
436
|
+
# to the HTTP request.
|
437
|
+
#
|
438
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
439
|
+
#
|
440
|
+
def delete_async(resource_group_name, account_name, object_replication_policy_id, custom_headers:nil)
|
441
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
442
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
443
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
444
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
445
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
446
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
447
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
448
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
449
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
450
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
451
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
452
|
+
fail ArgumentError, 'object_replication_policy_id is nil' if object_replication_policy_id.nil?
|
453
|
+
fail ArgumentError, "'object_replication_policy_id' should satisfy the constraint - 'MinLength': '1'" if !object_replication_policy_id.nil? && object_replication_policy_id.length < 1
|
454
|
+
|
455
|
+
|
456
|
+
request_headers = {}
|
457
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
458
|
+
|
459
|
+
# Set Headers
|
460
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
461
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
462
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}'
|
463
|
+
|
464
|
+
request_url = @base_url || @client.base_url
|
465
|
+
|
466
|
+
options = {
|
467
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
468
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'objectReplicationPolicyId' => object_replication_policy_id},
|
469
|
+
query_params: {'api-version' => @client.api_version},
|
470
|
+
headers: request_headers.merge(custom_headers || {}),
|
471
|
+
base_url: request_url
|
472
|
+
}
|
473
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
474
|
+
|
475
|
+
promise = promise.then do |result|
|
476
|
+
http_response = result.response
|
477
|
+
status_code = http_response.status
|
478
|
+
response_content = http_response.body
|
479
|
+
unless status_code == 200 || status_code == 204
|
480
|
+
error_model = JSON.load(response_content)
|
481
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
482
|
+
end
|
483
|
+
|
484
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
485
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
486
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
487
|
+
|
488
|
+
result
|
489
|
+
end
|
490
|
+
|
491
|
+
promise.execute
|
492
|
+
end
|
493
|
+
|
494
|
+
end
|
495
|
+
end
|