BlobContainersOperations Class

BlobContainersOperations 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.object
BlobContainersOperations

Constructor

BlobContainersOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

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, only way is to delete the container after deleting all blobs inside the 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.

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.

clear_legal_hold(resource_group_name: str, account_name: str, container_name: str, legal_hold: azure.mgmt.storage.v2018_03_01_preview.models._models_py3.LegalHold, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.LegalHold

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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.

legal_hold
LegalHold
Required

The LegalHold property that will be clear from a blob container.

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.

create(resource_group_name: str, account_name: str, container_name: str, blob_container: azure.mgmt.storage.v2018_03_01_preview.models._models_py3.BlobContainer, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.BlobContainer

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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.

blob_container
BlobContainer
Required

Properties of the blob container to create.

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.

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.v2018_03_01_preview.models._models_py3.ImmutabilityPolicy] = None, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.ImmutabilityPolicy

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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
Required

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
Required

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.

delete(resource_group_name: str, account_name: str, container_name: str, **kwargs: Any) -> None

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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, only way is to delete the container after deleting all blobs inside the container.

delete_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.ImmutabilityPolicy

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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
Required

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.

extend_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, parameters: Optional[azure.mgmt.storage.v2018_03_01_preview.models._models_py3.ImmutabilityPolicy] = None, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.ImmutabilityPolicy

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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
Required

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
Required

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.

get(resource_group_name: str, account_name: str, container_name: str, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.BlobContainer

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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.

get_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: Optional[str] = None, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.ImmutabilityPolicy

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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
Required

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.

lease(resource_group_name: str, account_name: str, container_name: str, parameters: Optional[azure.mgmt.storage.v2018_03_01_preview.models._models_py3.LeaseContainerRequest] = None, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.LeaseContainerResponse

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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.

parameters
LeaseContainerRequest
Required

Lease Container request body.

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, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.ListContainerItems

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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.

cls
callable

A custom type or function that will be passed the direct response

Returns

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.

lock_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.ImmutabilityPolicy

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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
Required

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

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.

set_legal_hold(resource_group_name: str, account_name: str, container_name: str, legal_hold: azure.mgmt.storage.v2018_03_01_preview.models._models_py3.LegalHold, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.LegalHold

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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.

legal_hold
LegalHold
Required

The LegalHold property that will be set to a blob container.

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.

update(resource_group_name: str, account_name: str, container_name: str, blob_container: azure.mgmt.storage.v2018_03_01_preview.models._models_py3.BlobContainer, **kwargs: Any) -> azure.mgmt.storage.v2018_03_01_preview.models._models_py3.BlobContainer

Parameters

resource_group_name
str
Required

The name of the resource group within the user's subscription. The name is case insensitive.

account_name
str
Required

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
Required

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.

blob_container
BlobContainer
Required

Properties to update for the blob container.

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.v2018_03_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\storage\\v2018_03_01_preview\\models\\__init__.py'>