EC2.Client.
describe_traffic_mirror_sessions
(**kwargs)¶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
Request Syntax
response = client.describe_traffic_mirror_sessions(
TrafficMirrorSessionIds=[
'string',
],
DryRun=True|False,
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
MaxResults=123,
NextToken='string'
)
The ID of the Traffic Mirror session.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.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.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.
The name of the filter. Filter names are case-sensitive.
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.
nextToken
value.dict
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'
},
]
},
],
'NextToken': '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.
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.