interface FlowLogDestinationConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.FlowLogDestinationConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#FlowLogDestinationConfig |
Java | software.amazon.awscdk.services.ec2.FlowLogDestinationConfig |
Python | aws_cdk.aws_ec2.FlowLogDestinationConfig |
TypeScript (source) | aws-cdk-lib » aws_ec2 » FlowLogDestinationConfig |
Obtainable from
Flow
.bind()
Flow Log Destination configuration.
Example
// 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';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_logs as logs } from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
declare const logGroup: logs.LogGroup;
declare const role: iam.Role;
const flowLogDestinationConfig: ec2.FlowLogDestinationConfig = {
logDestinationType: ec2.FlowLogDestinationType.CLOUD_WATCH_LOGS,
// the properties below are optional
deliveryStreamArn: 'deliveryStreamArn',
destinationOptions: {
fileFormat: ec2.FlowLogFileFormat.PLAIN_TEXT,
hiveCompatiblePartitions: false,
perHourPartition: false,
},
iamRole: role,
keyPrefix: 'keyPrefix',
logGroup: logGroup,
s3Bucket: bucket,
};
Properties
Name | Type | Description |
---|---|---|
log | Flow | The type of destination to publish the flow logs to. |
delivery | string | The ARN of Kinesis Data Firehose delivery stream to publish the flow logs to. |
destination | Destination | Options for writing flow logs to a supported destination. |
iam | IRole | The IAM Role that has access to publish to CloudWatch logs. |
key | string | S3 bucket key prefix to publish the flow logs to. |
log | ILog | The CloudWatch Logs Log Group to publish the flow logs to. |
s3 | IBucket | S3 bucket to publish the flow logs to. |
logDestinationType
Type:
Flow
The type of destination to publish the flow logs to.
deliveryStreamArn?
Type:
string
(optional, default: undefined)
The ARN of Kinesis Data Firehose delivery stream to publish the flow logs to.
destinationOptions?
Type:
Destination
(optional, default: undefined)
Options for writing flow logs to a supported destination.
iamRole?
Type:
IRole
(optional, default: default IAM role is created for you)
The IAM Role that has access to publish to CloudWatch logs.
keyPrefix?
Type:
string
(optional, default: undefined)
S3 bucket key prefix to publish the flow logs to.
logGroup?
Type:
ILog
(optional, default: default log group is created for you)
The CloudWatch Logs Log Group to publish the flow logs to.
s3Bucket?
Type:
IBucket
(optional, default: undefined)
S3 bucket to publish the flow logs to.