在DELETE操作的url中加上Policy,可以删除指定Bucket的Policy。只有根用户和拥有DELETE Bucket Policy权限的子用户才能执行此操作,否则会返回403 AccessDenied错误。如果Bucket配置了Policy,删除成功,返回200 OK。如果Bucket没有配置Policy,返回204 No Content。
请求语法
DELETE /?policy HTTP/1.1
Host: BucketName.oos-cn.ctyunapi.cn
Date: date
Authorization: SignatureValue
请求参数
名称 | 描述 | 是否必须 |
---|---|---|
BucketName | 存储桶名称。 | 是 |
请求示例
DELETE /?policy HTTP/1.1
Host: example-bucket.oos-cn.ctyunapi.cn
Content-MD5: 1B2M2Y8AsgTpgAmY7PhCfg==
Content-Type: application/octet-stream
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Date: Sun, 28 Apr 2024 06:37:14 GMT
Authorization: SignatureValue
Connection: keep-alive
响应示例
HTTP/1.1 204 No Content
x-amz-request-id: b10f8d28916049988bfef100f502040ac9cbd5bfc1c3c5c7c9
Date: Sun, 28 Apr 2024 06:37:14 GMT
Server: CTYUN