0010-00000107

更新时间:
复制 MD 格式

Problem description

A PutObjectTagging request fails because the XML request body is missing the Tag/Key child node, the Tag/Value child node, or both.

Causes

The XML request body does not include the required <Key> and <Value> child nodes inside the <Tag> element.

Examples

The following request uses <NoKey> and <NoValue> instead of the required <Key> and <Value> nodes, which causes the error:

PUT /objectname?tagging
Content-Length: 114
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: Mon, 18 Mar 2019 08:25:17 GMT
Authorization: SignatureValue
<Tagging>
  <TagSet>
    <Tag>
      <NoKey>Key</NoKey>
      <NoValue>Value</NoValue>
    </Tag>
  </TagSet>
</Tagging>

Solutions

Make sure the XML request body contains both <Key> and <Value> child nodes inside each <Tag> element. The correct structure is:

<Tagging>
  <TagSet>
    <Tag>
      <Key>age</Key>
      <Value>18</Value>
    </Tag>
  </TagSet>
</Tagging>

The following is a correct request example:

PUT /objectname?tagging&versionId=CAEQExiBgID.jImWlxciIDQ2ZjgwODIyNDk5MTRhNzBiYmQwYTZkMTYzZjM0****
Content-Length: 90
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 24 Jun 2020 08:58:15 GMT
Authorization: OSS qn6q**************:77Dv****************
<Tagging>
  <TagSet>
    <Tag>
      <Key>age</Key>
      <Value>18</Value>
    </Tag>
  </TagSet>
</Tagging>

References