Class CfnTrafficMirrorFilterRule.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnTrafficMirrorFilterRule.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTrafficMirrorFilterRule>
- Enclosing class:
CfnTrafficMirrorFilterRule
@Stability(Stable)
public static final class CfnTrafficMirrorFilterRule.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTrafficMirrorFilterRule>
A fluent builder for
CfnTrafficMirrorFilterRule
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
description
(String description) The description of the Traffic Mirror rule.destinationCidrBlock
(String destinationCidrBlock) The destination CIDR block to assign to the Traffic Mirror rule.destinationPortRange
(IResolvable destinationPortRange) The destination port range.destinationPortRange
(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty destinationPortRange) The destination port range.The protocol, for example UDP, to assign to the Traffic Mirror rule.ruleAction
(String ruleAction) The action to take on the filtered traffic.ruleNumber
(Number ruleNumber) The number of the Traffic Mirror rule.sourceCidrBlock
(String sourceCidrBlock) The source CIDR block to assign to the Traffic Mirror rule.sourcePortRange
(IResolvable sourcePortRange) The source port range.sourcePortRange
(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty sourcePortRange) The source port range.trafficDirection
(String trafficDirection) The type of traffic.trafficMirrorFilterId
(String trafficMirrorFilterId) The ID of the filter that this rule is associated with.
-
Method Details
-
create
@Stability(Stable) public static CfnTrafficMirrorFilterRule.Builder create(Construct scope, String id) - Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnTrafficMirrorFilterRule.Builder
.
-
destinationCidrBlock
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder destinationCidrBlock(String destinationCidrBlock) The destination CIDR block to assign to the Traffic Mirror rule.- Parameters:
destinationCidrBlock
- The destination CIDR block to assign to the Traffic Mirror rule. This parameter is required.- Returns:
this
-
ruleAction
The action to take on the filtered traffic.- Parameters:
ruleAction
- The action to take on the filtered traffic. This parameter is required.- Returns:
this
-
ruleNumber
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.
- Parameters:
ruleNumber
- The number of the Traffic Mirror rule. This parameter is required.- Returns:
this
-
sourceCidrBlock
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder sourceCidrBlock(String sourceCidrBlock) The source CIDR block to assign to the Traffic Mirror rule.- Parameters:
sourceCidrBlock
- The source CIDR block to assign to the Traffic Mirror rule. This parameter is required.- Returns:
this
-
trafficDirection
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder trafficDirection(String trafficDirection) The type of traffic.- Parameters:
trafficDirection
- The type of traffic. This parameter is required.- Returns:
this
-
trafficMirrorFilterId
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder trafficMirrorFilterId(String trafficMirrorFilterId) The ID of the filter that this rule is associated with.- Parameters:
trafficMirrorFilterId
- The ID of the filter that this rule is associated with. This parameter is required.- Returns:
this
-
description
The description of the Traffic Mirror rule.- Parameters:
description
- The description of the Traffic Mirror rule. This parameter is required.- Returns:
this
-
destinationPortRange
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder destinationPortRange(IResolvable destinationPortRange) The destination port range.- Parameters:
destinationPortRange
- The destination port range. This parameter is required.- Returns:
this
-
destinationPortRange
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder destinationPortRange(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty destinationPortRange) The destination port range.- Parameters:
destinationPortRange
- The destination port range. This parameter is required.- Returns:
this
-
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.
- Parameters:
protocol
- The protocol, for example UDP, to assign to the Traffic Mirror rule. This parameter is required.- Returns:
this
-
sourcePortRange
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder sourcePortRange(IResolvable sourcePortRange) The source port range.- Parameters:
sourcePortRange
- The source port range. This parameter is required.- Returns:
this
-
sourcePortRange
@Stability(Stable) public CfnTrafficMirrorFilterRule.Builder sourcePortRange(CfnTrafficMirrorFilterRule.TrafficMirrorPortRangeProperty sourcePortRange) The source port range.- Parameters:
sourcePortRange
- The source port range. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnTrafficMirrorFilterRule>
- Returns:
- a newly built instance of
CfnTrafficMirrorFilterRule
.
-