mc admin policy add

Creates accounts, domains, and user policies.

The Object Store administrator runs this command to create a policy. The command throws an error if the policy already exists.

Syntax

CLI
mc admin policy add TARGET POLICYNAME POLICYFILE account=<account_name> 
                                                 domain=<domain_name>
POLICYNAME:
  Name of the canned policy on the HPE Object Store server.

POLICYFILE:
  Name of the policy file associated with the policy name.

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 creates or updates a policy. This parameter is mandatory.
POLICYNAME The name of the policy to create or update. This parameter is mandatory.
POLICYFILE The file in JSON format containing the policy. This parameter is mandatory.
account The account to which this policy applies.
domain The domain to which this policy applies.
json Enables JSON formatted output
debug Enables output for debugging
insecure Disables SSL verification
help Shows this help

Examples

  1. Create the listbuckets policy that is in the file /tmp/listbuckets.json in the Object Store deployment with alias salesobject:
    CLI
    mc admin policy add salesobject listbuckets /tmp/listbuckets.json
  2. Create the listbuckets policy that is in the file /tmp/listbuckets.json in the Object Store deployment with alias salesobject, and applicable to the domain primary:
    CLI
    mc admin policy add salesobject listbuckets /tmp/listbuckets.json domain=primary -json