0010-00000002

更新时间:
复制 MD 格式

Problem description

Bucket tag keys cannot start with the acs prefix.

Cause

You sent a PutBucketTags request to set bucket tags. The request failed because the XML request body contains a Key node with a value that starts with `acs`. User-defined tag keys cannot start with the `acs` prefix.

Sample Problems

For example, you sent the following request:

PUT /?tagging
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 20 Dec 2018 11:49:13 GMT
Authorization: OSS qn6q**************:77Dv****************
</Tagging>
  <TagSet>
  	<Tag>
    	<Key>acs:abc</Key>
      <Value>test</Value>
    <Tag>
  </TagSet>
</Tagging>

In the preceding request, the value of the Key child node in the Tag node starts with `acs`. This format does not meet API requirements and causes an error.

Solution

Ensure that the XML request body is valid and that the Tag node meets API requirements. The following code provides an example:

PUT /?tagging
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Tue, 20 Dec 2018 11:49:13 GMT
Authorization: OSS qn6q**************:77Dv****************
<Tagging>
  <TagSet>
    <Tag>
      <Key>testa</Key>
      <Value>testv1</Value>
    </Tag>
    <Tag>
      <Key>testb</Key>
      <Value>testv2</Value>
    </Tag>
  </TagSet>
</Tagging>

Note:

  • A bucket can have a maximum of 20 tags. Each tag is a key-value pair.

  • Tag keys and values must be UTF-8 encoded.

  • A tag key is case-sensitive and must be 1 to 64 characters in length. It cannot start with the prefixes http://, https://, Aliyun, or acs. The prefix check is case-insensitive.

  • A tag value must be 0 to 128 characters in length.

References