mc admin policy info

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

Syntax

Parameters

The mc admin policy info command accepts the following arguments:

TARGET

Required

The alias of a configured AIStor deployment.

POLICYNAME

Required

The name of the policy to return in JSON format.

Global Flags

This command supports any of the global flags.

Examples

Return the policy readonly in JSON format from the deployment at 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:::*"
         ]
      }
   ]
}
All rights reserved 2024-Present, MinIO, Inc.