Class CfnTrafficMirrorSessionProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnTrafficMirrorSessionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTrafficMirrorSessionProps>
- Enclosing interface:
CfnTrafficMirrorSessionProps
@Stability(Stable)
public static final class CfnTrafficMirrorSessionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTrafficMirrorSessionProps>
A builder for
CfnTrafficMirrorSessionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.description
(String description) Sets the value ofCfnTrafficMirrorSessionProps.getDescription()
networkInterfaceId
(String networkInterfaceId) Sets the value ofCfnTrafficMirrorSessionProps.getNetworkInterfaceId()
packetLength
(Number packetLength) Sets the value ofCfnTrafficMirrorSessionProps.getPacketLength()
sessionNumber
(Number sessionNumber) Sets the value ofCfnTrafficMirrorSessionProps.getSessionNumber()
Sets the value ofCfnTrafficMirrorSessionProps.getTags()
trafficMirrorFilterId
(String trafficMirrorFilterId) Sets the value ofCfnTrafficMirrorSessionProps.getTrafficMirrorFilterId()
trafficMirrorTargetId
(String trafficMirrorTargetId) Sets the value ofCfnTrafficMirrorSessionProps.getTrafficMirrorTargetId()
virtualNetworkId
(Number virtualNetworkId) Sets the value ofCfnTrafficMirrorSessionProps.getVirtualNetworkId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
networkInterfaceId
@Stability(Stable) public CfnTrafficMirrorSessionProps.Builder networkInterfaceId(String networkInterfaceId) Sets the value ofCfnTrafficMirrorSessionProps.getNetworkInterfaceId()
- Parameters:
networkInterfaceId
- The ID of the source network interface. This parameter is required.- Returns:
this
-
sessionNumber
Sets the value ofCfnTrafficMirrorSessionProps.getSessionNumber()
- Parameters:
sessionNumber
- The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. This parameter is required. The first session with a matching filter is the one that mirrors the packets.Valid values are 1-32766.
- Returns:
this
-
trafficMirrorFilterId
@Stability(Stable) public CfnTrafficMirrorSessionProps.Builder trafficMirrorFilterId(String trafficMirrorFilterId) Sets the value ofCfnTrafficMirrorSessionProps.getTrafficMirrorFilterId()
- Parameters:
trafficMirrorFilterId
- The ID of the Traffic Mirror filter. This parameter is required.- Returns:
this
-
trafficMirrorTargetId
@Stability(Stable) public CfnTrafficMirrorSessionProps.Builder trafficMirrorTargetId(String trafficMirrorTargetId) Sets the value ofCfnTrafficMirrorSessionProps.getTrafficMirrorTargetId()
- Parameters:
trafficMirrorTargetId
- The ID of the Traffic Mirror target. This parameter is required.- Returns:
this
-
description
Sets the value ofCfnTrafficMirrorSessionProps.getDescription()
- Parameters:
description
- The description of the Traffic Mirror session.- Returns:
this
-
packetLength
Sets the value ofCfnTrafficMirrorSessionProps.getPacketLength()
- Parameters:
packetLength
- The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target.If you do not want to mirror the entire packet, use the
PacketLength
parameter to specify the number of bytes in each packet to mirror.For sessions with Network Load Balancer (NLB) Traffic Mirror targets the default
PacketLength
will be set to 8500. Valid values are 1-8500. Setting aPacketLength
greater than 8500 will result in an error response.- Returns:
this
-
tags
Sets the value ofCfnTrafficMirrorSessionProps.getTags()
- Parameters:
tags
- The tags to assign to a Traffic Mirror session.- Returns:
this
-
virtualNetworkId
@Stability(Stable) public CfnTrafficMirrorSessionProps.Builder virtualNetworkId(Number virtualNetworkId) Sets the value ofCfnTrafficMirrorSessionProps.getVirtualNetworkId()
- Parameters:
virtualNetworkId
- The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348 . If you do not specify aVirtualNetworkId
, an account-wide unique ID is chosen at random.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnTrafficMirrorSessionProps>
- Returns:
- a new instance of
CfnTrafficMirrorSessionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-