All Products
Search
Document Center

Virtual Private Cloud:ListTrafficMirrorFilters

Last Updated:Jul 10, 2024

Queries filters for traffic mirroring.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TrafficMirrorFilterNamestringNo

The name of the filter.

abc
MaxResultsintegerNo

The maximum number of entries to return.

Valid values: 1 to 100. Default value: 10.

10
NextTokenstringNo

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****
TrafficMirrorFilterIdsarrayNo

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.

stringNo

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****
RegionIdstringYes

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 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 tag list.

objectNo

The tag list.

KeystringNo

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
ValuestringNo

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 parameters

ParameterTypeDescriptionExample
object
NextTokenstring

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****
RequestIdstring

The request ID.

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

The number of entries returned.

1
MaxResultsinteger

The maximum number of entries returned.

20
Countinteger

The number of entries returned.

5
TrafficMirrorFiltersarray<object>

The information about the filters.

object
TrafficMirrorFilterStatusstring

The status of the filter. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
Created
TrafficMirrorFilterDescriptionstring

The description of the filter.

This is a filter.
TrafficMirrorFilterIdstring

The ID of the filter.

tmf-j6cmls82xnc86vtpe****
TrafficMirrorFilterNamestring

The filter name.

abc
IngressRulesarray<object>

The information about the inbound rules.

object
TrafficMirrorFilterRuleStatusstring

The status of the inbound rule. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
Created
Actionstring

The action of the inbound rule. Valid values:

  • accept
  • drop
accept
SourceCidrBlockstring

The source CIDR block of the inbound traffic.

0.0.0.0/0
TrafficDirectionstring

The direction of the network traffic. Valid values:

  • egress
  • ingress
ingress
Protocolstring

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

  • ALL
  • ICMP
  • TCP
  • UDP
ALL
DestinationPortRangestring

The destination port range of the inbound traffic.

-1/-1
TrafficMirrorFilterRuleIdstring

The ID of the inbound rule.

tmr-j6cezu8e68rnpepet****
DestinationCidrBlockstring

The destination CIDR block of the inbound traffic.

0.0.0.0/0
Priorityinteger

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

1
TrafficMirrorFilterIdstring

The ID of the filter associated with the inbound rule.

tmf-j6cmls82xnc86vtpe****
SourcePortRangestring

The destination port range of the inbound traffic.

-1/-1
EgressRulesarray<object>

The information about the outbound rules.

object
TrafficMirrorFilterRuleStatusstring

The status of the outbound rule. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
Created
Actionstring

The action of the outbound rule. Valid values:

  • accept
  • drop
accept
SourceCidrBlockstring

The source CIDR block of the outbound traffic.

10.0.0.0/24
TrafficDirectionstring

The direction of the network traffic. Valid values:

  • egress
  • ingress
egress
Protocolstring

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

  • ALL
  • ICMP
  • TCP
  • UDP
TCP
DestinationPortRangestring

The destination port range of the outbound traffic.

22/40
TrafficMirrorFilterRuleIdstring

The ID of the outbound rule.

tmr-j6c89rzmtd3hhdugq****
DestinationCidrBlockstring

The destination CIDR block of the outbound traffic.

10.0.0.0/24
Priorityinteger

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

1
TrafficMirrorFilterIdstring

The ID of the filter associated with the outbound rule.

tmf-j6cmls82xnc86vtpe****
SourcePortRangestring

The source port range of the outbound traffic.

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

2023-09-05T15:26Z

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",
          "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",
          "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

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

Change history

Change timeSummary of changesOperation
2023-12-18The response structure of the API has changedView Change Details
2023-06-25The response structure of the API has changedView Change Details