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

Description

Returns the Region the bucket resides in. You set the bucket's Region using the LocationConstraint request parameter in a CreateBucket request. For more information, see CreateBucket.

To use this implementation of the operation, you must be the bucket owner.

To use this API against an access point, provide the alias of the access point in place of the bucket name.

The following operations are related to GetBucketLocation:

Synopsis

Creating a Request

data GetBucketLocation Source #

See: newGetBucketLocation smart constructor.

Constructors

GetBucketLocation' 

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

Instances

Instances details
Eq GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Read GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Show GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Generic GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Associated Types

type Rep GetBucketLocation :: Type -> Type #

NFData GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Methods

rnf :: GetBucketLocation -> () #

Hashable GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

AWSRequest GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Associated Types

type AWSResponse GetBucketLocation #

ToHeaders GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

ToPath GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

ToQuery GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

type Rep GetBucketLocation Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

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

Defined in Amazonka.S3.GetBucketLocation

newGetBucketLocation Source #

Create a value of GetBucketLocation 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:GetBucketLocation', getBucketLocation_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:GetBucketLocation', getBucketLocation_bucket - The name of the bucket for which to get the location.

Request Lenses

getBucketLocation_expectedBucketOwner :: Lens' GetBucketLocation (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.

getBucketLocation_bucket :: Lens' GetBucketLocation BucketName Source #

The name of the bucket for which to get the location.

Destructuring the Response

data GetBucketLocationResponse Source #

See: newGetBucketLocationResponse smart constructor.

Constructors

GetBucketLocationResponse' 

Fields

Instances

Instances details
Eq GetBucketLocationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Read GetBucketLocationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Show GetBucketLocationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Generic GetBucketLocationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

Associated Types

type Rep GetBucketLocationResponse :: Type -> Type #

NFData GetBucketLocationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

type Rep GetBucketLocationResponse Source # 
Instance details

Defined in Amazonka.S3.GetBucketLocation

type Rep GetBucketLocationResponse = D1 ('MetaData "GetBucketLocationResponse" "Amazonka.S3.GetBucketLocation" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "GetBucketLocationResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "locationConstraint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LocationConstraint)))

newGetBucketLocationResponse Source #

Create a value of GetBucketLocationResponse 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:httpStatus:GetBucketLocationResponse', getBucketLocationResponse_httpStatus - The response's http status code.

$sel:locationConstraint:GetBucketLocationResponse', getBucketLocationResponse_locationConstraint - Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see Regions and Endpoints. Buckets in Region us-east-1 have a LocationConstraint of null.

Response Lenses

getBucketLocationResponse_locationConstraint :: Lens' GetBucketLocationResponse LocationConstraint Source #

Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported location constraints by Region, see Regions and Endpoints. Buckets in Region us-east-1 have a LocationConstraint of null.