interface Inventory
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.S3.Inventory |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awss3#Inventory |
Java | software.amazon.awscdk.services.s3.Inventory |
Python | aws_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
Name | Type | Description |
---|---|---|
destination | Inventory | The destination of the inventory. |
enabled? | boolean | Whether the inventory is enabled or disabled. |
format? | Inventory | The format of the inventory. |
frequency? | Inventory | Frequency at which the inventory should be generated. |
include | Inventory | If the inventory should contain all the object versions or only the current one. |
inventory | string | The inventory configuration ID. |
objects | string | The inventory will only include objects that meet the prefix filter criteria. |
optional | string[] | A list of optional fields to be included in the inventory result. |
destination
Type:
Inventory
The destination of the inventory.
enabled?
Type:
boolean
(optional, default: true)
Whether the inventory is enabled or disabled.
format?
Type:
Inventory
(optional, default: InventoryFormat.CSV)
The format of the inventory.
frequency?
Type:
Inventory
(optional, default: InventoryFrequency.WEEKLY)
Frequency at which the inventory should be generated.
includeObjectVersions?
Type:
Inventory
(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.
Should be limited to 64 characters and can only contain letters, numbers, periods, dashes, and underscores.
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.