最近更新时间:2026-06-16 20:17:26
该接口用于获取客户配置的针对UID内的全部桶阻止公网访问相关规则,使用该接口需要是主账号或拥有ks3:GetPublicNetworkBlock权限。
GET /?PublicNetworkBlock HTTP/1.1
Host: {endpoint}
Date: {date}
Authorization: {SignatureValue}
Content-length: {length}
Content-MD5: {md5}参数名称 | 说明 | 是否必选 |
|---|---|---|
PublicNetworkBlock | 阻止公网访问特定参数。 | 是 |
该接口仅使用常用请求头部。
该接口不返回请求体。
该接口仅返回常用响应头。
响应体为XML格式:
<PublicNetworkBlockConfiguration>
<BlockType>All</BlockType>
</PublicNetworkBlockConfiguration>返回XML中的参数如下所示:
名称 | 描述 |
|---|---|
PublicNetworkBlockConfiguration | 存放阻止公网访问配置信息的容器。
|
BlockType | 是否开启阻止公共访问。
该参数设置为ALL表示阻止所有的公网来源访问,注意KS3控制台默认使用公网访问,开启阻止公网访问后通过控制台将访问失败,包括关闭阻止公网访问操作。 |
GET /?PublicNetworkBlock HTTP/1.1
Host: {endpoint}
Date: {date}
Authorization: {SignatureValue}
Content-length: {length}
Content-MD5: {md5}HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 312
Connection: keep-alive
Date: Wed, 16 Aug 2017 12:23:54 GMT
Server: KS3
x-kss-request-id: NTk5NDM5NWFfMjQ4OGY3Xzc3NGRf****
<PublicNetworkBlockConfiguration>
<BlockType>All</BlockType>
</PublicNetworkBlockConfiguration>HTTP状态码 | 错误码 | 描述 |
|---|---|---|
404 Not Found | NotFoundApi | 没有配置阻止公网访问规则。 |
纯净模式
