BlobInventoryPolicyArgs

data class BlobInventoryPolicyArgs(val rules: Output<List<BlobInventoryPolicyRuleArgs>>? = null, val storageAccountId: Output<String>? = null) : ConvertibleToJava<BlobInventoryPolicyArgs>

Manages a Storage Blob Inventory Policy.

Example Usage

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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.blobProperties(AccountBlobPropertiesArgs.builder()
.versioningEnabled(true)
.build())
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.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());
}
}

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/inventoryPolicies/inventoryPolicy1

Constructors

Link copied to clipboard
fun BlobInventoryPolicyArgs(rules: Output<List<BlobInventoryPolicyRuleArgs>>? = null, storageAccountId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): BlobInventoryPolicyArgs

Properties

Link copied to clipboard
val rules: Output<List<BlobInventoryPolicyRuleArgs>>? = null

One or more rules blocks as defined below.

Link copied to clipboard
val storageAccountId: Output<String>? = null

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.