EC2 / Paginator / DescribeTrafficMirrorSessions

DescribeTrafficMirrorSessions#

class EC2.Paginator.DescribeTrafficMirrorSessions#
paginator = client.get_paginator('describe_traffic_mirror_sessions')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from EC2.Client.describe_traffic_mirror_sessions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TrafficMirrorSessionIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • TrafficMirrorSessionIds (list) –

    The ID of the Traffic Mirror session.

    • (string) –

  • DryRun (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.

    • (dict) –

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

      • Name (string) –

        The name of the filter. Filter names are case-sensitive.

      • Values (list) –

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

        • (string) –

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

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

Return type:

dict

Returns:

Response Syntax

{
    'TrafficMirrorSessions': [
        {
            'TrafficMirrorSessionId': 'string',
            'TrafficMirrorTargetId': 'string',
            'TrafficMirrorFilterId': 'string',
            'NetworkInterfaceId': 'string',
            'OwnerId': 'string',
            'PacketLength': 123,
            'SessionNumber': 123,
            'VirtualNetworkId': 123,
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) –

    • TrafficMirrorSessions (list) –

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

      • (dict) –

        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.

          • (dict) –

            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 256 Unicode characters.