Enables the Control Policy feature.

The Control Policy feature allows you to manage the permission boundaries of the folders or member accounts in a resource directory in a centralized manner. This feature is implemented based on the resource directory. You can use this feature to develop common or dedicated rules for access control. The Control Policy feature does not grant permissions but only defines permission boundaries. A member account in a resource directory can be used to access resources only after it is granted the required permissions by using the Resource Access Management (RAM) service. For more information, see Overview of the Control Policy feature.

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 EnableControlPolicy

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

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
EnablementStatus String PendingEnable

The status of the Control Policy feature. Valid values:

  • Enabled: The Control Policy feature is enabled.
  • PendingEnable: The Control Policy feature is being enabled.
  • Disabled: The Control Policy feature is disabled.
  • PendingDisable: The Control Policy feature is being disabled.
RequestId String 8CE7BD95-EFFA-4911-A1E0-BD4412697FEB

The ID of the request.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=EnableControlPolicy
&<Common request parameters>

Sample success responses

XML format

<EnableControlPolicyResponse>
	  <EnablementStatus>PendingEnable</EnablementStatus>
	  <RequestId>8CE7BD95-EFFA-4911-A1E0-BD4412697FEB</RequestId>
</EnableControlPolicyResponse>

JSON format

{
  "EnablementStatus": "PendingEnable",
  "RequestId": "8CE7BD95-EFFA-4911-A1E0-BD4412697FEB"
}

Error codes

HTTP status code Error code Error message Description
409 Throttling.EnableControlPolicy The enable operation is too frequent. Please try again in %s minute(s). The error message returned because frequent enabling operations are performed for the Control Policy feature. Try to enable the feature a few minutes later.

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