Skip to main content

accounts

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

Overview

Nameaccounts
TypeResource
Idazure.storage.accounts

Fields

NameDatatypeDescription
extendedLocationobjectThe complex type of the extended location.
identityobjectIdentity for the resource.
kindstringGets the Kind.
locationstringThe geo-location where the resource lives
propertiesobjectProperties of the storage account.
skuobjectThe resource model definition representing SKU
tagsobjectResource tags.

Methods

NameAccessible byRequired ParamsDescription
listSELECTsubscriptionIdLists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.
createINSERTaccountName, resourceGroupName, subscriptionId, data__kind, data__location, data__skuAsynchronously 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.
deleteDELETEaccountName, resourceGroupName, subscriptionIdDeletes a storage account in Microsoft Azure.
updateUPDATEaccountName, resourceGroupName, subscriptionIdThe 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.
abort_hierarchical_namespace_migrationEXECaccountName, resourceGroupName, subscriptionIdAbort live Migration of storage account to enable Hns
check_name_availabilityEXECsubscriptionId, data__name, data__typeChecks that the storage account name is valid and is not already in use.
customer_initiated_migrationEXECaccountName, resourceGroupName, subscriptionId, data__propertiesAccount Migration request can be triggered for a storage account to change its redundancy level. The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability. Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
failoverEXECaccountName, resourceGroupName, subscriptionIdA failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance
hierarchical_namespace_migrationEXECaccountName, requestType, resourceGroupName, subscriptionIdLive Migration of storage account to enable Hns
regenerate_keyEXECaccountName, resourceGroupName, subscriptionId, data__keyNameRegenerates one of the access keys or Kerberos keys for the specified storage account.
restore_blob_rangesEXECaccountName, resourceGroupName, subscriptionId, data__blobRanges, data__timeToRestoreRestore blobs in the specified blob ranges
revoke_user_delegation_keysEXECaccountName, resourceGroupName, subscriptionIdRevoke user delegation keys.

SELECT examples

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

SELECT
extendedLocation,
identity,
kind,
location,
properties,
sku,
tags
FROM azure.storage.accounts
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new accounts resource.

/*+ create */
INSERT INTO azure.storage.accounts (
accountName,
resourceGroupName,
subscriptionId,
data__kind,
data__location,
data__sku,
sku,
kind,
location,
extendedLocation,
tags,
identity,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__kind }}',
'{{ data__location }}',
'{{ data__sku }}',
'{{ sku }}',
'{{ kind }}',
'{{ location }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ identity }}',
'{{ properties }}'
;

UPDATE example

Updates a accounts resource.

/*+ update */
UPDATE azure.storage.accounts
SET
sku = '{{ sku }}',
tags = '{{ tags }}',
identity = '{{ identity }}',
properties = '{{ properties }}',
kind = '{{ kind }}'
WHERE
accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified accounts resource.

/*+ delete */
DELETE FROM azure.storage.accounts
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';