最近更新时间:2021-12-24
使用GetBucketWebsite接口实现返回与存储桶关联的网站配置。
此GET操作需要S3:GetBucketWebsite许可。默认情况下,只有存储桶拥有者才能读取存储桶website 配置。但是,存储桶拥有者可以website通过编写授予他们S3:GetBucketWebsite权限的存储桶策略来允许其他用户读取配置。
GET /?website HTTP/1.1 Host: examplebucket.region.unicloudsrv.com Date: date Authorization: authorization string |
GET ?website HTTP/1.1 Host: examplebucket.region.unicloudsrv.com Date: Thu, 27 Jan 2011 00:49:20 GMT Authorization: AWS AKIAIOSFODNN7EXAMPLE:n0Nhek72Ufg/u7Sm5C1dqRLs8XX= |
HTTP/1.1 200 OK x-amz-request-id: 3848CD259D811111 Date: Thu, 27 Jan 2011 00:49:26 GMT Content-Length: 240 Content-Type: application/xml Transfer-Encoding: chunked
< ?xml version="1.0" encoding="UTF-8"? > < WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/" > < IndexDocument > < Suffix >index.html< /Suffix > < /IndexDocument > < ErrorDocument > < Key >404.html< /Key > < /ErrorDocument > < /WebsiteConfiguration > |