libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.S3.DeleteBucketPolicy

Description

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

Creating a Request

data DeleteBucketPolicy Source #

See: newDeleteBucketPolicy smart constructor.

Constructors

DeleteBucketPolicy' 

Fields

  • expectedBucketOwner :: Maybe Text

    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.

  • bucket :: BucketName

    The bucket name.

Instances

Instances details
Eq DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Read DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Show DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Generic DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Associated Types

type Rep DeleteBucketPolicy :: Type -> Type #

NFData DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Methods

rnf :: DeleteBucketPolicy -> () #

Hashable DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

AWSRequest DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Associated Types

type AWSResponse DeleteBucketPolicy #

ToHeaders DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

ToPath DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

ToQuery DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

type Rep DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

type Rep DeleteBucketPolicy = D1 ('MetaData "DeleteBucketPolicy" "Amazonka.S3.DeleteBucketPolicy" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "DeleteBucketPolicy'" 'PrefixI 'True) (S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName)))
type AWSResponse DeleteBucketPolicy Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

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.

Destructuring the Response

data DeleteBucketPolicyResponse Source #

See: newDeleteBucketPolicyResponse smart constructor.

Instances

Instances details
Eq DeleteBucketPolicyResponse Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Read DeleteBucketPolicyResponse Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Show DeleteBucketPolicyResponse Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Generic DeleteBucketPolicyResponse Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

Associated Types

type Rep DeleteBucketPolicyResponse :: Type -> Type #

NFData DeleteBucketPolicyResponse Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

type Rep DeleteBucketPolicyResponse Source # 
Instance details

Defined in Amazonka.S3.DeleteBucketPolicy

type Rep DeleteBucketPolicyResponse = D1 ('MetaData "DeleteBucketPolicyResponse" "Amazonka.S3.DeleteBucketPolicy" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "DeleteBucketPolicyResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDeleteBucketPolicyResponse :: DeleteBucketPolicyResponse Source #

Create a value of DeleteBucketPolicyResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.