All Products
Search
Document Center

Object Storage Service:DeleteBucketWebsite

Last Updated:Sep 10, 2026

Menonaktifkan mode hosting situs web statis dan menghapus aturan pengalihan untuk sebuah bucket. Hanya pemilik bucket yang dapat menonaktifkan mode hosting situs web statis untuk bucket tersebut.

Note

Diperlukan izin oss:DeleteBucketWebsite untuk menonaktifkan mode hosting situs web statis dan menghapus aturan pengalihan untuk sebuah bucket dengan memanggil DeleteBucketWebsite. Untuk informasi selengkapnya, lihat Grant a custom policy.

Syntax

DELETE /?website HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request headers

Semua header dalam permintaan DeleteBucketWebsite merupakan header permintaan umum. Untuk informasi selengkapnya, lihat Common request headers.

Response headers

Semua header dalam tanggapan terhadap permintaan DeleteBucketWebsite merupakan header respons umum. Untuk informasi selengkapnya, lihat Common response headers.

Example

Contoh permintaan

DELETE /?website HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com 
Date: Fri, 24 Feb 2012 05:45:34 GMT  
Authorization: OSS qn6q**************:77Dv****************            

Contoh tanggapan

HTTP/1.1 204 No Content 
x-oss-request-id: 534B371674E88A4D8906008B
Date: Fri, 24 Feb 2012 05:45:34 GMT
Connection: keep-alive
Content-Length: 0  
Server: AliyunOSS

Kode lengkap

DELETE /?website HTTP/1.1
Date: Fri, 27 Jul 2018 09:10:52 GMT
Host: test.oss-cn-hangzhou-internal.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
User-Agent: aliyun-sdk-python-test/0.4.0

HTTP/1.1 204 No Content
Server: AliyunOSS
Date: Fri, 27 Jul 2018 09:10:52 GMT
Content-Length: 0
Connection: keep-alive
x-oss-request-id: 5B5AE19C188DC1CE81DAD7C8

OSS SDKs

Anda dapat menggunakan OSS SDK untuk bahasa pemrograman berikut untuk memanggil DeleteBucketWebsite:

ossutil

Untuk informasi mengenai perintah ossutil yang sesuai dengan operasi DeleteBucketWebsite, lihat delete-bucket-website.

Error codes

Error code

HTTP status code

Description

NoSuchBucket

404 Not Found

Bucket yang ingin Anda nonaktifkan mode hosting situs web statisnya tidak ada.

AccessDenied

403 Forbidden

Anda tidak memiliki izin untuk menonaktifkan mode hosting situs web statis untuk bucket tersebut. Hanya pemilik bucket yang dapat menonaktifkan mode hosting situs web statis untuk bucket.