Attach Policy to User/User Group/Service Account¶
Attach policies to a user, user group, or service account.
Operation Permissions¶
Applications assigned with the administrator policy in the OU.
Request Format¶
POST https://{apigw-address}/enos-iam-service/v2.3/policy/grant
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
The ID of the OU to which the user/user group/service account belongs to. How to get orgId>> |
Request Parameters (Body)¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
subjectIds |
Required |
String |
The ID of the user/user group/service arrount to attach the policy to. |
subjectType |
Required |
String |
The subject type. Available values are: |
policy |
Required |
AddPolicy Struct |
The information of the policies to be attached. For more information, see AddPolicy Struct. |
AddPolicy Struct ¶
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
add |
Required |
String Array |
The list of policies to be attached. |
Samples¶
Request Sample¶
url: https://{apigw-address}/enos-iam-service/v2.3/policy/grant?orgId=yourOrgId
method: POST
request Body:
{
"policy": {
"add": [
"123"
]
},
"subjectIds": "userId359",
"subjectType": "user"
}
Return Sample¶
{
"fail": false,
"data": true,
"success": true,
"status": 0
}