Documentation

mc admin policy info

Syntax

Returns the specified policy in JSON format if it exists on the target MinIO deployment.

The following command displays the contents of the writeonly policy on the alias myminio.

 mc admin policy info myminio writeonly

The command has the following syntax:

mc admin policy info TARGET POLICYNAME
                     [--policy-file, -f <path>]
  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The mc admin policy info command accepts the following arguments:

TARGET
Required

The alias of a configured MinIO deployment from which to display the specified policy.

POLICYNAME
Required

The name of the policy whose details you want to display.

--policy-file
Optional

Specifly the path of a file to write the contents of the specified policy JSON. If the path already exists, the command overwrites the existing file with the contents of the specified file.

Global Flags

This command supports any of the global flags.

Examples

Display the contents of the writeonly policy on the alias myminio.

mc admin policy info myminio writeonly

Show information on a given policy and write the policy JSON content to /tmp/policy.json.

mc admin policy info myminio writeonly --policy-file /tmp/policy.json

Output

The command returns output that resembles the following:

{
   "Version": "2012-10-17",
   "Statement": [
      {
         "Effect": "Allow",
         "Action": [
            "s3:PutObject"
         ],
         "Resource": [
            "arn:aws:s3:::*"
         ]
      }
   ]
}