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

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.

TrafficMirrorFilterName String No abc

The name of the filter.

MaxResults Integer No 10

The maximum number of records to be returned for the query.

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

NextToken String No caeba0bbb2be03f84eb48b699f0a4883

The query token. Set this parameter to the NextToken value that is returned in the last API call. If no subsequent request is sent, you do not need to set this parameter.

TrafficMirrorFilterIds.N RepeatList No tmf-j6cmls82xnc86vtpe****

The ID of the filter. The maximum value of N is 100, which indicates that you can query at most 100 filters at a time.

Response parameters

Parameter Type Example Description
NextToken String caeba0bbb2be03f84eb48b699f0a4883

The token that is required for the next query. If the NextToken parameter is empty, no subsequent request will be sent.

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

The ID of the request.

TotalCount String 1

The total number of entries returned.

TrafficMirrorFilters Array of TrafficMirrorFilter

The list of details about the filters.

EgressRules Array of TrafficMirrorRule

The list of details about outbound rules.

Action String accept

The collection policy of the outbound rule. Valid values:

  • accept: collects network traffic.
  • drop: does not collect network traffic.
DestinationCidrBlock String 10.0.0.0/24

The destination CIDR block of the outbound traffic.

DestinationPortRange String 22/40

The destination port range of the outbound traffic.

Priority Integer 1

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

Protocol String TCP

The transport protocol used by outbound traffic that needs to be mirrored. Valid values:

  • ALL: all protocols
  • ICMP: Internet Control Message Protocol (ICMP)
  • TCP: TCP
  • UDP: UDP
SourceCidrBlock String 10.0.0.0/24

The source CIDR block of the outbound traffic.

SourcePortRange String 22/40

The source port range of the outbound traffic.

TrafficDirection String egress

The direction of the network traffic. Valid values:

  • egress: outbound
  • ingress: inbound
TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the filter associated with the outbound rule.

TrafficMirrorFilterRuleId String tmr-j6c89rzmtd3hhdugq****

The ID of the outbound rule.

TrafficMirrorFilterRuleStatus String Created

The state of the outbound rule. Valid values:

  • Creating: The rule is being created.
  • Created: The rule is created.
  • Modifying: The rule is being modified.
  • Deleting: The rule is being deleted.
IngressRules Array of TrafficMirrorRule

The list of details about inbound rules.

Action String accept

The collection policy of the inbound rule. Valid values:

  • accept: collects network traffic.
  • drop: does not collect network traffic.
DestinationCidrBlock String 0.0.0.0/0

The destination CIDR block of the inbound traffic.

DestinationPortRange String -1/-1

The destination port range of the inbound traffic.

Priority Integer 1

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

Protocol String ALL

The transport protocol used by inbound traffic that needs to be mirrored. Valid values:

  • ALL: all protocols
  • ICMP: ICMP
  • TCP: TCP
  • UDP: UDP
SourceCidrBlock String 0.0.0.0/0

The source CIDR block of the inbound traffic.

SourcePortRange String -1/-1

The destination port range of the inbound traffic.

TrafficDirection String ingress

The direction of the network traffic. Valid values:

  • egress: outbound
  • ingress: inbound
TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the filter associated with the inbound rule.

TrafficMirrorFilterRuleId String tmr-j6cezu8e68rnpepet****

The ID of the inbound rule.

TrafficMirrorFilterRuleStatus String Created

The state of the inbound rule. Valid values:

  • Creating: The rule is being created.
  • Created: The rule is created.
  • Modifying: The rule is being modified.
  • Deleting: The rule is being deleted.
TrafficMirrorFilterDescription String This is a filter.

The description of the filter.

TrafficMirrorFilterId String tmf-j6cmls82xnc86vtpe****

The ID of the filter.

TrafficMirrorFilterName String abc

The name of the filter.

TrafficMirrorFilterStatus String Created

The state of the filter. Valid values:

  • Creating: The filter is being created.
  • Created: The filter is created.
  • Modifying: The filter is being modified.
  • Deleting: The filter is being deleted.

Example

Sample requests

http(s)://[Endpoint]/?Action=ListTrafficMirrorFilters
&RegionId=cn-hongkong
&<Common request parameters>

Sample success responses

XML format

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

JSON format

{
    "TrafficMirrorFilters": {
        "TrafficMirrorFilterDescription": "This is a filter.",
        "TrafficMirrorFilterStatus": "Created",
        "TrafficMirrorFilterId": "tmf-j6cmls82xnc86vtpe****",
        "TrafficMirrorFilterName": "abc",
        "IngressRules": {
            "DestinationPortRange": "-1/-1",
            "TrafficMirrorFilterRuleId": "tmr-j6cezu8e68rnpepet****",
            "Action": "accept",
            "SourcePortRange": "-1/-1",
            "Priority": 1,
            "TrafficMirrorFilterRuleStatus": "Created",
            "SourceCidrBlock": "0.0.0.0/0",
            "DestinationCidrBlock": "0.0.0.0/0",
            "Protocol": "ALL",
            "TrafficDirection": "ingress",
            "TrafficMirrorFilterId": "tmf-j6cmls82xnc86vtpe****"
        },
        "EgressRules": {
            "DestinationPortRange": "22/40",
            "TrafficMirrorFilterRuleId": "tmr-j6c89rzmtd3hhdugq****",
            "Action": "accept",
            "SourcePortRange": "22/40",
            "Priority": 1,
            "TrafficMirrorFilterRuleStatus": "Created",
            "SourceCidrBlock": "10.0.0.0/24",
            "DestinationCidrBlock": "10.0.0.0/24",
            "Protocol": "TCP",
            "TrafficDirection": "egress",
            "TrafficMirrorFilterId": "tmf-j6cmls82xnc86vtpe****"
        }
    },
    "TotalCount": 1,
    "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
    "RequestId": "739CA01C-92EB-4C69-BCC0-280149C6F41E"
}

Error codes

For a list of error codes, visit the API Error Center.