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 website configuration for a bucket. To host website on Amazon S3, you can configure a bucket as website by adding a website configuration. For more information about hosting websites, see Hosting Websites on Amazon S3.
This GET action requires the S3:GetBucketWebsite
permission. By
default, only the bucket owner can read the bucket website
configuration. However, bucket owners can allow other users to read the
website configuration by writing a bucket policy granting them the
S3:GetBucketWebsite
permission.
The following operations are related to DeleteBucketWebsite
:
Synopsis
- data GetBucketWebsite = GetBucketWebsite' {}
- newGetBucketWebsite :: BucketName -> GetBucketWebsite
- getBucketWebsite_expectedBucketOwner :: Lens' GetBucketWebsite (Maybe Text)
- getBucketWebsite_bucket :: Lens' GetBucketWebsite BucketName
- data GetBucketWebsiteResponse = GetBucketWebsiteResponse' {}
- newGetBucketWebsiteResponse :: Int -> GetBucketWebsiteResponse
- getBucketWebsiteResponse_redirectAllRequestsTo :: Lens' GetBucketWebsiteResponse (Maybe RedirectAllRequestsTo)
- getBucketWebsiteResponse_errorDocument :: Lens' GetBucketWebsiteResponse (Maybe ErrorDocument)
- getBucketWebsiteResponse_indexDocument :: Lens' GetBucketWebsiteResponse (Maybe IndexDocument)
- getBucketWebsiteResponse_routingRules :: Lens' GetBucketWebsiteResponse (Maybe [RoutingRule])
- getBucketWebsiteResponse_httpStatus :: Lens' GetBucketWebsiteResponse Int
Creating a Request
data GetBucketWebsite Source #
See: newGetBucketWebsite
smart constructor.
GetBucketWebsite' | |
|
Instances
Create a value of GetBucketWebsite
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:GetBucketWebsite'
, getBucketWebsite_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:GetBucketWebsite'
, getBucketWebsite_bucket
- The bucket name for which to get the website configuration.
Request Lenses
getBucketWebsite_expectedBucketOwner :: Lens' GetBucketWebsite (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.
getBucketWebsite_bucket :: Lens' GetBucketWebsite BucketName Source #
The bucket name for which to get the website configuration.
Destructuring the Response
data GetBucketWebsiteResponse Source #
See: newGetBucketWebsiteResponse
smart constructor.
GetBucketWebsiteResponse' | |
|
Instances
newGetBucketWebsiteResponse Source #
Create a value of GetBucketWebsiteResponse
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:redirectAllRequestsTo:GetBucketWebsiteResponse'
, getBucketWebsiteResponse_redirectAllRequestsTo
- Specifies the redirect behavior of all requests to a website endpoint of
an Amazon S3 bucket.
$sel:errorDocument:GetBucketWebsiteResponse'
, getBucketWebsiteResponse_errorDocument
- The object key name of the website error document to use for 4XX class
errors.
$sel:indexDocument:GetBucketWebsiteResponse'
, getBucketWebsiteResponse_indexDocument
- The name of the index document for the website (for example
index.html
).
$sel:routingRules:GetBucketWebsiteResponse'
, getBucketWebsiteResponse_routingRules
- Rules that define when a redirect is applied and the redirect behavior.
$sel:httpStatus:GetBucketWebsiteResponse'
, getBucketWebsiteResponse_httpStatus
- The response's http status code.
Response Lenses
getBucketWebsiteResponse_redirectAllRequestsTo :: Lens' GetBucketWebsiteResponse (Maybe RedirectAllRequestsTo) Source #
Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.
getBucketWebsiteResponse_errorDocument :: Lens' GetBucketWebsiteResponse (Maybe ErrorDocument) Source #
The object key name of the website error document to use for 4XX class errors.
getBucketWebsiteResponse_indexDocument :: Lens' GetBucketWebsiteResponse (Maybe IndexDocument) Source #
The name of the index document for the website (for example
index.html
).
getBucketWebsiteResponse_routingRules :: Lens' GetBucketWebsiteResponse (Maybe [RoutingRule]) Source #
Rules that define when a redirect is applied and the redirect behavior.
getBucketWebsiteResponse_httpStatus :: Lens' GetBucketWebsiteResponse Int Source #
The response's http status code.