azure.mgmt.storage.v2016_01_01.operations module

class azure.mgmt.storage.v2016_01_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.v2016_01_01.models._models_py3.StorageAccountCreateParameters, **kwargs: Any)azure.core.polling._poller.LROPoller[azure.mgmt.storage.v2016_01_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.

  • 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

check_name_availability(account_name: azure.mgmt.storage.v2016_01_01.models._models_py3.StorageAccountCheckNameAvailabilityParameters, **kwargs: Any)azure.mgmt.storage.v2016_01_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.

  • 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, **kwargs: Any)azure.mgmt.storage.v2016_01_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.

  • 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

StorageAccount, or the result of cls(response)

Return type

StorageAccount

Raises

~azure.core.exceptions.HttpResponseError

list(**kwargs: Any)Iterable[azure.mgmt.storage.v2016_01_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_by_resource_group(resource_group_name: str, **kwargs: Any)Iterable[azure.mgmt.storage.v2016_01_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.

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

  • 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

regenerate_key(resource_group_name: str, account_name: str, regenerate_key: azure.mgmt.storage.v2016_01_01.models._models_py3.StorageAccountRegenerateKeyParameters, **kwargs: Any)azure.mgmt.storage.v2016_01_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.

  • 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.v2016_01_01.models._models_py3.StorageAccountUpdateParameters, **kwargs: Any)azure.mgmt.storage.v2016_01_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.

  • 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.v2016_01_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2016_01_01/models/__init__.py'>
class azure.mgmt.storage.v2016_01_01.operations.UsageOperations(client, config, serializer, deserializer)[source]

Bases: object

UsageOperations 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.v2016_01_01.models._models_py3.UsageListResult][source]

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

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.v2016_01_01.models' from '/mnt/vss/_work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/storage/v2016_01_01/models/__init__.py'>