CfnTrafficMirrorSessionProps Struct
Properties for defining a CfnTrafficMirrorSession.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnTrafficMirrorSessionProps: ec2.CfnTrafficMirrorSessionProps = {
networkInterfaceId: 'networkInterfaceId',
sessionNumber: 123,
trafficMirrorFilterId: 'trafficMirrorFilterId',
trafficMirrorTargetId: 'trafficMirrorTargetId',
// the properties below are optional
description: 'description',
ownerId: 'ownerId',
packetLength: 123,
tags: [{
key: 'key',
value: 'value',
}],
virtualNetworkId: 123,
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
cfn_traffic_mirror_session_props = ec2.CfnTrafficMirrorSessionProps(
network_interface_id="networkInterfaceId",
session_number=123,
traffic_mirror_filter_id="trafficMirrorFilterId",
traffic_mirror_target_id="trafficMirrorTargetId",
# the properties below are optional
description="description",
owner_id="ownerId",
packet_length=123,
tags=[CfnTag(
key="key",
value="value"
)],
virtual_network_id=123
)
// 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.*;
CfnTrafficMirrorSessionProps cfnTrafficMirrorSessionProps = CfnTrafficMirrorSessionProps.builder()
.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();
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnTrafficMirrorSessionProps = new CfnTrafficMirrorSessionProps {
NetworkInterfaceId = "networkInterfaceId",
SessionNumber = 123,
TrafficMirrorFilterId = "trafficMirrorFilterId",
TrafficMirrorTargetId = "trafficMirrorTargetId",
// the properties below are optional
Description = "description",
OwnerId = "ownerId",
PacketLength = 123,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VirtualNetworkId = 123
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnTrafficMirrorSessionProps := &CfnTrafficMirrorSessionProps{
NetworkInterfaceId: jsii.String("networkInterfaceId"),
SessionNumber: jsii.Number(123),
TrafficMirrorFilterId: jsii.String("trafficMirrorFilterId"),
TrafficMirrorTargetId: jsii.String("trafficMirrorTargetId"),
// the properties below are optional
Description: jsii.String("description"),
OwnerId: jsii.String("ownerId"),
PacketLength: jsii.Number(123),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
VirtualNetworkId: jsii.Number(123),
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #networkInterfaceIdstringnetwork_interface_idstrnetworkInterfaceIdStringNetworkInterfaceIdstringNetworkInterfaceId*string required #ownerIdoptionalstringowner_idoptionalstrownerIdoptionalStringOwnerIdoptionalstringOwnerIdoptional*string #packetLengthoptionalnumberpacket_lengthoptionalint | floatpacketLengthoptionalNumberPacketLengthoptionaldoublePacketLengthoptional*float64 #notes
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 a PacketLength greater than 8500 will result in an error response.
sessionNumbernumbersession_numberint | floatsessionNumberNumberSessionNumberdoubleSessionNumber*float64 required #The first session with a matching filter is the one that mirrors the packets.
Valid values are 1-32766.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #trafficMirrorFilterIdstringtraffic_mirror_filter_idstrtrafficMirrorFilterIdStringTrafficMirrorFilterIdstringTrafficMirrorFilterId*string required #trafficMirrorTargetIdstringtraffic_mirror_target_idstrtrafficMirrorTargetIdStringTrafficMirrorTargetIdstringTrafficMirrorTargetId*string required #virtualNetworkIdoptionalnumbervirtual_network_idoptionalint | floatvirtualNetworkIdoptionalNumberVirtualNetworkIdoptionaldoubleVirtualNetworkIdoptional*float64 #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.