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

mc-cmd

Required

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

POLICYNAME

mc-cmd

Required

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

--policy-file

mc-cmd

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:::*"
         ]
      }
   ]
}
Last modified August 2, 2026: init commit (8338d5b)

Portions of this page are adapted from the MinIO Object Storage Documentation, © 2020–Present MinIO, Inc., licensed under CC BY 4.0, converted and maintained by the Silo project. Attribution