security iam role attach
The security iam role attach command assigns a custom
role to users, and/or groups. You can run the security iam
role attach command on a primary cluster only.
Syntax
- CLI
-
maprcli security iam role attach -name <Role Name> [ -users <List of Users> ] [ -groups <List of Groups> ] - REST
-
Request Type POST Request URL http[s]://<host>:<port>/rest/iam/role/attach?<parameters>
Parameters
| Parameter | Description |
|---|---|
name |
(Required) Name of the role. |
users |
(Optional) Name of the user. To assign a role to multiple users, use a comma-separated list of users. |
groups |
(Optional) Name of the group. To assign a role to multiple groups, use a comma-separated list of groups. |
Example
Attach the Eng role to the user user1
CLI
maprcli security iam role attach -name Eng -users user1 -json
{
"timestamp":1726571570127,
"timeofday":"2024-09-17 04:12:50.127 GMT-0700 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Successfully attached the role 'Eng'."
]
}
REST
curl -u <username> -X POST https://server.sj.us:8443/rest/security/iam/role/attach?name=Eng\&users=user1