Updated on 2023-11-07 GMT+08:00

Querying Traffic Mirror Filters

Function

This API is used to query traffic mirror filters.

URI

GET /v3/{project_id}/vpc/traffic-mirror-filters

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query parameters

Parameter

Mandatory

Type

Description

created_at

No

String

Sort by creation time.

description

No

String

Filter by description.

id

No

String

Query or sort by ID.

name

No

String

Filter or sort by name.

updated_at

No

String

Sort by update time.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

traffic_mirror_filters

Array of TrafficMirrorFilter objects

Traffic mirror filters

page_info

PageInfo object

Pagination information

request_id

String

Request ID

Table 4 TrafficMirrorFilter

Parameter

Type

Description

id

String

Traffic mirror filter ID

project_id

String

Project ID

description

String

Description of a traffic mirror filter

The value can contain no more than 255 characters and cannot contain angle brackets (< or >).

name

String

Traffic mirror filter name

The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).

ingress_rules

Array of TrafficMirrorFilterRule objects

Inbound mirror filter rules

egress_rules

Array of TrafficMirrorFilterRule objects

Outbound mirror filter rules

created_at

String

Time when a traffic mirror filter is created

updated_at

String

Time when a traffic mirror filter is updated

Table 5 TrafficMirrorFilterRule

Parameter

Type

Description

id

String

Traffic mirror filter rule ID

project_id

String

Project ID

description

String

Description of a traffic mirror filter rule

The value can contain no more than 255 characters and cannot contain angle brackets (< or >).

traffic_mirror_filter_id

String

Traffic mirror filter ID

direction

String

Traffic direction

The value can be ingress or egress.

source_cidr_block

String

Source CIDR block of the mirrored traffic

destination_cidr_block

String

Destination CIDR block of the mirrored traffic

source_port_range

String

Source port range

Value range: 1-65535

Format: 80-200

destination_port_range

String

Destination port range

Value range: 1-65535

Format: 80-200

ethertype

String

IP address version of the mirrored traffic

The value can be IPv4 or IPv6.

protocol

String

Protocol of the mirrored traffic

The value can be TCP, UDP, ICMP, ICMPV6, or ALL.

action

String

Whether to accept or reject traffic

The value can be accept or reject.

priority

Integer

Mirror filter rule priority

Value range: 1-65535. A smaller value indicates a higher priority.

created_at

String

Time when a traffic mirror filter rule is created

updated_at

String

Time when a traffic mirror filter rule is updated

Table 6 PageInfo

Parameter

Type

Description

previous_marker

String

First record on the current page

current_count

Integer

Total number of records on the current page

next_marker

String

Last record on the current page. This parameter does not exist if the page is the last one.

Example Request

GET http://{endpoint}/v3/{project_id}/vpc/traffic-mirror-filters

Example Response

Status code: 200

OK

{
  "request_id" : "05e4a009-74aa-47cb-8055-c3da26a51737",
  "traffic_mirror_filters" : [ {
    "id" : "59d2b2e7-0d35-41f7-a12e-f7699366cd21",
    "project_id" : "49a42f378df747bf8b8f6a70e25b63fb",
    "name" : "test1",
    "description" : "new_filter",
    "ingress_rules" : [ ],
    "egress_rules" : [ ],
    "created_at" : "2022-08-29T06:22:01Z",
    "updated_at" : "2022-08-29T06:22:01Z"
  } ],
  "page_info" : {
    "previous_marker" : "180edd76-ab7e-4039-acc2-239ff89243e8",
    "current_count" : 1
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.