If you are familiar with the JSON syntax and OBS bucket policies, you can code a bucket policy in the JSON view. There is no limit on the number of bucket policies (statements) for a bucket, but the JSON descriptions of all bucket policies in a bucket cannot exceed 20 KB in total.
{"Statement":[{"Action":["CreateBucket","DeleteBucket"],"Effect":"Allow","Principal":{"ID":["domain/account ID","domain/account ID:user/User ID"]},"Condition":{"NumericNotEquals":{"Referer":"sdf"},"StringNotLike":{"Delimiter":"ouio"}},"Resource":"000-02/key01"}]}
Parameter | Description |
|---|---|
Action | Actions the bucket policy applies to. For details, see Actions. |
Effect | Effect of the bucket policy. For details, see Effect. |
Principal | Users the bucket policy is applied to. You can obtain the user ID on the My Credentials page by logging in to the console as the user to be authorized. Principals should be configured as follows:
|
Condition | Conditions under which the bucket policy takes effect. For details, see Conditions. |
Resource | Resources the bucket policy is applied to. For details, see Resources. |