Queries 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. Valid values: 1 to 100. Default value: 10. |
10 |
| NextToken |
string |
No |
The pagination token for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| TrafficMirrorSourceId |
string |
No |
The ID of the traffic mirror source. You can specify only an elastic network interface (ENI) as the mirror source. |
eni-j6c8znm5l1yt4sox***** |
| TrafficMirrorTargetId |
string |
No |
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**** |
| TrafficMirrorFilterId |
string |
No |
The ID of the traffic mirror filter. |
tmf-j6cmls82xnc86vtpe**** |
| VirtualNetworkId |
integer |
No |
The VXLAN network identifier (VNI) used to distinguish mirrored traffic from different sessions. Valid values: 0 to 16777215. You can specify a custom VNI or let the system allocate one randomly. To use a system-allocated VNI, ignore 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. You cannot specify identical priorities for traffic mirror sessions that are created in the same region by using the same account. |
1 |
| Enabled |
boolean |
No |
Whether to enable the traffic mirror session. Valid values:
|
false |
| TrafficMirrorSessionIds |
array |
No |
The IDs of the traffic mirror sessions. You can specify up to 100 IDs. |
tms-j6cla50buc44ap8tu**** |
|
string |
No |
The ID of the traffic mirror session. You can specify up to 100 IDs. |
tms-j6cla50buc44ap8tu**** |
|
| RegionId |
string |
Yes |
The region ID of the traffic mirror session. Call the DescribeRegions operation to query available regions. For supported regions, see Overview of traffic mirror. |
cn-hongkong |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the mirrored traffic belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
array<object> |
No |
The tags of the resource. |
|
|
object |
No |
The tag of the resource. |
||
| Key |
string |
No |
The tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string. The key can be up to 64 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with |
FinanceDept |
| Value |
string |
No |
The tag value. You can specify up to 20 tag values. The tag value can be an empty string. The value can be up to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter but cannot start with |
FinanceJoshua |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination 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 about the traffic mirror session. |
|
|
array<object> |
|||
| TrafficMirrorTargetId |
string |
The ID of the traffic mirror destination. |
eni-j6c2fp57q8rr47rp**** |
| TrafficMirrorSessionId |
string |
The 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 maximum transmission unit. |
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 |
Whether the traffic mirror session is enabled.
|
false |
| TrafficMirrorSessionBusinessStatus |
string |
The status of the traffic mirror session.
|
Normal |
| VirtualNetworkId |
integer |
The VNI that distinguishes mirrored traffic from different sessions. |
10 |
| TrafficMirrorFilterId |
string |
The ID of the filter. |
tmf-j6cmls82xnc86vtpe**** |
| TrafficMirrorSessionName |
string |
The name of the traffic mirror session. |
abc |
| TrafficMirrorSourceIds |
array |
The ID of the traffic mirror source. |
|
|
string |
The ID of the traffic mirror source. |
eni-j6c8znm5l1yt4sox**** |
|
| ResourceGroupId |
string |
The ID of the resource group to which the traffic mirror session belongs. |
rg-bp67acfmxazb4ph**** |
| Tags |
array<object> |
The tag list. |
|
|
object |
|||
| Key |
string |
The tag key. |
FinanceDept |
| Value |
string |
The tag value. |
FinanceJoshua |
| CreationTime |
string |
The time when the session was created. |
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.