blob_inventory_policies
Creates, updates, deletes, gets or lists a blob_inventory_policies resource.
Overview
| Name | blob_inventory_policies |
| Type | Resource |
| Id | azure.storage.blob_inventory_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
lastModifiedTime | string (date-time) | Returns the last modified date and time of the blob inventory policy. |
policy | object | The storage account blob inventory policy object. It is composed of policy rules. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
lastModifiedTime | string (date-time) | Returns the last modified date and time of the blob inventory policy. |
policy | object | The storage account blob inventory policy object. It is composed of policy rules. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, blob_inventory_policy_name, subscription_id | Gets the blob inventory policy associated with the specified storage account. | |
list | select | resource_group_name, account_name, subscription_id | Gets the blob inventory policy associated with the specified storage account. | |
create_or_update | insert | resource_group_name, account_name, blob_inventory_policy_name, subscription_id | Sets the blob inventory policy to the specified storage account. | |
create_or_update | replace | resource_group_name, account_name, blob_inventory_policy_name, subscription_id | Sets the blob inventory policy to the specified storage account. | |
delete | delete | resource_group_name, account_name, blob_inventory_policy_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | The 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_name | string | The name of the storage account blob inventory policy. It should always be 'default'. "default" Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
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
;
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: blob_inventory_policies
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the blob_inventory_policies resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the blob_inventory_policies resource.
- name: blob_inventory_policy_name
value: "{{ blob_inventory_policy_name }}"
description: Required parameter for the blob_inventory_policies resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the blob_inventory_policies resource.
- name: properties
description: |
Returns the storage account blob inventory policy rules.
value:
lastModifiedTime: "{{ lastModifiedTime }}"
policy:
enabled: {{ enabled }}
destination: "{{ destination }}"
type: "{{ type }}"
rules:
- enabled: {{ enabled }}
name: "{{ name }}"
destination: "{{ destination }}"
definition:
filters:
prefixMatch: "{{ prefixMatch }}"
excludePrefix: "{{ excludePrefix }}"
blobTypes: "{{ blobTypes }}"
includeBlobVersions: {{ includeBlobVersions }}
includeSnapshots: {{ includeSnapshots }}
includeDeleted: {{ includeDeleted }}
creationTime: "{{ creationTime }}"
format: "{{ format }}"
schedule: "{{ schedule }}"
objectType: "{{ objectType }}"
schemaFields:
- "{{ schemaFields }}"
REPLACE examples
- create_or_update
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
- delete
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
;