# InventoryObjectVersion

Inventory version support.

- Source: [`aws-s3/lib/bucket.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-s3/lib/bucket.ts#L1366)

## Example

```ts
const inventoryBucket = new s3.Bucket(this, 'InventoryBucket');

const dataBucket = new s3.Bucket(this, 'DataBucket', {
  inventories: [
    {
      frequency: s3.InventoryFrequency.DAILY,
      includeObjectVersions: s3.InventoryObjectVersion.CURRENT,
      destination: {
        bucket: inventoryBucket,
      },
    },
    {
      frequency: s3.InventoryFrequency.WEEKLY,
      includeObjectVersions: s3.InventoryObjectVersion.ALL,
      destination: {
        bucket: inventoryBucket,
        prefix: 'with-all-versions',
      },
    },
  ],
});
```

## Members

| Member | Description |
| --- | --- |
| `ALL` | Includes all versions of each object in the report. |
| `CURRENT` | Includes only the current version of each object in the report. |

## Referenced by

- [`Inventory`](/v2/docs/aws-cdk-lib.aws_s3.Inventory).includeObjectVersions
