Skip to content
v2.278.0

InventoryConfigurationProperty Struct ​

Specifies the S3 Inventory configuration for an Amazon S3 bucket.

For more information, see GET Bucket inventory in the Amazon S3 API Reference .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
const inventoryConfigurationProperty: s3.CfnBucket.InventoryConfigurationProperty = {
  destination: {
    bucketArn: 'bucketArn',
    format: 'format',

    // the properties below are optional
    bucketAccountId: 'bucketAccountId',
    prefix: 'prefix',
  },
  enabled: false,
  id: 'id',
  includedObjectVersions: 'includedObjectVersions',
  scheduleFrequency: 'scheduleFrequency',

  // the properties below are optional
  optionalFields: ['optionalFields'],
  prefix: 'prefix',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3

inventory_configuration_property = s3.CfnBucket.InventoryConfigurationProperty(
    destination=s3.CfnBucket.DestinationProperty(
        bucket_arn="bucketArn",
        format="format",

        # the properties below are optional
        bucket_account_id="bucketAccountId",
        prefix="prefix"
    ),
    enabled=False,
    id="id",
    included_object_versions="includedObjectVersions",
    schedule_frequency="scheduleFrequency",

    # the properties below are optional
    optional_fields=["optionalFields"],
    prefix="prefix"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;

InventoryConfigurationProperty inventoryConfigurationProperty = InventoryConfigurationProperty.builder()
        .destination(DestinationProperty.builder()
                .bucketArn("bucketArn")
                .format("format")

                // the properties below are optional
                .bucketAccountId("bucketAccountId")
                .prefix("prefix")
                .build())
        .enabled(false)
        .id("id")
        .includedObjectVersions("includedObjectVersions")
        .scheduleFrequency("scheduleFrequency")

        // the properties below are optional
        .optionalFields(List.of("optionalFields"))
        .prefix("prefix")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;

var inventoryConfigurationProperty = new InventoryConfigurationProperty {
    Destination = new DestinationProperty {
        BucketArn = "bucketArn",
        Format = "format",

        // the properties below are optional
        BucketAccountId = "bucketAccountId",
        Prefix = "prefix"
    },
    Enabled = false,
    Id = "id",
    IncludedObjectVersions = "includedObjectVersions",
    ScheduleFrequency = "scheduleFrequency",

    // the properties below are optional
    OptionalFields = new [] { "optionalFields" },
    Prefix = "prefix"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

inventoryConfigurationProperty := &InventoryConfigurationProperty{
	Destination: &DestinationProperty{
		BucketArn: jsii.String("bucketArn"),
		Format: jsii.String("format"),

		// the properties below are optional
		BucketAccountId: jsii.String("bucketAccountId"),
		Prefix: jsii.String("prefix"),
	},
	Enabled: jsii.Boolean(false),
	Id: jsii.String("id"),
	IncludedObjectVersions: jsii.String("includedObjectVersions"),
	ScheduleFrequency: jsii.String("scheduleFrequency"),

	// the properties below are optional
	OptionalFields: []*string{
		jsii.String("optionalFields"),
	},
	Prefix: jsii.String("prefix"),
}

Properties ​

destinationIResolvable | CfnBucket.DestinationPropertydestinationtyping.Union[IResolvable, DestinationProperty]destinationIResolvableDestinationIResolvableDestinationinterface{} required #
Contains information about where to publish the inventory results.
enabledboolean | IResolvableenabledtyping.Union[bool, IResolvable]enabledBooleanEnabledboolEnabledinterface{} required #
Specifies whether the inventory is enabled or disabled.

If set to True , an inventory list is generated. If set to False , no inventory list is generated.

idstringidstridStringIdstringId*string required #
The ID used to identify the inventory configuration.
includedObjectVersionsstringincluded_object_versionsstrincludedObjectVersionsStringIncludedObjectVersionsstringIncludedObjectVersions*string required #
Object versions to include in the inventory list.

If set to All , the list includes all the object versions, which adds the version-related fields VersionId , IsLatest , and DeleteMarker to the list. If set to Current , the list does not contain these version-related fields.

optionalFieldsoptionalstring[]optional_fieldsoptionaltyping.List[str]optionalFieldsoptionalList<String>OptionalFieldsoptionalstring[]OptionalFieldsoptional*[]*string #
Contains the optional fields that are included in the inventory results.
prefixoptionalstringprefixoptionalstrprefixoptionalStringPrefixoptionalstringPrefixoptional*string #
Specifies the inventory filter prefix.
scheduleFrequencystringschedule_frequencystrscheduleFrequencyStringScheduleFrequencystringScheduleFrequency*string required #
Specifies the schedule for generating inventory results.