This topic describes how to grant an IAM user the permissions required to delete a bucket.
To grant other permissions, select required actions from Action Name in the bucket policy. For details, see Action/NotAction.
To grant resource-level permissions to an IAM user, use a bucket policy.
After configuration, the IAM user can use APIs to delete buckets. However, if they log in to OBS Console or OBS Browser+ to delete buckets, a message will be displayed indicating that they do not have required permissions.
This is because when they log in to OBS Console or OBS Browser+, more APIs (such as ListAllMyBuckets and ListBucketVersions) will be called to load the list of buckets and versioned objects. In such case, the message is displayed.
If you want an IAM user to delete buckets on OBS Console or OBS Browser+, you need to allow the ListBucketVersions permission in the bucket policy and configure a custom IAM policy to grant the ListAllMyBuckets permission by referring to Follow-up Procedure.
Parameter |
Description |
---|---|
Policy Mode |
Select Customized. |
Effect |
Select Allow. |
Principal |
|
Resources |
Select Include > Entire bucket. |
Actions |
To configure other permissions, select the corresponding actions. For details, see Action/NotAction. |
To delete buckets on OBS Console or OBS Browser+, you need to allow the obs:bucket:ListAllMyBuckets permission in the IAM policy.
Parameter |
Description |
---|---|
Policy Name |
Enter a policy name. |
Policy View |
Select one based on your own habits. Visual editor is used here. |
Policy Content |
|
Scope |
Use the default value Global services. |
Apply the created custom policy to the user group by following the instructions in the IAM document.
Due to data caching, it takes about 10 to 15 minutes for a custom policy to take effect.