Issue description
Bucket tags cannot start with acs.
Causes
You called the PutBucketTags operation to configure tags for a bucket and the value of the Key
child node whose name starts with acs is contained in the request body in the XML format. However, you cannot call the PutBucketTags operation to configure tags whose names contain the acs prefix.
Invalid examples
For example, you initiate a request by running the following command:
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 command, the value of the Key child node of the Tag node in the request body in the XML format starts with acs, which does not meet the requirements of the PutBucketTags operation. In this case, an error is reported.
Solutions
Make sure that the XML request body conforms to the specifications and contains a Tag
node that meets the requirements of the PutBucketTags operation. You can refer to the following 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>
Take note of the following items:
You can configure up to 20 tags for a bucket.
The key and value of a tag must be encoded in UTF-8.
The key can be up to 64 characters in length and is case-sensitive. The key cannot be left empty. Key cannot be prefixed with
http://
,https://
,Aliyun
, oracs
(case-insensitive).The value of a tag can be up to 128 characters in length and can be left empty.