mc admin policy info
Returns the specified policy in JSON format if it exists on the target MinIO AIStor deployment.
Syntax
The following command returns the policy readonly in JSON format from the deployment at alias myaistor.
mc admin policy info myaistor readonlyThe command has the following syntax:
mc admin policy info \
TARGET \
POLICYNAME \
[--policy-file FILE]- 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 AIStor deployment.
POLICYNAME
Required
The name of the policy to return in JSON format.
--policy-file
Alias: -f
Optional
The path to a file to which the command also writes the policy JSON. The command overwrites the file if it exists.
Global Flags
This command supports any of the global flags.
Examples
Return the policy writeonly in JSON format from the deployment at alias myaistor.
mc admin policy info myaistor writeonlyShow information on a given policy and write the policy JSON content to /tmp/policy.json.
mc admin policy info myaistor writeonly --policy-file /tmp/policy.jsonOutput
The command returns output that resembles the following:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::*"
]
}
]
}