Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
25 KiB
Querying VPC Flow Logs
Function
This API is used to query all VPC flow logs of the tenant submitting the request. The VPC flow logs are filtered based on the filtering condition.
URI
GET /v1/{project_id}/fl/flow_logs
Example:
GET https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs?name=flowlog
Table 1 describes the parameters.
Name |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
id |
No |
String |
Specifies the VPC flow log UUID. |
name |
No |
String |
|
resource_type |
No |
String |
Specifies the type of resource on which to create the VPC flow log. |
resource_id |
No |
String |
Specifies the unique resource ID. |
traffic_type |
No |
String |
Specifies the type of traffic to log. |
log_group_id |
No |
String |
Specifies the log group ID. |
log_topic_id |
No |
String |
Specifies the log topic ID. |
status |
No |
String |
Specifies the VPC flow log status.
|
limit |
No |
Integer |
Specifies the number of records that will be returned on each page. The value is from 0 to intmax. limit can be used together with marker. For details, see the parameter description of marker. |
marker |
No |
String |
Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. This parameter can work together with the parameter limit.
|
Response Message
- Response parameter
Table 2 Response parameter Name
Type
Description
flow_logs
Array of FlowLog objects
Specifies the FlowLog object list. For details, see Table 3.
Table 3 Description of the FlowLog field Name
Type
Description
id
String
Specifies the VPC flow log UUID.
name
String
Specifies the VPC flow log name.
tenant_id
String
Specifies the project ID.
description
String
Provides supplementary information about the VPC flow log.
resource_type
String
Specifies the type of resource on which to create the VPC flow log.
resource_id
String
Specifies the unique resource ID.
traffic_type
String
Specifies the type of traffic to log.
log_group_id
String
Specifies the log group ID.
log_topic_id
String
Specifies the log topic ID.
admin_state
Boolean
Specifies whether to enable the VPC flow log function.
status
String
Specifies the VPC flow log status.
- ACTIVE: Enabled
- DOWN: Disabled
- ERROR: Abnormal fault
created_at
String
Specifies the time when the VPC flow log was created.
updated_at
String
Specifies the time when the VPC flow log was updated.
- Example response
{ "flow_logs": [ { "id": "35868d55-443e-4d5c-90a4-ac618dc45c1a", "name": "flow", "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-19fea5a25fff", "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", "created_at": "2019-01-14T11:03:02", "updated_at": "2019-01-14T11:03:02" "status": "ACTIVE", "admin_state": true } ] }
Status Code
See Status Codes.
Error Code
See Error Codes.