Create policy
bycloud iam policies create --name <name> --document <document> [flags]Create a new policy in the current organization
Options
--output
(-o)
stringoptionalOutput format: text, json, or yaml
Values: "text", "json", "yaml"
Default: "text"
Body Options
--document
objectrequiredIAM-style policy document
--name
stringrequired--description
stringoptionalCommand
bycloud iam policies create \--name "my-resource" \--document "value"
Output
ID 550e8400-e29b-41d4-a716-446655440000CRN crn::iam:policy:550e8400-e29b-41d4-a716-446655440000NAME S3BucketAccessDESCRIPTION Allow read/write access to specific S3 bucketDOCUMENTVERSION 2024-01-01STATEMENTS[0]SID AllowS3ReadEFFECT allowACTIONS s3:GetObject, s3:ListBucketRESOURCES my-bucket/*, my-bucketCONDITIONS[0]OPERATOR equalsKEY s3:prefixVALUES home/, shared/[1]SID AllowS3ReadEFFECT allowACTIONS s3:GetObject, s3:ListBucketRESOURCES my-bucket/*, my-bucketCONDITIONS[0]OPERATOR equalsKEY s3:prefixVALUES home/, shared/CREATED_AT 2024-01-15T10:30:00ZUPDATED_AT 2024-01-15T10:30:00Z