Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
This implementation of the DELETE action uses the policy subresource to
delete the policy of a specified bucket. If you are using an identity
other than the root user of the Amazon Web Services account that owns
the bucket, the calling identity must have the DeleteBucketPolicy
permissions on the specified bucket and belong to the bucket owner's
account to use this operation.
If you don't have DeleteBucketPolicy
permissions, Amazon S3 returns a
403 Access Denied
error. If you have the correct permissions, but
you're not using an identity that belongs to the bucket owner's
account, Amazon S3 returns a 405 Method Not Allowed
error.
As a security precaution, the root user of the Amazon Web Services account that owns a bucket can always use this operation, even if the policy explicitly denies the root user the ability to perform this action.
For more information about bucket policies, see Using Bucket Policies and UserPolicies.
The following operations are related to DeleteBucketPolicy
Synopsis
- data DeleteBucketPolicy = DeleteBucketPolicy' {}
- newDeleteBucketPolicy :: BucketName -> DeleteBucketPolicy
- deleteBucketPolicy_expectedBucketOwner :: Lens' DeleteBucketPolicy (Maybe Text)
- deleteBucketPolicy_bucket :: Lens' DeleteBucketPolicy BucketName
- data DeleteBucketPolicyResponse = DeleteBucketPolicyResponse' {
- newDeleteBucketPolicyResponse :: DeleteBucketPolicyResponse
Creating a Request
data DeleteBucketPolicy Source #
See: newDeleteBucketPolicy
smart constructor.
DeleteBucketPolicy' | |
|
Instances
newDeleteBucketPolicy Source #
Create a value of DeleteBucketPolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:expectedBucketOwner:DeleteBucketPolicy'
, deleteBucketPolicy_expectedBucketOwner
- The account ID of the expected bucket owner. If the bucket is owned by a
different account, the request will fail with an HTTP
403 (Access Denied)
error.
$sel:bucket:DeleteBucketPolicy'
, deleteBucketPolicy_bucket
- The bucket name.
Request Lenses
deleteBucketPolicy_expectedBucketOwner :: Lens' DeleteBucketPolicy (Maybe Text) Source #
The account ID of the expected bucket owner. If the bucket is owned by a
different account, the request will fail with an HTTP
403 (Access Denied)
error.
deleteBucketPolicy_bucket :: Lens' DeleteBucketPolicy BucketName Source #
The bucket name.
Destructuring the Response
data DeleteBucketPolicyResponse Source #
See: newDeleteBucketPolicyResponse
smart constructor.
Instances
Eq DeleteBucketPolicyResponse Source # | |
Defined in Amazonka.S3.DeleteBucketPolicy | |
Read DeleteBucketPolicyResponse Source # | |
Show DeleteBucketPolicyResponse Source # | |
Defined in Amazonka.S3.DeleteBucketPolicy showsPrec :: Int -> DeleteBucketPolicyResponse -> ShowS # show :: DeleteBucketPolicyResponse -> String # showList :: [DeleteBucketPolicyResponse] -> ShowS # | |
Generic DeleteBucketPolicyResponse Source # | |
Defined in Amazonka.S3.DeleteBucketPolicy type Rep DeleteBucketPolicyResponse :: Type -> Type # | |
NFData DeleteBucketPolicyResponse Source # | |
Defined in Amazonka.S3.DeleteBucketPolicy rnf :: DeleteBucketPolicyResponse -> () # | |
type Rep DeleteBucketPolicyResponse Source # | |
newDeleteBucketPolicyResponse :: DeleteBucketPolicyResponse Source #
Create a value of DeleteBucketPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.