# InventoryConfigurationProperty

Specifies the S3 Inventory configuration for an Amazon S3 bucket.

For more information, see [GET Bucket inventory](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html) in the *Amazon S3 API Reference* .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// 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';
const inventoryConfigurationProperty: s3.CfnBucket.InventoryConfigurationProperty = {
  destination: {
    bucketArn: 'bucketArn',
    format: 'format',

    // the properties below are optional
    bucketAccountId: 'bucketAccountId',
    prefix: 'prefix',
  },
  enabled: false,
  id: 'id',
  includedObjectVersions: 'includedObjectVersions',
  scheduleFrequency: 'scheduleFrequency',

  // the properties below are optional
  optionalFields: ['optionalFields'],
  prefix: 'prefix',
};
```

Python:

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

inventory_configuration_property = s3.CfnBucket.InventoryConfigurationProperty(
    destination=s3.CfnBucket.DestinationProperty(
        bucket_arn="bucketArn",
        format="format",

        # the properties below are optional
        bucket_account_id="bucketAccountId",
        prefix="prefix"
    ),
    enabled=False,
    id="id",
    included_object_versions="includedObjectVersions",
    schedule_frequency="scheduleFrequency",

    # the properties below are optional
    optional_fields=["optionalFields"],
    prefix="prefix"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;

InventoryConfigurationProperty inventoryConfigurationProperty = InventoryConfigurationProperty.builder()
        .destination(DestinationProperty.builder()
                .bucketArn("bucketArn")
                .format("format")

                // the properties below are optional
                .bucketAccountId("bucketAccountId")
                .prefix("prefix")
                .build())
        .enabled(false)
        .id("id")
        .includedObjectVersions("includedObjectVersions")
        .scheduleFrequency("scheduleFrequency")

        // the properties below are optional
        .optionalFields(List.of("optionalFields"))
        .prefix("prefix")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;

var inventoryConfigurationProperty = new InventoryConfigurationProperty {
    Destination = new DestinationProperty {
        BucketArn = "bucketArn",
        Format = "format",

        // the properties below are optional
        BucketAccountId = "bucketAccountId",
        Prefix = "prefix"
    },
    Enabled = false,
    Id = "id",
    IncludedObjectVersions = "includedObjectVersions",
    ScheduleFrequency = "scheduleFrequency",

    // the properties below are optional
    OptionalFields = new [] { "optionalFields" },
    Prefix = "prefix"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

inventoryConfigurationProperty := &InventoryConfigurationProperty{
	Destination: &DestinationProperty{
		BucketArn: jsii.String("bucketArn"),
		Format: jsii.String("format"),

		// the properties below are optional
		BucketAccountId: jsii.String("bucketAccountId"),
		Prefix: jsii.String("prefix"),
	},
	Enabled: jsii.Boolean(false),
	Id: jsii.String("id"),
	IncludedObjectVersions: jsii.String("includedObjectVersions"),
	ScheduleFrequency: jsii.String("scheduleFrequency"),

	// the properties below are optional
	OptionalFields: []*string{
		jsii.String("optionalFields"),
	},
	Prefix: jsii.String("prefix"),
}
```

## Properties

- `destination`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBucket.DestinationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.CfnBucket.DestinationProperty.html) (required) — Contains information about where to publish the inventory results.

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Specifies whether the inventory is enabled or disabled.

  If set to `True` , an inventory list is generated. If set to `False` , no inventory list is generated.

- `id`: string (required) — The ID used to identify the inventory configuration.

- `includedObjectVersions`: string (required) — Object versions to include in the inventory list.

  If set to `All` , the list includes all the object versions, which adds the version-related fields `VersionId` , `IsLatest` , and `DeleteMarker` to the list. If set to `Current` , the list does not contain these version-related fields.

- `optionalFields`: string[] — Contains the optional fields that are included in the inventory results.

- `prefix`: string — Specifies the inventory filter prefix.

- `scheduleFrequency`: string (required) — Specifies the schedule for generating inventory results.
