security iam policy detach
Detaches an IAM policy from one or more identities.
You can use iam policy detach command to detach an
identity access management (IAM) policy from identities (users,
groups, or roles).
You can run the iam policy detach command on a primary
cluster only.
Multiple type of identities (users, groups, roles) and number of identities (comma-separated names) can be specified in same command.
Syntax
- CLI
-
maprcli security iam policy detach -name [ -users <User Names> -groups <Group Names> -roles <Role Names> ]
- REST
-
Request Type POST Request URL http[s]://<host>:<port>/rest/iam/policy/detach?<parameters>
Parameters
| Parameter | Description |
|---|---|
name |
(Required) Name of the policy. |
users |
(Optional) List of users. |
groups |
(Optional) List of groups |
roles |
(Optional) Name of roles |
Example
Detach IAM policy Policy1 from user user3
CLI
maprcli security iam policy detach -name Policy1 -users user3 -json
{
"timestamp":1726154439156,
"timeofday":"2024-09-12 08:20:39.156 GMT-0700 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Identity Policy 'Policy1' detached successfully"
]
}RESTcurl -u <username> -X POST 'https://server.sj.us:8443/rest/security/iam/policy/detach?name=Policy1&users=user3'