Microsoft.Storage storageAccounts/inventoryPolicies 2021-02-01

Template format

To create a Microsoft.Storage/storageAccounts/inventoryPolicies resource, add the following JSON to the resources section of your template.

{
  "name": "default",
  "type": "Microsoft.Storage/storageAccounts/inventoryPolicies",
  "apiVersion": "2021-02-01",
  "properties": {
    "policy": {
      "enabled": "boolean",
      "destination": "string",
      "type": "Inventory",
      "rules": [
        {
          "enabled": "boolean",
          "name": "string",
          "definition": {
            "filters": {
              "prefixMatch": [
                "string"
              ],
              "blobTypes": [
                "string"
              ],
              "includeBlobVersions": "boolean",
              "includeSnapshots": "boolean"
            }
          }
        }
      ]
    }
  },
  "systemData": {
    "createdBy": "string",
    "createdByType": "string",
    "lastModifiedAt": "string"
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Storage/storageAccounts/inventoryPolicies object

Note

In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name enum Yes The name of the storage account blob inventory policy. It should always be 'default' - default
type enum Yes For JSON -inventoryPolicies
-or-
Microsoft.Storage/storageAccounts/inventoryPolicies

See Set name and type for child resources.
apiVersion enum Yes For JSON - 2021-02-01
properties object Yes Returns the storage account blob inventory policy rules. - BlobInventoryPolicyProperties object
systemData object No SystemData object

BlobInventoryPolicyProperties object

Name Type Required Value
policy object Yes The storage account blob inventory policy object. It is composed of policy rules. - BlobInventoryPolicySchema object

SystemData object

Name Type Required Value
createdBy string No The identity that created the resource.
createdByType enum No The type of identity that created the resource. - User, Application, ManagedIdentity, Key
lastModifiedAt string No The timestamp of resource last modification (UTC)

BlobInventoryPolicySchema object

Name Type Required Value
enabled boolean Yes Policy is enabled if set to true.
destination string Yes Container name where blob inventory files are stored. Must be pre-created.
type enum Yes The valid value is Inventory - Inventory
rules array Yes The storage account blob inventory policy rules. The rule is applied when it is enabled. - BlobInventoryPolicyRule object

BlobInventoryPolicyRule object

Name Type Required Value
enabled boolean Yes Rule is enabled when set to true.
name string Yes A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
definition object Yes An object that defines the blob inventory policy rule. - BlobInventoryPolicyDefinition object

BlobInventoryPolicyDefinition object

Name Type Required Value
filters object Yes An object that defines the filter set. - BlobInventoryPolicyFilter object

BlobInventoryPolicyFilter object

Name Type Required Value
prefixMatch array No An array of strings for blob prefixes to be matched. - string
blobTypes array Yes An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. - string
includeBlobVersions boolean No Includes blob versions in blob inventory when value set to true.
includeSnapshots boolean No Includes blob snapshots in blob inventory when value set to true.