dcloud s3 bucket-access set-policySet the bucket policy (AWS grammar: the public, organizations, IAM users)
IAM s3:PutBucketPolicyChanges stateAsks before it deletes (-y skips)
Principal "*" (public), or {"EWS": [<org id> | rn:ews::<org>:iam:user/<id>]}; another organization needs its own IAM to allow the action too. Resources as arn:aws:s3:::<bucket>/… or EWS RNs; s3:ListBucket is accepted for s3:ListObjects. 403 when the policy would make the bucket public while blockPublicPolicy is on; 400 for a principal that does not exist.
Synopsis
dcloud s3 bucket-access set-policy name --policy policyArguments
<name>Requiredstring
Also accepted as
--name. Constraints: 3-63 chars, /^[a-z0-9][a-z0-9-]*[a-z0-9]$/
Flags
--policyRequiredstring
The policy document as JSON text, as `aws s3api put-bucket-policy` takes it
Constraints: 1-20480 chars
Example
dcloud s3 bucket-access set-policy name --policy exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.