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****
.
Limits
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.
Debugging
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:
|
PermissionPolicyName | String | Yes | AliyunECSFullAccess |
The name of the policy.
|
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 |
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. |
Examples
Sample requests
https://[Endpoint]/?Action=AddPermissionPolicyToAccessConfiguration
&DirectoryId=d-00fc2p61****
&AccessConfigurationId=ac-00jhtfl8thteu6uj****
&PermissionPolicyType=System
&PermissionPolicyName=AliyunECSFullAccess
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddPermissionPolicyToAccessConfigurationResponse>
<RequestId>B7C6E839-FB65-59BE-B753-003AA8AF7DF7</RequestId>
</AddPermissionPolicyToAccessConfigurationResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "B7C6E839-FB65-59BE-B753-003AA8AF7DF7"
}
Error codes
For a list of error codes, visit the API Error Center.