Class CfnTrafficMirrorFilterRule

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.053Z") @Stability(Stable) public class CfnTrafficMirrorFilterRule extends CfnResource implements IInspectable
A CloudFormation AWS::EC2::TrafficMirrorFilterRule.

Creates a Traffic Mirror filter rule.

A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror.

You need the Traffic Mirror filter ID when you create the rule.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ec2.*;
 CfnTrafficMirrorFilterRule cfnTrafficMirrorFilterRule = CfnTrafficMirrorFilterRule.Builder.create(this, "MyCfnTrafficMirrorFilterRule")
         .destinationCidrBlock("destinationCidrBlock")
         .ruleAction("ruleAction")
         .ruleNumber(123)
         .sourceCidrBlock("sourceCidrBlock")
         .trafficDirection("trafficDirection")
         .trafficMirrorFilterId("trafficMirrorFilterId")
         // the properties below are optional
         .description("description")
         .destinationPortRange(TrafficMirrorPortRangeProperty.builder()
                 .fromPort(123)
                 .toPort(123)
                 .build())
         .protocol(123)
         .sourcePortRange(TrafficMirrorPortRangeProperty.builder()
                 .fromPort(123)
                 .toPort(123)
                 .build())
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTrafficMirrorFilterRule

      protected CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTrafficMirrorFilterRule

      protected CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTrafficMirrorFilterRule

      @Stability(Stable) public CfnTrafficMirrorFilterRule(@NotNull Construct scope, @NotNull String id, @NotNull CfnTrafficMirrorFilterRuleProps props)
      Create a new AWS::EC2::TrafficMirrorFilterRule.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getDestinationCidrBlock

      @Stability(Stable) @NotNull public String getDestinationCidrBlock()
      The destination CIDR block to assign to the Traffic Mirror rule.
    • setDestinationCidrBlock

      @Stability(Stable) public void setDestinationCidrBlock(@NotNull String value)
      The destination CIDR block to assign to the Traffic Mirror rule.
    • getRuleAction

      @Stability(Stable) @NotNull public String getRuleAction()
      The action to take on the filtered traffic.
    • setRuleAction

      @Stability(Stable) public void setRuleAction(@NotNull String value)
      The action to take on the filtered traffic.
    • getRuleNumber

      @Stability(Stable) @NotNull public Number getRuleNumber()
      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.

    • setRuleNumber

      @Stability(Stable) public void setRuleNumber(@NotNull Number value)
      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.

    • getSourceCidrBlock

      @Stability(Stable) @NotNull public String getSourceCidrBlock()
      The source CIDR block to assign to the Traffic Mirror rule.
    • setSourceCidrBlock

      @Stability(Stable) public void setSourceCidrBlock(@NotNull String value)
      The source CIDR block to assign to the Traffic Mirror rule.
    • getTrafficDirection

      @Stability(Stable) @NotNull public String getTrafficDirection()
      The type of traffic.
    • setTrafficDirection

      @Stability(Stable) public void setTrafficDirection(@NotNull String value)
      The type of traffic.
    • getTrafficMirrorFilterId

      @Stability(Stable) @NotNull public String getTrafficMirrorFilterId()
      The ID of the filter that this rule is associated with.
    • setTrafficMirrorFilterId

      @Stability(Stable) public void setTrafficMirrorFilterId(@NotNull String value)
      The ID of the filter that this rule is associated with.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the Traffic Mirror rule.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the Traffic Mirror rule.
    • getDestinationPortRange

      @Stability(Stable) @Nullable public Object getDestinationPortRange()
      The destination port range.
    • setDestinationPortRange

      @Stability(Stable) public void setDestinationPortRange(@Nullable IResolvable value)
      The destination port range.
    • setDestinationPortRange

      @Stability(Stable) public void setDestinationPortRange(@Nullable CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)
      The destination port range.
    • getProtocol

      @Stability(Stable) @Nullable public Number getProtocol()
      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.

    • setProtocol

      @Stability(Stable) public void setProtocol(@Nullable Number value)
      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.

    • getSourcePortRange

      @Stability(Stable) @Nullable public Object getSourcePortRange()
      The source port range.
    • setSourcePortRange

      @Stability(Stable) public void setSourcePortRange(@Nullable IResolvable value)
      The source port range.
    • setSourcePortRange

      @Stability(Stable) public void setSourcePortRange(@Nullable CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)
      The source port range.