StorageAccountsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:storage_accounts> attribute.
- Inheritance
-
builtins.objectStorageAccountsOperations
Constructor
StorageAccountsOperations(*args, **kwargs)
Methods
begin_create |
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. |
check_name_availability |
Checks that the storage account name is valid and is not already in use. |
delete |
Deletes a storage account in Microsoft Azure. |
get_properties |
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. |
list |
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. |
list_account_sas |
List SAS credentials of a storage account. |
list_by_resource_group |
Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. |
list_keys |
Lists the access keys for the specified storage account. |
list_service_sas |
List service SAS credentials of a specific resource. |
regenerate_key |
Regenerates one of the access keys for the specified storage account. |
update |
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. |
begin_create
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.
begin_create(resource_group_name: str, account_name: str, parameters: _models.StorageAccountCreateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.StorageAccount]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
parameters
Required
|
The parameters to provide for the created account. Is either a StorageAccountCreateParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of LROPoller that returns either StorageAccount or the result of cls(response) |
Exceptions
Type | Description |
---|---|
check_name_availability
Checks that the storage account name is valid and is not already in use.
check_name_availability(account_name: _models.StorageAccountCheckNameAvailabilityParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.CheckNameAvailabilityResult
Parameters
Name | Description |
---|---|
account_name
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. Is either a StorageAccountCheckNameAvailabilityParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
CheckNameAvailabilityResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete
Deletes a storage account in Microsoft Azure.
delete(resource_group_name: str, account_name: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_properties
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.
get_properties(resource_group_name: str, account_name: str, **kwargs: Any) -> StorageAccount
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
Returns
Type | Description |
---|---|
StorageAccount or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
list(**kwargs: Any) -> Iterable[StorageAccount]
Returns
Type | Description |
---|---|
An iterator like instance of either StorageAccount or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_account_sas
List SAS credentials of a storage account.
list_account_sas(resource_group_name: str, account_name: str, parameters: _models.AccountSasParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ListAccountSasResponse
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
parameters
Required
|
The parameters to provide to list SAS credentials for the storage account. Is either a AccountSasParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
ListAccountSasResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_resource_group
Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> Iterable[StorageAccount]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either StorageAccount or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_keys
Lists the access keys for the specified storage account.
list_keys(resource_group_name: str, account_name: str, **kwargs: Any) -> StorageAccountListKeysResult
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
Returns
Type | Description |
---|---|
StorageAccountListKeysResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_service_sas
List service SAS credentials of a specific resource.
list_service_sas(resource_group_name: str, account_name: str, parameters: _models.ServiceSasParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ListServiceSasResponse
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
parameters
Required
|
The parameters to provide to list service SAS credentials. Is either a ServiceSasParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
ListServiceSasResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
regenerate_key
Regenerates one of the access keys for the specified storage account.
regenerate_key(resource_group_name: str, account_name: str, regenerate_key: _models.StorageAccountRegenerateKeyParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.StorageAccountListKeysResult
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
regenerate_key
Required
|
Specifies name of the key which should be regenerated – key1 or key2. Is either a StorageAccountRegenerateKeyParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
StorageAccountListKeysResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
update
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.
update(resource_group_name: str, account_name: str, parameters: _models.StorageAccountUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.StorageAccount
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group within the user's subscription. The name is case insensitive. Required. |
account_name
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. Required. |
parameters
Required
|
The parameters to provide for the updated account. Is either a StorageAccountUpdateParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
StorageAccount or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.storage.v2017_06_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\storage\\v2017_06_01\\models\\__init__.py'>
Azure SDK for Python