This API is used to create a VPC flow log.
A VPC flow log captures information about the traffic going to and from your VPC. You can use flow logs to monitor network traffic, analyze network attacks, and to determine whether security group and firewall rules need to be modified.
VPC flow logs must be used together with the Log Tank Service (LTS). You need to create a log group and a log topic in LTS, and then create a VPC flow log.
Name |
Mandatory |
Type |
Description |
---|---|---|---|
flow_log |
Yes |
flow_log object |
FlowLog objects. For details, see Table 3. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
|
description |
No |
String |
|
resource_type |
Yes |
String |
|
resource_id |
Yes |
String |
|
traffic_type |
Yes |
String |
|
log_group_id |
Yes |
String |
|
log_topic_id |
Yes |
String |
|
index_enabled |
No |
Boolean |
Whether to enable the log index. |
POST https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs { "flow_log": { "name": "flowlog", "description": "just a test", "resource_type": "port", "resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde", "traffic_type": "reject", "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fdd", "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", "index_enabled": true } }
Name |
Type |
Description |
---|---|---|
flow_log |
flow_log object |
FlowLog objects. For details, see Table 5. |
Name |
Type |
Description |
---|---|---|
id |
String |
|
name |
String |
|
tenant_id |
String |
|
description |
String |
|
resource_type |
String |
|
resource_id |
String |
|
traffic_type |
String |
|
log_group_id |
String |
|
log_topic_id |
String |
|
index_enabled |
Boolean |
|
admin_state |
Boolean |
|
status |
String |
|
created_at |
String |
|
updated_at |
String |
|
{ "flow_log": { "id": "f49f00f1-0f15-470a-a8c5-4e879e461c8d", "name": "flowlog", "description": "just a test", "tenant_id": "b2782e6708b8475c993e6064bc456bf8", "resource_type": "port", "resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde", "traffic_type": "reject", "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fdd", "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", "created_at": "2019-01-14T11:03:02", "updated_at": "2019-01-14T11:03:02", "index_enabled": false, "admin_state": true, "status": "ACTIVE" } }
See Status Codes.
See Error Codes.