All Products
Search
Document Center

:ActiveFlowLog

最終更新日:Aug 10, 2023

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

Usage notes

  • ActiveFlowLog is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeFlowLogs operation to query the status of the task:
    • 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 region ID of 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.

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

The request ID.

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 InvalidInstanceId Instance does not exist. The instance is not found.
400 IncorrectStatus.flowlog Invalid flowlog status. The flow log is in an invalid state and cannot be disabled.
400 Forbidden.OperateManagedFlowLog Authentication is failed for operate managed flowlog. Authentication failed when the system handles the managed flow log.
400 OperationDenied.FlowLogDeliverFailed The operation is not allowed due to an invalid delivery address. The destination address is invalid and the flow log cannot be enabled.

For a list of error codes, see Service error codes.