CfnTrafficMirrorFilterRuleProps

class aws_cdk.aws_ec2.CfnTrafficMirrorFilterRuleProps(*, destination_cidr_block, rule_action, rule_number, source_cidr_block, traffic_direction, traffic_mirror_filter_id, description=None, destination_port_range=None, protocol=None, source_port_range=None)

Bases: object

Properties for defining a CfnTrafficMirrorFilterRule.

Parameters
  • destination_cidr_block (str) – The destination CIDR block to assign to the Traffic Mirror rule.

  • rule_action (str) – The action to take on the filtered traffic.

  • rule_number (Union[int, float]) – The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

  • source_cidr_block (str) – The source CIDR block to assign to the Traffic Mirror rule.

  • traffic_direction (str) – The type of traffic.

  • traffic_mirror_filter_id (str) – The ID of the filter that this rule is associated with.

  • description (Optional[str]) – The description of the Traffic Mirror rule.

  • destination_port_range (Union[IResolvable, TrafficMirrorPortRangeProperty, Dict[str, Any], None]) – The destination port range.

  • protocol (Union[int, float, None]) – The protocol, for example UDP, to assign to the Traffic Mirror rule. For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.

  • source_port_range (Union[IResolvable, TrafficMirrorPortRangeProperty, Dict[str, Any], None]) – The source port range.

Link

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

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

cfn_traffic_mirror_filter_rule_props = ec2.CfnTrafficMirrorFilterRuleProps(
    destination_cidr_block="destinationCidrBlock",
    rule_action="ruleAction",
    rule_number=123,
    source_cidr_block="sourceCidrBlock",
    traffic_direction="trafficDirection",
    traffic_mirror_filter_id="trafficMirrorFilterId",

    # the properties below are optional
    description="description",
    destination_port_range=ec2.CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty(
        from_port=123,
        to_port=123
    ),
    protocol=123,
    source_port_range=ec2.CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty(
        from_port=123,
        to_port=123
    )
)

Attributes

description

The description of the Traffic Mirror rule.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-description

Return type

Optional[str]

destination_cidr_block

The destination CIDR block to assign to the Traffic Mirror rule.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-destinationcidrblock

Return type

str

destination_port_range

The destination port range.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-destinationportrange

Return type

Union[IResolvable, TrafficMirrorPortRangeProperty, None]

protocol

The protocol, for example UDP, to assign to the Traffic Mirror rule.

For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-protocol

Return type

Union[int, float, None]

rule_action

The action to take on the filtered traffic.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-ruleaction

Return type

str

rule_number

The number of the Traffic Mirror rule.

This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-rulenumber

Return type

Union[int, float]

source_cidr_block

The source CIDR block to assign to the Traffic Mirror rule.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-sourcecidrblock

Return type

str

source_port_range

The source port range.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-sourceportrange

Return type

Union[IResolvable, TrafficMirrorPortRangeProperty, None]

traffic_direction

The type of traffic.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-trafficdirection

Return type

str

traffic_mirror_filter_id

The ID of the filter that this rule is associated with.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trafficmirrorfilterrule.html#cfn-ec2-trafficmirrorfilterrule-trafficmirrorfilterid

Return type

str