published on Tuesday, Sep 8, 2026 by Pulumi
published on Tuesday, Sep 8, 2026 by Pulumi
Provides a S3 bucket inventory configuration resource.
Example Usage
Add inventory configuration
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.s3.Bucket("test", {bucket: "my-tf-test-bucket"});
const inventory = new aws.s3.Bucket("inventory", {bucket: "my-tf-inventory-bucket"});
const testInventory = new aws.s3.Inventory("test", {
schedule: {
frequency: "Daily",
},
destination: {
bucket: {
format: "ORC",
bucketArn: inventory.arn,
},
},
bucket: test.id,
name: "EntireBucketDaily",
includedObjectVersions: "All",
});
import pulumi
import pulumi_aws as aws
test = aws.s3.Bucket("test", bucket="my-tf-test-bucket")
inventory = aws.s3.Bucket("inventory", bucket="my-tf-inventory-bucket")
test_inventory = aws.s3.Inventory("test",
schedule={
"frequency": "Daily",
},
destination={
"bucket": {
"format": "ORC",
"bucket_arn": inventory.arn,
},
},
bucket=test.id,
name="EntireBucketDaily",
included_object_versions="All")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := s3.NewBucket(ctx, "test", &s3.BucketArgs{
Bucket: pulumi.String("my-tf-test-bucket"),
})
if err != nil {
return err
}
inventory, err := s3.NewBucket(ctx, "inventory", &s3.BucketArgs{
Bucket: pulumi.String("my-tf-inventory-bucket"),
})
if err != nil {
return err
}
_, err = s3.NewInventory(ctx, "test", &s3.InventoryArgs{
Schedule: &s3.InventoryScheduleArgs{
Frequency: pulumi.String("Daily"),
},
Destination: &s3.InventoryDestinationArgs{
Bucket: &s3.InventoryDestinationBucketArgs{
Format: pulumi.String("ORC"),
BucketArn: inventory.Arn,
},
},
Bucket: test.ID().ToIDOutput().ToStringOutput(),
Name: pulumi.String("EntireBucketDaily"),
IncludedObjectVersions: pulumi.String("All"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.S3.Bucket("test", new()
{
BucketName = "my-tf-test-bucket",
});
var inventory = new Aws.S3.Bucket("inventory", new()
{
BucketName = "my-tf-inventory-bucket",
});
var testInventory = new Aws.S3.Inventory("test", new()
{
Schedule = new Aws.S3.Inputs.InventoryScheduleArgs
{
Frequency = "Daily",
},
Destination = new Aws.S3.Inputs.InventoryDestinationArgs
{
Bucket = new Aws.S3.Inputs.InventoryDestinationBucketArgs
{
Format = "ORC",
BucketArn = inventory.Arn,
},
},
Bucket = test.Id,
Name = "EntireBucketDaily",
IncludedObjectVersions = "All",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.Bucket;
import com.pulumi.aws.s3.BucketArgs;
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.ArrayList;
import java.util.Arrays;
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 Bucket("test", BucketArgs.builder()
.bucket("my-tf-test-bucket")
.build());
var inventory = new Bucket("inventory", BucketArgs.builder()
.bucket("my-tf-inventory-bucket")
.build());
var testInventory = new Inventory("testInventory", InventoryArgs.builder()
.schedule(InventoryScheduleArgs.builder()
.frequency("Daily")
.build())
.destination(InventoryDestinationArgs.builder()
.bucket(InventoryDestinationBucketArgs.builder()
.format("ORC")
.bucketArn(inventory.arn())
.build())
.build())
.bucket(test.id())
.name("EntireBucketDaily")
.includedObjectVersions("All")
.build());
}
}
resources:
test:
type: aws:s3:Bucket
properties:
bucket: my-tf-test-bucket
inventory:
type: aws:s3:Bucket
properties:
bucket: my-tf-inventory-bucket
testInventory:
type: aws:s3:Inventory
name: test
properties:
schedule:
frequency: Daily
destination:
bucket:
format: ORC
bucketArn: ${inventory.arn}
bucket: ${test.id}
name: EntireBucketDaily
includedObjectVersions: All
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_s3_bucket" "test" {
bucket = "my-tf-test-bucket"
}
resource "aws_s3_bucket" "inventory" {
bucket = "my-tf-inventory-bucket"
}
resource "aws_s3_inventory" "test" {
schedule = {
frequency = "Daily"
}
destination = {
bucket = {
format = "ORC"
bucket_arn = aws_s3_bucket.inventory.arn
}
}
bucket = aws_s3_bucket.test.id
name = "EntireBucketDaily"
included_object_versions = "All"
}
Add inventory configuration with S3 object prefix
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.s3.Bucket("test", {bucket: "my-tf-test-bucket"});
const inventory = new aws.s3.Bucket("inventory", {bucket: "my-tf-inventory-bucket"});
const test_prefix = new aws.s3.Inventory("test-prefix", {
schedule: {
frequency: "Daily",
},
filter: {
prefix: "documents/",
},
destination: {
bucket: {
format: "ORC",
bucketArn: inventory.arn,
prefix: "inventory",
},
},
bucket: test.id,
name: "DocumentsWeekly",
includedObjectVersions: "All",
});
import pulumi
import pulumi_aws as aws
test = aws.s3.Bucket("test", bucket="my-tf-test-bucket")
inventory = aws.s3.Bucket("inventory", bucket="my-tf-inventory-bucket")
test_prefix = aws.s3.Inventory("test-prefix",
schedule={
"frequency": "Daily",
},
filter={
"prefix": "documents/",
},
destination={
"bucket": {
"format": "ORC",
"bucket_arn": inventory.arn,
"prefix": "inventory",
},
},
bucket=test.id,
name="DocumentsWeekly",
included_object_versions="All")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := s3.NewBucket(ctx, "test", &s3.BucketArgs{
Bucket: pulumi.String("my-tf-test-bucket"),
})
if err != nil {
return err
}
inventory, err := s3.NewBucket(ctx, "inventory", &s3.BucketArgs{
Bucket: pulumi.String("my-tf-inventory-bucket"),
})
if err != nil {
return err
}
_, err = s3.NewInventory(ctx, "test-prefix", &s3.InventoryArgs{
Schedule: &s3.InventoryScheduleArgs{
Frequency: pulumi.String("Daily"),
},
Filter: &s3.InventoryFilterArgs{
Prefix: pulumi.String("documents/"),
},
Destination: &s3.InventoryDestinationArgs{
Bucket: &s3.InventoryDestinationBucketArgs{
Format: pulumi.String("ORC"),
BucketArn: inventory.Arn,
Prefix: pulumi.String("inventory"),
},
},
Bucket: test.ID().ToIDOutput().ToStringOutput(),
Name: pulumi.String("DocumentsWeekly"),
IncludedObjectVersions: pulumi.String("All"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.S3.Bucket("test", new()
{
BucketName = "my-tf-test-bucket",
});
var inventory = new Aws.S3.Bucket("inventory", new()
{
BucketName = "my-tf-inventory-bucket",
});
var test_prefix = new Aws.S3.Inventory("test-prefix", new()
{
Schedule = new Aws.S3.Inputs.InventoryScheduleArgs
{
Frequency = "Daily",
},
Filter = new Aws.S3.Inputs.InventoryFilterArgs
{
Prefix = "documents/",
},
Destination = new Aws.S3.Inputs.InventoryDestinationArgs
{
Bucket = new Aws.S3.Inputs.InventoryDestinationBucketArgs
{
Format = "ORC",
BucketArn = inventory.Arn,
Prefix = "inventory",
},
},
Bucket = test.Id,
Name = "DocumentsWeekly",
IncludedObjectVersions = "All",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.Bucket;
import com.pulumi.aws.s3.BucketArgs;
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.ArrayList;
import java.util.Arrays;
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 Bucket("test", BucketArgs.builder()
.bucket("my-tf-test-bucket")
.build());
var inventory = new Bucket("inventory", BucketArgs.builder()
.bucket("my-tf-inventory-bucket")
.build());
var test_prefix = new Inventory("test-prefix", InventoryArgs.builder()
.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())
.bucket(test.id())
.name("DocumentsWeekly")
.includedObjectVersions("All")
.build());
}
}
resources:
test:
type: aws:s3:Bucket
properties:
bucket: my-tf-test-bucket
inventory:
type: aws:s3:Bucket
properties:
bucket: my-tf-inventory-bucket
test-prefix:
type: aws:s3:Inventory
properties:
schedule:
frequency: Daily
filter:
prefix: documents/
destination:
bucket:
format: ORC
bucketArn: ${inventory.arn}
prefix: inventory
bucket: ${test.id}
name: DocumentsWeekly
includedObjectVersions: All
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_s3_bucket" "test" {
bucket = "my-tf-test-bucket"
}
resource "aws_s3_bucket" "inventory" {
bucket = "my-tf-inventory-bucket"
}
resource "aws_s3_inventory" "test-prefix" {
schedule = {
frequency = "Daily"
}
filter = {
prefix = "documents/"
}
destination = {
bucket = {
format = "ORC"
bucket_arn = aws_s3_bucket.inventory.arn
prefix = "inventory"
}
}
bucket = aws_s3_bucket.test.id
name = "DocumentsWeekly"
included_object_versions = "All"
}
Create Inventory Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Inventory(name: string, args: InventoryArgs, opts?: CustomResourceOptions);@overload
def Inventory(resource_name: str,
args: InventoryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Inventory(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
destination: Optional[InventoryDestinationArgs] = None,
included_object_versions: Optional[str] = None,
schedule: Optional[InventoryScheduleArgs] = None,
enabled: Optional[bool] = None,
filter: Optional[InventoryFilterArgs] = None,
name: Optional[str] = None,
optional_fields: Optional[Sequence[str]] = None,
region: Optional[str] = None)func NewInventory(ctx *Context, name string, args InventoryArgs, opts ...ResourceOption) (*Inventory, error)public Inventory(string name, InventoryArgs args, CustomResourceOptions? opts = null)
public Inventory(String name, InventoryArgs args)
public Inventory(String name, InventoryArgs args, CustomResourceOptions options)
type: aws:s3:Inventory
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "aws_s3_inventory" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args InventoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args InventoryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InventoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InventoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InventoryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var inventoryResource = new Aws.S3.Inventory("inventoryResource", new()
{
Bucket = "string",
Destination = new Aws.S3.Inputs.InventoryDestinationArgs
{
Bucket = new Aws.S3.Inputs.InventoryDestinationBucketArgs
{
BucketArn = "string",
Format = "string",
AccountId = "string",
Encryption = new Aws.S3.Inputs.InventoryDestinationBucketEncryptionArgs
{
SseKms = new Aws.S3.Inputs.InventoryDestinationBucketEncryptionSseKmsArgs
{
KeyId = "string",
},
SseS3 = null,
},
Prefix = "string",
},
},
IncludedObjectVersions = "string",
Schedule = new Aws.S3.Inputs.InventoryScheduleArgs
{
Frequency = "string",
},
Enabled = false,
Filter = new Aws.S3.Inputs.InventoryFilterArgs
{
Prefix = "string",
},
Name = "string",
OptionalFields = new[]
{
"string",
},
Region = "string",
});
example, err := s3.NewInventory(ctx, "inventoryResource", &s3.InventoryArgs{
Bucket: pulumi.String("string"),
Destination: &s3.InventoryDestinationArgs{
Bucket: &s3.InventoryDestinationBucketArgs{
BucketArn: pulumi.String("string"),
Format: pulumi.String("string"),
AccountId: pulumi.String("string"),
Encryption: &s3.InventoryDestinationBucketEncryptionArgs{
SseKms: &s3.InventoryDestinationBucketEncryptionSseKmsArgs{
KeyId: pulumi.String("string"),
},
SseS3: &s3.InventoryDestinationBucketEncryptionSseS3Args{},
},
Prefix: pulumi.String("string"),
},
},
IncludedObjectVersions: pulumi.String("string"),
Schedule: &s3.InventoryScheduleArgs{
Frequency: pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
Filter: &s3.InventoryFilterArgs{
Prefix: pulumi.String("string"),
},
Name: pulumi.String("string"),
OptionalFields: pulumi.StringArray{
pulumi.String("string"),
},
Region: pulumi.String("string"),
})
resource "aws_s3_inventory" "inventoryResource" {
lifecycle {
create_before_destroy = true
}
bucket = "string"
destination = {
bucket = {
bucket_arn = "string"
format = "string"
account_id = "string"
encryption = {
sse_kms = {
key_id = "string"
}
sse_s3 = {}
}
prefix = "string"
}
}
included_object_versions = "string"
schedule = {
frequency = "string"
}
enabled = false
filter = {
prefix = "string"
}
name = "string"
optional_fields = ["string"]
region = "string"
}
var inventoryResource = new Inventory("inventoryResource", InventoryArgs.builder()
.bucket("string")
.destination(InventoryDestinationArgs.builder()
.bucket(InventoryDestinationBucketArgs.builder()
.bucketArn("string")
.format("string")
.accountId("string")
.encryption(InventoryDestinationBucketEncryptionArgs.builder()
.sseKms(InventoryDestinationBucketEncryptionSseKmsArgs.builder()
.keyId("string")
.build())
.sseS3(InventoryDestinationBucketEncryptionSseS3Args.builder()
.build())
.build())
.prefix("string")
.build())
.build())
.includedObjectVersions("string")
.schedule(InventoryScheduleArgs.builder()
.frequency("string")
.build())
.enabled(false)
.filter(InventoryFilterArgs.builder()
.prefix("string")
.build())
.name("string")
.optionalFields("string")
.region("string")
.build());
inventory_resource = aws.s3.Inventory("inventoryResource",
bucket="string",
destination={
"bucket": {
"bucket_arn": "string",
"format": "string",
"account_id": "string",
"encryption": {
"sse_kms": {
"key_id": "string",
},
"sse_s3": {},
},
"prefix": "string",
},
},
included_object_versions="string",
schedule={
"frequency": "string",
},
enabled=False,
filter={
"prefix": "string",
},
name="string",
optional_fields=["string"],
region="string")
const inventoryResource = new aws.s3.Inventory("inventoryResource", {
bucket: "string",
destination: {
bucket: {
bucketArn: "string",
format: "string",
accountId: "string",
encryption: {
sseKms: {
keyId: "string",
},
sseS3: {},
},
prefix: "string",
},
},
includedObjectVersions: "string",
schedule: {
frequency: "string",
},
enabled: false,
filter: {
prefix: "string",
},
name: "string",
optionalFields: ["string"],
region: "string",
});
type: aws:s3:Inventory
properties:
bucket: string
destination:
bucket:
accountId: string
bucketArn: string
encryption:
sseKms:
keyId: string
sseS3: {}
format: string
prefix: string
enabled: false
filter:
prefix: string
includedObjectVersions: string
name: string
optionalFields:
- string
region: string
schedule:
frequency: string
Inventory Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Inventory resource accepts the following input properties:
- Bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- Destination
Inventory
Destination - Where to publish the inventory results. See
destinationBlock below. - Included
Object stringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - Schedule
Inventory
Schedule Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- Enabled bool
- Whether to enable the inventory.
- Filter
Inventory
Filter - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - Name string
- Unique identifier of the inventory configuration for the bucket.
- Optional
Fields List<string> - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- Destination
Inventory
Destination Args - Where to publish the inventory results. See
destinationBlock below. - Included
Object stringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - Schedule
Inventory
Schedule Args Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- Enabled bool
- Whether to enable the inventory.
- Filter
Inventory
Filter Args - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - Name string
- Unique identifier of the inventory configuration for the bucket.
- Optional
Fields []string - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination object
- Where to publish the inventory results. See
destinationBlock below. - included_
object_ stringversions - Object versions to include in the inventory list. Valid values:
All,Current. - schedule object
Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- enabled bool
- Whether to enable the inventory.
- filter object
- Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - name string
- Unique identifier of the inventory configuration for the bucket.
- optional_
fields list(string) - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- bucket String
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination
Inventory
Destination - Where to publish the inventory results. See
destinationBlock below. - included
Object StringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - schedule
Inventory
Schedule Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- enabled Boolean
- Whether to enable the inventory.
- filter
Inventory
Filter - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - name String
- Unique identifier of the inventory configuration for the bucket.
- optional
Fields List<String> - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination
Inventory
Destination - Where to publish the inventory results. See
destinationBlock below. - included
Object stringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - schedule
Inventory
Schedule Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- enabled boolean
- Whether to enable the inventory.
- filter
Inventory
Filter - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - name string
- Unique identifier of the inventory configuration for the bucket.
- optional
Fields string[] - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- bucket str
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination
Inventory
Destination Args - Where to publish the inventory results. See
destinationBlock below. - included_
object_ strversions - Object versions to include in the inventory list. Valid values:
All,Current. - schedule
Inventory
Schedule Args Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- enabled bool
- Whether to enable the inventory.
- filter
Inventory
Filter Args - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - name str
- Unique identifier of the inventory configuration for the bucket.
- optional_
fields Sequence[str] - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- bucket String
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination Property Map
- Where to publish the inventory results. See
destinationBlock below. - included
Object StringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - schedule Property Map
Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- enabled Boolean
- Whether to enable the inventory.
- filter Property Map
- Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - name String
- Unique identifier of the inventory configuration for the bucket.
- optional
Fields List<String> - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the Inventory resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Inventory Resource
Get an existing Inventory resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InventoryState, opts?: CustomResourceOptions): Inventory@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
destination: Optional[InventoryDestinationArgs] = None,
enabled: Optional[bool] = None,
filter: Optional[InventoryFilterArgs] = None,
included_object_versions: Optional[str] = None,
name: Optional[str] = None,
optional_fields: Optional[Sequence[str]] = None,
region: Optional[str] = None,
schedule: Optional[InventoryScheduleArgs] = None) -> Inventoryfunc GetInventory(ctx *Context, name string, id IDInput, state *InventoryState, opts ...ResourceOption) (*Inventory, error)public static Inventory Get(string name, Input<string> id, InventoryState? state, CustomResourceOptions? opts = null)public static Inventory get(String name, Output<String> id, InventoryState state, CustomResourceOptions options)resources: _: type: aws:s3:Inventory get: id: ${id}import {
to = aws_s3_inventory.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- Destination
Inventory
Destination - Where to publish the inventory results. See
destinationBlock below. - Enabled bool
- Whether to enable the inventory.
- Filter
Inventory
Filter - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - Included
Object stringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - Name string
- Unique identifier of the inventory configuration for the bucket.
- Optional
Fields List<string> - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Schedule
Inventory
Schedule Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- Bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- Destination
Inventory
Destination Args - Where to publish the inventory results. See
destinationBlock below. - Enabled bool
- Whether to enable the inventory.
- Filter
Inventory
Filter Args - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - Included
Object stringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - Name string
- Unique identifier of the inventory configuration for the bucket.
- Optional
Fields []string - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Schedule
Inventory
Schedule Args Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination object
- Where to publish the inventory results. See
destinationBlock below. - enabled bool
- Whether to enable the inventory.
- filter object
- Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - included_
object_ stringversions - Object versions to include in the inventory list. Valid values:
All,Current. - name string
- Unique identifier of the inventory configuration for the bucket.
- optional_
fields list(string) - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- schedule object
Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- bucket String
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination
Inventory
Destination - Where to publish the inventory results. See
destinationBlock below. - enabled Boolean
- Whether to enable the inventory.
- filter
Inventory
Filter - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - included
Object StringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - name String
- Unique identifier of the inventory configuration for the bucket.
- optional
Fields List<String> - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- schedule
Inventory
Schedule Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- bucket string
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination
Inventory
Destination - Where to publish the inventory results. See
destinationBlock below. - enabled boolean
- Whether to enable the inventory.
- filter
Inventory
Filter - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - included
Object stringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - name string
- Unique identifier of the inventory configuration for the bucket.
- optional
Fields string[] - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- schedule
Inventory
Schedule Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- bucket str
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination
Inventory
Destination Args - Where to publish the inventory results. See
destinationBlock below. - enabled bool
- Whether to enable the inventory.
- filter
Inventory
Filter Args - Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - included_
object_ strversions - Object versions to include in the inventory list. Valid values:
All,Current. - name str
- Unique identifier of the inventory configuration for the bucket.
- optional_
fields Sequence[str] - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- schedule
Inventory
Schedule Args Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
- bucket String
- Name of the source bucket that inventory lists the objects for. Both general purpose and directory buckets are supported.
- destination Property Map
- Where to publish the inventory results. See
destinationBlock below. - enabled Boolean
- Whether to enable the inventory.
- filter Property Map
- Inventory filter. The inventory only includes objects that meet the filter's criteria. See
filterBlock below. - included
Object StringVersions - Object versions to include in the inventory list. Valid values:
All,Current. - name String
- Unique identifier of the inventory configuration for the bucket.
- optional
Fields List<String> - List of optional fields that are included in the inventory results. Please refer to the S3 documentation for more details.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- schedule Property Map
Schedule for generating inventory results. See
scheduleBlock below.The following arguments are optional:
Supporting Types
InventoryDestination, InventoryDestinationArgs
- Bucket
Inventory
Destination Bucket - S3 bucket configuration where inventory results are published. See
bucketBlock below.
- Bucket
Inventory
Destination Bucket - S3 bucket configuration where inventory results are published. See
bucketBlock below.
- bucket
Inventory
Destination Bucket - S3 bucket configuration where inventory results are published. See
bucketBlock below.
- bucket
Inventory
Destination Bucket - S3 bucket configuration where inventory results are published. See
bucketBlock below.
- bucket
Inventory
Destination Bucket - S3 bucket configuration where inventory results are published. See
bucketBlock below.
- bucket Property Map
- S3 bucket configuration where inventory results are published. See
bucketBlock below.
InventoryDestinationBucket, InventoryDestinationBucketArgs
- Bucket
Arn string - Amazon S3 bucket ARN of the destination. Only general purpose buckets are supported.
- Format string
Output format of the inventory results. Valid values:
CSV,ORC,Parquet.The following arguments are optional:
- Account
Id string - ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes.
- Encryption
Inventory
Destination Bucket Encryption - Type of server-side encryption to use to encrypt the inventory. See
encryptionBlock below. - Prefix string
- Prefix that is prepended to all inventory results.
- Bucket
Arn string - Amazon S3 bucket ARN of the destination. Only general purpose buckets are supported.
- Format string
Output format of the inventory results. Valid values:
CSV,ORC,Parquet.The following arguments are optional:
- Account
Id string - ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes.
- Encryption
Inventory
Destination Bucket Encryption - Type of server-side encryption to use to encrypt the inventory. See
encryptionBlock below. - Prefix string
- Prefix that is prepended to all inventory results.
- bucket_
arn string - Amazon S3 bucket ARN of the destination. Only general purpose buckets are supported.
- format string
Output format of the inventory results. Valid values:
CSV,ORC,Parquet.The following arguments are optional:
- account_
id string - ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes.
- encryption object
- Type of server-side encryption to use to encrypt the inventory. See
encryptionBlock below. - prefix string
- Prefix that is prepended to all inventory results.
- bucket
Arn String - Amazon S3 bucket ARN of the destination. Only general purpose buckets are supported.
- format String
Output format of the inventory results. Valid values:
CSV,ORC,Parquet.The following arguments are optional:
- account
Id String - ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes.
- encryption
Inventory
Destination Bucket Encryption - Type of server-side encryption to use to encrypt the inventory. See
encryptionBlock below. - prefix String
- Prefix that is prepended to all inventory results.
- bucket
Arn string - Amazon S3 bucket ARN of the destination. Only general purpose buckets are supported.
- format string
Output format of the inventory results. Valid values:
CSV,ORC,Parquet.The following arguments are optional:
- account
Id string - ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes.
- encryption
Inventory
Destination Bucket Encryption - Type of server-side encryption to use to encrypt the inventory. See
encryptionBlock below. - prefix string
- Prefix that is prepended to all inventory results.
- bucket_
arn str - Amazon S3 bucket ARN of the destination. Only general purpose buckets are supported.
- format str
Output format of the inventory results. Valid values:
CSV,ORC,Parquet.The following arguments are optional:
- account_
id str - ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes.
- encryption
Inventory
Destination Bucket Encryption - Type of server-side encryption to use to encrypt the inventory. See
encryptionBlock below. - prefix str
- Prefix that is prepended to all inventory results.
- bucket
Arn String - Amazon S3 bucket ARN of the destination. Only general purpose buckets are supported.
- format String
Output format of the inventory results. Valid values:
CSV,ORC,Parquet.The following arguments are optional:
- account
Id String - ID of the account that owns the destination bucket. Recommended to be set to prevent problems if the destination bucket ownership changes.
- encryption Property Map
- Type of server-side encryption to use to encrypt the inventory. See
encryptionBlock below. - prefix String
- Prefix that is prepended to all inventory results.
InventoryDestinationBucketEncryption, InventoryDestinationBucketEncryptionArgs
- Sse
Kms InventoryDestination Bucket Encryption Sse Kms - Server-side encryption with AWS KMS-managed keys to encrypt the inventory file. See
sseKmsBlock below. - Sse
S3 InventoryDestination Bucket Encryption Sse S3 - Server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file.
- Sse
Kms InventoryDestination Bucket Encryption Sse Kms - Server-side encryption with AWS KMS-managed keys to encrypt the inventory file. See
sseKmsBlock below. - Sse
S3 InventoryDestination Bucket Encryption Sse S3 - Server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file.
- sse
Kms InventoryDestination Bucket Encryption Sse Kms - Server-side encryption with AWS KMS-managed keys to encrypt the inventory file. See
sseKmsBlock below. - sse
S3 InventoryDestination Bucket Encryption Sse S3 - Server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file.
- sse
Kms InventoryDestination Bucket Encryption Sse Kms - Server-side encryption with AWS KMS-managed keys to encrypt the inventory file. See
sseKmsBlock below. - sse
S3 InventoryDestination Bucket Encryption Sse S3 - Server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file.
- sse_
kms InventoryDestination Bucket Encryption Sse Kms - Server-side encryption with AWS KMS-managed keys to encrypt the inventory file. See
sseKmsBlock below. - sse_
s3 InventoryDestination Bucket Encryption Sse S3 - Server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file.
- sse
Kms Property Map - Server-side encryption with AWS KMS-managed keys to encrypt the inventory file. See
sseKmsBlock below. - sse
S3 Property Map - Server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file.
InventoryDestinationBucketEncryptionSseKms, InventoryDestinationBucketEncryptionSseKmsArgs
- Key
Id string - ARN of the KMS customer master key (CMK) used to encrypt the inventory file.
- Key
Id string - ARN of the KMS customer master key (CMK) used to encrypt the inventory file.
- key_
id string - ARN of the KMS customer master key (CMK) used to encrypt the inventory file.
- key
Id String - ARN of the KMS customer master key (CMK) used to encrypt the inventory file.
- key
Id string - ARN of the KMS customer master key (CMK) used to encrypt the inventory file.
- key_
id str - ARN of the KMS customer master key (CMK) used to encrypt the inventory file.
- key
Id String - ARN of the KMS customer master key (CMK) used to encrypt the inventory file.
InventoryFilter, InventoryFilterArgs
- Prefix string
- Prefix that an object must have to be included in the inventory results.
- Prefix string
- Prefix that an object must have to be included in the inventory results.
- prefix string
- Prefix that an object must have to be included in the inventory results.
- prefix String
- Prefix that an object must have to be included in the inventory results.
- prefix string
- Prefix that an object must have to be included in the inventory results.
- prefix str
- Prefix that an object must have to be included in the inventory results.
- prefix String
- Prefix that an object must have to be included in the inventory results.
InventorySchedule, InventoryScheduleArgs
- Frequency string
- How frequently inventory results are produced. Valid values:
Daily,Weekly.
- Frequency string
- How frequently inventory results are produced. Valid values:
Daily,Weekly.
- frequency string
- How frequently inventory results are produced. Valid values:
Daily,Weekly.
- frequency String
- How frequently inventory results are produced. Valid values:
Daily,Weekly.
- frequency string
- How frequently inventory results are produced. Valid values:
Daily,Weekly.
- frequency str
- How frequently inventory results are produced. Valid values:
Daily,Weekly.
- frequency String
- How frequently inventory results are produced. Valid values:
Daily,Weekly.
Import
Using pulumi import, import S3 bucket inventory configurations using bucket:inventory. For example:
$ pulumi import aws:s3/inventory:Inventory my-bucket-entire-bucket my-bucket:EntireBucket
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Tuesday, Sep 8, 2026 by Pulumi