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.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec 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:
Return type:

CheckNameAvailabilityResult

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **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) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns StorageAccount

Return type:

ClientRawResponse if raw=true

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.
Return type:

None

Return type:

ClientRawResponse if raw=true

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.
Return type:

StorageAccount

Return type:

ClientRawResponse if raw=true

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:
Return type:

StorageAccountPaged

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.
Return type:

StorageAccountPaged

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.
Return type:

StorageAccountKeys

Return type:

ClientRawResponse if raw=true

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.
Return type:

StorageAccountKeys

Return type:

ClientRawResponse if raw=true

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.
Return type:

StorageAccount

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

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

Bases: object

UsageOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec 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:
Return type:

UsagePaged

Raises:

CloudError