FlowLogDestinationConfig
- class aws_cdk.aws_ec2.FlowLogDestinationConfig(*, log_destination_type, 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_LOGSiam_role (
Optional
[IRole
]) – The IAM Role that has access to publish to CloudWatch logs. Default: - default IAM role is created for youkey_prefix (
Optional
[str
]) – S3 bucket key prefix to publish the flow logs to. Default: - undefinedlog_group (
Optional
[ILogGroup
]) – The CloudWatch Logs Log Group to publish the flow logs to. Default: - default log group is created for yous3_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. import aws_cdk.aws_ec2 as ec2 import aws_cdk.aws_iam as iam import aws_cdk.aws_logs as logs import aws_cdk.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 iam_role=role, key_prefix="keyPrefix", log_group=log_group, s3_bucket=bucket )
Attributes
- 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