0010-00000210

更新时间:
复制 MD 格式

Problem description

Your PutObjectTagging or PutBucketTags request fails because the XML request body contains duplicate tag keys.

Causes

Each <Tag> within a <TagSet> must have a unique <Key>. If two or more <Tag> elements share the same key, OSS rejects the request.

Examples

The following request fails because both <Tag> elements use A as the key:

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

Solutions

Make sure every <Key> in the request is unique. The following request uses key1 and key2 as distinct keys and succeeds:

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>
      <Key>key1</Key>
      <Value>Value1</Value>
    </Tag>
    <Tag>
      <Key>key2</Key>
      <Value>Value2</Value>
    </Tag>
  </TagSet>
</Tagging>

References