Inventory

class aws_cdk.aws_s3.Inventory(*, destination, enabled=None, format=None, frequency=None, include_object_versions=None, inventory_id=None, objects_prefix=None, optional_fields=None)

Bases: object

Specifies the inventory configuration of an S3 Bucket.

Parameters:
  • destination (Union[InventoryDestination, Dict[str, Any]]) – The destination of the inventory.

  • enabled (Optional[bool]) – Whether the inventory is enabled or disabled. Default: true

  • format (Optional[InventoryFormat]) – The format of the inventory. Default: InventoryFormat.CSV

  • frequency (Optional[InventoryFrequency]) – Frequency at which the inventory should be generated. Default: InventoryFrequency.WEEKLY

  • include_object_versions (Optional[InventoryObjectVersion]) – If the inventory should contain all the object versions or only the current one. Default: InventoryObjectVersion.ALL

  • inventory_id (Optional[str]) – The inventory configuration ID. Default: - generated ID.

  • objects_prefix (Optional[str]) – The inventory will only include objects that meet the prefix filter criteria. Default: - No objects prefix

  • optional_fields (Optional[Sequence[str]]) – A list of optional fields to be included in the inventory result. Default: - No optional fields.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3 as s3

# bucket: s3.Bucket

inventory = s3.Inventory(
    destination=s3.InventoryDestination(
        bucket=bucket,

        # the properties below are optional
        bucket_owner="bucketOwner",
        prefix="prefix"
    ),

    # the properties below are optional
    enabled=False,
    format=s3.InventoryFormat.CSV,
    frequency=s3.InventoryFrequency.DAILY,
    include_object_versions=s3.InventoryObjectVersion.ALL,
    inventory_id="inventoryId",
    objects_prefix="objectsPrefix",
    optional_fields=["optionalFields"]
)

Attributes

destination

The destination of the inventory.

enabled

Whether the inventory is enabled or disabled.

Default:

true

format

The format of the inventory.

Default:

InventoryFormat.CSV

frequency

Frequency at which the inventory should be generated.

Default:

InventoryFrequency.WEEKLY

include_object_versions

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

Default:

InventoryObjectVersion.ALL

inventory_id

The inventory configuration ID.

Default:
  • generated ID.

objects_prefix

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

Default:
  • No objects prefix

optional_fields

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

Default:
  • No optional fields.