InventoryDestination
- class aws_cdk.aws_s3.InventoryDestination(*, bucket, bucket_owner=None, prefix=None)
Bases:
object
The destination of the inventory.
- Parameters:
bucket (
IBucket
) – Bucket where all inventories will be saved in.bucket_owner (
Optional
[str
]) – The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data. It’s recommended to set an account ID to prevent problems if the destination bucket ownership changes. Default: - No account ID.prefix (
Optional
[str
]) – The prefix to be used when saving the inventory. Default: - No prefix.
- ExampleMetadata:
infused
Example:
inventory_bucket = s3.Bucket(self, "InventoryBucket") data_bucket = s3.Bucket(self, "DataBucket", inventories=[s3.Inventory( frequency=s3.InventoryFrequency.DAILY, include_object_versions=s3.InventoryObjectVersion.CURRENT, destination=s3.InventoryDestination( bucket=inventory_bucket ) ), s3.Inventory( frequency=s3.InventoryFrequency.WEEKLY, include_object_versions=s3.InventoryObjectVersion.ALL, destination=s3.InventoryDestination( bucket=inventory_bucket, prefix="with-all-versions" ) ) ] )
Attributes
- bucket
Bucket where all inventories will be saved in.
- bucket_owner
The account ID that owns the destination S3 bucket.
If no account ID is provided, the owner is not validated before exporting data. It’s recommended to set an account ID to prevent problems if the destination bucket ownership changes.
- Default:
No account ID.
- prefix
The prefix to be used when saving the inventory.
- Default:
No prefix.