mc admin policy set
Sets a policy for a user or a group.
Syntax
- CLI
-
mc admin policy set - set IAM policy on a user or group USAGE: mc admin policy set TARGET POLICYNAME [ users=user1,user2 ] [ groups=group1, group2 ] [ account=<account_name> ] [ domain=<domain_name> ] [ principalsaccount=<user/group account> ] POLICYNAME: Name of the policy on the MinIO server. users: List of users to which the policy must be attached. groups: List of Groups to which the policy must be attached. account: Name of the account whose policy is being attached. domain: Name of the domain to which the account belongs. principalsaccount: Name of the account of the users or groups, if it is different from the policy's account. Currently, the allowed value for this is 'default'. FLAGS: --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
Parameters
Parameter | Description |
---|---|
TARGET |
The alias of a configured HPE Ezmeral Object Store on which the command sets the policy. This parameter is mandatory. |
POLICYNAME |
The name of the policy to set. This parameter is mandatory. |
users |
Comma separated list of users to which the policy must be set.
Specify either a user or a group (using the groups
parameter), or both. |
groups |
Comma separated list of groups to which the policy must be set.
Specify either a user (using the users parameter) or a
group or both. |
account |
Name of the account where the policy is created. |
domain |
Name of the domain to which account belongs. |
principalsaccount |
Name of the account of the users or groups, if different from the
policy's account. Currently, the allowed value for this is
default . |
json |
Enables JSON formatted output |
debug |
Enables output for debugging |
insecure |
Disables SSL verification |
help |
Shows this help |
Examples
- Set the listbuckets policy for users james and daniel on the
Object Store deployment with alias salesobject:
- CLI
-
/opt/mapr/bin/mc admin policy set salesobject listbuckets users='james,daniel' -json
- Set the listbuckets policy for users james and daniel in
account naphthara on the Object Store deployment with alias salesobject:
- CLI
-
/opt/mapr/bin/mc admin policy set salesobject listbuckets users='james,daniel' account='naphthara' -json