Bucket policies define the access control over resources (buckets and objects) in OBS.
{ "Statement": [ { "Sid": "testing", "Effect": "Allow", "Principal": { "ID": [ "domain/783fc6652cf246c096ea836694f71855:user/*" ] }, "Action": [ "GetBucketLogging" ], "Resource": [ "logging.bucket3" ] } ] }
Item to Modify |
Description |
---|---|
GetBucketLogging |
Value of the Action field that indicates the operation set in the policy. The Action field indicates all operations supported by OBS and its values are strings of case-insensitive characters. The value supports a wildcard character (*) that indicates all actions, for example, "Action":["List*", "Get*"]. You need to change the value as needed. For the actions supported by OBS, see . |
Allow |
Value of the Effect field that indicates whether the permission in the policy is allowed or denied. The value must be Allow or Deny. |
logging.bucket3 |
The bucket on which the policy works. You can change the bucket name as needed. |
783fc6652cf246c096ea836694f71855 |
ID of an account. You can change it as needed. You can obtain the account ID on the bucket's Basic Information page. |
{ "Statement": [ { "Sid": "testing", "Effect": "Allow", "Principal": { "ID": [ "domain/219d520ceac84c5a98b237431a2cf4c2:user/71f3901173514e6988115ea2c26d1999" ] }, "Action": [ "PutBucketLogging" ], "Resource": [ "logging.bucket3" ] } ] }
Item to Modify |
Description |
---|---|
PutBucketLogging |
Value of the Action field that indicates the operation set in the policy. The Action field indicates all operations supported by OBS and its values are strings of case-insensitive characters. The value supports a wildcard character (*) that indicates all actions, for example, "Action":["List*", "Get*"]. You need to change the value as needed. For the actions supported by OBS, see . |
Allow |
Value of the Effect field that indicates whether the permission in the policy is allowed or denied. The value must be Allow or Deny. |
logging.bucket3 |
The bucket on which the policy works. You can change the bucket name as needed. |
219d520ceac84c5a98b237431a2cf4c2 |
ID of an account. You can change it as needed. You can click |
71f3901173514e6988115ea2c26d1999 |
ID of a user under the account. You can change it as needed. You can choose My Credentials from the username in the upper right corner of OBS Console to obtain the IAM User ID. |
For details about the fields in a bucket policy, see .