All Products
Search
Document Center

Virtual Private Cloud:ActiveFlowLog

Last Updated:Jun 19, 2026

Calls the ActiveFlowLog operation to activate a flow log and start capturing traffic of the specified resource.

Operation description

  • The ActiveFlowLog operation is asynchronous. After you call this operation, the system returns a request ID, but the flow log has not been activated yet because the activation task is still running in the background. You can call DescribeFlowLogs to query the activation status of the flow log:
    • If the flow log is in the Activating state, the flow log is being activated.

    • If the flow log is in the Active state, the flow log has been activated.

  • The ActiveFlowLog operation does not support concurrent activation of the same flow log.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:ActiveFlowLog

update

*FlowLog

acs:vpc:{#regionId}:{#accountId}:flowlog/{#FlowLogId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the flow log. You can call DescribeRegions to query the region ID.

cn-qingdao

FlowLogId

string

Yes

The flow log ID.

fl-m5e8vhz2t21sel1nq****

Response elements

Element

Type

Description

Example

object

Success

string

Indicates whether the call is successful.

  • true: The call is successful.

  • false: The call failed.

true

RequestId

string

The request ID.

F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 IncorrectBusinessStatus.FlowLog The business status of flowLog is incorrect.
400 InvalidInstanceId Instance does not exist. The error message returned because the specified instance does not exist.
400 InvalidStatus Current instance status is not valid for this action.
400 InvalidRegionId.NotFound The RegionId provided does not exist in our records.
400 InvalidInstanceId.NotFound The specfied instance is not existed.
400 IncorrectStatus.flowlog Invalid flowlog status. The flow log cannot be disabled because it is in an invalid state.
400 Forbidden.OperateManagedFlowLog Authentication is failed for operate managed flowlog. Authentication failed when operating the managed flow log.
400 OperationDenied.FlowLogDeliverFailed The operation is not allowed due to an invalid delivery address. The flow log cannot be started because the delivery address is invalid.
400 OperationDenied.NisTrafficAnalyzerAggregationIntervalMismatch The sampling interval of the FlowLog is greater than the sampling interval of the NIS Traffic Analyzer. The sampling interval of the FlowLog is greater than the sampling interval of the NIS Traffic Analyzer.
400 OperationDenied.NisTrafficAnalyzerNotActive The specified NIS Traffic Analyzer is not enabled. The specified NIS Traffic Analyzer is not enabled.
400 OperationDenied.NisTrafficAnalyzerNotFound The specified NIS Traffic Analyzer does not exist. The specified NIS Traffic Analyzer does not exist.
400 OperationFailed.InternalError The request processing has failed due to some unknown error. Unknown error. Please retry the operation. The error still exists. Please submit the work order for processing.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.