Class CfnTrafficMirrorSession
A CloudFormation AWS::EC2::TrafficMirrorSession
.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnTrafficMirrorSession : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnTrafficMirrorSession
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::EC2::TrafficMirrorSession
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnTrafficMirrorSession = new CfnTrafficMirrorSession(this, "MyCfnTrafficMirrorSession", new CfnTrafficMirrorSessionProps {
NetworkInterfaceId = "networkInterfaceId",
SessionNumber = 123,
TrafficMirrorFilterId = "trafficMirrorFilterId",
TrafficMirrorTargetId = "trafficMirrorTargetId",
// the properties below are optional
Description = "description",
PacketLength = 123,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VirtualNetworkId = 123
});
Synopsis
Constructors
CfnTrafficMirrorSession(Construct, String, ICfnTrafficMirrorSessionProps) | Create a new |
CfnTrafficMirrorSession(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnTrafficMirrorSession(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | The description of the Traffic Mirror session. |
NetworkInterfaceId | The ID of the source network interface. |
PacketLength | The number of bytes in each packet to mirror. |
SessionNumber | The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. |
Tags | The tags to assign to a Traffic Mirror session. |
TrafficMirrorFilterId | The ID of the Traffic Mirror filter. |
TrafficMirrorTargetId | The ID of the Traffic Mirror target. |
VirtualNetworkId | The VXLAN ID for the Traffic Mirror session. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnTrafficMirrorSession(Construct, String, ICfnTrafficMirrorSessionProps)
Create a new AWS::EC2::TrafficMirrorSession
.
public CfnTrafficMirrorSession(Construct scope, string id, ICfnTrafficMirrorSessionProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnTrafficMirrorSessionProps
- resource properties.
CfnTrafficMirrorSession(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnTrafficMirrorSession(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnTrafficMirrorSession(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnTrafficMirrorSession(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
The description of the Traffic Mirror session.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
NetworkInterfaceId
The ID of the source network interface.
public virtual string NetworkInterfaceId { get; set; }
Property Value
System.String
Remarks
PacketLength
The number of bytes in each packet to mirror.
public virtual Nullable<double> PacketLength { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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.
SessionNumber
The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions.
public virtual double SessionNumber { get; set; }
Property Value
System.Double
Remarks
The first session with a matching filter is the one that mirrors the packets.
Valid values are 1-32766.
Tags
The tags to assign to a Traffic Mirror session.
public virtual TagManager Tags { get; }
Property Value
Remarks
TrafficMirrorFilterId
The ID of the Traffic Mirror filter.
public virtual string TrafficMirrorFilterId { get; set; }
Property Value
System.String
Remarks
TrafficMirrorTargetId
The ID of the Traffic Mirror target.
public virtual string TrafficMirrorTargetId { get; set; }
Property Value
System.String
Remarks
VirtualNetworkId
The VXLAN ID for the Traffic Mirror session.
public virtual Nullable<double> VirtualNetworkId { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
For more information about the VXLAN protocol, see RFC 7348 . If you do not specify a VirtualNetworkId
, an account-wide unique id is chosen at random.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>