# S3DestinationOptions

Options for writing logs to a S3 destination.

Used as argument in: [FlowLogDestination.toS3](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.FlowLogDestination.html#tos3)

- Source: [`aws-ec2/lib/vpc-flow-logs.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts#L171)
- Type last changed: v2.32.0 · 14 Jul 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const s3DestinationOptions: ec2.S3DestinationOptions = {
  fileFormat: ec2.FlowLogFileFormat.PLAIN_TEXT,
  hiveCompatiblePartitions: false,
  perHourPartition: false,
};
```

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_ec2 as ec2

s3_destination_options = ec2.S3DestinationOptions(
    file_format=ec2.FlowLogFileFormat.PLAIN_TEXT,
    hive_compatible_partitions=False,
    per_hour_partition=False
)
```

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.ec2.*;

S3DestinationOptions s3DestinationOptions = S3DestinationOptions.builder()
        .fileFormat(FlowLogFileFormat.PLAIN_TEXT)
        .hiveCompatiblePartitions(false)
        .perHourPartition(false)
        .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.EC2;

var s3DestinationOptions = new S3DestinationOptions {
    FileFormat = FlowLogFileFormat.PLAIN_TEXT,
    HiveCompatiblePartitions = false,
    PerHourPartition = false
};
```

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"

s3DestinationOptions := &S3DestinationOptions{
	FileFormat: awscdk.Aws_ec2.FlowLogFileFormat_PLAIN_TEXT,
	HiveCompatiblePartitions: jsii.Boolean(false),
	PerHourPartition: jsii.Boolean(false),
}
```

## Properties

- `fileFormat`: [FlowLogFileFormat](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.FlowLogFileFormat.html) = FlowLogFileFormat.PLAIN_TEXT — The format for the flow log.

- `hiveCompatiblePartitions`: boolean = false — Use Hive-compatible prefixes for flow logs stored in Amazon S3.

- `perHourPartition`: boolean = false — Partition the flow log per hour.
