BlobInventoryPolicy

class BlobInventoryPolicy : KotlinCustomResource

The storage account blob inventory policy. API Version: 2021-02-01.

Example Usage

StorageAccountSetBlobInventoryPolicy

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var blobInventoryPolicy = new AzureNative.Storage.BlobInventoryPolicy("blobInventoryPolicy", new()
{
AccountName = "sto9699",
BlobInventoryPolicyName = "default",
Policy = new AzureNative.Storage.Inputs.BlobInventoryPolicySchemaArgs
{
Destination = "containerName",
Enabled = true,
Rules = new[]
{
new AzureNative.Storage.Inputs.BlobInventoryPolicyRuleArgs
{
Definition = new AzureNative.Storage.Inputs.BlobInventoryPolicyDefinitionArgs
{
Filters = new AzureNative.Storage.Inputs.BlobInventoryPolicyFilterArgs
{
BlobTypes = new[]
{
"blockBlob",
"appendBlob",
"pageBlob",
},
IncludeBlobVersions = true,
IncludeSnapshots = true,
PrefixMatch = new[]
{
"inventoryprefix1",
"inventoryprefix2",
},
},
},
Enabled = true,
Name = "inventoryPolicyRule1",
},
},
Type = "Inventory",
},
ResourceGroupName = "res7687",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.storage.BlobInventoryPolicy;
import com.pulumi.azurenative.storage.BlobInventoryPolicyArgs;
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 blobInventoryPolicy = new BlobInventoryPolicy("blobInventoryPolicy", BlobInventoryPolicyArgs.builder()
.accountName("sto9699")
.blobInventoryPolicyName("default")
.policy(Map.ofEntries(
Map.entry("destination", "containerName"),
Map.entry("enabled", true),
Map.entry("rules", Map.ofEntries(
Map.entry("definition", Map.of("filters", Map.ofEntries(
Map.entry("blobTypes",
"blockBlob",
"appendBlob",
"pageBlob"),
Map.entry("includeBlobVersions", true),
Map.entry("includeSnapshots", true),
Map.entry("prefixMatch",
"inventoryprefix1",
"inventoryprefix2")
))),
Map.entry("enabled", true),
Map.entry("name", "inventoryPolicyRule1")
)),
Map.entry("type", "Inventory")
))
.resourceGroupName("res7687")
.build());
}
}

Import

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

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

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Returns the last modified date and time of the blob inventory policy.

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

The storage account blob inventory policy object. It is composed of policy rules.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Metadata pertaining to creation and last modification of the resource.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>