azure.mgmt.storage.v2018_07_01.operations module

class azure.mgmt.storage.v2018_07_01.operations.BlobContainersOperations(client, config, serializer, deserializer)[source]

Bases: object

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.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

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.

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.

  • legal_hold (LegalHold) – The LegalHold property that will be clear from a blob container.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

LegalHold, or the result of cls(response)

Return type

LegalHold

Raises

~azure.core.exceptions.HttpResponseError

create(resource_group_name: str, account_name: str, container_name: str, blob_container: azure.mgmt.storage.v2018_07_01.models._models_py3.BlobContainer, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.BlobContainer[source]

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.

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.

  • blob_container (BlobContainer) – Properties of the blob container to create.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

BlobContainer, or the result of cls(response)

Return type

BlobContainer

Raises

~azure.core.exceptions.HttpResponseError

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

Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ImmutabilityPolicy, or the result of cls(response)

Return type

ImmutabilityPolicy

Raises

~azure.core.exceptions.HttpResponseError

delete(resource_group_name: str, account_name: str, container_name: str, **kwargs: Any)None[source]

Deletes specified container under its account.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

delete_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.ImmutabilityPolicy[source]

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.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ImmutabilityPolicy, or the result of cls(response)

Return type

ImmutabilityPolicy

Raises

~azure.core.exceptions.HttpResponseError

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

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.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ImmutabilityPolicy, or the result of cls(response)

Return type

ImmutabilityPolicy

Raises

~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, account_name: str, container_name: str, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.BlobContainer[source]

Gets properties of a specified container.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

BlobContainer, or the result of cls(response)

Return type

BlobContainer

Raises

~azure.core.exceptions.HttpResponseError

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

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

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ImmutabilityPolicy, or the result of cls(response)

Return type

ImmutabilityPolicy

Raises

~azure.core.exceptions.HttpResponseError

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

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.

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.

  • parameters (LeaseContainerRequest) – Lease Container request body.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

LeaseContainerResponse, or the result of cls(response)

Return type

LeaseContainerResponse

Raises

~azure.core.exceptions.HttpResponseError

list(resource_group_name: str, account_name: str, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.ListContainerItems[source]

Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ListContainerItems, or the result of cls(response)

Return type

ListContainerItems

Raises

~azure.core.exceptions.HttpResponseError

lock_immutability_policy(resource_group_name: str, account_name: str, container_name: str, if_match: str, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.ImmutabilityPolicy[source]

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.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ImmutabilityPolicy, or the result of cls(response)

Return type

ImmutabilityPolicy

Raises

~azure.core.exceptions.HttpResponseError

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.

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.

  • legal_hold (LegalHold) – The LegalHold property that will be set to a blob container.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

LegalHold, or the result of cls(response)

Return type

LegalHold

Raises

~azure.core.exceptions.HttpResponseError

update(resource_group_name: str, account_name: str, container_name: str, blob_container: azure.mgmt.storage.v2018_07_01.models._models_py3.BlobContainer, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.BlobContainer[source]

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.

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.

  • blob_container (BlobContainer) – Properties to update for the blob container.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

BlobContainer, or the result of cls(response)

Return type

BlobContainer

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.storage.v2018_07_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2018_07_01/models/__init__.py'>
class azure.mgmt.storage.v2018_07_01.operations.BlobServicesOperations(client, config, serializer, deserializer)[source]

Bases: object

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

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

get_service_properties(resource_group_name: str, account_name: str, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.BlobServiceProperties[source]

Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

BlobServiceProperties, or the result of cls(response)

Return type

BlobServiceProperties

Raises

~azure.core.exceptions.HttpResponseError

set_service_properties(resource_group_name: str, account_name: str, parameters: azure.mgmt.storage.v2018_07_01.models._models_py3.BlobServiceProperties, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.BlobServiceProperties[source]

Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.

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.

  • parameters (BlobServiceProperties) – The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

BlobServiceProperties, or the result of cls(response)

Return type

BlobServiceProperties

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.storage.v2018_07_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2018_07_01/models/__init__.py'>
class azure.mgmt.storage.v2018_07_01.operations.ManagementPoliciesOperations(client, config, serializer, deserializer)[source]

Bases: object

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

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

create_or_update(resource_group_name: str, account_name: str, management_policy_name: Union[str, azure.mgmt.storage.v2018_07_01.models._storage_management_client_enums.ManagementPolicyName], properties: azure.mgmt.storage.v2018_07_01.models._models_py3.ManagementPoliciesRulesSetParameter, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountManagementPolicies[source]

Sets the data policy rules associated with the specified storage account.

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.

  • management_policy_name (str or ManagementPolicyName) – The name of the Storage Account Management Policy. It should always be ‘default’.

  • properties (ManagementPoliciesRulesSetParameter) – The data policy rules to set to a storage account.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

StorageAccountManagementPolicies, or the result of cls(response)

Return type

StorageAccountManagementPolicies

Raises

~azure.core.exceptions.HttpResponseError

delete(resource_group_name: str, account_name: str, management_policy_name: Union[str, azure.mgmt.storage.v2018_07_01.models._storage_management_client_enums.ManagementPolicyName], **kwargs: Any)None[source]

Deletes the data policy rules associated with the specified storage account.

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.

  • management_policy_name (str or ManagementPolicyName) – The name of the Storage Account Management Policy. It should always be ‘default’.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get(resource_group_name: str, account_name: str, management_policy_name: Union[str, azure.mgmt.storage.v2018_07_01.models._storage_management_client_enums.ManagementPolicyName], **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountManagementPolicies[source]

Gets the data policy rules associated with the specified storage account.

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.

  • management_policy_name (str or ManagementPolicyName) – The name of the Storage Account Management Policy. It should always be ‘default’.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

StorageAccountManagementPolicies, or the result of cls(response)

Return type

StorageAccountManagementPolicies

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.storage.v2018_07_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2018_07_01/models/__init__.py'>
class azure.mgmt.storage.v2018_07_01.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

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

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

list(**kwargs: Any)Iterable[azure.mgmt.storage.v2018_07_01.models._models_py3.OperationListResult][source]

Lists all of the available Storage Rest API operations.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either OperationListResult or the result of cls(response)

Return type

ItemPaged[OperationListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.storage.v2018_07_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2018_07_01/models/__init__.py'>
class azure.mgmt.storage.v2018_07_01.operations.SkusOperations(client, config, serializer, deserializer)[source]

Bases: object

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

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

list(**kwargs: Any)Iterable[azure.mgmt.storage.v2018_07_01.models._models_py3.StorageSkuListResult][source]

Lists the available SKUs supported by Microsoft.Storage for given subscription.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either StorageSkuListResult or the result of cls(response)

Return type

ItemPaged[StorageSkuListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.storage.v2018_07_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2018_07_01/models/__init__.py'>
class azure.mgmt.storage.v2018_07_01.operations.StorageAccountsOperations(client, config, serializer, deserializer)[source]

Bases: object

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

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

begin_create(resource_group_name: str, account_name: str, parameters: azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountCreateParameters, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccount][source]

Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.

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.

  • parameters (StorageAccountCreateParameters) – The parameters to provide for the created account.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either StorageAccount or the result of cls(response)

Return type

LROPoller[StorageAccount]

Raises

~azure.core.exceptions.HttpResponseError

begin_failover(resource_group_name: str, account_name: str, **kwargs: Any)azure.core.polling._poller.LROPoller[None][source]

Failover request can be triggered for a storage account in case of availability issues. The failover occurs from the storage account’s primary cluster to secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover.

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.

Keyword Arguments
  • 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 PollingMethod) – By default, your polling method will be ARMPolling. 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 LROPoller that returns either None or the result of cls(response)

Return type

LROPoller[None]

Raises

~azure.core.exceptions.HttpResponseError

check_name_availability(account_name: azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountCheckNameAvailabilityParameters, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.CheckNameAvailabilityResult[source]

Checks that the storage account name is valid and is not already in use.

Parameters

account_name (StorageAccountCheckNameAvailabilityParameters) – 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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

CheckNameAvailabilityResult, or the result of cls(response)

Return type

CheckNameAvailabilityResult

Raises

~azure.core.exceptions.HttpResponseError

delete(resource_group_name: str, account_name: str, **kwargs: Any)None[source]

Deletes a storage account in Microsoft Azure.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get_properties(resource_group_name: str, account_name: str, expand: Optional[str] = 'geoReplicationStats', **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccount[source]

Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.

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.

  • expand (str) – May be used to expand the properties within account’s properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats. The default value is “geoReplicationStats”.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

StorageAccount, or the result of cls(response)

Return type

StorageAccount

Raises

~azure.core.exceptions.HttpResponseError

list(**kwargs: Any)Iterable[azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountListResult][source]

Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either StorageAccountListResult or the result of cls(response)

Return type

ItemPaged[StorageAccountListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_account_sas(resource_group_name: str, account_name: str, parameters: azure.mgmt.storage.v2018_07_01.models._models_py3.AccountSasParameters, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.ListAccountSasResponse[source]

List SAS credentials of a storage account.

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.

  • parameters (AccountSasParameters) – The parameters to provide to list SAS credentials for the storage account.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ListAccountSasResponse, or the result of cls(response)

Return type

ListAccountSasResponse

Raises

~azure.core.exceptions.HttpResponseError

list_by_resource_group(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountListResult][source]

Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.

Parameters

resource_group_name (str) – The name of the resource group within the user’s subscription. The name is case insensitive.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either StorageAccountListResult or the result of cls(response)

Return type

ItemPaged[StorageAccountListResult]

Raises

~azure.core.exceptions.HttpResponseError

list_keys(resource_group_name: str, account_name: str, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountListKeysResult[source]

Lists the access keys for the specified storage account.

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.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

StorageAccountListKeysResult, or the result of cls(response)

Return type

StorageAccountListKeysResult

Raises

~azure.core.exceptions.HttpResponseError

list_service_sas(resource_group_name: str, account_name: str, parameters: azure.mgmt.storage.v2018_07_01.models._models_py3.ServiceSasParameters, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.ListServiceSasResponse[source]

List service SAS credentials of a specific resource.

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.

  • parameters (ServiceSasParameters) – The parameters to provide to list service SAS credentials.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

ListServiceSasResponse, or the result of cls(response)

Return type

ListServiceSasResponse

Raises

~azure.core.exceptions.HttpResponseError

regenerate_key(resource_group_name: str, account_name: str, regenerate_key: azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountRegenerateKeyParameters, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountListKeysResult[source]

Regenerates one of the access keys for the specified storage account.

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.

  • regenerate_key (StorageAccountRegenerateKeyParameters) – Specifies name of the key which should be regenerated – key1 or key2.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

StorageAccountListKeysResult, or the result of cls(response)

Return type

StorageAccountListKeysResult

Raises

~azure.core.exceptions.HttpResponseError

update(resource_group_name: str, account_name: str, parameters: azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccountUpdateParameters, **kwargs: Any)azure.mgmt.storage.v2018_07_01.models._models_py3.StorageAccount[source]

The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.

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.

  • parameters (StorageAccountUpdateParameters) – The parameters to provide for the updated account.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

StorageAccount, or the result of cls(response)

Return type

StorageAccount

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.storage.v2018_07_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2018_07_01/models/__init__.py'>
class azure.mgmt.storage.v2018_07_01.operations.UsagesOperations(client, config, serializer, deserializer)[source]

Bases: object

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

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

list_by_location(location: str, **kwargs: Any)Iterable[azure.mgmt.storage.v2018_07_01.models._models_py3.UsageListResult][source]

Gets the current usage count and the limit for the resources of the location under the subscription.

Parameters

location (str) – The location of the Azure Storage resource.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either UsageListResult or the result of cls(response)

Return type

ItemPaged[UsageListResult]

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.mgmt.storage.v2018_07_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2018_07_01/models/__init__.py'>