All Products
Search
Document Center

Virtual Private Cloud:ListTrafficMirrorFilters

Last Updated:Sep 01, 2026

Queries filters for traffic mirror.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:ListTrafficMirrorFilters

list

*TrafficMirrorFilter

acs:vpc:{#regionId}:{#accountId}:trafficmirrorfilter/*

None 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:

  • 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.

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.

tmf-j6cmls82xnc86vtpe****

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 aliyun or acs:, and cannot contain http:// or https://.

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 aliyun or acs:, and cannot contain http:// or https://.

FinanceJoshua

Response elements

Element

Type

Description

Example

object

NextToken

string

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.

  • If a value is returned for NextToken, the value is the token that is used for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

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

TotalCount

string

The number of entries returned.

1

MaxResults

integer

The maximum number of entries returned.

20

Count

integer

The number of entries returned.

5

TrafficMirrorFilters

array<object>

The information about the filters.

array<object>

TrafficMirrorFilterStatus

string

The status of the filter. Valid values:

  • Creating

  • Created

  • Modifying

  • Deleting

Created

TrafficMirrorFilterDescription

string

The description of the filter.

This is a filter.

TrafficMirrorFilterId

string

The ID of the filter.

tmf-j6cmls82xnc86vtpe****

TrafficMirrorFilterName

string

The filter name.

abc

IngressRules

array<object>

The information about the inbound rules.

object

TrafficMirrorFilterRuleStatus

string

The status of the inbound rule. Valid values:

  • Creating

  • Created

  • Modifying

  • Deleting

Created

Action

string

The action of the inbound rule. Valid values:

  • accept

  • drop

accept

SourceCidrBlock

string

The source CIDR block of the inbound traffic.

0.0.0.0/0

TrafficDirection

string

The direction of the network traffic. Valid values:

  • egress

  • ingress

ingress

Protocol

string

The protocol that is used by the inbound traffic to be mirrored. Valid values:

  • ALL

  • ICMP

  • TCP

  • UDP

ALL

IpVersion

string

The version of IP protocol.

IPv4

DestinationPortRange

string

The destination port range of the inbound traffic.

-1/-1

TrafficMirrorFilterRuleId

string

The ID of the inbound rule.

tmr-j6cezu8e68rnpepet****

DestinationCidrBlock

string

The destination CIDR block of the inbound traffic.

0.0.0.0/0

Priority

integer

The priority of the inbound rule. A smaller value indicates a higher priority.

1

TrafficMirrorFilterId

string

The ID of the filter associated with the inbound rule.

tmf-j6cmls82xnc86vtpe****

SourcePortRange

string

The destination port range of the inbound traffic.

-1/-1

EgressRules

array<object>

The information about the outbound rules.

object

TrafficMirrorFilterRuleStatus

string

The status of the outbound rule. Valid values:

  • Creating

  • Created

  • Modifying

  • Deleting

Created

Action

string

The action of the outbound rule. Valid values:

  • accept

  • drop

accept

SourceCidrBlock

string

The source CIDR block of the outbound traffic.

10.0.0.0/24

TrafficDirection

string

The direction of the network traffic. Valid values:

  • egress

  • ingress

egress

Protocol

string

The protocol that is used by the outbound traffic to be mirrored. Valid values:

  • ALL

  • ICMP

  • TCP

  • UDP

TCP

IpVersion

string

The version of IP protocol.

IPv4

DestinationPortRange

string

The destination port range of the outbound traffic.

22/40

TrafficMirrorFilterRuleId

string

The ID of the outbound rule.

tmr-j6c89rzmtd3hhdugq****

DestinationCidrBlock

string

The destination CIDR block of the outbound traffic.

10.0.0.0/24

Priority

integer

The priority of the outbound rule. A smaller value indicates a higher priority.

1

TrafficMirrorFilterId

string

The ID of the filter associated with the outbound rule.

tmf-j6cmls82xnc86vtpe****

SourcePortRange

string

The source port range of the outbound traffic.

22/40

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 filter is created.

2023-09-05T15:26Z

Examples

Success response

JSON format

{
  "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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.