CfnFlowLogPropsMixin
- class aws_cdk.cfn_property_mixins.aws_ec2.CfnFlowLogPropsMixin(props, *, strategy=None)
Bases:
MixinSpecifies 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.cfn_property_mixins import aws_ec2 as ec2 import aws_cdk as cdk # destination_options: Any # merge_strategy: cdk.IMergeStrategy cfn_flow_log_props_mixin = ec2.CfnFlowLogPropsMixin(ec2.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=[cdk.CfnTag( key="key", value="value" )], traffic_type="trafficType" ), strategy=merge_strategy )
Create a mixin to apply properties to
AWS::EC2::FlowLog.- Parameters:
props (
Union[CfnFlowLogMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
None
- 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)
Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.
DestinationOptionsProperty
- class CfnFlowLogPropsMixin.DestinationOptionsProperty(*, file_format=None, hive_compatible_partitions=None, per_hour_partition=None)
Bases:
objectDescribes the destination options for a flow log.
- Parameters:
file_format (
Optional[str]) – The format for the flow log. The default isplain-text.hive_compatible_partitions (
Union[bool,IResolvable,None]) – Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default isfalse.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 isfalse.
- See:
- 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.cfn_property_mixins import aws_ec2 as ec2 destination_options_property = ec2.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.
- hive_compatible_partitions
Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.
The default is
false.
- 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.