Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

BlobInventoryPolicy

The storage account blob inventory policy.

Example Usage

StorageAccountSetBlobInventoryPolicy

using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;

class MyStack : Stack
{
    public MyStack()
    {
        var blobInventoryPolicy = new AzureNextGen.Storage.V20200801Preview.BlobInventoryPolicy("blobInventoryPolicy", new AzureNextGen.Storage.V20200801Preview.BlobInventoryPolicyArgs
        {
            AccountName = "sto9699",
            BlobInventoryPolicyName = "default",
            Policy = new AzureNextGen.Storage.V20200801Preview.Inputs.BlobInventoryPolicySchemaArgs
            {
                Destination = "containerName",
                Enabled = true,
                Rules = 
                {
                    new AzureNextGen.Storage.V20200801Preview.Inputs.BlobInventoryPolicyRuleArgs
                    {
                        Definition = new AzureNextGen.Storage.V20200801Preview.Inputs.BlobInventoryPolicyDefinitionArgs
                        {
                            Filters = new AzureNextGen.Storage.V20200801Preview.Inputs.BlobInventoryPolicyFilterArgs
                            {
                                BlobTypes = 
                                {
                                    "blockBlob",
                                    "appendBlob",
                                    "pageBlob",
                                },
                                IncludeBlobVersions = true,
                                IncludeSnapshots = true,
                                PrefixMatch = 
                                {
                                    "inventoryprefix1",
                                    "inventoryprefix2",
                                },
                            },
                        },
                        Enabled = true,
                        Name = "inventoryPolicyRule1",
                    },
                },
                Type = "Inventory",
            },
            ResourceGroupName = "res7687",
        });
    }

}
package main

import (
    storage "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/storage/v20200801preview"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := storage.NewBlobInventoryPolicy(ctx, "blobInventoryPolicy", &storage.BlobInventoryPolicyArgs{
            AccountName:             pulumi.String("sto9699"),
            BlobInventoryPolicyName: pulumi.String("default"),
            Policy: &storage.BlobInventoryPolicySchemaArgs{
                Destination: pulumi.String("containerName"),
                Enabled:     pulumi.Bool(true),
                Rules: storage.BlobInventoryPolicyRuleArray{
                    &storage.BlobInventoryPolicyRuleArgs{
                        Definition: &storage.BlobInventoryPolicyDefinitionArgs{
                            Filters: &storage.BlobInventoryPolicyFilterArgs{
                                BlobTypes: pulumi.StringArray{
                                    pulumi.String("blockBlob"),
                                    pulumi.String("appendBlob"),
                                    pulumi.String("pageBlob"),
                                },
                                IncludeBlobVersions: pulumi.Bool(true),
                                IncludeSnapshots:    pulumi.Bool(true),
                                PrefixMatch: pulumi.StringArray{
                                    pulumi.String("inventoryprefix1"),
                                    pulumi.String("inventoryprefix2"),
                                },
                            },
                        },
                        Enabled: pulumi.Bool(true),
                        Name:    pulumi.String("inventoryPolicyRule1"),
                    },
                },
                Type: pulumi.String("Inventory"),
            },
            ResourceGroupName: pulumi.String("res7687"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure_nextgen as azure_nextgen

blob_inventory_policy = azure_nextgen.storage.v20200801preview.BlobInventoryPolicy("blobInventoryPolicy",
    account_name="sto9699",
    blob_inventory_policy_name="default",
    policy=azure_nextgen.storage.v20200801preview.BlobInventoryPolicySchemaArgs(
        destination="containerName",
        enabled=True,
        rules=[azure_nextgen.storage.v20200801preview.BlobInventoryPolicyRuleArgs(
            definition=azure_nextgen.storage.v20200801preview.BlobInventoryPolicyDefinitionArgs(
                filters=azure_nextgen.storage.v20200801preview.BlobInventoryPolicyFilterArgs(
                    blob_types=[
                        "blockBlob",
                        "appendBlob",
                        "pageBlob",
                    ],
                    include_blob_versions=True,
                    include_snapshots=True,
                    prefix_match=[
                        "inventoryprefix1",
                        "inventoryprefix2",
                    ],
                ),
            ),
            enabled=True,
            name="inventoryPolicyRule1",
        )],
        type="Inventory",
    ),
    resource_group_name="res7687")
import * as pulumi from "@pulumi/pulumi";
import * as azure_nextgen from "@pulumi/azure-nextgen";

const blobInventoryPolicy = new azure_nextgen.storage.v20200801preview.BlobInventoryPolicy("blobInventoryPolicy", {
    accountName: "sto9699",
    blobInventoryPolicyName: "default",
    policy: {
        destination: "containerName",
        enabled: true,
        rules: [{
            definition: {
                filters: {
                    blobTypes: [
                        "blockBlob",
                        "appendBlob",
                        "pageBlob",
                    ],
                    includeBlobVersions: true,
                    includeSnapshots: true,
                    prefixMatch: [
                        "inventoryprefix1",
                        "inventoryprefix2",
                    ],
                },
            },
            enabled: true,
            name: "inventoryPolicyRule1",
        }],
        type: "Inventory",
    },
    resourceGroupName: "res7687",
});

Create a BlobInventoryPolicy Resource

new BlobInventoryPolicy(name: string, args: BlobInventoryPolicyArgs, opts?: CustomResourceOptions);
def BlobInventoryPolicy(resource_name: str, opts: Optional[ResourceOptions] = None, account_name: Optional[str] = None, blob_inventory_policy_name: Optional[str] = None, policy: Optional[BlobInventoryPolicySchemaArgs] = None, resource_group_name: Optional[str] = None)
func NewBlobInventoryPolicy(ctx *Context, name string, args BlobInventoryPolicyArgs, opts ...ResourceOption) (*BlobInventoryPolicy, error)
public BlobInventoryPolicy(string name, BlobInventoryPolicyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args BlobInventoryPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BlobInventoryPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BlobInventoryPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

BlobInventoryPolicy Resource Properties

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

Inputs

The BlobInventoryPolicy resource accepts the following input properties:

AccountName 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.
BlobInventoryPolicyName string
The name of the storage account blob inventory policy. It should always be ‘default’
Policy Pulumi.AzureNextGen.Storage.Inputs.BlobInventoryPolicySchemaArgs
The storage account blob inventory policy object. It is composed of policy rules.
ResourceGroupName string
The name of the resource group within the user’s subscription. The name is case insensitive.
AccountName 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.
BlobInventoryPolicyName string
The name of the storage account blob inventory policy. It should always be ‘default’
Policy BlobInventoryPolicySchema
The storage account blob inventory policy object. It is composed of policy rules.
ResourceGroupName string
The name of the resource group within the user’s subscription. The name is case insensitive.
accountName 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.
blobInventoryPolicyName string
The name of the storage account blob inventory policy. It should always be ‘default’
policy BlobInventoryPolicySchema
The storage account blob inventory policy object. It is composed of policy rules.
resourceGroupName string
The name of the resource group within the user’s subscription. The name is case insensitive.
account_name str
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.
blob_inventory_policy_name str
The name of the storage account blob inventory policy. It should always be ‘default’
policy BlobInventoryPolicySchemaArgs
The storage account blob inventory policy object. It is composed of policy rules.
resource_group_name str
The name of the resource group within the user’s subscription. The name is case insensitive.

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.
LastModifiedTime string
Returns the last modified date and time of the blob inventory policy.
Name string
The name of the resource
SystemData Pulumi.AzureNextGen.Storage.Outputs.SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
Id string
The provider-assigned unique ID for this managed resource.
LastModifiedTime string
Returns the last modified date and time of the blob inventory policy.
Name string
The name of the resource
SystemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
id string
The provider-assigned unique ID for this managed resource.
lastModifiedTime string
Returns the last modified date and time of the blob inventory policy.
name string
The name of the resource
systemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
id str
The provider-assigned unique ID for this managed resource.
last_modified_time str
Returns the last modified date and time of the blob inventory policy.
name str
The name of the resource
system_data SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type str
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”

Supporting Types

BlobInventoryPolicyDefinition

Filters Pulumi.AzureNextGen.Storage.Inputs.BlobInventoryPolicyFilterArgs
An object that defines the filter set.
Filters BlobInventoryPolicyFilter
An object that defines the filter set.
filters BlobInventoryPolicyFilter
An object that defines the filter set.
filters BlobInventoryPolicyFilterArgs
An object that defines the filter set.

BlobInventoryPolicyDefinitionResponse

Filters Pulumi.AzureNextGen.Storage.Inputs.BlobInventoryPolicyFilterResponseArgs
An object that defines the filter set.
Filters BlobInventoryPolicyFilterResponse
An object that defines the filter set.
filters BlobInventoryPolicyFilterResponse
An object that defines the filter set.
filters BlobInventoryPolicyFilterResponseArgs
An object that defines the filter set.

BlobInventoryPolicyFilter

BlobTypes List<string>
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
IncludeBlobVersions bool
Includes blob versions in blob inventory when value set to true.
IncludeSnapshots bool
Includes blob snapshots in blob inventory when value set to true.
PrefixMatch List<string>
An array of strings for blob prefixes to be matched.
BlobTypes []string
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
IncludeBlobVersions bool
Includes blob versions in blob inventory when value set to true.
IncludeSnapshots bool
Includes blob snapshots in blob inventory when value set to true.
PrefixMatch []string
An array of strings for blob prefixes to be matched.
blobTypes string[]
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
includeBlobVersions boolean
Includes blob versions in blob inventory when value set to true.
includeSnapshots boolean
Includes blob snapshots in blob inventory when value set to true.
prefixMatch string[]
An array of strings for blob prefixes to be matched.
blob_types Sequence[str]
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
include_blob_versions bool
Includes blob versions in blob inventory when value set to true.
include_snapshots bool
Includes blob snapshots in blob inventory when value set to true.
prefix_match Sequence[str]
An array of strings for blob prefixes to be matched.

BlobInventoryPolicyFilterResponse

BlobTypes List<string>
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
IncludeBlobVersions bool
Includes blob versions in blob inventory when value set to true.
IncludeSnapshots bool
Includes blob snapshots in blob inventory when value set to true.
PrefixMatch List<string>
An array of strings for blob prefixes to be matched.
BlobTypes []string
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
IncludeBlobVersions bool
Includes blob versions in blob inventory when value set to true.
IncludeSnapshots bool
Includes blob snapshots in blob inventory when value set to true.
PrefixMatch []string
An array of strings for blob prefixes to be matched.
blobTypes string[]
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
includeBlobVersions boolean
Includes blob versions in blob inventory when value set to true.
includeSnapshots boolean
Includes blob snapshots in blob inventory when value set to true.
prefixMatch string[]
An array of strings for blob prefixes to be matched.
blob_types Sequence[str]
An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs.
include_blob_versions bool
Includes blob versions in blob inventory when value set to true.
include_snapshots bool
Includes blob snapshots in blob inventory when value set to true.
prefix_match Sequence[str]
An array of strings for blob prefixes to be matched.

BlobInventoryPolicyRule

Definition Pulumi.AzureNextGen.Storage.Inputs.BlobInventoryPolicyDefinitionArgs
An object that defines the blob inventory policy rule.
Enabled bool
Rule is enabled when set to true.
Name string
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
Definition BlobInventoryPolicyDefinition
An object that defines the blob inventory policy rule.
Enabled bool
Rule is enabled when set to true.
Name string
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
definition BlobInventoryPolicyDefinition
An object that defines the blob inventory policy rule.
enabled boolean
Rule is enabled when set to true.
name string
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
definition BlobInventoryPolicyDefinitionArgs
An object that defines the blob inventory policy rule.
enabled bool
Rule is enabled when set to true.
name str
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.

BlobInventoryPolicyRuleResponse

Definition Pulumi.AzureNextGen.Storage.Inputs.BlobInventoryPolicyDefinitionResponseArgs
An object that defines the blob inventory policy rule.
Enabled bool
Rule is enabled when set to true.
Name string
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
Definition BlobInventoryPolicyDefinitionResponse
An object that defines the blob inventory policy rule.
Enabled bool
Rule is enabled when set to true.
Name string
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
definition BlobInventoryPolicyDefinitionResponse
An object that defines the blob inventory policy rule.
enabled boolean
Rule is enabled when set to true.
name string
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.
definition BlobInventoryPolicyDefinitionResponseArgs
An object that defines the blob inventory policy rule.
enabled bool
Rule is enabled when set to true.
name str
A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.

BlobInventoryPolicySchema

Destination string
Container name where blob inventory files are stored. Must be pre-created.
Enabled bool
Policy is enabled if set to true.
Rules List<Pulumi.AzureNextGen.Storage.Inputs.BlobInventoryPolicyRuleArgs>
The storage account blob inventory policy rules. The rule is applied when it is enabled.
Type string | Pulumi.AzureNextGen.Storage.InventoryRuleType
The valid value is Inventory
Destination string
Container name where blob inventory files are stored. Must be pre-created.
Enabled bool
Policy is enabled if set to true.
Rules []BlobInventoryPolicyRule
The storage account blob inventory policy rules. The rule is applied when it is enabled.
Type string | InventoryRuleType
The valid value is Inventory
destination string
Container name where blob inventory files are stored. Must be pre-created.
enabled boolean
Policy is enabled if set to true.
rules BlobInventoryPolicyRule[]
The storage account blob inventory policy rules. The rule is applied when it is enabled.
type string | InventoryRuleType
The valid value is Inventory
destination str
Container name where blob inventory files are stored. Must be pre-created.
enabled bool
Policy is enabled if set to true.
rules Sequence[BlobInventoryPolicyRuleArgs]
The storage account blob inventory policy rules. The rule is applied when it is enabled.
type str | InventoryRuleType
The valid value is Inventory

BlobInventoryPolicySchemaResponse

Destination string
Container name where blob inventory files are stored. Must be pre-created.
Enabled bool
Policy is enabled if set to true.
Rules List<Pulumi.AzureNextGen.Storage.Inputs.BlobInventoryPolicyRuleResponseArgs>
The storage account blob inventory policy rules. The rule is applied when it is enabled.
Type string
The valid value is Inventory
Destination string
Container name where blob inventory files are stored. Must be pre-created.
Enabled bool
Policy is enabled if set to true.
Rules []BlobInventoryPolicyRuleResponse
The storage account blob inventory policy rules. The rule is applied when it is enabled.
Type string
The valid value is Inventory
destination string
Container name where blob inventory files are stored. Must be pre-created.
enabled boolean
Policy is enabled if set to true.
rules BlobInventoryPolicyRuleResponse[]
The storage account blob inventory policy rules. The rule is applied when it is enabled.
type string
The valid value is Inventory
destination str
Container name where blob inventory files are stored. Must be pre-created.
enabled bool
Policy is enabled if set to true.
rules Sequence[BlobInventoryPolicyRuleResponseArgs]
The storage account blob inventory policy rules. The rule is applied when it is enabled.
type str
The valid value is Inventory

InventoryRuleType

Inventory
Inventory
InventoryRuleTypeInventory
Inventory
Inventory
Inventory
INVENTORY
Inventory

SystemDataResponse

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The type of identity that last modified the resource.
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The type of identity that last modified the resource.
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-nextgen:storage/v20200801preview:BlobInventoryPolicy DefaultInventoryPolicy /subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-nextgen
License
Apache-2.0