All Products
Search
Document Center

:ListTrafficMirrorSessions

最終更新日:Aug 21, 2023

Queries details of 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 the 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.

TrafficMirrorSessionName String No abc

The name of the traffic mirror session.

The name must be 1 to 128 characters in length and cannot start with http:// or https://.

MaxResults Integer No 10

The maximum number of entries to return. Valid values: 1 to 100. Default value: 10.

NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
TrafficMirrorSourceId String No eni-j6c8znm5l1yt4sox*****

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

TrafficMirrorTargetId String No eni-j6c2fp57q8rr47rp****

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

TrafficMirrorFilterId String No tmf-j6cmls82xnc86vtpe****

The ID of the traffic mirror 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 use VNIs to identify mirrored traffic from different sessions at the traffic mirror destination. You can specify a custom VNI or use a random VNI that is allocated by the system. 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 by using the same account.

Enabled Boolean No false

Specifies whether to enable the traffic mirror session. Valid values:

  • false (default)
  • true
TrafficMirrorSessionIds.N String No tms-j6cla50buc44ap8tu****

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

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.

ResourceGroupId String No rg-bp67acfmxazb4ph****

The ID of the resource group to which the mirrored traffic belongs.

Tags.N.Key String No FinanceDept

The key of tag N to add to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be at most 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Tags.N.Value String No FinanceJoshua

The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with acs: or aliyun. The tag value cannot contain http:// or https://.

Response parameters

Parameter Type Example Description
NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • If the value returned of NextToken is not empty, the value indicates the token that is used for the next query.
RequestId String 739CA01C-92EB-4C69-BCC0-280149C6F41E

The request ID.

TotalCount String 1

The total number of entries returned.

TrafficMirrorSessions Array of TrafficMirrorSession

The details about the traffic mirror session.

TrafficMirrorTargetId String eni-j6c2fp57q8rr47rp****

The ID of the mirror destination.

TrafficMirrorSessionId String tms-j6cla50buc44ap8tu****

The ID of the traffic mirror session.

Priority Integer 1

The priority of the traffic mirror session.

A smaller value indicates a higher priority.

TrafficMirrorTargetType String NetworkInterface

The type of the traffic mirror destination. Valid values:

  • NetworkInterface: an elastic network interface (ENI)
  • SLB: an internal-facing SLB instance
PacketLength Integer 1500

The maximum transmission unit (MTU).

TrafficMirrorSessionDescription String This is a session.

The description of the traffic mirror session.

TrafficMirrorSessionStatus String Created

The status of the traffic mirror session. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
Enabled Boolean false

Indicates whether the traffic mirror session was enabled.

  • false (default)
  • true
TrafficMirrorSessionBusinessStatus String Normal

The status of the traffic mirror session.

  • Normal
  • FinancialLocked
VirtualNetworkId Integer 10

You can specify VNIs to distinguish different mirrored traffic.

TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the traffic mirror filter.

TrafficMirrorSessionName String abc

The name of the traffic mirror session.

TrafficMirrorSourceIds Array of String eni-j6c8znm5l1yt4sox****

The ID of the traffic mirror source.

ResourceGroupId String rg-bp67acfmxazb4ph****

The ID of the resource group to which the mirrored traffic belongs.

Tags Array of Tag

The list of tags.

Key String FinanceDept

The key of tag N.

Value String FinanceJoshua

The value of tag N.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTrafficMirrorSessions
&TrafficMirrorSessionName=abc
&MaxResults=10
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&TrafficMirrorSourceId=eni-j6c8znm5l1yt4sox*****
&TrafficMirrorTargetId=eni-j6c2fp57q8rr47rp****
&TrafficMirrorFilterId=tmf-j6cmls82xnc86vtpe****
&VirtualNetworkId=10
&Priority=1
&Enabled=false
&TrafficMirrorSessionIds=["tms-j6cla50buc44ap8tu****"]
&RegionId=cn-hongkong
&ResourceGroupId=rg-bp67acfmxazb4ph****
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTrafficMirrorSessionsResponse>
    <NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
    <RequestId>739CA01C-92EB-4C69-BCC0-280149C6F41E</RequestId>
    <TotalCount>1</TotalCount>
    <TrafficMirrorSessions>
        <TrafficMirrorTargetId>eni-j6c2fp57q8rr47rp****</TrafficMirrorTargetId>
        <TrafficMirrorSessionId>tms-j6cla50buc44ap8tu****</TrafficMirrorSessionId>
        <Priority>1</Priority>
        <TrafficMirrorTargetType>NetworkInterface</TrafficMirrorTargetType>
        <PacketLength>1500</PacketLength>
        <TrafficMirrorSessionDescription>This is a session.</TrafficMirrorSessionDescription>
        <TrafficMirrorSessionStatus>Created</TrafficMirrorSessionStatus>
        <Enabled>false</Enabled>
        <TrafficMirrorSessionBusinessStatus>Normal</TrafficMirrorSessionBusinessStatus>
        <VirtualNetworkId>10</VirtualNetworkId>
        <TrafficMirrorFilterId>tmf-j6cmls82xnc86vtpe****</TrafficMirrorFilterId>
        <TrafficMirrorSessionName>abc</TrafficMirrorSessionName>
        <TrafficMirrorSourceIds>eni-j6c8znm5l1yt4sox****</TrafficMirrorSourceIds>
        <ResourceGroupId>rg-bp67acfmxazb4ph****</ResourceGroupId>
        <Tags>
            <Key>FinanceDept</Key>
            <Value>FinanceJoshua</Value>
        </Tags>
    </TrafficMirrorSessions>
</ListTrafficMirrorSessionsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId" : "739CA01C-92EB-4C69-BCC0-280149C6F41E",
  "TotalCount" : "1",
  "TrafficMirrorSessions" : [ {
    "TrafficMirrorTargetId" : "eni-j6c2fp57q8rr47rp****",
    "TrafficMirrorSessionId" : "tms-j6cla50buc44ap8tu****",
    "Priority" : 1,
    "TrafficMirrorTargetType" : "NetworkInterface",
    "PacketLength" : 1500,
    "TrafficMirrorSessionDescription" : "This is a session.",
    "TrafficMirrorSessionStatus" : "Created",
    "Enabled" : false,
    "TrafficMirrorSessionBusinessStatus" : "Normal",
    "VirtualNetworkId" : 10,
    "TrafficMirrorFilterId" : "tmf-j6cmls82xnc86vtpe****",
    "TrafficMirrorSessionName" : "abc",
    "TrafficMirrorSourceIds" : [ "eni-j6c8znm5l1yt4sox****" ],
    "ResourceGroupId" : "rg-bp67acfmxazb4ph****",
    "Tags" : [ {
      "Key" : "FinanceDept",
      "Value" : "FinanceJoshua"
    } ]
  } ]
}

Error codes

For a list of error codes, see Service error codes.