Blob Inventory Policy Args
data class BlobInventoryPolicyArgs(val accountName: Output<String>? = null, val blobInventoryPolicyName: Output<String>? = null, val policy: Output<BlobInventoryPolicySchemaArgs>? = null, val resourceGroupName: Output<String>? = null) : ConvertibleToJava<BlobInventoryPolicyArgs>
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",
});
});
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accountName: Output<String>? = null, blobInventoryPolicyName: Output<String>? = null, policy: Output<BlobInventoryPolicySchemaArgs>? = null, resourceGroupName: Output<String>? = null)
Properties
Link copied to clipboard
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.
Link copied to clipboard
The name of the storage account blob inventory policy. It should always be 'default'
Link copied to clipboard
The storage account blob inventory policy object. It is composed of policy rules.
Link copied to clipboard
The name of the resource group within the user's subscription. The name is case insensitive.