Enables flow logs. After flow logs are enabled, traffic information about a resource is captured.

Usage notes

  • The ActiveFlowLog operation is asynchronous. After you send the request, the system returns a request ID. However, the operation is still being performed in the system background. You can call the DescribeFlowLogs operation to query the status of a flow log:
    • If the flow log is in the Activating state, the flow log is being started.
    • If the flow log is in the Active state, the flow log is started.
  • You cannot repeatedly call the ActiveFlowLog operation to start a flow log within the specified period of time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ActiveFlowLog

The operation that you want to perform. Set the value to ActiveFlowLog.

RegionId String Yes cn-qingdao

The ID of the region where you want to create the flow log. You can call the DescribeRegions operation to query the most recent region list.

FlowLogId String Yes fl-m5e8vhz2t21sel1nq****

The ID of the flow log.

Response parameters

Parameter Type Example Description
Success String true

Indicates whether the operation is successful. Valid values:

  • true: yes
  • false: no
RequestId String F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ActiveFlowLog
&RegionId=cn-qingdao
&FlowLogId=fl-m5e8vhz2t21sel1nq****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ActiveFlowLogResponse>
    <Success>true</Success>
    <RequestId>F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1</RequestId>
</ActiveFlowLogResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Success" : "true",
  "RequestId" : "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1"
}

Error codes

HttpCode Error code Error message Description
400 IncorrectStatus.flowlog Invalid flowlog status. The error message returned because the flow log is in an invalid state and cannot be disabled.

For a list of error codes, visit the API Error Center.