1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ec2
  5. TrafficMirrorSession

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.32.0 published on Wednesday, Aug 13, 2025 by Pulumi

aws-native.ec2.TrafficMirrorSession

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.32.0 published on Wednesday, Aug 13, 2025 by Pulumi

    Resource schema for AWS::EC2::TrafficMirrorSession

    Create TrafficMirrorSession Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TrafficMirrorSession(name: string, args: TrafficMirrorSessionArgs, opts?: CustomResourceOptions);
    @overload
    def TrafficMirrorSession(resource_name: str,
                             args: TrafficMirrorSessionArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def TrafficMirrorSession(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             network_interface_id: Optional[str] = None,
                             session_number: Optional[int] = None,
                             traffic_mirror_filter_id: Optional[str] = None,
                             traffic_mirror_target_id: Optional[str] = None,
                             description: Optional[str] = None,
                             owner_id: Optional[str] = None,
                             packet_length: Optional[int] = None,
                             tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
                             virtual_network_id: Optional[int] = None)
    func NewTrafficMirrorSession(ctx *Context, name string, args TrafficMirrorSessionArgs, opts ...ResourceOption) (*TrafficMirrorSession, error)
    public TrafficMirrorSession(string name, TrafficMirrorSessionArgs args, CustomResourceOptions? opts = null)
    public TrafficMirrorSession(String name, TrafficMirrorSessionArgs args)
    public TrafficMirrorSession(String name, TrafficMirrorSessionArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:TrafficMirrorSession
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args TrafficMirrorSessionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args TrafficMirrorSessionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args TrafficMirrorSessionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrafficMirrorSessionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrafficMirrorSessionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TrafficMirrorSession Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TrafficMirrorSession resource accepts the following input properties:

    NetworkInterfaceId string
    The ID of the source network interface.
    SessionNumber int
    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
    TrafficMirrorFilterId string
    The ID of a Traffic Mirror filter.
    TrafficMirrorTargetId string
    The ID of a Traffic Mirror target.
    Description string
    The description of the Traffic Mirror session.
    OwnerId string
    The ID of the account that owns the Traffic Mirror session.
    PacketLength int
    The number of bytes in each packet to mirror.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    The tags assigned to the Traffic Mirror session.
    VirtualNetworkId int
    The VXLAN ID for the Traffic Mirror session.
    NetworkInterfaceId string
    The ID of the source network interface.
    SessionNumber int
    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
    TrafficMirrorFilterId string
    The ID of a Traffic Mirror filter.
    TrafficMirrorTargetId string
    The ID of a Traffic Mirror target.
    Description string
    The description of the Traffic Mirror session.
    OwnerId string
    The ID of the account that owns the Traffic Mirror session.
    PacketLength int
    The number of bytes in each packet to mirror.
    Tags TagArgs
    The tags assigned to the Traffic Mirror session.
    VirtualNetworkId int
    The VXLAN ID for the Traffic Mirror session.
    networkInterfaceId String
    The ID of the source network interface.
    sessionNumber Integer
    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
    trafficMirrorFilterId String
    The ID of a Traffic Mirror filter.
    trafficMirrorTargetId String
    The ID of a Traffic Mirror target.
    description String
    The description of the Traffic Mirror session.
    ownerId String
    The ID of the account that owns the Traffic Mirror session.
    packetLength Integer
    The number of bytes in each packet to mirror.
    tags List<Tag>
    The tags assigned to the Traffic Mirror session.
    virtualNetworkId Integer
    The VXLAN ID for the Traffic Mirror session.
    networkInterfaceId string
    The ID of the source network interface.
    sessionNumber number
    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
    trafficMirrorFilterId string
    The ID of a Traffic Mirror filter.
    trafficMirrorTargetId string
    The ID of a Traffic Mirror target.
    description string
    The description of the Traffic Mirror session.
    ownerId string
    The ID of the account that owns the Traffic Mirror session.
    packetLength number
    The number of bytes in each packet to mirror.
    tags Tag[]
    The tags assigned to the Traffic Mirror session.
    virtualNetworkId number
    The VXLAN ID for the Traffic Mirror session.
    network_interface_id str
    The ID of the source network interface.
    session_number int
    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
    traffic_mirror_filter_id str
    The ID of a Traffic Mirror filter.
    traffic_mirror_target_id str
    The ID of a Traffic Mirror target.
    description str
    The description of the Traffic Mirror session.
    owner_id str
    The ID of the account that owns the Traffic Mirror session.
    packet_length int
    The number of bytes in each packet to mirror.
    tags Sequence[TagArgs]
    The tags assigned to the Traffic Mirror session.
    virtual_network_id int
    The VXLAN ID for the Traffic Mirror session.
    networkInterfaceId String
    The ID of the source network interface.
    sessionNumber Number
    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.
    trafficMirrorFilterId String
    The ID of a Traffic Mirror filter.
    trafficMirrorTargetId String
    The ID of a Traffic Mirror target.
    description String
    The description of the Traffic Mirror session.
    ownerId String
    The ID of the account that owns the Traffic Mirror session.
    packetLength Number
    The number of bytes in each packet to mirror.
    tags List<Property Map>
    The tags assigned to the Traffic Mirror session.
    virtualNetworkId Number
    The VXLAN ID for the Traffic Mirror session.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TrafficMirrorSession resource produces the following output properties:

    AwsId string
    The ID of a Traffic Mirror session.
    Id string
    The provider-assigned unique ID for this managed resource.
    AwsId string
    The ID of a Traffic Mirror session.
    Id string
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID of a Traffic Mirror session.
    id String
    The provider-assigned unique ID for this managed resource.
    awsId string
    The ID of a Traffic Mirror session.
    id string
    The provider-assigned unique ID for this managed resource.
    aws_id str
    The ID of a Traffic Mirror session.
    id str
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID of a Traffic Mirror session.
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.32.0 published on Wednesday, Aug 13, 2025 by Pulumi