CfnFlowLogPropsMixin

class aws_cdk.mixins_preview.aws_ec2.mixins.CfnFlowLogPropsMixin(props, *, strategy=None)

Bases: Mixin

Specifies a VPC flow log that captures IP traffic for a specified network interface, subnet, or VPC.

To view the log data, use Amazon CloudWatch Logs (CloudWatch Logs) to help troubleshoot connection issues. For example, you can use a flow log to investigate why certain traffic isn’t reaching an instance, which can help you diagnose overly restrictive security group rules. For more information, see VPC Flow Logs in the Amazon VPC User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-flowlog.html

CloudformationResource:

AWS::EC2::FlowLog

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins

# destination_options: Any

cfn_flow_log_props_mixin = ec2_mixins.CfnFlowLogPropsMixin(ec2_mixins.CfnFlowLogMixinProps(
    deliver_cross_account_role="deliverCrossAccountRole",
    deliver_logs_permission_arn="deliverLogsPermissionArn",
    destination_options=destination_options,
    log_destination="logDestination",
    log_destination_type="logDestinationType",
    log_format="logFormat",
    log_group_name="logGroupName",
    max_aggregation_interval=123,
    resource_id="resourceId",
    resource_type="resourceType",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    traffic_type="trafficType"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::EC2::FlowLog.

Parameters:
  • props (Union[CfnFlowLogMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['deliverCrossAccountRole', 'deliverLogsPermissionArn', 'destinationOptions', 'logDestination', 'logDestinationType', 'logFormat', 'logGroupName', 'maxAggregationInterval', 'resourceId', 'resourceType', 'tags', 'trafficType']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

DestinationOptionsProperty

class CfnFlowLogPropsMixin.DestinationOptionsProperty(*, file_format=None, hive_compatible_partitions=None, per_hour_partition=None)

Bases: object

Describes the destination options for a flow log.

Parameters:
  • file_format (Optional[str]) – The format for the flow log. The default is plain-text .

  • hive_compatible_partitions (Union[bool, IResolvable, None]) – Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is false .

  • per_hour_partition (Union[bool, IResolvable, None]) – Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The default is false .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-flowlog-destinationoptions.html

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.mixins_preview.aws_ec2 import mixins as ec2_mixins

destination_options_property = ec2_mixins.CfnFlowLogPropsMixin.DestinationOptionsProperty(
    file_format="fileFormat",
    hive_compatible_partitions=False,
    per_hour_partition=False
)

Attributes

file_format

The format for the flow log.

The default is plain-text .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-flowlog-destinationoptions.html#cfn-ec2-flowlog-destinationoptions-fileformat

hive_compatible_partitions

Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.

The default is false .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-flowlog-destinationoptions.html#cfn-ec2-flowlog-destinationoptions-hivecompatiblepartitions

per_hour_partition

Indicates whether to partition the flow log per hour.

This reduces the cost and response time for queries. The default is false .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-flowlog-destinationoptions.html#cfn-ec2-flowlog-destinationoptions-perhourpartition