@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.798Z") public class CfnTrafficMirrorFilterRule extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnTrafficMirrorFilterRule.Builder
A fluent builder for
CfnTrafficMirrorFilterRule . |
static interface |
CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty
Describes the Traffic Mirror port range.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnTrafficMirrorFilterRule(Construct scope,
java.lang.String id,
CfnTrafficMirrorFilterRuleProps props)
Create a new `AWS::EC2::TrafficMirrorFilterRule`.
|
protected |
CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
The description of the Traffic Mirror rule.
|
java.lang.String |
getDestinationCidrBlock()
The destination CIDR block to assign to the Traffic Mirror rule.
|
java.lang.Object |
getDestinationPortRange()
The destination port range.
|
java.lang.Number |
getProtocol()
The protocol, for example UDP, to assign to the Traffic Mirror rule.
|
java.lang.String |
getRuleAction()
The action to take on the filtered traffic.
|
java.lang.Number |
getRuleNumber()
The number of the Traffic Mirror rule.
|
java.lang.String |
getSourceCidrBlock()
The source CIDR block to assign to the Traffic Mirror rule.
|
java.lang.Object |
getSourcePortRange()
The source port range.
|
java.lang.String |
getTrafficDirection()
The type of traffic.
|
java.lang.String |
getTrafficMirrorFilterId()
The ID of the filter that this rule is associated with.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setDescription(java.lang.String value)
The description of the Traffic Mirror rule.
|
void |
setDestinationCidrBlock(java.lang.String value)
The destination CIDR block to assign to the Traffic Mirror rule.
|
void |
setDestinationPortRange(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)
The destination port range.
|
void |
setDestinationPortRange(IResolvable value)
The destination port range.
|
void |
setProtocol(java.lang.Number value)
The protocol, for example UDP, to assign to the Traffic Mirror rule.
|
void |
setRuleAction(java.lang.String value)
The action to take on the filtered traffic.
|
void |
setRuleNumber(java.lang.Number value)
The number of the Traffic Mirror rule.
|
void |
setSourceCidrBlock(java.lang.String value)
The source CIDR block to assign to the Traffic Mirror rule.
|
void |
setSourcePortRange(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)
The source port range.
|
void |
setSourcePortRange(IResolvable value)
The source port range.
|
void |
setTrafficDirection(java.lang.String value)
The type of traffic.
|
void |
setTrafficMirrorFilterId(java.lang.String value)
The ID of the filter that this rule is associated with.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnTrafficMirrorFilterRule(Construct scope, java.lang.String id, CfnTrafficMirrorFilterRuleProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getDestinationCidrBlock()
public void setDestinationCidrBlock(java.lang.String value)
public java.lang.String getRuleAction()
public void setRuleAction(java.lang.String value)
public java.lang.Number getRuleNumber()
This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.
public void setRuleNumber(java.lang.Number value)
This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.
public java.lang.String getSourceCidrBlock()
public void setSourceCidrBlock(java.lang.String value)
public java.lang.String getTrafficDirection()
public void setTrafficDirection(java.lang.String value)
public java.lang.String getTrafficMirrorFilterId()
public void setTrafficMirrorFilterId(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.Object getDestinationPortRange()
public void setDestinationPortRange(IResolvable value)
public void setDestinationPortRange(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)
public java.lang.Number getProtocol()
For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
public void setProtocol(java.lang.Number value)
For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
public java.lang.Object getSourcePortRange()
public void setSourcePortRange(IResolvable value)
public void setSourcePortRange(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)