FlowLogDestinationConfig

class aws_cdk.aws_ec2.FlowLogDestinationConfig(*, log_destination_type, delivery_stream_arn=None, destination_options=None, iam_role=None, key_prefix=None, log_group=None, s3_bucket=None)

Bases: object

Flow Log Destination configuration.

Parameters:
  • log_destination_type (FlowLogDestinationType) – The type of destination to publish the flow logs to. Default: - CLOUD_WATCH_LOGS

  • delivery_stream_arn (Optional[str]) – The ARN of Kinesis Data Firehose delivery stream to publish the flow logs to. Default: - undefined

  • destination_options (Union[DestinationOptions, Dict[str, Any], None]) – Options for writing flow logs to a supported destination. Default: - undefined

  • iam_role (Optional[IRole]) – The IAM Role that has access to publish to CloudWatch logs. Default: - default IAM role is created for you

  • key_prefix (Optional[str]) – S3 bucket key prefix to publish the flow logs to. Default: - undefined

  • log_group (Optional[ILogGroup]) – The CloudWatch Logs Log Group to publish the flow logs to. Default: - default log group is created for you

  • s3_bucket (Optional[IBucket]) – S3 bucket to publish the flow logs to. Default: - undefined

ExampleMetadata:

fixture=_generated

Example:

# 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
from aws_cdk import aws_iam as iam
from aws_cdk import aws_logs as logs
from aws_cdk import aws_s3 as s3

# bucket: s3.Bucket
# log_group: logs.LogGroup
# role: iam.Role

flow_log_destination_config = ec2.FlowLogDestinationConfig(
    log_destination_type=ec2.FlowLogDestinationType.CLOUD_WATCH_LOGS,

    # the properties below are optional
    delivery_stream_arn="deliveryStreamArn",
    destination_options=ec2.DestinationOptions(
        file_format=ec2.FlowLogFileFormat.PLAIN_TEXT,
        hive_compatible_partitions=False,
        per_hour_partition=False
    ),
    iam_role=role,
    key_prefix="keyPrefix",
    log_group=log_group,
    s3_bucket=bucket
)

Attributes

delivery_stream_arn

The ARN of Kinesis Data Firehose delivery stream to publish the flow logs to.

Default:
  • undefined

destination_options

Options for writing flow logs to a supported destination.

Default:
  • undefined

iam_role

The IAM Role that has access to publish to CloudWatch logs.

Default:
  • default IAM role is created for you

key_prefix

S3 bucket key prefix to publish the flow logs to.

Default:
  • undefined

log_destination_type

The type of destination to publish the flow logs to.

Default:
  • CLOUD_WATCH_LOGS

log_group

The CloudWatch Logs Log Group to publish the flow logs to.

Default:
  • default log group is created for you

s3_bucket

S3 bucket to publish the flow logs to.

Default:
  • undefined