aws-cdk-lib.aws_s3.Inventory

interface Inventory

LanguageType name
.NETAmazon.CDK.AWS.S3.Inventory
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3#Inventory
Javasoftware.amazon.awscdk.services.s3.Inventory
Pythonaws_cdk.aws_s3.Inventory
TypeScript (source)aws-cdk-lib » aws_s3 » Inventory

Specifies the inventory configuration of an S3 Bucket.

See also: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html

Example

// 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';

declare const bucket: s3.Bucket;
const inventory: s3.Inventory = {
  destination: {
    bucket: bucket,

    // the properties below are optional
    bucketOwner: 'bucketOwner',
    prefix: 'prefix',
  },

  // the properties below are optional
  enabled: false,
  format: s3.InventoryFormat.CSV,
  frequency: s3.InventoryFrequency.DAILY,
  includeObjectVersions: s3.InventoryObjectVersion.ALL,
  inventoryId: 'inventoryId',
  objectsPrefix: 'objectsPrefix',
  optionalFields: ['optionalFields'],
};

Properties

NameTypeDescription
destinationInventoryDestinationThe destination of the inventory.
enabled?booleanWhether the inventory is enabled or disabled.
format?InventoryFormatThe format of the inventory.
frequency?InventoryFrequencyFrequency at which the inventory should be generated.
includeObjectVersions?InventoryObjectVersionIf the inventory should contain all the object versions or only the current one.
inventoryId?stringThe inventory configuration ID.
objectsPrefix?stringThe inventory will only include objects that meet the prefix filter criteria.
optionalFields?string[]A list of optional fields to be included in the inventory result.

destination

Type: InventoryDestination

The destination of the inventory.


enabled?

Type: boolean (optional, default: true)

Whether the inventory is enabled or disabled.


format?

Type: InventoryFormat (optional, default: InventoryFormat.CSV)

The format of the inventory.


frequency?

Type: InventoryFrequency (optional, default: InventoryFrequency.WEEKLY)

Frequency at which the inventory should be generated.


includeObjectVersions?

Type: InventoryObjectVersion (optional, default: InventoryObjectVersion.ALL)

If the inventory should contain all the object versions or only the current one.


inventoryId?

Type: string (optional, default: generated ID.)

The inventory configuration ID.


objectsPrefix?

Type: string (optional, default: No objects prefix)

The inventory will only include objects that meet the prefix filter criteria.


optionalFields?

Type: string[] (optional, default: No optional fields.)

A list of optional fields to be included in the inventory result.