Class: Azure::Storage::Mgmt::V2018_03_01_preview::BlobContainers
- Inherits:
-
Object
- Object
- Azure::Storage::Mgmt::V2018_03_01_preview::BlobContainers
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb
Overview
The Azure Storage Management API.
Instance Attribute Summary collapse
-
#client ⇒ StorageManagementClient
readonly
Reference to the StorageManagementClient.
Instance Method Summary collapse
-
#clear_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ LegalHold
Clears legal hold tags.
-
#clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ Concurrent::Promise
Clears legal hold tags.
-
#clear_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Clears legal hold tags.
-
#create(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ BlobContainer
Creates a new container under the specified account as described by request body.
-
#create_async(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new container under the specified account as described by request body.
-
#create_or_update_immutability_policy(resource_group_name, account_name, container_name, parameters: nil, if_match: nil, custom_headers: nil) ⇒ ImmutabilityPolicy
Creates or updates an unlocked immutability policy.
-
#create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters: nil, if_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates an unlocked immutability policy.
-
#create_or_update_immutability_policy_with_http_info(resource_group_name, account_name, container_name, parameters: nil, if_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates an unlocked immutability policy.
-
#create_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new container under the specified account as described by request body.
-
#delete(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ Object
Deletes specified container under its account.
-
#delete_async(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes specified container under its account.
-
#delete_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ ImmutabilityPolicy
Aborts an unlocked immutability policy.
-
#delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ Concurrent::Promise
Aborts an unlocked immutability policy.
-
#delete_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Aborts an unlocked immutability policy.
-
#delete_with_http_info(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes specified container under its account.
-
#extend_immutability_policy(resource_group_name, account_name, container_name, if_match, parameters: nil, custom_headers: nil) ⇒ ImmutabilityPolicy
Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy.
-
#extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy.
-
#extend_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy.
-
#get(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ BlobContainer
Gets properties of a specified container.
-
#get_async(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets properties of a specified container.
-
#get_immutability_policy(resource_group_name, account_name, container_name, if_match: nil, custom_headers: nil) ⇒ ImmutabilityPolicy
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
-
#get_immutability_policy_async(resource_group_name, account_name, container_name, if_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
-
#get_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
-
#get_with_http_info(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets properties of a specified container.
-
#initialize(client) ⇒ BlobContainers
constructor
Creates and initializes a new instance of the BlobContainers class.
-
#lease(resource_group_name, account_name, container_name, parameters: nil, custom_headers: nil) ⇒ LeaseContainerResponse
The Lease Container operation establishes and manages a lock on a container for delete operations.
-
#lease_async(resource_group_name, account_name, container_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
The Lease Container operation establishes and manages a lock on a container for delete operations.
-
#lease_with_http_info(resource_group_name, account_name, container_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Lease Container operation establishes and manages a lock on a container for delete operations.
-
#list(resource_group_name, account_name, custom_headers: nil) ⇒ ListContainerItems
Lists all containers and does not support a prefix like data plane.
-
#list_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all containers and does not support a prefix like data plane.
-
#list_with_http_info(resource_group_name, account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all containers and does not support a prefix like data plane.
-
#lock_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ ImmutabilityPolicy
Sets the ImmutabilityPolicy to Locked state.
-
#lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ Concurrent::Promise
Sets the ImmutabilityPolicy to Locked state.
-
#lock_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Sets the ImmutabilityPolicy to Locked state.
-
#set_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ LegalHold
Sets legal hold tags.
-
#set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ Concurrent::Promise
Sets legal hold tags.
-
#set_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Sets legal hold tags.
-
#update(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ BlobContainer
Updates container properties as specified in request body.
-
#update_async(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ Concurrent::Promise
Updates container properties as specified in request body.
-
#update_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates container properties as specified in request body.
Constructor Details
#initialize(client) ⇒ BlobContainers
Creates and initializes a new instance of the BlobContainers class.
17 18 19 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ StorageManagementClient (readonly)
Returns reference to the StorageManagementClient.
22 23 24 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 22 def client @client end |
Instance Method Details
#clear_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ LegalHold
Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. a blob container. will be added to the HTTP request.
851 852 853 854 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 851 def clear_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) response = clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! response.body unless response.nil? end |
#clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ Concurrent::Promise
Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. a blob container. to the HTTP request.
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 904 def clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 fail ArgumentError, 'legal_hold is nil' if legal_hold.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold.mapper() request_content = @client.serialize(request_mapper, legal_hold) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#clear_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. a blob container. will be added to the HTTP request.
878 879 880 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 878 def clear_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) clear_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! end |
#create(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ BlobContainer
Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. create. will be added to the HTTP request.
160 161 162 163 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 160 def create(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) response = create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ Concurrent::Promise
Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. create. to the HTTP request.
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 215 def create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, 'blob_container is nil' if blob_container.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer.mapper() request_content = @client.serialize(request_mapper, blob_container) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#create_or_update_immutability_policy(resource_group_name, account_name, container_name, parameters: nil, if_match: nil, custom_headers: nil) ⇒ ImmutabilityPolicy
Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be created or updated to a blob container. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1002 1003 1004 1005 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1002 def create_or_update_immutability_policy(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil) response = create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:parameters, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters: nil, if_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be created or updated to a blob container. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. to the HTTP request.
1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1061 def create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 immutability_policy_name = 'default' fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#create_or_update_immutability_policy_with_http_info(resource_group_name, account_name, container_name, parameters: nil, if_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be created or updated to a blob container. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1032 1033 1034 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1032 def create_or_update_immutability_policy_with_http_info(resource_group_name, account_name, container_name, parameters:nil, if_match:nil, custom_headers:nil) create_or_update_immutability_policy_async(resource_group_name, account_name, container_name, parameters:parameters, if_match:if_match, custom_headers:custom_headers).value! end |
#create_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. create. will be added to the HTTP request.
188 189 190 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 188 def create_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) create_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! end |
#delete(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ Object
Deletes specified container under its account.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be added to the HTTP request.
581 582 583 584 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 581 def delete(resource_group_name, account_name, container_name, custom_headers:nil) response = delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes specified container under its account.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. to the HTTP request.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 626 def delete_async(resource_group_name, account_name, container_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#delete_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ ImmutabilityPolicy
Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1306 1307 1308 1309 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1306 def delete_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers:nil) response = delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! response.body unless response.nil? end |
#delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ Concurrent::Promise
Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. to the HTTP request.
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1367 def delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 immutability_policy_name = 'default' fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 fail ArgumentError, 'if_match is nil' if if_match.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#delete_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, only way is to delete the container after deleting all blobs inside the container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1337 1338 1339 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1337 def delete_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil) delete_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! end |
#delete_with_http_info(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes specified container under its account.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be added to the HTTP request.
604 605 606 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 604 def delete_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil) delete_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! end |
#extend_immutability_policy(resource_group_name, account_name, container_name, if_match, parameters: nil, custom_headers: nil) ⇒ ImmutabilityPolicy
Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be extended for a blob container. will be added to the HTTP request.
1609 1610 1611 1612 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1609 def extend_immutability_policy(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil) response = extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be extended for a blob container. to the HTTP request.
1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1670 def extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 fail ArgumentError, 'if_match is nil' if if_match.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#extend_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be extended for a blob container. will be added to the HTTP request.
1640 1641 1642 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1640 def extend_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, parameters:nil, custom_headers:nil) extend_immutability_policy_async(resource_group_name, account_name, container_name, if_match, parameters:parameters, custom_headers:custom_headers).value! end |
#get(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ BlobContainer
Gets properties of a specified container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be added to the HTTP request.
454 455 456 457 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 454 def get(resource_group_name, account_name, container_name, custom_headers:nil) response = get_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets properties of a specified container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. to the HTTP request.
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 499 def get_async(resource_group_name, account_name, container_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_immutability_policy(resource_group_name, account_name, container_name, if_match: nil, custom_headers: nil) ⇒ ImmutabilityPolicy
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1158 1159 1160 1161 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1158 def get_immutability_policy(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil) response = get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_immutability_policy_async(resource_group_name, account_name, container_name, if_match: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. to the HTTP request.
1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1213 def get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 immutability_policy_name = 'default' fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'immutabilityPolicyName' => immutability_policy_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1186 1187 1188 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1186 def get_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match:nil, custom_headers:nil) get_immutability_policy_async(resource_group_name, account_name, container_name, if_match:if_match, custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, account_name, container_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets properties of a specified container.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be added to the HTTP request.
477 478 479 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 477 def get_with_http_info(resource_group_name, account_name, container_name, custom_headers:nil) get_async(resource_group_name, account_name, container_name, custom_headers:custom_headers).value! end |
#lease(resource_group_name, account_name, container_name, parameters: nil, custom_headers: nil) ⇒ LeaseContainerResponse
The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be added to the HTTP request.
1765 1766 1767 1768 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1765 def lease(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil) response = lease_async(resource_group_name, account_name, container_name, parameters:parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#lease_async(resource_group_name, account_name, container_name, parameters: nil, custom_headers: nil) ⇒ Concurrent::Promise
The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. to the HTTP request.
1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1816 def lease_async(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseContainerRequest.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LeaseContainerResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#lease_with_http_info(resource_group_name, account_name, container_name, parameters: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. will be added to the HTTP request.
1791 1792 1793 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1791 def lease_with_http_info(resource_group_name, account_name, container_name, parameters:nil, custom_headers:nil) lease_async(resource_group_name, account_name, container_name, parameters:parameters, custom_headers:custom_headers).value! end |
#list(resource_group_name, account_name, custom_headers: nil) ⇒ ListContainerItems
Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. will be added to the HTTP request.
38 39 40 41 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 38 def list(resource_group_name, account_name, custom_headers:nil) response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_async(resource_group_name, account_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. to the HTTP request.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 75 def list_async(resource_group_name, account_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ListContainerItems.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_with_http_info(resource_group_name, account_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. will be added to the HTTP request.
57 58 59 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 57 def list_with_http_info(resource_group_name, account_name, custom_headers:nil) list_async(resource_group_name, account_name, custom_headers:custom_headers).value! end |
#lock_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ ImmutabilityPolicy
Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1459 1460 1461 1462 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1459 def lock_immutability_policy(resource_group_name, account_name, container_name, if_match, custom_headers:nil) response = lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! response.body unless response.nil? end |
#lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ Concurrent::Promise
Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. to the HTTP request.
1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1516 def lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 fail ArgumentError, 'if_match is nil' if if_match.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['If-Match'] = if_match unless if_match.nil? request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::ImmutabilityPolicy.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#lock_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. policy to update. A value of “*” can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. will be added to the HTTP request.
1488 1489 1490 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 1488 def lock_immutability_policy_with_http_info(resource_group_name, account_name, container_name, if_match, custom_headers:nil) lock_immutability_policy_async(resource_group_name, account_name, container_name, if_match, custom_headers:custom_headers).value! end |
#set_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ LegalHold
Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. blob container. will be added to the HTTP request.
703 704 705 706 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 703 def set_legal_hold(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) response = set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! response.body unless response.nil? end |
#set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ Concurrent::Promise
Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. blob container. to the HTTP request.
756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 756 def set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 fail ArgumentError, 'legal_hold is nil' if legal_hold.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold.mapper() request_content = @client.serialize(request_mapper, legal_hold) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::LegalHold.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#set_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. blob container. will be added to the HTTP request.
730 731 732 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 730 def set_legal_hold_with_http_info(resource_group_name, account_name, container_name, legal_hold, custom_headers:nil) set_legal_hold_async(resource_group_name, account_name, container_name, legal_hold, custom_headers:custom_headers).value! end |
#update(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ BlobContainer
Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn’t already exist.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. container. will be added to the HTTP request.
310 311 312 313 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 310 def update(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) response = update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ Concurrent::Promise
Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn’t already exist.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. container. to the HTTP request.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 363 def update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil? fail ArgumentError, 'account_name is nil' if account_name.nil? fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24 fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3 fail ArgumentError, 'container_name is nil' if container_name.nil? fail ArgumentError, "'container_name' should satisfy the constraint - 'MaxLength': '63'" if !container_name.nil? && container_name.length > 63 fail ArgumentError, "'container_name' should satisfy the constraint - 'MinLength': '3'" if !container_name.nil? && container_name.length < 3 fail ArgumentError, 'blob_container is nil' if blob_container.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1 fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer.mapper() request_content = @client.serialize(request_mapper, blob_container) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Storage::Mgmt::V2018_03_01_preview::Models::BlobContainer.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#update_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn’t already exist.
user’s subscription. The name is case insensitive. specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. container. will be added to the HTTP request.
337 338 339 |
# File 'lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb', line 337 def update_with_http_info(resource_group_name, account_name, container_name, blob_container, custom_headers:nil) update_async(resource_group_name, account_name, container_name, blob_container, custom_headers:custom_headers).value! end |