Creating a Traffic Mirror Filter
Function
This API is used to create a traffic mirror filter.
URI
POST /v3/{project_id}/vpc/traffic-mirror-filters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
traffic_mirror_filter |
Yes |
Traffic mirror filter. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
description |
No |
String |
Description of a traffic mirror filter. The value can contain no more than 255 characters and cannot contain angle brackets (< or >). |
name |
Yes |
String |
Traffic mirror filter name. The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
traffic_mirror_filter |
TrafficMirrorFilter object |
Traffic mirror filter. |
request_id |
String |
Request ID. |
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. |
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. |
Example Requests
Create a traffic mirror filter named test1 with description description.
POST https://{endpoint}/v3/{project_id}/vpc/traffic-mirror-filters { "traffic_mirror_filter" : { "name" : "test1", "description" : "description" } }
Example Responses
Status code: 201
Created
{ "traffic_mirror_filter" : { "id" : "59d2b2e7-0d35-41f7-a12e-f7699366cd21", "project_id" : "49a42f378df747bf8b8f6a70e25b63fb", "name" : "test1", "description" : "description", "ingress_rules" : [ ], "egress_rules" : [ ], "type" : "eni", "created_at" : "2022-08-29T06:22:01.000+00:00", "updated_at" : "2022-08-29T06:22:01.000+00:00" }, "request_id" : "f05abcd9-fa75-43a5-a795-b3d8e8b7a9e9" }
Status Codes
Status Code |
Description |
---|---|
201 |
Created |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot