设置空间标签
Last updated
2023-07-14 09:35:25
{"value":"## **\u63cf\u8ff0**\n\n\u672c\u63a5\u53e3\u7528\u4e8e\u8bbe\u7f6e\u7a7a\u95f4\u6807\u7b7e\uff0c\u5305\u62ec\u65b0\u589e\u548c\u4fee\u6539\u3002\n\n\n\n\n\n## **\u8bf7\u6c42**\n\n\n\n**\u8bf7\u6c42\u8bed\u6cd5**\n\n```\nPUT \/bucketTagging?bucket=<BucketName> HTTP\/1.1\nHost: uc.qiniuapi.com\nContent-Type: application\/json\nX-Qiniu-Date: 20060102T150405Z\nAuthorization: Qiniu <AccessToken>\n\n{\n \"Tags\":[ \n {\"Key\":xx, \"Value\": xx},\n {\"Key\":xx, \"Value\": xx},\n ...\n ]\n}\n```\n\n\u4f7f\u7528\u8bf4\u660e\uff1a\n\n- \u6807\u7b7e\uff08tag\uff09\u662f Key-Value\u7684\u7ed3\u6784\uff0c\u540c\u4e00\u4e2aBucket\u4e0b\uff0cKey\u5fc5\u987b\u662f\u552f\u4e00\u7684, \u4e14\u4e00\u4e2aKey\u53ea\u80fd\u67091\u4e2aValue\uff0cKey\u8bbe\u7f6e\u91cd\u590d\u65f6\u670d\u52a1\u7aef\u4f1a\u8fd4\u56de400: tag contain duplicate key\u3002\n- \u6bcf\u4e2aBucket\u6700\u591a\u53ef\u4ee5\u8bbe\u7f6e10\u5bf9\u6807\u7b7e\uff0c\u8d85\u51fa\u9650\u5236\u65f6\u670d\u52a1\u7aef\u4f1a\u8fd4\u56de400: tag num exceed limit\u3002\n- API\u662f\u8986\u76d6\u8bed\u4e49\uff0c\u8c03\u7528\u65f6\u4f1a\u66ff\u6362\u6574\u4e2aBucket\u7684\u6807\u7b7e\uff0c\u6bd4\u5982\uff1a\u539f\u6765Bucket\u670910\u5bf9\u6807\u7b7e, \u60f3\u66f4\u65b0\u5176\u4e2d1\u5bf9\uff0crequest.body\u5e94\u8be5\u5305\u542b9\u5bf9old tag + 1\u5bf9 new tag\u3002\n\n\n\n\n\n**\u8bf7\u6c42\u53c2\u6570**\n\n| \u53c2\u6570\u540d\u79f0 | \u5fc5\u586b | \u8bf4\u660e |\n| ---------- | ---- | ------------------------------------------------------------ |\n| BucketName | \u662f | \u7a7a\u95f4\u540d\u79f0 |\n| Key | \u662f | \u6807\u7b7e\u540d\u79f0\uff0c\u6700\u592764Byte\uff0c\u4e0d\u80fd\u4e3a\u7a7a\u4e14\u5927\u5c0f\u5199\u654f\u611f\uff0c\u4e0d\u80fd\u4ee5kodo\u4e3a\u524d\u7f00(\u9884\u7559), \u4e0d\u652f\u6301\u4e2d\u6587\u5b57\u7b26\uff0c\u53ef\u4f7f\u7528\u7684\u5b57\u7b26\u6709\uff1a\u5b57\u6bcd\uff0c\u6570\u5b57\uff0c\u7a7a\u683c\uff0c+ - = . _ : \/ @ |\n| Value | \u662f | \u6807\u7b7e\u503c\uff0c\u6700\u5927128Byte\uff0c\u4e0d\u80fd\u4e3a\u7a7a\u4e14\u5927\u5c0f\u5199\u654f\u611f\uff0c\u4e0d\u652f\u6301\u4e2d\u6587\u5b57\u7b26\uff0c\u53ef\u4f7f\u7528\u7684\u5b57\u7b26\u6709\uff1a\u5b57\u6bcd\uff0c\u6570\u5b57\uff0c\u7a7a\u683c\uff0c+ - = . _ : \/ @ |\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\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```\nPUT \/bucketTagging?bucket=temp-bucket-jnacytgvzwpgiotaprp1z0 HTTP\/1.1\nHost: uc.qiniuapi.com\nUser-Agent: Go-http-client\/1.1\nContent-Length: 0\nX-Qiniu-Date: 20060102T150405Z\nAuthorization: Qiniu HwFOxpYCQU6oXoZXFOTh1mq5ZZig6Yyocgk3BTZZ:yfdfCaZNBlgi2HACEXRSgycc8IY=\nContent-Type: application\/json \n\n{\n \"Tags\": [\n {\n \"Key\": \"KODO-BUKCET-TAGS-key-qyxvhJ0b3l\",\n \"Value\": \"KODO-BUKCET-TAGS-value-tUwjRvCVzz\"\n }\n ]\n}\n```\n\n\n\n\n\n**\u54cd\u5e94\u793a\u4f8b**\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\nX-Reqid: rWkAAFTxT13GrdYV\n\n{}\n```"}