0010-00000102

更新时间:
复制 MD 格式

Problem description

The PutObjectTagging request fails because the <Tagging> root element is missing from the XML request body.

Causes

The XML request body uses <XMLTag> as the root element instead of the required <Tagging> element. OSS rejects the request because <Tagging> is a required root element.

Examples

The following request fails because the root element is <XMLTag> instead of <Tagging>:

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

Solutions

Replace <XMLTag> with <Tagging> as the root element in the XML request body. The PutObjectTagging API requires <Tagging> as the root element.

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 ************:********************
<Tagging>
  <TagSet>
    <Tag>
      <Key>age</Key>
      <Value>18</Value>
    </Tag>
  </TagSet>
</Tagging>

References