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.

Table 1 Parameter description

Name

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

id

No

String

Specifies the VPC flow log UUID.

name

No

String

  • Specifies the VPC flow log name.
  • The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).

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.

  • ACTIVE: Enabled
  • DOWN: Disabled
  • ERROR: Abnormal fault

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.

  • If parameters marker and limit are not passed, all resource records will be returned.
  • If the parameter marker is not passed and the value of parameter limit is set to 10, the first 10 resource records will be returned.
  • If the value of the parameter marker is set to the resource ID of the 10th record and the value of parameter limit is set to 10, the 11th to 20th resource records will be returned.
  • If the value of the parameter marker is set to the resource ID of the 10th record and the parameter limit is not passed, resource records starting from the 11th records (including 11th) will be returned.

Request Message

Response Message

Status Code

See Status Codes.

Error Code

See Error Codes.