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.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 will fail with an HTTP 403 (Access Denied) error.

  • bucket :: BucketName

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

Instances

Instances details
Eq GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Read GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Show GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Generic GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Associated Types

type Rep GetBucketVersioning :: Type -> Type #

NFData GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Methods

rnf :: GetBucketVersioning -> () #

Hashable GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

AWSRequest GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Associated Types

type AWSResponse GetBucketVersioning #

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

type Rep GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

type Rep GetBucketVersioning = D1 ('MetaData "GetBucketVersioning" "Amazonka.S3.GetBucketVersioning" "libZSservicesZSamazonka-s3ZSamazonka-s3" '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)))
type AWSResponse GetBucketVersioning Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

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 will fail with an HTTP 403 (Access Denied) error.

$sel:bucket: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 will fail with an HTTP 403 (Access Denied) error.

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

  • status :: Maybe BucketVersioningStatus

    The versioning state of the bucket.

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

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Read GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Show GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Generic GetBucketVersioningResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketVersioning

Associated Types

type Rep GetBucketVersioningResponse :: Type -> Type #

NFData 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" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "GetBucketVersioningResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BucketVersioningStatus)) :*: (S1 ('MetaSel ('Just "mfaDelete") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MFADeleteStatus)) :*: 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:

$sel:status:GetBucketVersioningResponse', getBucketVersioningResponse_status - The versioning state of the bucket.

$sel:mfaDelete: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.

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