Class CfnTrafficMirrorSession
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.CfnTrafficMirrorSession
- All Implemented Interfaces:
IInspectable,ITaggable,ITrafficMirrorSessionRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:09.481Z")
@Stability(Stable)
public class CfnTrafficMirrorSession
extends CfnResource
implements IInspectable, ITrafficMirrorSessionRef, ITaggable
Creates a Traffic Mirror session.
A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create a filter, and then assign it to the session to define a subset of the traffic to mirror, for example all TCP traffic.
The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway.
By default, no traffic is mirrored. Use AWS::EC2::TrafficMirrorFilterRule to specify filter rules that specify the traffic to mirror.
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.*;
CfnTrafficMirrorSession cfnTrafficMirrorSession = CfnTrafficMirrorSession.Builder.create(this, "MyCfnTrafficMirrorSession")
.networkInterfaceId("networkInterfaceId")
.sessionNumber(123)
.trafficMirrorFilterId("trafficMirrorFilterId")
.trafficMirrorTargetId("trafficMirrorTargetId")
// the properties below are optional
.description("description")
.ownerId("ownerId")
.packetLength(123)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.virtualNetworkId(123)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnTrafficMirrorSession.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.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.ITrafficMirrorSessionRef
ITrafficMirrorSessionRef.Jsii$Default, ITrafficMirrorSessionRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTrafficMirrorSession(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTrafficMirrorSession(software.amazon.jsii.JsiiObjectRef objRef) CfnTrafficMirrorSession(software.constructs.Construct scope, String id, CfnTrafficMirrorSessionProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic ITrafficMirrorSessionReffromTrafficMirrorSessionId(software.constructs.Construct scope, String id, String trafficMirrorSessionId) Creates a new ITrafficMirrorSessionRef from a trafficMirrorSessionId.The ID of a Traffic Mirror session.The description of the Traffic Mirror session.The ID of the source network interface.The ID of the account that owns the Traffic Mirror session.The number of bytes in each packet to mirror.The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions.getTags()Tag Manager which manages the tags for this resource.The tags to assign to a Traffic Mirror session.The ID of the Traffic Mirror filter.A reference to a TrafficMirrorSession resource.The ID of the Traffic Mirror target.The VXLAN ID for the Traffic Mirror session.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) The description of the Traffic Mirror session.voidsetNetworkInterfaceId(String value) The ID of the source network interface.voidsetOwnerId(String value) The ID of the account that owns the Traffic Mirror session.voidsetPacketLength(Number value) The number of bytes in each packet to mirror.voidsetSessionNumber(Number value) The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions.voidsetTagsRaw(List<CfnTag> value) The tags to assign to a Traffic Mirror session.voidsetTrafficMirrorFilterId(String value) The ID of the Traffic Mirror filter.voidsetTrafficMirrorTargetId(String value) The ID of the Traffic Mirror target.voidsetVirtualNetworkId(Number value) The VXLAN ID for the Traffic Mirror session.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, 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, overrideLogicalIdMethods 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
getNodeMethods 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
-
CfnTrafficMirrorSession
protected CfnTrafficMirrorSession(software.amazon.jsii.JsiiObjectRef objRef) -
CfnTrafficMirrorSession
protected CfnTrafficMirrorSession(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnTrafficMirrorSession
@Stability(Stable) public CfnTrafficMirrorSession(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTrafficMirrorSessionProps props) - 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
-
fromTrafficMirrorSessionId
@Stability(Stable) @NotNull public static ITrafficMirrorSessionRef fromTrafficMirrorSessionId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String trafficMirrorSessionId) Creates a new ITrafficMirrorSessionRef from a trafficMirrorSessionId.- Parameters:
scope- This parameter is required.id- This parameter is required.trafficMirrorSessionId- 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.
-
getAttrId
The ID of a Traffic Mirror session. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getTrafficMirrorSessionRef
A reference to a TrafficMirrorSession resource.- Specified by:
getTrafficMirrorSessionRefin interfaceITrafficMirrorSessionRef
-
getNetworkInterfaceId
The ID of the source network interface. -
setNetworkInterfaceId
The ID of the source network interface. -
getSessionNumber
The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. -
setSessionNumber
The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. -
getTrafficMirrorFilterId
The ID of the Traffic Mirror filter. -
setTrafficMirrorFilterId
The ID of the Traffic Mirror filter. -
getTrafficMirrorTargetId
The ID of the Traffic Mirror target. -
setTrafficMirrorTargetId
The ID of the Traffic Mirror target. -
getDescription
The description of the Traffic Mirror session. -
setDescription
The description of the Traffic Mirror session. -
getOwnerId
The ID of the account that owns the Traffic Mirror session. -
setOwnerId
The ID of the account that owns the Traffic Mirror session. -
getPacketLength
The number of bytes in each packet to mirror. -
setPacketLength
The number of bytes in each packet to mirror. -
getTagsRaw
The tags to assign to a Traffic Mirror session. -
setTagsRaw
The tags to assign to a Traffic Mirror session. -
getVirtualNetworkId
The VXLAN ID for the Traffic Mirror session. -
setVirtualNetworkId
The VXLAN ID for the Traffic Mirror session.
-