Queries the details of traffic mirror sessions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:ListTrafficMirrorSessions |
list |
*TrafficMirrorSession
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TrafficMirrorSessionName |
string |
No |
The name of the traffic mirror session. The name must be 1 to 128 characters in length and cannot start with |
abc |
| MaxResults |
integer |
No |
The maximum number of entries to return for a single request. Valid values: 1 to 100. Default value: 10. |
10 |
| NextToken |
string |
No |
The token for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| TrafficMirrorSourceId |
string |
No |
The instance ID of the traffic mirror source. Currently, only elastic network interfaces (ENIs) are supported as traffic mirror sources. |
eni-j6c8znm5l1yt4sox***** |
| TrafficMirrorTargetId |
string |
No |
The instance ID of the traffic mirror destination. Currently, elastic network interfaces (ENIs) and internal-facing SLB instances are supported as traffic mirror destinations. |
eni-j6c2fp57q8rr47rp**** |
| TrafficMirrorFilterId |
string |
No |
The instance ID of the traffic mirror filter. |
tmf-j6cmls82xnc86vtpe**** |
| VirtualNetworkId |
integer |
No |
The virtual network identifier (VNI) that is used to distinguish different mirrored traffic. Valid values: 0 to 16777215. You can use the VNI to distinguish mirrored traffic of different sessions at the traffic mirror destination. You can specify a custom VNI or let the system randomly allocate one. To let the system randomly allocate a VNI, do not specify this parameter. |
10 |
| Priority |
integer |
No |
The priority of the traffic mirror session. Valid values: 1 to 32766. A smaller value indicates a higher priority. The priorities of traffic mirror sessions created by the same Alibaba Cloud account in the same region must be unique. |
1 |
| Enabled |
boolean |
No |
Specifies whether to enable the traffic mirror session. Valid values:
|
false |
| TrafficMirrorSessionIds |
array |
No |
The instance IDs of the traffic mirror sessions. The maximum value of N is 100, which means you can query up to 100 traffic mirror sessions at a time. |
tms-j6cla50buc44ap8tu**** |
|
string |
No |
The instance IDs of the traffic mirror sessions. The maximum value of N is 100, which means you can query up to 100 traffic mirror sessions at a time. |
tms-j6cla50buc44ap8tu**** |
|
| RegionId |
string |
Yes |
The region ID of the traffic mirror session. You can call the DescribeRegions operation to query the most recent region list. For more information about the regions that support traffic mirroring, see Traffic mirroring overview. |
cn-hongkong |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the traffic mirroring belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The list of tags. |
||
| Key |
string |
No |
The tag key of the resource. You can specify up to 20 tag keys. If you specify this parameter, you cannot enter an empty string. A tag key can be up to 128 characters in length and cannot start with |
FinanceDept |
| Value |
string |
No |
The tag value of the resource. You can specify up to 20 tag values. If you specify this parameter, you can enter an empty string. A tag value can be up to 128 characters in length and cannot start with |
FinanceJoshua |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The token for the next query. Valid values:
|
||
| NextToken |
string |
The token for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The ID of the request. |
739CA01C-92EB-4C69-BCC0-280149C6F41E |
| TotalCount |
string |
The total number of entries returned. |
1 |
| TrafficMirrorSessions |
array<object> |
The details of the traffic mirror sessions. |
|
|
array<object> |
The details of the traffic mirror sessions. |
||
| TrafficMirrorTargetId |
string |
The instance ID of the traffic mirror destination. |
eni-j6c2fp57q8rr47rp**** |
| TrafficMirrorSessionId |
string |
The instance ID of the traffic mirror session. |
tms-j6cla50buc44ap8tu**** |
| Priority |
integer |
The priority of the traffic mirror session. A smaller value indicates a higher priority. |
1 |
| TrafficMirrorTargetType |
string |
The type of the traffic mirror destination. Valid values:
|
NetworkInterface |
| PacketLength |
integer |
The length of the original mirrored packet, excluding the length of the VXLAN packet. Default value: 1500. Valid values: 64 to 8500. Unit: bytes.
|
1500 |
| TrafficMirrorSessionDescription |
string |
The description of the traffic mirror session. |
This is a session. |
| TrafficMirrorSessionStatus |
string |
The status of the traffic mirror session. Valid values:
|
Created |
| Enabled |
boolean |
Specifies whether the traffic mirror session is enabled. Valid values:
|
false |
| TrafficMirrorSessionBusinessStatus |
string |
The business status of the traffic mirror session. Valid values:
|
Normal |
| VirtualNetworkId |
integer |
The VNI that is used to distinguish different mirrored traffic. |
10 |
| TrafficMirrorFilterId |
string |
The instance ID of the traffic mirror filter. |
tmf-j6cmls82xnc86vtpe**** |
| TrafficMirrorSessionName |
string |
The name of the traffic mirror session. |
abc |
| TrafficMirrorSourceIds |
array |
The instance IDs of the traffic mirror sources. |
|
|
string |
The instance IDs of the traffic mirror sources. |
eni-j6c8znm5l1yt4sox**** |
|
| ResourceGroupId |
string |
The ID of the resource group to which the traffic mirroring belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
array<object> |
The list of tags. |
|
|
object |
The list of tags. |
||
| Key |
string |
The tag key. |
FinanceDept |
| Value |
string |
The tag value. |
FinanceJoshua |
| CreationTime |
string |
The creation time of the traffic mirror session. The time is specified in the ISO 8601 standard in UTC. The example is accurate to the minute in the YYYY-MM-DDThh:mmZ format. |
2023-09-05T15:26Z |
Examples
Success response
JSON format
{
"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
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.NextToken | The specified NextToken is invalid. | The specified NextToken is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.