security iam policy attach

You can use iam policy attach command to assign an IAM Policy to input identities (Users, Groups, or Roles).

Syntax

CLI
IMPORTANT
NOTE
  • This operation is only supported on primary cluster group. Attach operation is NOT supported by Identity Policy with status - Enforcing, Disarming.
  • Multiple types of identities (users, groups), and number of identities (comma-separated names) can be specified together in the same command.
maprcli security iam policy attach -name [ -users <User Names> -groups <Group Names> -roles <Role Names> ]

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

maprcli security iam policy attach -name Policy1 -users user3 -groups group2 -roles role1 -json
{
        "timestamp":1726154305075,
        "timeofday":"2024-09-12 08:18:25.075 GMT-0700 AM",
        "status":"OK",
        "total":0,
        "data":[
        
        ],
        "messages":[
                "Identity Policy 'Policy1' attached successfully"
        ]
}