Skip to main content

storage_accounts

Creates, updates, deletes, gets or lists a storage_accounts resource.

Overview

Namestorage_accounts
TypeResource
Idazure_stack.storage_admin.storage_accounts

Fields

The following fields are returned by SELECT queries:

OK -- The storage account has been returned.

NameDatatypeDescription
idstringResource ID.
namestringResource Name.
kindstringIndicates the type of storage account
locationstringResource Location.
propertiesobjectProperties of the storage account.
tagsobjectResource tags.
typestringResource Type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, location, accountIdReturns the requested storage account.
listselectsubscriptionId, location$filter, summaryReturns a list of storage accounts.
undeleteexecsubscriptionId, location, accountIdnewAccountNameUndelete a deleted storage account with new account name if the a new name is provided.
reclaim_storage_capacityexecsubscriptionId, locationStart reclaim storage capacity on deleted storage objects.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
accountIdstringInternal storage account ID, which is not visible to tenant.
locationstringResource location.
subscriptionIdstringSubscription Id.
$filterstringFilter string
newAccountNamestringNew storage account name when doing undelete storage account operation.
summarybooleanSwitch for whether summary or detailed information is returned.

SELECT examples

Returns the requested storage account.

SELECT
id,
name,
kind,
location,
properties,
tags,
type
FROM azure_stack.storage_admin.storage_accounts
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND location = '{{ location }}' -- required
AND accountId = '{{ accountId }}' -- required
;

Lifecycle Methods

Undelete a deleted storage account with new account name if the a new name is provided.

EXEC azure_stack.storage_admin.storage_accounts.undelete 
@subscriptionId='{{ subscriptionId }}' --required,
@location='{{ location }}' --required,
@accountId='{{ accountId }}' --required,
@newAccountName='{{ newAccountName }}'
;