Issue description
The prefix of the tag key is invalid.
Causes
You called the PutBucketTags operation to configure tags for a bucket. However, the prefix of the Tag/Key node in the request body in the XML format is invalid.
The tag key must meet the following requirements:
A tag key can be up to 64 bytes in length.
A tag key cannot start with
http://,https://, orAliyun.A tag key must be UTF-8 encoded.
A tag key cannot be left empty.
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>Aliyun-abc</Key>
<Value>test</Value>
</Tag>
</TagSet>
</Tagging>In the preceding command, the value of the Tag/Key node in the request body in the XML format starts with Aliyun, which does not meet the requirements of the PutBucketTags operation. In this case, an error is reported.
Solutions
Make sure that the request body in the XML format conforms to the specifications and contains the 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>