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
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.110.0 (build 336b265)",
date="2025-04-24T21:15:50.892Z")
@Stability(Stable)
public class CfnTrafficMirrorSession
extends CfnResource
implements IInspectable, 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") .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 class
A fluent builder forCfnTrafficMirrorSession
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnTrafficMirrorSession
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnTrafficMirrorSession
(software.amazon.jsii.JsiiObjectRef objRef) CfnTrafficMirrorSession
(software.constructs.Construct scope, String id, CfnTrafficMirrorSessionProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe description of the Traffic Mirror session.The ID of the source network interface.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.The ID of the Traffic Mirror target.The VXLAN ID for the Traffic Mirror session.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDescription
(String value) The description of the Traffic Mirror session.void
setNetworkInterfaceId
(String value) The ID of the source network interface.void
setPacketLength
(Number value) The number of bytes in each packet to mirror.void
setSessionNumber
(Number value) The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions.void
setTagsRaw
(List<CfnTag> value) The tags to assign to a Traffic Mirror session.void
setTrafficMirrorFilterId
(String value) The ID of the Traffic Mirror filter.void
setTrafficMirrorTargetId
(String value) The ID of the Traffic Mirror target.void
setVirtualNetworkId
(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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
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. -
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.
-