ByCloud Docs
GuidesCLIAPISDK

Update policy

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

Update an existing policy

Options

--policy_id

stringrequired

Policy ID

--output

(-o)

stringoptional

Output format: text, json, or yaml

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

Default: "text"

Body Options

--description

stringoptional

--document

objectoptional

IAM-style policy document

--name

stringoptional

Command

bycloud iam policies update \
--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