| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.S3.GetBucketWebsite
Description
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_errorDocument :: Lens' GetBucketWebsiteResponse (Maybe ErrorDocument)
- getBucketWebsiteResponse_indexDocument :: Lens' GetBucketWebsiteResponse (Maybe IndexDocument)
- getBucketWebsiteResponse_redirectAllRequestsTo :: Lens' GetBucketWebsiteResponse (Maybe RedirectAllRequestsTo)
- getBucketWebsiteResponse_routingRules :: Lens' GetBucketWebsiteResponse (Maybe [RoutingRule])
- getBucketWebsiteResponse_httpStatus :: Lens' GetBucketWebsiteResponse Int
Creating a Request
data GetBucketWebsite Source #
See: newGetBucketWebsite smart constructor.
Constructors
| GetBucketWebsite' | |
Fields
| |
Instances
Arguments
| :: BucketName | |
| -> GetBucketWebsite |
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 fails with the HTTP status code
403 Forbidden (access denied).
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 fails with the HTTP status code
403 Forbidden (access denied).
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.
Constructors
| GetBucketWebsiteResponse' | |
Fields
| |
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:
GetBucketWebsiteResponse, getBucketWebsiteResponse_errorDocument - The object key name of the website error document to use for 4XX class
errors.
GetBucketWebsiteResponse, getBucketWebsiteResponse_indexDocument - The name of the index document for the website (for example
index.html).
GetBucketWebsiteResponse, getBucketWebsiteResponse_redirectAllRequestsTo - Specifies the redirect behavior of all requests to a website endpoint of
an Amazon S3 bucket.
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_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_redirectAllRequestsTo :: Lens' GetBucketWebsiteResponse (Maybe RedirectAllRequestsTo) Source #
Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.
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.