Problem description
The prefix of the tag key is invalid.
Cause
You sent a PutBucketTags request with an invalid prefix for the Tag/Key node in the XML request body.
A tag key must meet the following requirements:
The maximum length is 64 bytes.
It cannot start with
http://,https://, orAliyun.It must be UTF-8 encoded.
It cannot be empty.
Sample problem
The following request is 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>Aliyun-abc</Key>
<Value>test</Value>
</Tag>
</TagSet>
</Tagging>In the preceding request, the value of the Tag/Key node in the XML request body starts with Aliyun. This value does not meet the requirements and results in an error.
Solution
Make sure that the Tag node in your request XML is valid and meets the requirements. The following code provides an example of a valid 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>testa</Key>
<Value>testv1</Value>
</Tag>
<Tag>
<Key>testb</Key>
<Value>testv2</Value>
</Tag>
</TagSet>
</Tagging>References
该文章对您有帮助吗?