Bicep resource definition
The storageAccounts/inventoryPolicies resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Storage/storageAccounts/inventoryPolicies resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Storage/storageAccounts/inventoryPolicies@2021-01-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
policy: {
destination: 'string'
enabled: bool
rules: [
{
definition: {
filters: {
blobTypes: [
'string'
]
includeBlobVersions: bool
includeSnapshots: bool
prefixMatch: [
'string'
]
}
}
enabled: bool
name: 'string'
}
]
type: 'string'
}
}
}
Property Values
Microsoft.Storage/storageAccounts/inventoryPolicies
Name |
Description |
Value |
name |
The resource name |
'default' (required) |
parent |
In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.
For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: storageAccounts |
properties |
Returns the storage account blob inventory policy rules. |
BlobInventoryPolicyProperties |
BlobInventoryPolicyDefinition
BlobInventoryPolicyFilter
Name |
Description |
Value |
blobTypes |
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. |
string[] (required) |
includeBlobVersions |
Includes blob versions in blob inventory when value set to true. |
bool |
includeSnapshots |
Includes blob snapshots in blob inventory when value set to true. |
bool |
prefixMatch |
An array of strings for blob prefixes to be matched. |
string[] |
BlobInventoryPolicyProperties
Name |
Description |
Value |
policy |
The storage account blob inventory policy object. It is composed of policy rules. |
BlobInventoryPolicySchema (required) |
BlobInventoryPolicyRule
Name |
Description |
Value |
definition |
An object that defines the blob inventory policy rule. |
BlobInventoryPolicyDefinition (required) |
enabled |
Rule is enabled when set to true. |
bool (required) |
name |
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. |
string (required) |
BlobInventoryPolicySchema
Name |
Description |
Value |
destination |
Container name where blob inventory files are stored. Must be pre-created. |
string (required) |
enabled |
Policy is enabled if set to true. |
bool (required) |
rules |
The storage account blob inventory policy rules. The rule is applied when it is enabled. |
BlobInventoryPolicyRule[] (required) |
type |
The valid value is Inventory |
'Inventory' (required) |
ARM template resource definition
The storageAccounts/inventoryPolicies resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Storage/storageAccounts/inventoryPolicies resource, add the following JSON to your template.
{
"type": "Microsoft.Storage/storageAccounts/inventoryPolicies",
"apiVersion": "2021-01-01",
"name": "string",
"properties": {
"policy": {
"destination": "string",
"enabled": "bool",
"rules": [
{
"definition": {
"filters": {
"blobTypes": [ "string" ],
"includeBlobVersions": "bool",
"includeSnapshots": "bool",
"prefixMatch": [ "string" ]
}
},
"enabled": "bool",
"name": "string"
}
],
"type": "string"
}
}
}
Property Values
Microsoft.Storage/storageAccounts/inventoryPolicies
Name |
Description |
Value |
apiVersion |
The api version |
'2021-01-01' |
name |
The resource name |
'default' (required) |
properties |
Returns the storage account blob inventory policy rules. |
BlobInventoryPolicyProperties |
type |
The resource type |
'Microsoft.Storage/storageAccounts/inventoryPolicies' |
BlobInventoryPolicyDefinition
BlobInventoryPolicyFilter
Name |
Description |
Value |
blobTypes |
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. |
string[] (required) |
includeBlobVersions |
Includes blob versions in blob inventory when value set to true. |
bool |
includeSnapshots |
Includes blob snapshots in blob inventory when value set to true. |
bool |
prefixMatch |
An array of strings for blob prefixes to be matched. |
string[] |
BlobInventoryPolicyProperties
Name |
Description |
Value |
policy |
The storage account blob inventory policy object. It is composed of policy rules. |
BlobInventoryPolicySchema (required) |
BlobInventoryPolicyRule
Name |
Description |
Value |
definition |
An object that defines the blob inventory policy rule. |
BlobInventoryPolicyDefinition (required) |
enabled |
Rule is enabled when set to true. |
bool (required) |
name |
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. |
string (required) |
BlobInventoryPolicySchema
Name |
Description |
Value |
destination |
Container name where blob inventory files are stored. Must be pre-created. |
string (required) |
enabled |
Policy is enabled if set to true. |
bool (required) |
rules |
The storage account blob inventory policy rules. The rule is applied when it is enabled. |
BlobInventoryPolicyRule[] (required) |
type |
The valid value is Inventory |
'Inventory' (required) |
Usage Examples
The storageAccounts/inventoryPolicies resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Storage/storageAccounts/inventoryPolicies resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Storage/storageAccounts/inventoryPolicies@2021-01-01"
name = "string"
parent_id = "string"
body = {
properties = {
policy = {
destination = "string"
enabled = bool
rules = [
{
definition = {
filters = {
blobTypes = [
"string"
]
includeBlobVersions = bool
includeSnapshots = bool
prefixMatch = [
"string"
]
}
}
enabled = bool
name = "string"
}
]
type = "string"
}
}
}
}
Property Values
Microsoft.Storage/storageAccounts/inventoryPolicies
Name |
Description |
Value |
name |
The resource name |
'default' (required) |
parent_id |
The ID of the resource that is the parent for this resource. |
ID for resource of type: storageAccounts |
properties |
Returns the storage account blob inventory policy rules. |
BlobInventoryPolicyProperties |
type |
The resource type |
"Microsoft.Storage/storageAccounts/inventoryPolicies@2021-01-01" |
BlobInventoryPolicyDefinition
BlobInventoryPolicyFilter
Name |
Description |
Value |
blobTypes |
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. |
string[] (required) |
includeBlobVersions |
Includes blob versions in blob inventory when value set to true. |
bool |
includeSnapshots |
Includes blob snapshots in blob inventory when value set to true. |
bool |
prefixMatch |
An array of strings for blob prefixes to be matched. |
string[] |
BlobInventoryPolicyProperties
Name |
Description |
Value |
policy |
The storage account blob inventory policy object. It is composed of policy rules. |
BlobInventoryPolicySchema (required) |
BlobInventoryPolicyRule
Name |
Description |
Value |
definition |
An object that defines the blob inventory policy rule. |
BlobInventoryPolicyDefinition (required) |
enabled |
Rule is enabled when set to true. |
bool (required) |
name |
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. |
string (required) |
BlobInventoryPolicySchema
Name |
Description |
Value |
destination |
Container name where blob inventory files are stored. Must be pre-created. |
string (required) |
enabled |
Policy is enabled if set to true. |
bool (required) |
rules |
The storage account blob inventory policy rules. The rule is applied when it is enabled. |
BlobInventoryPolicyRule[] (required) |
type |
The valid value is Inventory |
'Inventory' (required) |