Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data GetBucketLocation = GetBucketLocation' {}
- newGetBucketLocation :: BucketName -> GetBucketLocation
- getBucketLocation_expectedBucketOwner :: Lens' GetBucketLocation (Maybe Text)
- getBucketLocation_bucket :: Lens' GetBucketLocation BucketName
- data GetBucketLocationResponse = GetBucketLocationResponse' {}
- newGetBucketLocationResponse :: Int -> LocationConstraint -> GetBucketLocationResponse
- getBucketLocationResponse_httpStatus :: Lens' GetBucketLocationResponse Int
- getBucketLocationResponse_locationConstraint :: Lens' GetBucketLocationResponse LocationConstraint
Creating a Request
data GetBucketLocation Source #
See: newGetBucketLocation
smart constructor.
GetBucketLocation' | |
|
Instances
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.
GetBucketLocationResponse' | |
|
Instances
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_httpStatus :: Lens' GetBucketLocationResponse Int Source #
The response's http status code.
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
.