Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . ec2 ]

describe-traffic-mirror-sessions

Description

Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

describe-traffic-mirror-sessions is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the --no-paginate argument. When using --output text and the --query argument on a paginated response, the --query argument must extract data from the results of the following query expressions: TrafficMirrorSessions

Synopsis

  describe-traffic-mirror-sessions
[--traffic-mirror-session-ids <value>]
[--dry-run | --no-dry-run]
[--filters <value>]
[--cli-input-json <value>]
[--starting-token <value>]
[--page-size <value>]
[--max-items <value>]
[--generate-cli-skeleton <value>]

Options

--traffic-mirror-session-ids (list)

The ID of the Traffic Mirror session.

Syntax:

"string" "string" ...

--dry-run | --no-dry-run (boolean)

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

--filters (list)

One or more filters. The possible values are:

  • description : The Traffic Mirror session description.
  • network-interface-id : The ID of the Traffic Mirror session network interface.
  • owner-id : The ID of the account that owns the Traffic Mirror session.
  • packet-length : The assigned number of packets to mirror.
  • session-number : The assigned session number.
  • traffic-mirror-filter-id : The ID of the Traffic Mirror filter.
  • traffic-mirror-session-id : The ID of the Traffic Mirror session.
  • traffic-mirror-target-id : The ID of the Traffic Mirror target.
  • virtual-network-id : The virtual network ID of the Traffic Mirror session.

Shorthand Syntax:

Name=string,Values=string,string ...

JSON Syntax:

[
  {
    "Name": "string",
    "Values": ["string", ...]
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--starting-token (string)

A token to specify where to start paginating. This is the NextToken from a previously truncated response.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--page-size (integer)

The size of each page to get in the AWS service call. This does not affect the number of items returned in the command's output. Setting a smaller page size results in more calls to the AWS service, retrieving fewer items in each call. This can help prevent the AWS service calls from timing out.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--max-items (integer)

The total number of items to return in the command's output. If the total number of items available is more than the value specified, a NextToken is provided in the command's output. To resume pagination, provide the NextToken value in the starting-token argument of a subsequent command. Do not use the NextToken response element directly outside of the AWS CLI.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To describe a Traffic Mirror Session

The following describe-traffic-mirror-sessions example displays details of the your Traffic Mirror sessions.

aws ec2 describe-traffic-mirror-sessions

Output:

{
    "TrafficMirrorSessions": [
        {
            "Tags": [],
            "VirtualNetworkId": 42,
            "OwnerId": "111122223333",
            "Description": "TCP Session",
            "NetworkInterfaceId": "eni-0a471a5cf3EXAMPLE",
            "TrafficMirrorTargetId": "tmt-0dabe9b0a6EXAMPLE",
            "TrafficMirrorFilterId": "tmf-083e18f985EXAMPLE",
            "PacketLength": 20,
            "SessionNumber": 1,
            "TrafficMirrorSessionId": "tms-0567a4c684EXAMPLE"
        },
        {
            "Tags": [
                {
                    "Key": "Name",
                    "Value": "tag test"
                }
            ],
            "VirtualNetworkId": 13314501,
            "OwnerId": "111122223333",
            "Description": "TCP Session",
            "NetworkInterfaceId": "eni-0a471a5cf3EXAMPLE",
            "TrafficMirrorTargetId": "tmt-03665551cbEXAMPLE",
            "TrafficMirrorFilterId": "tmf-06c787846cEXAMPLE",
            "SessionNumber": 2,
            "TrafficMirrorSessionId": "tms-0060101cf8EXAMPLE"
        }
    ]
}

For more information, see View Traffic Mirror Session Details in the AWS Traffic Mirroring Guide.

Output

TrafficMirrorSessions -> (list)

Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

(structure)

Describes a Traffic Mirror session.

TrafficMirrorSessionId -> (string)

The ID for the Traffic Mirror session.

TrafficMirrorTargetId -> (string)

The ID of the Traffic Mirror target.

TrafficMirrorFilterId -> (string)

The ID of the Traffic Mirror filter.

NetworkInterfaceId -> (string)

The ID of the Traffic Mirror session's network interface.

OwnerId -> (string)

The ID of the account that owns the Traffic Mirror session.

PacketLength -> (integer)

The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) 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. Do not specify this parameter when you want to mirror the entire packet

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.

Valid values are 1-32766.

VirtualNetworkId -> (integer)

The virtual network ID associated with the Traffic Mirror session.

Description -> (string)

The description of the Traffic Mirror session.

Tags -> (list)

The tags assigned to the Traffic Mirror session.

(structure)

Describes a tag.

Key -> (string)

The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

Value -> (string)

The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

NextToken -> (string)

The token to use to retrieve the next page of results. The value is null when there are no more results to return.