All Products
Search
Document Center

Virtual Private Cloud:ListTrafficMirrorFilters

Last Updated:Nov 13, 2024

Queries filters for traffic mirroring.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is 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.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:ListTrafficMirrorFilterslist
  • TrafficMirrorFilter
    acs:vpc:{#regionId}:{#accountId}:trafficmirrorfilter/*
    none
none

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.

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

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

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

Tagobject
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
2024-07-31The Error code has changedView Change Details
2023-12-18The response structure of the API has changedView Change Details
2023-06-25The response structure of the API has changedView Change Details