DestinationOptions Struct
Options for writing logs to a destination.
TODO: there are other destination options, currently they are only for s3 destinations (not sure if that will change)
| Source | aws-ec2/lib/vpc-flow-logs.ts |
|---|---|
| Type last changed |
Example
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 destinationOptions: ec2.DestinationOptions = {
fileFormat: ec2.FlowLogFileFormat.PLAIN_TEXT,
hiveCompatiblePartitions: false,
perHourPartition: false,
};
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
destination_options = ec2.DestinationOptions(
file_format=ec2.FlowLogFileFormat.PLAIN_TEXT,
hive_compatible_partitions=False,
per_hour_partition=False
)
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.*;
DestinationOptions destinationOptions = DestinationOptions.builder()
.fileFormat(FlowLogFileFormat.PLAIN_TEXT)
.hiveCompatiblePartitions(false)
.perHourPartition(false)
.build();
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 destinationOptions = new DestinationOptions {
FileFormat = FlowLogFileFormat.PLAIN_TEXT,
HiveCompatiblePartitions = false,
PerHourPartition = false
};
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"
destinationOptions := &DestinationOptions{
FileFormat: awscdk.Aws_ec2.FlowLogFileFormat_PLAIN_TEXT,
HiveCompatiblePartitions: jsii.Boolean(false),
PerHourPartition: jsii.Boolean(false),
}
Properties
fileFormatoptionalFlowLogFileFormatfile_formatoptionalFlowLogFileFormatfileFormatoptionalFlowLogFileFormatFileFormatoptionalFlowLogFileFormatFileFormatoptionalFlowLogFileFormat = FlowLogFileFormat.PLAIN_TEXT #The format for the flow log.
hiveCompatiblePartitionsoptionalbooleanhive_compatible_partitionsoptionalboolhiveCompatiblePartitionsoptionalBooleanHiveCompatiblePartitionsoptionalboolHiveCompatiblePartitionsoptional*bool = false #Use Hive-compatible prefixes for flow logs stored in Amazon S3.
perHourPartitionoptionalbooleanper_hour_partitionoptionalboolperHourPartitionoptionalBooleanPerHourPartitionoptionalboolPerHourPartitionoptional*bool = false #Partition the flow log per hour.