All Products
Search
Document Center

Resource Access Management:AttachPolicyToUser

最終更新日:Jul 31, 2025

Attaches a policy to a Resource Access Management (RAM) user.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
PolicyTypestringYes

The type of the policy. Valid values: System and Custom.

Custom
PolicyNamestringYes

The name of the policy.

OSS-Administrator
UserNamestringYes

The name of the RAM user.

zhangq****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

697852FB-50D7-44D9-9774-530C31EAC572

Examples

Sample success responses

JSONformat

{
  "RequestId": "697852FB-50D7-44D9-9774-530C31EAC572"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history