Skip to main content

blob_inventory_policies

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

Overview

Nameblob_inventory_policies
TypeResource
Idazure.storage.blob_inventory_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
blobInventoryPolicyNametextfield from the properties object
last_modified_timetextfield from the properties object
policytextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
typetextThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, blobInventoryPolicyName, resourceGroupName, subscriptionIdGets the blob inventory policy associated with the specified storage account.
listSELECTaccountName, resourceGroupName, subscriptionIdGets the blob inventory policy associated with the specified storage account.
create_or_updateINSERTaccountName, blobInventoryPolicyName, resourceGroupName, subscriptionIdSets the blob inventory policy to the specified storage account.
deleteDELETEaccountName, blobInventoryPolicyName, resourceGroupName, subscriptionIdDeletes the blob inventory policy associated with the specified storage account.

SELECT examples

Gets the blob inventory policy associated with the specified storage account.

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

INSERT example

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

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

DELETE example

Deletes the specified blob_inventory_policies resource.

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