BlobContainersOperations Class
BlobContainersOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectBlobContainersOperations
Constructor
BlobContainersOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| begin_object_level_worm |
This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. |
| clear_legal_hold |
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. |
| create |
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. |
| create_or_update_immutability_policy |
Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. |
| delete |
Deletes specified container under its account. |
| delete_immutability_policy |
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, the only way is to delete the container after deleting all expired blobs inside the policy locked container. |
| extend_immutability_policy |
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. |
| get |
Gets properties of a specified container. |
| get_immutability_policy |
Gets the existing immutability policy along with the corresponding ETag in response headers and body. |
| lease |
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. |
| list |
Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. |
| lock_immutability_policy |
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. |
| set_legal_hold |
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. |
| update |
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. |
begin_object_level_worm
This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.
async begin_object_level_worm(resource_group_name: str, account_name: str, container_name: str, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[None]
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
- continuation_token
- str
A continuation token to restart a poller from a saved state.
- polling
- bool or AsyncPollingMethod
By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
- polling_interval
- int
Default waiting time between two polls for LRO operations if no Retry-After header is present.
Returns
An instance of AsyncLROPoller that returns either None or the result of cls(response)
Return type
Exceptions
clear_legal_hold
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.
async clear_legal_hold(resource_group_name: str, account_name: str, container_name: str, legal_hold: azure.mgmt.storage.v2021_09_01.models._models_py3.LegalHold, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.LegalHold
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
LegalHold, or the result of cls(response)
Return type
Exceptions
create
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.
async create(resource_group_name: str, account_name: str, container_name: str, blob_container: azure.mgmt.storage.v2021_09_01.models._models_py3.BlobContainer, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.BlobContainer
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
BlobContainer, or the result of cls(response)
Return type
Exceptions
create_or_update_immutability_policy
Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.
async create_or_update_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: Optional[str] = None, parameters: Optional[azure.mgmt.storage.v2021_09_01.models._models_py3.ImmutabilityPolicy] = None, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.ImmutabilityPolicy
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match
- str
The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- parameters
- ImmutabilityPolicy
The ImmutabilityPolicy Properties that will be created or updated to a blob container.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ImmutabilityPolicy, or the result of cls(response)
Return type
Exceptions
delete
Deletes specified container under its account.
async delete(resource_group_name: str, account_name: str, container_name: str, **kwargs: Any) -> None
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
delete_immutability_policy
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, the only way is to delete the container after deleting all expired blobs inside the policy locked container.
async delete_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.ImmutabilityPolicy
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match
- str
The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ImmutabilityPolicy, or the result of cls(response)
Return type
Exceptions
extend_immutability_policy
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.
async extend_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, parameters: Optional[azure.mgmt.storage.v2021_09_01.models._models_py3.ImmutabilityPolicy] = None, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.ImmutabilityPolicy
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match
- str
The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- parameters
- ImmutabilityPolicy
The ImmutabilityPolicy Properties that will be extended for a blob container.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ImmutabilityPolicy, or the result of cls(response)
Return type
Exceptions
get
Gets properties of a specified container.
async get(resource_group_name: str, account_name: str, container_name: str, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.BlobContainer
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
BlobContainer, or the result of cls(response)
Return type
Exceptions
get_immutability_policy
Gets the existing immutability policy along with the corresponding ETag in response headers and body.
async get_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: Optional[str] = None, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.ImmutabilityPolicy
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match
- str
The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ImmutabilityPolicy, or the result of cls(response)
Return type
Exceptions
lease
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.
async lease(resource_group_name: str, account_name: str, container_name: str, parameters: Optional[azure.mgmt.storage.v2021_09_01.models._models_py3.LeaseContainerRequest] = None, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.LeaseContainerResponse
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
LeaseContainerResponse, or the result of cls(response)
Return type
Exceptions
list
Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.
list(resource_group_name: str, account_name: str, maxpagesize: Optional[str] = None, filter: Optional[str] = None, include: Optional[Union[str, azure.mgmt.storage.v2021_09_01.models._storage_management_client_enums.ListContainersInclude]] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.storage.v2021_09_01.models._models_py3.ListContainerItems]
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- maxpagesize
- str
Optional. Specified maximum number of containers that can be included in the list.
- filter
- str
Optional. When specified, only container names starting with the filter will be listed.
- include
- str or ListContainersInclude
Optional, used to include the properties for soft deleted blob containers.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either ListContainerItems or the result of cls(response)
Return type
Exceptions
lock_immutability_policy
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.
async lock_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.ImmutabilityPolicy
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- if_match
- str
The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
ImmutabilityPolicy, or the result of cls(response)
Return type
Exceptions
set_legal_hold
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.
async set_legal_hold(resource_group_name: str, account_name: str, container_name: str, legal_hold: azure.mgmt.storage.v2021_09_01.models._models_py3.LegalHold, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.LegalHold
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
LegalHold, or the result of cls(response)
Return type
Exceptions
update
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.
async update(resource_group_name: str, account_name: str, container_name: str, blob_container: azure.mgmt.storage.v2021_09_01.models._models_py3.BlobContainer, **kwargs: Any) -> azure.mgmt.storage.v2021_09_01.models._models_py3.BlobContainer
Parameters
- resource_group_name
- str
The name of the resource group within the user's subscription. The name is case insensitive.
- account_name
- str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- container_name
- str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
BlobContainer, or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.storage.v2021_09_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\storage\\v2021_09_01\\models\\__init__.py'>
Feedback
Submit and view feedback for