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) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The ID of the organization to which the user/user group/service account belongs to. How to get orgId>> |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
subjectIds |
Mandatory |
String |
The ID of the user/user group/service arrount to attach the policy to. |
subjectType |
Mandatory |
String |
The subject type. Available values are: |
policy |
Mandatory |
AddPolicy Struct |
The information of the policies to be attached. For more information, see AddPolicy Struct. |
AddPolicy Struct ¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
add |
Mandatory |
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
}