Skip to main content

management_policies

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

Overview

Namemanagement_policies
TypeResource
Idazure.storage.management_policies

Fields

The following fields are returned by SELECT queries:

OK -- Get the managementpolicy successfully.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
propertiesobjectReturns the Storage Account Data Policies Rules.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, accountName, subscriptionId, managementPolicyNameGets the managementpolicy associated with the specified storage account.
create_or_updateinsertresourceGroupName, accountName, subscriptionId, managementPolicyNameSets the managementpolicy to the specified storage account.
deletedeleteresourceGroupName, accountName, subscriptionId, managementPolicyNameDeletes the managementpolicy associated with the specified storage account.

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
accountNamestringThe 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.
managementPolicyNamestringThe name of the Storage Account Management Policy. It should always be 'default'
resourceGroupNamestringThe name of the resource group within the user's subscription. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Gets the managementpolicy associated with the specified storage account.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.storage.management_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND managementPolicyName = '{{ managementPolicyName }}' -- required
;

INSERT examples

Sets the managementpolicy to the specified storage account.

INSERT INTO azure.storage.management_policies (
data__properties,
resourceGroupName,
accountName,
subscriptionId,
managementPolicyName
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ subscriptionId }}',
'{{ managementPolicyName }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Deletes the managementpolicy associated with the specified storage account.

DELETE FROM azure.storage.management_policies
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND managementPolicyName = '{{ managementPolicyName }}' --required
;