amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.S3.PutBucketOwnershipControls

Description

Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this operation, you must have the s3:PutBucketOwnershipControls permission. For more information about Amazon S3 permissions, see Specifying permissions in a policy.

For information about Amazon S3 Object Ownership, see Using object ownership.

The following operations are related to PutBucketOwnershipControls:

  • GetBucketOwnershipControls
  • DeleteBucketOwnershipControls
Synopsis

Creating a Request

data PutBucketOwnershipControls Source #

See: newPutBucketOwnershipControls smart constructor.

Constructors

PutBucketOwnershipControls' 

Fields

  • contentMD5 :: Maybe Text

    The MD5 hash of the OwnershipControls request body.

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

  • bucket :: BucketName

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

  • ownershipControls :: OwnershipControls

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter) that you want to apply to this Amazon S3 bucket.

Instances

Instances details
ToHeaders PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

ToPath PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

ToQuery PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

ToElement PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

AWSRequest PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Generic PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Associated Types

type Rep PutBucketOwnershipControls :: Type -> Type #

Read PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Show PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

NFData PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Eq PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Hashable PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

type AWSResponse PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

type Rep PutBucketOwnershipControls Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

type Rep PutBucketOwnershipControls = D1 ('MetaData "PutBucketOwnershipControls" "Amazonka.S3.PutBucketOwnershipControls" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "PutBucketOwnershipControls'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "contentMD5") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName) :*: S1 ('MetaSel ('Just "ownershipControls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 OwnershipControls))))

newPutBucketOwnershipControls Source #

Create a value of PutBucketOwnershipControls 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:contentMD5:PutBucketOwnershipControls', putBucketOwnershipControls_contentMD5 - The MD5 hash of the OwnershipControls request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

$sel:expectedBucketOwner:PutBucketOwnershipControls', putBucketOwnershipControls_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

PutBucketOwnershipControls, putBucketOwnershipControls_bucket - The name of the Amazon S3 bucket whose OwnershipControls you want to set.

$sel:ownershipControls:PutBucketOwnershipControls', putBucketOwnershipControls_ownershipControls - The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter) that you want to apply to this Amazon S3 bucket.

Request Lenses

putBucketOwnershipControls_contentMD5 :: Lens' PutBucketOwnershipControls (Maybe Text) Source #

The MD5 hash of the OwnershipControls request body.

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

putBucketOwnershipControls_expectedBucketOwner :: Lens' PutBucketOwnershipControls (Maybe Text) Source #

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

putBucketOwnershipControls_bucket :: Lens' PutBucketOwnershipControls BucketName Source #

The name of the Amazon S3 bucket whose OwnershipControls you want to set.

putBucketOwnershipControls_ownershipControls :: Lens' PutBucketOwnershipControls OwnershipControls Source #

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter) that you want to apply to this Amazon S3 bucket.

Destructuring the Response

data PutBucketOwnershipControlsResponse Source #

Instances

Instances details
Generic PutBucketOwnershipControlsResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Associated Types

type Rep PutBucketOwnershipControlsResponse :: Type -> Type #

Read PutBucketOwnershipControlsResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Show PutBucketOwnershipControlsResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

NFData PutBucketOwnershipControlsResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

Eq PutBucketOwnershipControlsResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

type Rep PutBucketOwnershipControlsResponse Source # 
Instance details

Defined in Amazonka.S3.PutBucketOwnershipControls

type Rep PutBucketOwnershipControlsResponse = D1 ('MetaData "PutBucketOwnershipControlsResponse" "Amazonka.S3.PutBucketOwnershipControls" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "PutBucketOwnershipControlsResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newPutBucketOwnershipControlsResponse :: PutBucketOwnershipControlsResponse Source #

Create a value of PutBucketOwnershipControlsResponse with all optional fields omitted.

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