Inventory Args
data class InventoryArgs(val bucket: Output<String>? = null, val destination: Output<InventoryDestinationArgs>? = null, val enabled: Output<Boolean>? = null, val filter: Output<InventoryFilterArgs>? = null, val includedObjectVersions: Output<String>? = null, val name: Output<String>? = null, val optionalFields: Output<List<String>>? = null, val schedule: Output<InventoryScheduleArgs>? = null) : ConvertibleToJava<InventoryArgs>
Provides a S3 bucket inventory configuration resource.
Example Usage
Add inventory configuration
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.Inventory;
import com.pulumi.aws.s3.InventoryArgs;
import com.pulumi.aws.s3.inputs.InventoryScheduleArgs;
import com.pulumi.aws.s3.inputs.InventoryDestinationArgs;
import com.pulumi.aws.s3.inputs.InventoryDestinationBucketArgs;
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 testBucketV2 = new BucketV2("testBucketV2");
var inventory = new BucketV2("inventory");
var testInventory = new Inventory("testInventory", InventoryArgs.builder()
.bucket(testBucketV2.id())
.includedObjectVersions("All")
.schedule(InventoryScheduleArgs.builder()
.frequency("Daily")
.build())
.destination(InventoryDestinationArgs.builder()
.bucket(InventoryDestinationBucketArgs.builder()
.format("ORC")
.bucketArn(inventory.arn())
.build())
.build())
.build());
}
}
Content copied to clipboard
Add inventory configuration with S3 object prefix
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.Inventory;
import com.pulumi.aws.s3.InventoryArgs;
import com.pulumi.aws.s3.inputs.InventoryScheduleArgs;
import com.pulumi.aws.s3.inputs.InventoryFilterArgs;
import com.pulumi.aws.s3.inputs.InventoryDestinationArgs;
import com.pulumi.aws.s3.inputs.InventoryDestinationBucketArgs;
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 test = new BucketV2("test");
var inventory = new BucketV2("inventory");
var test_prefix = new Inventory("test-prefix", InventoryArgs.builder()
.bucket(test.id())
.includedObjectVersions("All")
.schedule(InventoryScheduleArgs.builder()
.frequency("Daily")
.build())
.filter(InventoryFilterArgs.builder()
.prefix("documents/")
.build())
.destination(InventoryDestinationArgs.builder()
.bucket(InventoryDestinationBucketArgs.builder()
.format("ORC")
.bucketArn(inventory.arn())
.prefix("inventory")
.build())
.build())
.build());
}
}
Content copied to clipboard
Import
S3 bucket inventory configurations can be imported using bucket:inventory
, e.g.,
$ pulumi import aws:s3/inventory:Inventory my-bucket-entire-bucket my-bucket:EntireBucket
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(bucket: Output<String>? = null, destination: Output<InventoryDestinationArgs>? = null, enabled: Output<Boolean>? = null, filter: Output<InventoryFilterArgs>? = null, includedObjectVersions: Output<String>? = null, name: Output<String>? = null, optionalFields: Output<List<String>>? = null, schedule: Output<InventoryScheduleArgs>? = null)
Properties
Link copied to clipboard
Contains information about where to publish the inventory results (documented below).
Link copied to clipboard
Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria (documented below).
Link copied to clipboard
Object versions to include in the inventory list. Valid values: All
, Current
.
Link copied to clipboard
List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
Link copied to clipboard
Specifies the schedule for generating inventory results (documented below).