1. Packages
  2. Azure Classic
  3. API Docs
  4. storage
  5. BlobInventoryPolicy

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.storage.BlobInventoryPolicy

Explore with Pulumi AI

Manages a Storage Blob Inventory Policy.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
    name: "examplestoracc",
    resourceGroupName: example.name,
    location: example.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
    blobProperties: {
        versioningEnabled: true,
    },
});
const exampleContainer = new azure.storage.Container("example", {
    name: "examplecontainer",
    storageAccountName: exampleAccount.name,
    containerAccessType: "private",
});
const exampleBlobInventoryPolicy = new azure.storage.BlobInventoryPolicy("example", {
    storageAccountId: exampleAccount.id,
    rules: [{
        name: "rule1",
        storageContainerName: exampleContainer.name,
        format: "Csv",
        schedule: "Daily",
        scope: "Container",
        schemaFields: [
            "Name",
            "Last-Modified",
        ],
    }],
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_account = azure.storage.Account("example",
    name="examplestoracc",
    resource_group_name=example.name,
    location=example.location,
    account_tier="Standard",
    account_replication_type="LRS",
    blob_properties={
        "versioning_enabled": True,
    })
example_container = azure.storage.Container("example",
    name="examplecontainer",
    storage_account_name=example_account.name,
    container_access_type="private")
example_blob_inventory_policy = azure.storage.BlobInventoryPolicy("example",
    storage_account_id=example_account.id,
    rules=[{
        "name": "rule1",
        "storage_container_name": example_container.name,
        "format": "Csv",
        "schedule": "Daily",
        "scope": "Container",
        "schema_fields": [
            "Name",
            "Last-Modified",
        ],
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
			Name:                   pulumi.String("examplestoracc"),
			ResourceGroupName:      example.Name,
			Location:               example.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
			BlobProperties: &storage.AccountBlobPropertiesArgs{
				VersioningEnabled: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
			Name:                pulumi.String("examplecontainer"),
			StorageAccountName:  exampleAccount.Name,
			ContainerAccessType: pulumi.String("private"),
		})
		if err != nil {
			return err
		}
		_, err = storage.NewBlobInventoryPolicy(ctx, "example", &storage.BlobInventoryPolicyArgs{
			StorageAccountId: exampleAccount.ID(),
			Rules: storage.BlobInventoryPolicyRuleArray{
				&storage.BlobInventoryPolicyRuleArgs{
					Name:                 pulumi.String("rule1"),
					StorageContainerName: exampleContainer.Name,
					Format:               pulumi.String("Csv"),
					Schedule:             pulumi.String("Daily"),
					Scope:                pulumi.String("Container"),
					SchemaFields: pulumi.StringArray{
						pulumi.String("Name"),
						pulumi.String("Last-Modified"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleAccount = new Azure.Storage.Account("example", new()
    {
        Name = "examplestoracc",
        ResourceGroupName = example.Name,
        Location = example.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
        BlobProperties = new Azure.Storage.Inputs.AccountBlobPropertiesArgs
        {
            VersioningEnabled = true,
        },
    });

    var exampleContainer = new Azure.Storage.Container("example", new()
    {
        Name = "examplecontainer",
        StorageAccountName = exampleAccount.Name,
        ContainerAccessType = "private",
    });

    var exampleBlobInventoryPolicy = new Azure.Storage.BlobInventoryPolicy("example", new()
    {
        StorageAccountId = exampleAccount.Id,
        Rules = new[]
        {
            new Azure.Storage.Inputs.BlobInventoryPolicyRuleArgs
            {
                Name = "rule1",
                StorageContainerName = exampleContainer.Name,
                Format = "Csv",
                Schedule = "Daily",
                Scope = "Container",
                SchemaFields = new[]
                {
                    "Name",
                    "Last-Modified",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.inputs.AccountBlobPropertiesArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.storage.BlobInventoryPolicy;
import com.pulumi.azure.storage.BlobInventoryPolicyArgs;
import com.pulumi.azure.storage.inputs.BlobInventoryPolicyRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("examplestoracc")
            .resourceGroupName(example.name())
            .location(example.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .blobProperties(AccountBlobPropertiesArgs.builder()
                .versioningEnabled(true)
                .build())
            .build());

        var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
            .name("examplecontainer")
            .storageAccountName(exampleAccount.name())
            .containerAccessType("private")
            .build());

        var exampleBlobInventoryPolicy = new BlobInventoryPolicy("exampleBlobInventoryPolicy", BlobInventoryPolicyArgs.builder()
            .storageAccountId(exampleAccount.id())
            .rules(BlobInventoryPolicyRuleArgs.builder()
                .name("rule1")
                .storageContainerName(exampleContainer.name())
                .format("Csv")
                .schedule("Daily")
                .scope("Container")
                .schemaFields(                
                    "Name",
                    "Last-Modified")
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: examplestoracc
      resourceGroupName: ${example.name}
      location: ${example.location}
      accountTier: Standard
      accountReplicationType: LRS
      blobProperties:
        versioningEnabled: true
  exampleContainer:
    type: azure:storage:Container
    name: example
    properties:
      name: examplecontainer
      storageAccountName: ${exampleAccount.name}
      containerAccessType: private
  exampleBlobInventoryPolicy:
    type: azure:storage:BlobInventoryPolicy
    name: example
    properties:
      storageAccountId: ${exampleAccount.id}
      rules:
        - name: rule1
          storageContainerName: ${exampleContainer.name}
          format: Csv
          schedule: Daily
          scope: Container
          schemaFields:
            - Name
            - Last-Modified
Copy

Create BlobInventoryPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new BlobInventoryPolicy(name: string, args: BlobInventoryPolicyArgs, opts?: CustomResourceOptions);
@overload
def BlobInventoryPolicy(resource_name: str,
                        args: BlobInventoryPolicyArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def BlobInventoryPolicy(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        rules: Optional[Sequence[BlobInventoryPolicyRuleArgs]] = None,
                        storage_account_id: Optional[str] = None)
func NewBlobInventoryPolicy(ctx *Context, name string, args BlobInventoryPolicyArgs, opts ...ResourceOption) (*BlobInventoryPolicy, error)
public BlobInventoryPolicy(string name, BlobInventoryPolicyArgs args, CustomResourceOptions? opts = null)
public BlobInventoryPolicy(String name, BlobInventoryPolicyArgs args)
public BlobInventoryPolicy(String name, BlobInventoryPolicyArgs args, CustomResourceOptions options)
type: azure:storage:BlobInventoryPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BlobInventoryPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BlobInventoryPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BlobInventoryPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BlobInventoryPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BlobInventoryPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var blobInventoryPolicyResource = new Azure.Storage.BlobInventoryPolicy("blobInventoryPolicyResource", new()
{
    Rules = new[]
    {
        new Azure.Storage.Inputs.BlobInventoryPolicyRuleArgs
        {
            Format = "string",
            Name = "string",
            Schedule = "string",
            SchemaFields = new[]
            {
                "string",
            },
            Scope = "string",
            StorageContainerName = "string",
            Filter = new Azure.Storage.Inputs.BlobInventoryPolicyRuleFilterArgs
            {
                BlobTypes = new[]
                {
                    "string",
                },
                ExcludePrefixes = new[]
                {
                    "string",
                },
                IncludeBlobVersions = false,
                IncludeDeleted = false,
                IncludeSnapshots = false,
                PrefixMatches = new[]
                {
                    "string",
                },
            },
        },
    },
    StorageAccountId = "string",
});
Copy
example, err := storage.NewBlobInventoryPolicy(ctx, "blobInventoryPolicyResource", &storage.BlobInventoryPolicyArgs{
	Rules: storage.BlobInventoryPolicyRuleArray{
		&storage.BlobInventoryPolicyRuleArgs{
			Format:   pulumi.String("string"),
			Name:     pulumi.String("string"),
			Schedule: pulumi.String("string"),
			SchemaFields: pulumi.StringArray{
				pulumi.String("string"),
			},
			Scope:                pulumi.String("string"),
			StorageContainerName: pulumi.String("string"),
			Filter: &storage.BlobInventoryPolicyRuleFilterArgs{
				BlobTypes: pulumi.StringArray{
					pulumi.String("string"),
				},
				ExcludePrefixes: pulumi.StringArray{
					pulumi.String("string"),
				},
				IncludeBlobVersions: pulumi.Bool(false),
				IncludeDeleted:      pulumi.Bool(false),
				IncludeSnapshots:    pulumi.Bool(false),
				PrefixMatches: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
	},
	StorageAccountId: pulumi.String("string"),
})
Copy
var blobInventoryPolicyResource = new BlobInventoryPolicy("blobInventoryPolicyResource", BlobInventoryPolicyArgs.builder()
    .rules(BlobInventoryPolicyRuleArgs.builder()
        .format("string")
        .name("string")
        .schedule("string")
        .schemaFields("string")
        .scope("string")
        .storageContainerName("string")
        .filter(BlobInventoryPolicyRuleFilterArgs.builder()
            .blobTypes("string")
            .excludePrefixes("string")
            .includeBlobVersions(false)
            .includeDeleted(false)
            .includeSnapshots(false)
            .prefixMatches("string")
            .build())
        .build())
    .storageAccountId("string")
    .build());
Copy
blob_inventory_policy_resource = azure.storage.BlobInventoryPolicy("blobInventoryPolicyResource",
    rules=[{
        "format": "string",
        "name": "string",
        "schedule": "string",
        "schema_fields": ["string"],
        "scope": "string",
        "storage_container_name": "string",
        "filter": {
            "blob_types": ["string"],
            "exclude_prefixes": ["string"],
            "include_blob_versions": False,
            "include_deleted": False,
            "include_snapshots": False,
            "prefix_matches": ["string"],
        },
    }],
    storage_account_id="string")
Copy
const blobInventoryPolicyResource = new azure.storage.BlobInventoryPolicy("blobInventoryPolicyResource", {
    rules: [{
        format: "string",
        name: "string",
        schedule: "string",
        schemaFields: ["string"],
        scope: "string",
        storageContainerName: "string",
        filter: {
            blobTypes: ["string"],
            excludePrefixes: ["string"],
            includeBlobVersions: false,
            includeDeleted: false,
            includeSnapshots: false,
            prefixMatches: ["string"],
        },
    }],
    storageAccountId: "string",
});
Copy
type: azure:storage:BlobInventoryPolicy
properties:
    rules:
        - filter:
            blobTypes:
                - string
            excludePrefixes:
                - string
            includeBlobVersions: false
            includeDeleted: false
            includeSnapshots: false
            prefixMatches:
                - string
          format: string
          name: string
          schedule: string
          schemaFields:
            - string
          scope: string
          storageContainerName: string
    storageAccountId: string
Copy

BlobInventoryPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The BlobInventoryPolicy resource accepts the following input properties:

Rules This property is required. List<BlobInventoryPolicyRule>
One or more rules blocks as defined below.
StorageAccountId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
Rules This property is required. []BlobInventoryPolicyRuleArgs
One or more rules blocks as defined below.
StorageAccountId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules This property is required. List<BlobInventoryPolicyRule>
One or more rules blocks as defined below.
storageAccountId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules This property is required. BlobInventoryPolicyRule[]
One or more rules blocks as defined below.
storageAccountId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules This property is required. Sequence[BlobInventoryPolicyRuleArgs]
One or more rules blocks as defined below.
storage_account_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules This property is required. List<Property Map>
One or more rules blocks as defined below.
storageAccountId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the BlobInventoryPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing BlobInventoryPolicy Resource

Get an existing BlobInventoryPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BlobInventoryPolicyState, opts?: CustomResourceOptions): BlobInventoryPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        rules: Optional[Sequence[BlobInventoryPolicyRuleArgs]] = None,
        storage_account_id: Optional[str] = None) -> BlobInventoryPolicy
func GetBlobInventoryPolicy(ctx *Context, name string, id IDInput, state *BlobInventoryPolicyState, opts ...ResourceOption) (*BlobInventoryPolicy, error)
public static BlobInventoryPolicy Get(string name, Input<string> id, BlobInventoryPolicyState? state, CustomResourceOptions? opts = null)
public static BlobInventoryPolicy get(String name, Output<String> id, BlobInventoryPolicyState state, CustomResourceOptions options)
resources:  _:    type: azure:storage:BlobInventoryPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Rules List<BlobInventoryPolicyRule>
One or more rules blocks as defined below.
StorageAccountId Changes to this property will trigger replacement. string
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
Rules []BlobInventoryPolicyRuleArgs
One or more rules blocks as defined below.
StorageAccountId Changes to this property will trigger replacement. string
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules List<BlobInventoryPolicyRule>
One or more rules blocks as defined below.
storageAccountId Changes to this property will trigger replacement. String
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules BlobInventoryPolicyRule[]
One or more rules blocks as defined below.
storageAccountId Changes to this property will trigger replacement. string
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules Sequence[BlobInventoryPolicyRuleArgs]
One or more rules blocks as defined below.
storage_account_id Changes to this property will trigger replacement. str
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
rules List<Property Map>
One or more rules blocks as defined below.
storageAccountId Changes to this property will trigger replacement. String
The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.

Supporting Types

BlobInventoryPolicyRule
, BlobInventoryPolicyRuleArgs

Format This property is required. string
The format of the inventory files. Possible values are Csv and Parquet.
Name This property is required. string
The name which should be used for this Blob Inventory Policy Rule.
Schedule This property is required. string
The inventory schedule applied by this rule. Possible values are Daily and Weekly.
SchemaFields This property is required. List<string>
A list of fields to be included in the inventory. See the Azure API reference for all the supported fields.
Scope This property is required. string
The scope of the inventory for this rule. Possible values are Blob and Container.
StorageContainerName This property is required. string
The storage container name to store the blob inventory files for this rule.
Filter BlobInventoryPolicyRuleFilter
A filter block as defined above.
Format This property is required. string
The format of the inventory files. Possible values are Csv and Parquet.
Name This property is required. string
The name which should be used for this Blob Inventory Policy Rule.
Schedule This property is required. string
The inventory schedule applied by this rule. Possible values are Daily and Weekly.
SchemaFields This property is required. []string
A list of fields to be included in the inventory. See the Azure API reference for all the supported fields.
Scope This property is required. string
The scope of the inventory for this rule. Possible values are Blob and Container.
StorageContainerName This property is required. string
The storage container name to store the blob inventory files for this rule.
Filter BlobInventoryPolicyRuleFilter
A filter block as defined above.
format This property is required. String
The format of the inventory files. Possible values are Csv and Parquet.
name This property is required. String
The name which should be used for this Blob Inventory Policy Rule.
schedule This property is required. String
The inventory schedule applied by this rule. Possible values are Daily and Weekly.
schemaFields This property is required. List<String>
A list of fields to be included in the inventory. See the Azure API reference for all the supported fields.
scope This property is required. String
The scope of the inventory for this rule. Possible values are Blob and Container.
storageContainerName This property is required. String
The storage container name to store the blob inventory files for this rule.
filter BlobInventoryPolicyRuleFilter
A filter block as defined above.
format This property is required. string
The format of the inventory files. Possible values are Csv and Parquet.
name This property is required. string
The name which should be used for this Blob Inventory Policy Rule.
schedule This property is required. string
The inventory schedule applied by this rule. Possible values are Daily and Weekly.
schemaFields This property is required. string[]
A list of fields to be included in the inventory. See the Azure API reference for all the supported fields.
scope This property is required. string
The scope of the inventory for this rule. Possible values are Blob and Container.
storageContainerName This property is required. string
The storage container name to store the blob inventory files for this rule.
filter BlobInventoryPolicyRuleFilter
A filter block as defined above.
format This property is required. str
The format of the inventory files. Possible values are Csv and Parquet.
name This property is required. str
The name which should be used for this Blob Inventory Policy Rule.
schedule This property is required. str
The inventory schedule applied by this rule. Possible values are Daily and Weekly.
schema_fields This property is required. Sequence[str]
A list of fields to be included in the inventory. See the Azure API reference for all the supported fields.
scope This property is required. str
The scope of the inventory for this rule. Possible values are Blob and Container.
storage_container_name This property is required. str
The storage container name to store the blob inventory files for this rule.
filter BlobInventoryPolicyRuleFilter
A filter block as defined above.
format This property is required. String
The format of the inventory files. Possible values are Csv and Parquet.
name This property is required. String
The name which should be used for this Blob Inventory Policy Rule.
schedule This property is required. String
The inventory schedule applied by this rule. Possible values are Daily and Weekly.
schemaFields This property is required. List<String>
A list of fields to be included in the inventory. See the Azure API reference for all the supported fields.
scope This property is required. String
The scope of the inventory for this rule. Possible values are Blob and Container.
storageContainerName This property is required. String
The storage container name to store the blob inventory files for this rule.
filter Property Map
A filter block as defined above.

BlobInventoryPolicyRuleFilter
, BlobInventoryPolicyRuleFilterArgs

BlobTypes This property is required. List<string>

A set of blob types. Possible values are blockBlob, appendBlob, and pageBlob. The storage account with is_hns_enabled is true doesn't support pageBlob.

NOTE: The rules.*.schema_fields for this rule has to include BlobType so that you can specify the blob_types.

ExcludePrefixes List<string>
A set of strings for blob prefixes to be excluded. Maximum of 10 blob prefixes.
IncludeBlobVersions bool

Includes blob versions in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include IsCurrentVersion and VersionId so that you can specify the include_blob_versions.

IncludeDeleted bool

Includes deleted blobs in blob inventory or not? Defaults to false.

NOTE: If rules.*.scope is Container, the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob, the rules.*.schema_fields must include Deleted and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob and the storage account specified by storage_account_id has hierarchical namespaces enabled (is_hns_enabled is true on the storage account), the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted.

IncludeSnapshots bool

Includes blob snapshots in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include Snapshot so that you can specify the include_snapshots.

PrefixMatches List<string>
A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes.
BlobTypes This property is required. []string

A set of blob types. Possible values are blockBlob, appendBlob, and pageBlob. The storage account with is_hns_enabled is true doesn't support pageBlob.

NOTE: The rules.*.schema_fields for this rule has to include BlobType so that you can specify the blob_types.

ExcludePrefixes []string
A set of strings for blob prefixes to be excluded. Maximum of 10 blob prefixes.
IncludeBlobVersions bool

Includes blob versions in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include IsCurrentVersion and VersionId so that you can specify the include_blob_versions.

IncludeDeleted bool

Includes deleted blobs in blob inventory or not? Defaults to false.

NOTE: If rules.*.scope is Container, the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob, the rules.*.schema_fields must include Deleted and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob and the storage account specified by storage_account_id has hierarchical namespaces enabled (is_hns_enabled is true on the storage account), the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted.

IncludeSnapshots bool

Includes blob snapshots in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include Snapshot so that you can specify the include_snapshots.

PrefixMatches []string
A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes.
blobTypes This property is required. List<String>

A set of blob types. Possible values are blockBlob, appendBlob, and pageBlob. The storage account with is_hns_enabled is true doesn't support pageBlob.

NOTE: The rules.*.schema_fields for this rule has to include BlobType so that you can specify the blob_types.

excludePrefixes List<String>
A set of strings for blob prefixes to be excluded. Maximum of 10 blob prefixes.
includeBlobVersions Boolean

Includes blob versions in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include IsCurrentVersion and VersionId so that you can specify the include_blob_versions.

includeDeleted Boolean

Includes deleted blobs in blob inventory or not? Defaults to false.

NOTE: If rules.*.scope is Container, the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob, the rules.*.schema_fields must include Deleted and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob and the storage account specified by storage_account_id has hierarchical namespaces enabled (is_hns_enabled is true on the storage account), the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted.

includeSnapshots Boolean

Includes blob snapshots in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include Snapshot so that you can specify the include_snapshots.

prefixMatches List<String>
A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes.
blobTypes This property is required. string[]

A set of blob types. Possible values are blockBlob, appendBlob, and pageBlob. The storage account with is_hns_enabled is true doesn't support pageBlob.

NOTE: The rules.*.schema_fields for this rule has to include BlobType so that you can specify the blob_types.

excludePrefixes string[]
A set of strings for blob prefixes to be excluded. Maximum of 10 blob prefixes.
includeBlobVersions boolean

Includes blob versions in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include IsCurrentVersion and VersionId so that you can specify the include_blob_versions.

includeDeleted boolean

Includes deleted blobs in blob inventory or not? Defaults to false.

NOTE: If rules.*.scope is Container, the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob, the rules.*.schema_fields must include Deleted and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob and the storage account specified by storage_account_id has hierarchical namespaces enabled (is_hns_enabled is true on the storage account), the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted.

includeSnapshots boolean

Includes blob snapshots in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include Snapshot so that you can specify the include_snapshots.

prefixMatches string[]
A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes.
blob_types This property is required. Sequence[str]

A set of blob types. Possible values are blockBlob, appendBlob, and pageBlob. The storage account with is_hns_enabled is true doesn't support pageBlob.

NOTE: The rules.*.schema_fields for this rule has to include BlobType so that you can specify the blob_types.

exclude_prefixes Sequence[str]
A set of strings for blob prefixes to be excluded. Maximum of 10 blob prefixes.
include_blob_versions bool

Includes blob versions in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include IsCurrentVersion and VersionId so that you can specify the include_blob_versions.

include_deleted bool

Includes deleted blobs in blob inventory or not? Defaults to false.

NOTE: If rules.*.scope is Container, the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob, the rules.*.schema_fields must include Deleted and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob and the storage account specified by storage_account_id has hierarchical namespaces enabled (is_hns_enabled is true on the storage account), the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted.

include_snapshots bool

Includes blob snapshots in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include Snapshot so that you can specify the include_snapshots.

prefix_matches Sequence[str]
A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes.
blobTypes This property is required. List<String>

A set of blob types. Possible values are blockBlob, appendBlob, and pageBlob. The storage account with is_hns_enabled is true doesn't support pageBlob.

NOTE: The rules.*.schema_fields for this rule has to include BlobType so that you can specify the blob_types.

excludePrefixes List<String>
A set of strings for blob prefixes to be excluded. Maximum of 10 blob prefixes.
includeBlobVersions Boolean

Includes blob versions in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include IsCurrentVersion and VersionId so that you can specify the include_blob_versions.

includeDeleted Boolean

Includes deleted blobs in blob inventory or not? Defaults to false.

NOTE: If rules.*.scope is Container, the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob, the rules.*.schema_fields must include Deleted and RemainingRetentionDays so that you can specify the include_deleted. If rules.*.scope is Blob and the storage account specified by storage_account_id has hierarchical namespaces enabled (is_hns_enabled is true on the storage account), the rules.*.schema_fields for this rule must include Deleted, Version, DeletedTime, and RemainingRetentionDays so that you can specify the include_deleted.

includeSnapshots Boolean

Includes blob snapshots in blob inventory or not? Defaults to false.

NOTE: The rules.*.schema_fields for this rule has to include Snapshot so that you can specify the include_snapshots.

prefixMatches List<String>
A set of strings for blob prefixes to be matched. Maximum of 10 blob prefixes.

Import

Storage Blob Inventory Policies can be imported using the resource id, e.g.

$ pulumi import azure:storage/blobInventoryPolicy:BlobInventoryPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/storageAccount1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.