Queries filters for traffic mirror.
Debugging
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| vpc:ListTrafficMirrorFilters | list | *TrafficMirrorFilter acs:vpc:{#regionId}:{#accountId}:trafficmirrorfilter/* |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| TrafficMirrorFilterName | string | No | The name of the filter. | 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 that is used in the next request to retrieve a new page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
| TrafficMirrorFilterIds | array | No | The ID of the traffic mirror filter. The maximum value of N is 100, which specifies that you can query up to 100 filters at a time. | |
| string | No | The ID of the traffic mirror filter. The maximum value of N is 100, which specifies that you can query up to 100 filters at a time. | tmf-j6cmls82xnc86vtpe**** | |
| RegionId | string | Yes | The ID of the region to which the mirrored traffic belongs. You can call the DescribeRegions operation to query the most recent region list. For more information about regions that support traffic mirror, 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 tag list. | |
| object | No | The tag list. | ||
| Key | string | No | The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 128 characters in length. It cannot start with | FinanceDept |
| Value | string | No | The tag value. 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. It cannot start with | FinanceJoshua |
Response parameters
Examples
Sample success responses
JSONformat
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "739CA01C-92EB-4C69-BCC0-280149C6F41E",
"TotalCount": 1,
"MaxResults": 20,
"Count": 5,
"TrafficMirrorFilters": [
{
"TrafficMirrorFilterStatus": "Created",
"TrafficMirrorFilterDescription": "This is a filter.",
"TrafficMirrorFilterId": "tmf-j6cmls82xnc86vtpe****",
"TrafficMirrorFilterName": "abc",
"IngressRules": [
{
"TrafficMirrorFilterRuleStatus": "Created",
"Action": "accept",
"SourceCidrBlock": "0.0.0.0/0",
"TrafficDirection": "ingress",
"Protocol": "ALL",
"IpVersion": "IPv4",
"DestinationPortRange": "-1/-1",
"TrafficMirrorFilterRuleId": "tmr-j6cezu8e68rnpepet****",
"DestinationCidrBlock": "0.0.0.0/0",
"Priority": 1,
"TrafficMirrorFilterId": "tmf-j6cmls82xnc86vtpe****",
"SourcePortRange": "-1/-1"
}
],
"EgressRules": [
{
"TrafficMirrorFilterRuleStatus": "Created",
"Action": "accept",
"SourceCidrBlock": "10.0.0.0/24",
"TrafficDirection": "egress",
"Protocol": "TCP",
"IpVersion": "IPv4",
"DestinationPortRange": "22/40",
"TrafficMirrorFilterRuleId": "tmr-j6c89rzmtd3hhdugq****",
"DestinationCidrBlock": "10.0.0.0/24",
"Priority": 1,
"TrafficMirrorFilterId": "tmf-j6cmls82xnc86vtpe****",
"SourcePortRange": "22/40"
}
],
"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. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-04-25 | The Error code has changed. The response structure of the API has changed | View Change Details |
| 2024-07-31 | The Error code has changed | View Change Details |
| 2023-12-18 | The response structure of the API has changed | View Change Details |
| 2023-06-25 | The response structure of the API has changed | View Change Details |
