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 all OBS-supported actions in the policy. The value is a case-insensitive string. The value can contain a wildcard character (*), for example, "Action":["List*", "Get*"], to apply all actions to the resources. You need to change the value as needed. |
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 all OBS-supported actions in the policy. The value is a case-insensitive string. The value can contain a wildcard character (*), for example, "Action":["List*", "Get*"], to apply all actions to the resources. You need to change the value as needed. |
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 Bucket Policy Overview.