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

NameDatatypeDescription
idtextFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
nametextThe name of the resource
accountNametextfield from the properties object
last_modified_timetextfield from the properties object
managementPolicyNametextfield from the properties object
policytextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, managementPolicyName, resourceGroupName, subscriptionIdGets the managementpolicy associated with the specified storage account.
create_or_updateINSERTaccountName, managementPolicyName, resourceGroupName, subscriptionIdSets the managementpolicy to the specified storage account.
deleteDELETEaccountName, managementPolicyName, resourceGroupName, subscriptionIdDeletes the managementpolicy associated with the specified storage account.

SELECT examples

Gets the managementpolicy associated with the specified storage account.

SELECT
id,
name,
accountName,
last_modified_time,
managementPolicyName,
policy,
resourceGroupName,
subscriptionId,
type
FROM azure.storage.vw_management_policies
WHERE accountName = '{{ accountName }}'
AND managementPolicyName = '{{ managementPolicyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.storage.management_policies (
accountName,
managementPolicyName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ managementPolicyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified management_policies resource.

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