Problem description
The tag key cannot be blank when configuring object tags or bucket tags.
Causes
PutObjectTagging and PutBucketTags require a non-empty Tag/Key node in the XML request body. If the Tag/Key node is an empty string, the request fails.
Examples
The following request fails because <Key> is blank:
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></Key>
<Value>Value</Value>
</Tag>
</TagSet>
</Tagging>Solutions
Set a non-empty value for the Tag/Key node. Both Tag/Key and Tag/Value must be present in the request body.
PUT /objectname?tagging&versionId=CAEQExiBgID.jImWlxciIDQ2ZjgwODIyNDk5MTRhNzBiYmQwYTZkMTYzZjM0****
Content-Length: 90
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 24 Jun 2020 08:58:15 GMT
Authorization: OSS ************:********************
<Tagging>
<TagSet>
<Tag>
<Key>age</Key>
<Value>18</Value>
</Tag>
</TagSet>
</Tagging>References
该文章对您有帮助吗?