1
0
mirror of https://github.com/minio/docs.git synced 2025-07-30 07:03:26 +03:00
Files
docs/source/reference/minio-mc-admin/mc-admin-policy-info.rst
Daryl White 840417a6f7 Doc updates for mc RELEASE.2023-03-20T17-17-53Z (#799)
- Adds note that `mc support proxy set|remove` no longer require
registration
- Adds info about stale ARNs for `mc replicate status` command
- Additional information for --dry-run flag in `mc rm`
- Thoroughly updates and restructures `mc admin policy` commands
- Adds new `mc batch cancel` command
- Updates deprecated commands for newly deprecated mc admin policy
functions
- Fixes toctree on mc admin page to allow for mc admin policy subcommand
nesting

Closes #766

Other fixes not part of the release:
- Updates `--fake` flag on `mc rm` to `--dry-run`
- Updates `--fake` flag on `mc mirror` to `--dry-run`
2023-04-05 10:50:40 -05:00

2.4 KiB

mc admin policy info

minio

Table of Contents

mc admin policy info

Syntax

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

EXAMPLE

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

mc admin policy info myminio writeonly  

SYNTAX

The command has the following syntax:

mc admin policy info TARGET POLICYNAME
                     [--policy-file, -f <path>]

Parameters

The mc admin policy info command accepts the following arguments:

TARGET

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

POLICYNAME

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

--policy-file

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

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:::*"
         ]
      }
   ]
}