ByCloud Docs
GuidesCLIAPISDK

Get policy

bycloud iam policies get --policy_id <policy_id> [flags]

Get details of a specific policy

Options

--policy_id

stringrequired

Policy ID

--output

(-o)

stringoptional

Output format: text, json, or yaml

Values: "text", "json", "yaml"

Default: "text"

Command

bycloud iam policies get \
--policy_id "abc-123"

Output

ID 550e8400-e29b-41d4-a716-446655440000
CRN crn::iam:policy:550e8400-e29b-41d4-a716-446655440000
NAME S3BucketAccess
DESCRIPTION Allow read/write access to specific S3 bucket
DOCUMENT
VERSION 2024-01-01
STATEMENTS
[0]
SID AllowS3Read
EFFECT allow
ACTIONS s3:GetObject, s3:ListBucket
RESOURCES my-bucket/*, my-bucket
CONDITIONS
[0]
OPERATOR equals
KEY s3:prefix
VALUES home/, shared/
[1]
SID AllowS3Read
EFFECT allow
ACTIONS s3:GetObject, s3:ListBucket
RESOURCES my-bucket/*, my-bucket
CONDITIONS
[0]
OPERATOR equals
KEY s3:prefix
VALUES home/, shared/
CREATED_AT 2024-01-15T10:30:00Z
UPDATED_AT 2024-01-15T10:30:00Z