All Products
Search
Document Center

:ListTrafficMirrorFilters

最終更新日:Aug 21, 2023

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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTrafficMirrorFilters

The operation that you want to perform. Set the value to ListTrafficMirrorFilters.

TrafficMirrorFilterName String No abc

The name of the filter.

MaxResults Integer No 10

The maximum number of entries to return.

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

NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

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.
TrafficMirrorFilterIds.N String No tmf-j6cmls82xnc86vtpe****

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.

RegionId String Yes cn-hongkong

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.

ResourceGroupId String No rg-bp67acfmxazb4ph****

The ID of the resource group to which the mirrored traffic belongs.

Tags.N.Key String No FinanceDept

The key of tag N to add to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be at most 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Tags.N.Value String No FinanceJoshua

The value of tag N to add to the resource. 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 and cannot start with acs: or aliyun. The tag value cannot contain http:// or https://.

Response parameters

Parameter Type Example Description
NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

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.
RequestId String 739CA01C-92EB-4C69-BCC0-280149C6F41E

The request ID.

TotalCount String 1

The number of entries returned.

MaxResults Integer 20

The maximum number of entries returned.

Count Integer 5

The number of entries returned.

TrafficMirrorFilters Array of TrafficMirrorFilter

The details about the filters.

TrafficMirrorFilterStatus String Created

The status of the filter. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
TrafficMirrorFilterDescription String This is a filter.

The description of the filter.

TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the traffic mirror filter.

TrafficMirrorFilterName String abc

The name of the filter.

IngressRules Array of TrafficMirrorRule

The details about the inbound rules.

TrafficMirrorFilterRuleStatus String Created

The status of the inbound rule. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
Action String accept

The action of the inbound rule. Valid values:

  • accept
  • drop
SourceCidrBlock String 0.0.0.0/0

The source CIDR block of the inbound traffic.

TrafficDirection String ingress

The direction of the network traffic. Valid values:

  • egress
  • ingress
Protocol String ALL

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

  • ALL
  • ICMP
  • TCP
  • UDP
DestinationPortRange String -1/-1

The destination port range of the inbound traffic.

TrafficMirrorFilterRuleId String tmr-j6cezu8e68rnpepet****

The ID of the inbound rule.

DestinationCidrBlock String 0.0.0.0/0

The destination CIDR block of the inbound traffic.

Priority Integer 1

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

TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the filter associated with the inbound rule.

SourcePortRange String -1/-1

The destination port range of the inbound traffic.

EgressRules Array of TrafficMirrorRule

The details about the outbound rules.

TrafficMirrorFilterRuleStatus String Created

The status of the outbound rule. Valid values:

  • Creating
  • Created
  • Modifying
  • Deleting
Action String accept

The action of the outbound rule. Valid values:

  • accept
  • drop
SourceCidrBlock String 10.0.0.0/24

The source CIDR block of the outbound traffic.

TrafficDirection String egress

The direction of the network traffic. Valid values:

  • egress
  • ingress
Protocol String TCP

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

  • ALL
  • ICMP
  • TCP
  • UDP
DestinationPortRange String 22/40

The destination port range of the outbound traffic.

TrafficMirrorFilterRuleId String tmr-j6c89rzmtd3hhdugq****

The ID of the outbound rule.

DestinationCidrBlock String 10.0.0.0/24

The destination CIDR block of the outbound traffic.

Priority Integer 1

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

TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the filter associated with the outbound rule.

SourcePortRange String 22/40

The source port range of the outbound traffic.

ResourceGroupId String rg-bp67acfmxazb4ph****

The ID of the resource group.

Tags Array of Tag

The list of tags.

Key String FinanceDept

The key of tag N.

Value String FinanceJoshua

The value of tag N.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTrafficMirrorFilters
&TrafficMirrorFilterName=abc
&MaxResults=10
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&TrafficMirrorFilterIds=["tmf-j6cmls82xnc86vtpe****"]
&RegionId=cn-hongkong
&ResourceGroupId=rg-bp67acfmxazb4ph****
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTrafficMirrorFiltersResponse>
    <NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
    <RequestId>739CA01C-92EB-4C69-BCC0-280149C6F41E</RequestId>
    <TotalCount>1</TotalCount>
    <TrafficMirrorFilters>
        <TrafficMirrorFilterStatus>Created</TrafficMirrorFilterStatus>
        <TrafficMirrorFilterDescription>This is a filter.</TrafficMirrorFilterDescription>
        <TrafficMirrorFilterId>tmf-j6cmls82xnc86vtpe****</TrafficMirrorFilterId>
        <TrafficMirrorFilterName>abc</TrafficMirrorFilterName>
        <IngressRules>
            <TrafficMirrorFilterRuleStatus>Created</TrafficMirrorFilterRuleStatus>
            <Action>accept</Action>
            <SourceCidrBlock>0.0.0.0/0</SourceCidrBlock>
            <TrafficDirection>ingress</TrafficDirection>
            <Protocol>ALL</Protocol>
            <DestinationPortRange>-1/-1</DestinationPortRange>
            <TrafficMirrorFilterRuleId>tmr-j6cezu8e68rnpepet****</TrafficMirrorFilterRuleId>
            <DestinationCidrBlock>0.0.0.0/0</DestinationCidrBlock>
            <Priority>1</Priority>
            <TrafficMirrorFilterId>tmf-j6cmls82xnc86vtpe****</TrafficMirrorFilterId>
            <SourcePortRange>-1/-1</SourcePortRange>
        </IngressRules>
        <EgressRules>
            <TrafficMirrorFilterRuleStatus>Created</TrafficMirrorFilterRuleStatus>
            <Action>accept</Action>
            <SourceCidrBlock>10.0.0.0/24</SourceCidrBlock>
            <TrafficDirection>egress</TrafficDirection>
            <Protocol>TCP</Protocol>
            <DestinationPortRange>22/40</DestinationPortRange>
            <TrafficMirrorFilterRuleId>tmr-j6c89rzmtd3hhdugq****</TrafficMirrorFilterRuleId>
            <DestinationCidrBlock>10.0.0.0/24</DestinationCidrBlock>
            <Priority>1</Priority>
            <TrafficMirrorFilterId>tmf-j6cmls82xnc86vtpe****</TrafficMirrorFilterId>
            <SourcePortRange>22/40</SourcePortRange>
        </EgressRules>
        <ResourceGroupId>rg-bp67acfmxazb4ph****</ResourceGroupId>
        <Tags>
            <Key>FinanceDept</Key>
            <Value>FinanceJoshua</Value>
        </Tags>
    </TrafficMirrorFilters>
</ListTrafficMirrorFiltersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId" : "739CA01C-92EB-4C69-BCC0-280149C6F41E",
  "TotalCount" : "1",
  "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"
    } ]
  } ]
}

Error codes

For a list of error codes, see Service error codes.