PUT /?tagging HTTP 1.1Host:<BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth StringContent-MD5: MD5Content-Length: Content LengthContent-Type: application/xml[Request Body]
<?xml version="1.0" encoding="UTF-8" ?><Tagging><TagSet><Tag><Key>age</Key><Value>18</Value></Tag><Tag><Key>name</Key><Value>xiaoming</Value></Tag></TagSet></Tagging>
节点名称(关键字) | 父节点 | 描述 | 类型 | 是否必选 |
Tagging | 无 | 标签集合 | Container | 是 |
TagSet | Tagging | 标签集合 | Container | 是 |
Tag | Tagging.TagSet | 标签集合,最多支持50个标签 | Containers | 是 |
Key | Tagging.TagSet.Tag | 标签的 Key,长度小于128字节, 支持英文字母、数字、空格、加号、减号、下划线、等号、点号、冒号、斜线 | String | 是 |
Value | Tagging.TagSet.Tag | 标签的 Value,长度小于256字节, 支持英文字母、数字、空格、加号、减号、下划线、等号、点号、冒号、斜线 | String | 是 |
examplebucket-1250000000
中写入了{age:18}和{name:xiaoming}两个标签。COS 配置标签成功并返回204成功请求。PUT /?tagging HTTP/1.1User-Agent: curl/7.29.0Accept: */*Host: examplebucket-1250000000.cos.ap-chengdu.myqcloud.comAuthorization: q-sign-algorithm=sha1&q-ak=AKIDrbAYjEBqqdEconpFi8NPFsOjrnX4****&q-sign-time=1516361923;1517361973&q-key-time=1516361923;1517361973&q-url-param-list=tagging&q-header-list=content-md5;host&q-signature=71251feb4501494edcfbd01747fa87300375****Content-MD5: LIbd5t5HLPhuNWYkP6qHcQ==Content-Length: 127Content-Type: application/xml<Tagging><TagSet><Tag><Key>age</Key><Value>18</Value></Tag><Tag><Key>name</Key><Value>xiaoming</Value></Tag></TagSet></Tagging>
HTTP/1.1 204 No ContentContent-Type: application/xmlContent-Length: 0Connection: keep-aliveDate: Fri, 19 Jan 2018 11:40:22 GMTServer: tencent-cosx-cos-request-id: NWE2MWQ5MjZfMTBhYzM1MGFfMTA5ODVfMTVj****
本页内容是否解决了您的问题?