PutBucketWebsite¶
Sets the configuration of the website that is specified in the website subresource.
To configure a bucket as a website, add this subresource on the bucket along with website configuration information, such as the file name of the index document and any redirect rules.
You must have Full
ACL to be able to call this action.
The following operations are related to PutBucketWebsite
:
Request Syntax¶
1PUT /?website HTTP/1.1
2Host: <BUCKET>.s3.tebi.io
3
4<?xml version="1.0" encoding="UTF-8"?>
5<WebsiteConfiguration>
6 <RedirectAllRequestsTo>
7 <HostName>string</HostName>
8 <Protocol>string</Protocol>
9 </RedirectAllRequestsTo>
10 <IndexDocument>
11 <Suffix>string</Suffix>
12 </IndexDocument>
13 <ErrorDocument>
14 <Key>string</Key>
15 </ErrorDocument>
16</WebsiteConfiguration>
The request uses the following URI parameters:
<BUCKET>: Bucket name for which to set the website configuration. Required.
The request accepts the following data in XML format:
WebsiteConfiguration: Root level tag for the WebsiteConfiguration parameters.
ErrorDocument: Object key name of the website error document to use for 4XX class errors.
IndexDocument: Name of the index document for the website (for example index.html).
RedirectAllRequestsTo: Specifies the redirect behavior of all requests.
Response Syntax¶
1HTTP/1.1 200
2Content-Length: 0
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
See Also¶
Refer here for more information.