Queries details about a traffic mirror session.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates a sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTrafficMirrorSessions

The operation that you want to perform. Set the value to ListTrafficMirrorSessions.

RegionId String Yes cn-hongkong

The ID of the region to which the traffic mirror session belongs. You can call the DescribeRegions operation to query the most recent region list. For more information about regions that support traffic mirroring, see Overview of traffic mirroring.

TrafficMirrorSessionName String No abc

The name of the traffic mirror session.

MaxResults Integer No 10

The maximum number of records to be returned for the query. Valid values: 1 to 100. Default value: 10.

NextToken String No caeba0bbb2be03f84eb48b699f0a4883

The query token. Set this parameter to the value of the NextToken parameter that is returned in the last API call. If no subsequent request is sent, you do not need to set this parameter.

TrafficMirrorSessionIds.N RepeatList No tms-j6cla50buc44ap8tu****

The ID of the traffic mirror session. The maximum value of N is 100, which indicates that you can query at most 100 traffic mirror sessions at a time.

TrafficMirrorSourceId String No eni-j6c8znm5l1yt4sox*****

The ID of the mirror source. You can specify only an elastic network interface (ENI) as the mirror source.

TrafficMirrorTargetId String No eni-j6c2fp57q8rr47rp****

The ID of the mirror destination. You can specify only an ENI or a Server Load Balancer (SLB) instance as a mirror destination.

TrafficMirrorFilterId String No tmf-j6cmls82xnc86vtpe****

The ID of the filter.

VirtualNetworkId Integer No 10

The VXLAN network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values: 0 to 16777215. You can specify VNIs for the traffic mirror destination to identify mirrored traffic from different sessions. If you do not specify a VNI, the system randomly allocates a VNI. If you want the system to randomly allocate a VNI, ignore this parameter.

Priority Integer No 1

The priority of the traffic mirror session. Valid values: 1 to 32766.

A smaller value indicates a higher priority. You cannot specify the same priority for traffic mirror sessions that are created in the same region with the same Alibaba Cloud account.

Enabled Boolean No false

Specifies whether to enable traffic mirror sessions.

  • false (default): no
  • true: yes

Response parameters

Parameter Type Example Description
NextToken String caeba0bbb2be03f84eb48b699f0a4883

The token that is required for the next query. If the NextToken parameter is empty, no subsequent request will be sent.

RequestId String 739CA01C-92EB-4C69-BCC0-280149C6F41E

The ID of the request.

TotalCount String 1

The total number of entries returned.

TrafficMirrorSessions Array of TrafficMirrorSession

The list of details about traffic mirror sessions.

Enabled Boolean false

Indicates whether traffic mirror sessions are enabled.

  • false (default): no
  • true: yes
PacketLength Integer 1500

The maximum transmission unit (MTU).

Priority Integer 1

The priority of the traffic mirror session.

A smaller value indicates a higher priority.

TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the filter.

TrafficMirrorSessionBusinessStatus String Normal

The state of the traffic mirror session.

  • Normal: working as expected
  • FinancialLocked: locked due to overdue payments
TrafficMirrorSessionDescription String This is a session.

The description of the traffic mirror session.

TrafficMirrorSessionId String tms-j6cla50buc44ap8tu****

The ID of the traffic mirror session.

TrafficMirrorSessionName String test

The name of the traffic mirror session.

TrafficMirrorSessionStatus String Created

The state of the traffic mirror session. Valid values:

  • Creating: The traffic mirror session is being created.
  • Created: The traffic mirror session is created.
  • Modifying: The traffic mirror session is being modified.
  • Deleting: The traffic mirror session is being deleted.
TrafficMirrorSourceIds List eni-j6c8znm5l1yt4sox****

The ID of the mirror source.

TrafficMirrorTargetId String eni-j6c2fp57q8rr47rp****

The ID of the mirror destination.

TrafficMirrorTargetType String NetworkInterface

The type of the mirror destination.

  • NetworkInterface: an ENI
  • SLB: an internal-facing SLB instance
VirtualNetworkId Integer 10

You can specify VNIs to distinguish different mirrored traffic.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTrafficMirrorSessions
&RegionId=cn-hongkong
&<Common request parameters>

Sample success responses

XML format

<ListTrafficMirrorFiltersResponse>
  <TotalCount>1</TotalCount>
  <NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
  <RequestId>739CA01C-92EB-4C69-BCC0-280149C6F41E</RequestId>
  <TrafficMirrorSessions>
        <TrafficMirrorTargetId>eni-j6c2fp57q8rr47rp****</TrafficMirrorTargetId>
        <TrafficMirrorSessionStatus>Created</TrafficMirrorSessionStatus>
        <VirtualNetworkId>10</VirtualNetworkId>
        <TrafficMirrorSessionBusinessStatus>Normal</TrafficMirrorSessionBusinessStatus>
        <Priority>1</Priority>
        <PacketLength>1500</PacketLength>
        <Enabled>false</Enabled>
        <TrafficMirrorSessionDescription>This is a session.</TrafficMirrorSessionDescription>
        <TrafficMirrorSessionId>tms-j6cla50buc44ap8tu****</TrafficMirrorSessionId>
        <TrafficMirrorSessionName>test</TrafficMirrorSessionName>
        <TrafficMirrorFilterId>tmf-j6cmls82xnc86vtpe****</TrafficMirrorFilterId>
        <TrafficMirrorTargetType>NetworkInterface</TrafficMirrorTargetType>
        <TrafficMirrorSourceIds>eni-j6c8znm5l1yt4sox****</TrafficMirrorSourceIds>
  </TrafficMirrorSessions>
</ListTrafficMirrorFiltersResponse>

JSON format

{
    "TotalCount": 1,
    "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
    "RequestId": "739CA01C-92EB-4C69-BCC0-280149C6F41E",
    "TrafficMirrorSessions": {
        "TrafficMirrorTargetId": "eni-j6c2fp57q8rr47rp****",
        "TrafficMirrorSessionStatus": "Created",
        "VirtualNetworkId": 10,
        "TrafficMirrorSessionBusinessStatus": "Normal",
        "Priority": 1,
        "PacketLength": 1500,
        "Enabled": false,
        "TrafficMirrorSessionDescription": "This is a session.",
        "TrafficMirrorSessionId": "tms-j6cla50buc44ap8tu****",
        "TrafficMirrorSessionName": "test",
        "TrafficMirrorFilterId": "tmf-j6cmls82xnc86vtpe****",
        "TrafficMirrorTargetType": "NetworkInterface",
        "TrafficMirrorSourceIds": "eni-j6c8znm5l1yt4sox****"
    }
}

Error codes

For a list of error codes, visit the API Error Center.