azure.mgmt.storage.v2015_06_15.operations module

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

Bases: object

StorageAccountsOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client Api Version. Constant value: “2015-06-15”.

check_name_availability(name, type='Microsoft.Storage/storageAccounts', custom_headers=None, raw=False, **operation_config)[source]

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

Parameters
  • name (str) –

  • type (str) –

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

CheckNameAvailabilityResult or ClientRawResponse if raw=true

Return type

CheckNameAvailabilityResult or ClientRawResponse

Raises

CloudError

create(resource_group_name, account_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config)[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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns StorageAccount or ClientRawResponse<StorageAccount> if raw==True

Return type

AzureOperationPoller[StorageAccount] or AzureOperationPoller[ClientRawResponse[StorageAccount]]

Raises

CloudError

delete(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

CloudError

get_properties(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

StorageAccount or ClientRawResponse if raw=true

Return type

StorageAccount or ClientRawResponse

Raises

CloudError

list(custom_headers=None, raw=False, **operation_config)[source]

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

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of StorageAccount

Return type

StorageAccountPaged[StorageAccount]

Raises

CloudError

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of StorageAccount

Return type

StorageAccountPaged[StorageAccount]

Raises

CloudError

list_keys(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

StorageAccountKeys or ClientRawResponse if raw=true

Return type

StorageAccountKeys or ClientRawResponse

Raises

CloudError

regenerate_key(resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config)[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.

  • key_name (str) –

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

StorageAccountKeys or ClientRawResponse if raw=true

Return type

StorageAccountKeys or ClientRawResponse

Raises

CloudError

update(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config)[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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

StorageAccount or ClientRawResponse if raw=true

Return type

StorageAccount or ClientRawResponse

Raises

CloudError

models = <module 'azure.mgmt.storage.v2015_06_15.models' from '/home/vsts/work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/storage/v2015_06_15/models/__init__.py'>
class azure.mgmt.storage.v2015_06_15.operations.UsageOperations(client, config, serializer, deserializer)[source]

Bases: object

UsageOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client Api Version. Constant value: “2015-06-15”.

list(custom_headers=None, raw=False, **operation_config)[source]

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

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Usage

Return type

UsagePaged[Usage]

Raises

CloudError

models = <module 'azure.mgmt.storage.v2015_06_15.models' from '/home/vsts/work/1/s/sdk/storage/azure-mgmt-storage/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/storage/v2015_06_15/models/__init__.py'>