设置Bucket访问权限
Last updated
2023-07-14 09:56:31
{"value":"## **\u63cf\u8ff0**\n\n\u672c\u63a5\u53e3\u7528\u4e8e\u8bbe\u7f6e Bucket \u8bbf\u95ee\u6743\u9650\u3002\u76ee\u524d Bucket \u6709\u4e24\u79cd\u8bbf\u95ee\u6743\u9650\uff1a\u516c\u5f00\u548c\u79c1\u6709\u3002\u521b\u5efa Bucket \u65f6\u9ed8\u8ba4\u4e3a\u516c\u5f00\u7a7a\u95f4\u3002\n\n\n\n\n\n## **\u8bf7\u6c42**\n\n\n\n**\u8bf7\u6c42\u8bed\u6cd5**\n\n```\nPOST \/private?bucket=<BucketName>&private=<Private> HTTP\/1.1\nHost: uc.qiniuapi.com\nContent-Type: application\/x-www-form-urlencoded\nX-Qiniu-Date: 20060102T150405Z\nAuthorization: Qiniu <AccessToken>\n```\n\n\n\n\n\n**\u8bf7\u6c42\u53c2\u6570**\n\n| \u53c2\u6570\u540d\u79f0 | \u5fc5\u586b | \u8bf4\u660e |\n| -------- | ---- | ---------------- |\n| bucket | \u662f | \u7a7a\u95f4\u540d\u79f0 |\n| private | \u662f | `0` \u516c\u5f00`1` \u79c1\u6709 |\n\n\n\n\n\n**\u8bf7\u6c42\u5934**\n\n\u8be5\u8bf7\u6c42\u64cd\u4f5c\u7684\u5b9e\u73b0\u4f7f\u7528\u4e86\u6240\u6709\u64cd\u4f5c\u7684\u516c\u5171\u8bf7\u6c42\u5934\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u67e5\u9605\u516c\u5171\u8bf7\u6c42\u5934\u3002\n\n\n\n**\u8bf7\u6c42\u5185\u5bb9**\n\n\u8be5\u8bf7\u6c42\u64cd\u4f5c\u7684\u8bf7\u6c42\u4f53\u4e3a\u7a7a\u3002\n\n\n\n\n\n## **\u54cd\u5e94**\n\n\n\n**\u54cd\u5e94\u5934**\n\n\u8be5\u8bf7\u6c42\u64cd\u4f5c\u7684\u5b9e\u73b0\u4f7f\u7528\u4e86\u6240\u6709\u64cd\u4f5c\u7684\u516c\u5171\u54cd\u5e94\u5934\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u67e5\u9605\u516c\u5171\u54cd\u5e94\u5934\u3002\n\n\n\n\n\n**\u54cd\u5e94\u5185\u5bb9**\n\n\u8be5\u8bf7\u6c42\u64cd\u4f5c\u7684\u54cd\u5e94\u4f53\u4e3a\u7a7a\u3002\n\n\n\n\n\n**\u54cd\u5e94\u72b6\u6001\u7801**\n\n\u8be5\u64cd\u4f5c\u7684\u5b9e\u73b0\u4e0d\u4f1a\u8fd4\u56de\u7279\u6b8a\u9519\u8bef\u3002\u6709\u5173\u9519\u8bef\u548c\u9519\u8bef\u4ee3\u7801\u5217\u8868\u7684\u4e00\u822c\u4fe1\u606f\uff0c\u8bf7\u67e5\u9605\u9519\u8bef\u54cd\u5e94\u3002\n\n\n\n\n\n## **\u793a\u4f8b**\n\n\n\n**\u8bf7\u6c42\u793a\u4f8b**\n\n```\nPOST \/private?bucket=test06&private=1 HTTP\/1.1\nHost: uc.qiniuapi.com\nUser-Agent: Go-http-client\/1.1\nContent-Length: 23\nX-Qiniu-Date: 20060102T150405Z\nAuthorization: Qiniu j853F3bLkWl59I5BOkWm6q1Z1mZClpr9Z9CLfDE0:YHLW5tnhbumBI56iQ0AzJdZONSY=\nContent-Type: application\/x-www-form-urlencoded\nAccept-Encoding: gzip\n```\n\n\n\n\n\n**\u54cd\u5e94\u793a\u4f8b**\n\n```\nHTTP\/1.1 200 OK\nContent-Length: 2\nConnection: keep-alive\nContent-Type: application\/json\nDate: Mon, 02 Jan 2006 15:04:05 GMT\nServer: nginx\nX-Reqid: VBoAAJjbI4_ZmdsU\n\n{}\n```\n"}