Class CfnTrafficMirrorFilterRule
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ec2.CfnTrafficMirrorFilterRule
- All Implemented Interfaces:
IInspectable,ITrafficMirrorFilterRuleRef,IEnvironmentAware,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-10T14:49:43.414Z")
@Stability(Stable)
public class CfnTrafficMirrorFilterRule
extends CfnResource
implements IInspectable, ITrafficMirrorFilterRuleRef, ITaggableV2
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())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnTrafficMirrorFilterRule.static interfaceDescribes the Traffic Mirror port range.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.ec2.ITrafficMirrorFilterRuleRef
ITrafficMirrorFilterRuleRef.Jsii$Default, ITrafficMirrorFilterRuleRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObjectRef objRef) CfnTrafficMirrorFilterRule(software.constructs.Construct scope, String id, CfnTrafficMirrorFilterRuleProps props) Create a newAWS::EC2::TrafficMirrorFilterRule. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic ITrafficMirrorFilterRuleReffromTrafficMirrorFilterRuleId(software.constructs.Construct scope, String id, String trafficMirrorFilterRuleId) Creates a new ITrafficMirrorFilterRuleRef from a trafficMirrorFilterRuleId.The ID of the Traffic Mirror rule.Tag Manager which manages the tags for this resource.The description of the Traffic Mirror rule.The destination CIDR block to assign to the Traffic Mirror rule.The destination port range.The protocol, for example UDP, to assign to the Traffic Mirror rule.The action to take on the filtered traffic.The number of the Traffic Mirror rule.The source CIDR block to assign to the Traffic Mirror rule.The source port range.getTags()Tags on Traffic Mirroring filter rules.The type of traffic.The ID of the filter that this rule is associated with.A reference to a TrafficMirrorFilterRule resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnTrafficMirrorFilterRule.renderProperties(Map<String, Object> props) voidsetDescription(String value) The description of the Traffic Mirror rule.voidsetDestinationCidrBlock(String value) The destination CIDR block to assign to the Traffic Mirror rule.voidThe destination port range.voidThe destination port range.voidsetProtocol(Number value) The protocol, for example UDP, to assign to the Traffic Mirror rule.voidsetRuleAction(String value) The action to take on the filtered traffic.voidsetRuleNumber(Number value) The number of the Traffic Mirror rule.voidsetSourceCidrBlock(String value) The source CIDR block to assign to the Traffic Mirror rule.voidsetSourcePortRange(IResolvable value) The source port range.voidThe source port range.voidTags on Traffic Mirroring filter rules.voidsetTrafficDirection(String value) The type of traffic.voidsetTrafficMirrorFilterId(String value) The ID of the filter that this rule is associated with.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId, withMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnTrafficMirrorFilterRuleProps props) Create a newAWS::EC2::TrafficMirrorFilterRule.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForTrafficMirrorFilterRule
@Stability(Stable) @NotNull public static String arnForTrafficMirrorFilterRule(@NotNull ITrafficMirrorFilterRuleRef resource) - Parameters:
resource- This parameter is required.
-
fromTrafficMirrorFilterRuleId
@Stability(Stable) @NotNull public static ITrafficMirrorFilterRuleRef fromTrafficMirrorFilterRuleId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String trafficMirrorFilterRuleId) Creates a new ITrafficMirrorFilterRuleRef from a trafficMirrorFilterRuleId.- Parameters:
scope- This parameter is required.id- This parameter is required.trafficMirrorFilterRuleId- This parameter is required.
-
isCfnTrafficMirrorFilterRule
Checks whether the given object is a CfnTrafficMirrorFilterRule.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrTrafficMirrorFilterRuleId
The ID of the Traffic Mirror rule. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTrafficMirrorFilterRuleRef
A reference to a TrafficMirrorFilterRule resource.- Specified by:
getTrafficMirrorFilterRuleRefin interfaceITrafficMirrorFilterRuleRef
-
getDestinationCidrBlock
The destination CIDR block to assign to the Traffic Mirror rule. -
setDestinationCidrBlock
The destination CIDR block to assign to the Traffic Mirror rule. -
getRuleAction
The action to take on the filtered traffic. -
setRuleAction
The action to take on the filtered traffic. -
getRuleNumber
The number of the Traffic Mirror rule. -
setRuleNumber
The number of the Traffic Mirror rule. -
getSourceCidrBlock
The source CIDR block to assign to the Traffic Mirror rule. -
setSourceCidrBlock
The source CIDR block to assign to the Traffic Mirror rule. -
getTrafficDirection
The type of traffic. -
setTrafficDirection
The type of traffic. -
getTrafficMirrorFilterId
The ID of the filter that this rule is associated with. -
setTrafficMirrorFilterId
The ID of the filter that this rule is associated with. -
getDescription
The description of the Traffic Mirror rule. -
setDescription
The description of the Traffic Mirror rule. -
getDestinationPortRange
The destination port range.Returns union: either
IResolvableorCfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty -
setDestinationPortRange
The destination port range. -
setDestinationPortRange
@Stability(Stable) public void setDestinationPortRange(@Nullable CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value) The destination port range. -
getProtocol
The protocol, for example UDP, to assign to the Traffic Mirror rule. -
setProtocol
The protocol, for example UDP, to assign to the Traffic Mirror rule. -
getSourcePortRange
The source port range.Returns union: either
IResolvableorCfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty -
setSourcePortRange
The source port range. -
setSourcePortRange
@Stability(Stable) public void setSourcePortRange(@Nullable CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value) The source port range. -
getTags
Tags on Traffic Mirroring filter rules. -
setTags
Tags on Traffic Mirroring filter rules.
-