Adds a policy to an access configuration.

Usage notes

This topic provides an example on how to add the system policy AliyunECSFullAccess to the access configuration ac-00jhtfl8thteu6uj****.


You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.


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 AddPermissionPolicyToAccessConfiguration

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

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

AccessConfigurationId String Yes ac-00jhtfl8thteu6uj****

The ID of the access configuration.

PermissionPolicyType String Yes System

The type of the policy. Valid values:

  • System: system policy. Resource Access Management (RAM) system policies are reused.
  • Inline: inline policy. Inline policies are created based on the RAM policy syntax and structure.
PermissionPolicyName String Yes AliyunECSFullAccess

The name of the policy.

  • If you set PermissionPolicyType to System, you must set this parameter to the name of the system policy. You can obtain the name of the system policy from RAM.
  • If you set PermissionPolicyType to Inline, you must set this parameter to the name of the inline policy. A custom value is supported.
InlinePolicyDocument String No {"Statement": [{"Action": "*","Effect": "Allow","Resource": "*"}],"Version": "1"}

The configurations of the inline policy.

The value can be up to 4,096 characters in length.

If you set PermissionPolicyType to Inline, you must specify this parameter. For more information about the syntax and structure of RAM policies, see Policy syntax and structure.

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

Response parameters

Parameter Type Example Description
RequestId String B7C6E839-FB65-59BE-B753-003AA8AF7DF7

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "B7C6E839-FB65-59BE-B753-003AA8AF7DF7"

Error codes

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