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:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
lastModifiedTimestring (date-time)Returns the last modified date and time of the blob inventory policy.
policyobjectThe storage account blob inventory policy object. It is composed of policy rules. Required.
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
getselectresource_group_name, account_name, blob_inventory_policy_name, subscription_idGets the blob inventory policy associated with the specified storage account.
listselectresource_group_name, account_name, subscription_idGets the blob inventory policy associated with the specified storage account.
create_or_updateinsertresource_group_name, account_name, blob_inventory_policy_name, subscription_idSets the blob inventory policy to the specified storage account.
create_or_updatereplaceresource_group_name, account_name, blob_inventory_policy_name, subscription_idSets the blob inventory policy to the specified storage account.
deletedeleteresource_group_name, account_name, blob_inventory_policy_name, subscription_idDeletes 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
account_namestringThe 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. Required.
blob_inventory_policy_namestringThe name of the storage account blob inventory policy. It should always be 'default'. "default" Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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

SELECT
id,
name,
lastModifiedTime,
policy,
systemData,
type
FROM azure.storage.blob_inventory_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND blob_inventory_policy_name = '{{ blob_inventory_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Sets the blob inventory policy to the specified storage account.

INSERT INTO azure.storage.blob_inventory_policies (
properties,
resource_group_name,
account_name,
blob_inventory_policy_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ blob_inventory_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Sets the blob inventory policy to the specified storage account.

REPLACE azure.storage.blob_inventory_policies
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND blob_inventory_policy_name = '{{ blob_inventory_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
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 resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND blob_inventory_policy_name = '{{ blob_inventory_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;