All Products
Search
Document Center

Virtual Private Cloud:ListTrafficMirrorSessions

Last Updated:Aug 29, 2024

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

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:ListTrafficMirrorSessionslist
  • TrafficMirrorSession
    acs:vpc:{#regionId}:{#accountId}:trafficmirrorsession/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TrafficMirrorSessionNamestringNo

The name of the traffic mirror session.

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

abc
MaxResultsintegerNo

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

10
NextTokenstringNo

The token that is used for the next query. Valid values:

  • If this is your first query and no next queries are to be sent, ignore this parameter.
  • If a next query is to be sent, set the value to the value of NextToken that is returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****
TrafficMirrorSourceIdstringNo

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

eni-j6c8znm5l1yt4sox*****
TrafficMirrorTargetIdstringNo

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.

eni-j6c2fp57q8rr47rp****
TrafficMirrorFilterIdstringNo

The ID of the traffic mirror filter.

tmf-j6cmls82xnc86vtpe****
VirtualNetworkIdintegerNo

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.

10
PriorityintegerNo

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

A smaller value indicates a higher priority. You cannot specify identical priorities for traffic mirror sessions that are created in the same region by using the same account.

1
EnabledbooleanNo

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

  • false: does not enable the traffic mirror session.
  • true: enables the traffic mirror session.
false
TrafficMirrorSessionIdsarrayNo

The IDs 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.

stringNo

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.

tms-j6cla50buc44ap8tu****
RegionIdstringYes

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.

cn-hongkong
ResourceGroupIdstringNo

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

rg-bp67acfmxazb4ph****
Tagsarray<object>No

The tags of the resource.

objectNo

The tag of the resource.

KeystringNo

The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The key cannot exceed 64 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). The key must start with a letter but cannot start with aliyun or acs:. The key cannot contain http:// or https://.

FinanceDept
ValuestringNo

The tag value. You can specify at most 20 tag values. The tag value can be an empty string.

The tag value cannot exceed 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The token that is used for the next query. Valid values:

  • If no value is returned for NextToken, no next queries are sent.
  • If a value of NextToken is returned, the value is the token that is used for the subsequent query.
FFmyTO70tTpLG6I3FmYAXGKPd****
RequestIdstring

The ID of the request.

739CA01C-92EB-4C69-BCC0-280149C6F41E
TotalCountstring

The total number of entries returned.

1
TrafficMirrorSessionsarray<object>

The details about the traffic mirror session.

object
TrafficMirrorTargetIdstring

The ID of the traffic mirror destination.

eni-j6c2fp57q8rr47rp****
TrafficMirrorSessionIdstring

The ID of the traffic mirror session.

tms-j6cla50buc44ap8tu****
Priorityinteger

The priority of the traffic mirror session.

A smaller value indicates a higher priority.

1
TrafficMirrorTargetTypestring

The type of the traffic mirror destination. Valid values:

  • NetworkInterface: an elastic network interface (ENI)
  • SLB: an internal-facing Server Load Balancer (SLB) instance
NetworkInterface
PacketLengthinteger

The maximum transmission unit.

1500
TrafficMirrorSessionDescriptionstring

The description of the traffic mirror session.

This is a session.
TrafficMirrorSessionStatusstring

The status of the traffic mirror session. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
Created
Enabledboolean

Indicates whether the traffic mirror session was enabled.

  • false
  • true
false
TrafficMirrorSessionBusinessStatusstring

The status of the traffic mirror session.

  • Normal
  • FinancialLocked
Normal
VirtualNetworkIdinteger

You can specify VNIs to distinguish different mirrored traffic.

10
TrafficMirrorFilterIdstring

The ID of the filter.

tmf-j6cmls82xnc86vtpe****
TrafficMirrorSessionNamestring

The name of the traffic mirror session.

abc
TrafficMirrorSourceIdsarray

The ID of the traffic mirror source.

string

The ID of the traffic mirror source.

eni-j6c8znm5l1yt4sox****
ResourceGroupIdstring

The ID of the resource group to which the traffic mirror session belongs.

rg-bp67acfmxazb4ph****
Tagsarray<object>

The tag list.

object
Keystring

The tag key.

FinanceDept
Valuestring

The tag value.

FinanceJoshua
CreationTimestring

The time when the session is created.

2023-09-05T15:26Z

Examples

Sample success responses

JSONformat

{
  "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"
        }
      ],
      "CreationTime": "2023-09-05T15:26Z"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-31The Error code has changedView Change Details
2023-12-18The response structure of the API has changedView Change Details
2023-08-30API Description UpdateView Change Details