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, 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.

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, account_name, container_name, legal_hold, **kwargs)

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

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, account_name, container_name, blob_container, **kwargs)

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

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, account_name, container_name, if_match=None, parameters=None, **kwargs)

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
default value: None

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
default value: None

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

delete

Deletes specified container under its account.

delete(resource_group_name, account_name, container_name, **kwargs)

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

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.

delete_immutability_policy(resource_group_name, account_name, container_name, if_match, **kwargs)

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

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, account_name, container_name, if_match, parameters=None, **kwargs)

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
default value: None

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

get

Gets properties of a specified container.

get(resource_group_name, account_name, container_name, **kwargs)

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

get_immutability_policy

Gets the existing immutability policy along with the corresponding ETag in response headers and body.

get_immutability_policy(resource_group_name, account_name, container_name, if_match=None, **kwargs)

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
default value: None

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

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, account_name, container_name, parameters=None, **kwargs)

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
default value: None

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

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, account_name, maxpagesize=None, filter=None, include=None, **kwargs)

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.

maxpagesize
str
default value: None

Optional. Specified maximum number of containers that can be included in the list.

filter
str
default value: None

Optional. When specified, only container names starting with the filter will be listed.

include
str or ListContainersInclude
default value: None

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

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, account_name, container_name, if_match, **kwargs)

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

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, account_name, container_name, legal_hold, **kwargs)

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

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, account_name, container_name, blob_container, **kwargs)

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

Attributes

models

models = <module 'azure.mgmt.storage.v2021_01_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.6.8\\x64\\lib\\site-packages\\azure\\mgmt\\storage\\v2021_01_01\\models\\__init__.py'>