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.GetBucketVersioning

Description

Returns the versioning state of a bucket.

To retrieve the versioning state of a bucket, you must be the bucket owner.

This implementation also returns the MFA Delete status of the versioning state. If the MFA Delete status is enabled, the bucket owner must use an authentication device to change the versioning state of the bucket.

The following operations are related to GetBucketVersioning:

Synopsis

Creating a Request

data GetBucketVersioning Source #

See: newGetBucketVersioning smart constructor.

Constructors

GetBucketVersioning' 

Fields

  • 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 bucket for which to get the versioning information.

Instances

Instances details
ToHeaders GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

ToPath GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

ToQuery GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

AWSRequest GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Associated Types

type AWSResponse GetBucketVersioning #

Generic GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Associated Types

type Rep GetBucketVersioning :: Type -> Type #

Read GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Show GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

NFData GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Methods

rnf :: GetBucketVersioning -> () #

Eq GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Hashable GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

type AWSResponse GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

type Rep GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

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

newGetBucketVersioning Source #

Create a value of GetBucketVersioning 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:GetBucketVersioning', getBucketVersioning_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).

GetBucketVersioning, getBucketVersioning_bucket - The name of the bucket for which to get the versioning information.

Request Lenses

getBucketVersioning_expectedBucketOwner :: Lens' GetBucketVersioning (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).

getBucketVersioning_bucket :: Lens' GetBucketVersioning BucketName Source #

The name of the bucket for which to get the versioning information.

Destructuring the Response

data GetBucketVersioningResponse Source #

See: newGetBucketVersioningResponse smart constructor.

Constructors

GetBucketVersioningResponse' 

Fields

  • mfaDelete :: Maybe MFADeleteStatus

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.

  • status :: Maybe BucketVersioningStatus

    The versioning state of the bucket.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Associated Types

type Rep GetBucketVersioningResponse :: Type -> Type #

Read GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Show GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

NFData GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Eq GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

type Rep GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

type Rep GetBucketVersioningResponse = D1 ('MetaData "GetBucketVersioningResponse" "Amazonka.S3.GetBucketVersioning" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "GetBucketVersioningResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "mfaDelete") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MFADeleteStatus)) :*: (S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BucketVersioningStatus)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetBucketVersioningResponse Source #

Create a value of GetBucketVersioningResponse 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:

GetBucketVersioningResponse, getBucketVersioningResponse_mfaDelete - Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.

GetBucketVersioningResponse, getBucketVersioningResponse_status - The versioning state of the bucket.

$sel:httpStatus:GetBucketVersioningResponse', getBucketVersioningResponse_httpStatus - The response's http status code.

Response Lenses

getBucketVersioningResponse_mfaDelete :: Lens' GetBucketVersioningResponse (Maybe MFADeleteStatus) Source #

Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.