Last Updated on : 2023-10-09 08:09:03download
Based on the permission ID and user ID, link a user with the specified permission.
Note: - 1. Each user can be linked with no more than 10 permissions to avoid authorization flooding. - 2. The same permission ID can be granted to no more than 1,000 users.
POST: /v2.0/cloud/iam/permission/{permission_id}/user/{user_id}
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
permission_id | Long | uri | true | The ID of the specified permission. |
user_id | String | uri | true | The user ID. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
attach_type | Integer | true | The authorization type. Valid values:
| |
start_time | Long | false | The time when a temporary authorization takes effect. Unit: milliseconds. This field is only valid for temporary authorization. | |
end_time | Long | false | The time when a temporary authorization expires. Unit: milliseconds. This field is only valid for temporary authorization. |
Parameter name | Type | Description |
---|---|---|
success | Boolean | Indicates whether the operation is successful. Valid values:
|
error_code | String | The error code. For more information, see the error codes. |
error_msg | String | The message that is returned if the request fails. It is empty if the request is successful. |
result | Object | The returned result. |
POST: /v2.0/cloud/iam/permission/1/user/uid1
{
"attach_type": 0
}
{
"tid": "f5ffe2440b5111ee8144726abb6617ad",
"result": true,
"t": 1686815715734,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback