@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.341Z") @Stability(value=Stable) 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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnTrafficMirrorFilterRule(software.constructs.Construct scope,
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 Map<String,Object> |
getCfnProperties() |
String |
getDescription()
The description of the Traffic Mirror rule.
|
String |
getDestinationCidrBlock()
The destination CIDR block to assign to the Traffic Mirror rule.
|
Object |
getDestinationPortRange()
The destination port range.
|
Number |
getProtocol()
The protocol, for example UDP, to assign to the Traffic Mirror rule.
|
String |
getRuleAction()
The action to take on the filtered traffic.
|
Number |
getRuleNumber()
The number of the Traffic Mirror rule.
|
String |
getSourceCidrBlock()
The source CIDR block to assign to the Traffic Mirror rule.
|
Object |
getSourcePortRange()
The source port range.
|
String |
getTrafficDirection()
The type of traffic.
|
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 Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDescription(String value)
The description of the Traffic Mirror rule.
|
void |
setDestinationCidrBlock(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(Number value)
The protocol, for example UDP, to assign to the Traffic Mirror rule.
|
void |
setRuleAction(String value)
The action to take on the filtered traffic.
|
void |
setRuleNumber(Number value)
The number of the Traffic Mirror rule.
|
void |
setSourceCidrBlock(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(String value)
The type of traffic.
|
void |
setTrafficMirrorFilterId(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, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTrafficMirrorFilterRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnTrafficMirrorFilterRule(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getDestinationCidrBlock()
@Stability(value=Stable)
public void setDestinationCidrBlock(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getRuleAction()
@Stability(value=Stable)
public void setRuleAction(@NotNull
String value)
@Stability(value=Stable) @NotNull public 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.
@Stability(value=Stable)
public void setRuleNumber(@NotNull
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.
@Stability(value=Stable) @NotNull public String getSourceCidrBlock()
@Stability(value=Stable)
public void setSourceCidrBlock(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getTrafficDirection()
@Stability(value=Stable)
public void setTrafficDirection(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getTrafficMirrorFilterId()
@Stability(value=Stable)
public void setTrafficMirrorFilterId(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getDestinationPortRange()
@Stability(value=Stable)
public void setDestinationPortRange(@Nullable
CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)
@Stability(value=Stable)
public void setDestinationPortRange(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Number getProtocol()
For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
@Stability(value=Stable)
public void setProtocol(@Nullable
Number value)
For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.
@Stability(value=Stable) @Nullable public Object getSourcePortRange()
@Stability(value=Stable)
public void setSourcePortRange(@Nullable
CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty value)
@Stability(value=Stable)
public void setSourcePortRange(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.