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

The following fields are returned by SELECT queries:

OK -- Get the blob inventory policy 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 blob inventory policy 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, blobInventoryPolicyNameGets the blob inventory policy associated with the specified storage account.
listselectresourceGroupName, accountName, subscriptionIdGets the blob inventory policy associated with the specified storage account.
create_or_updateinsertresourceGroupName, accountName, subscriptionId, blobInventoryPolicyNameSets the blob inventory policy to the specified storage account.
deletedeleteresourceGroupName, accountName, subscriptionId, blobInventoryPolicyNameDeletes the blob inventory policy 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.
blobInventoryPolicyNamestringThe name of the storage account blob inventory 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 blob inventory policy associated with the specified storage account.

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

INSERT examples

Sets the blob inventory policy to the specified storage account.

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

DELETE examples

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

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