0016-00000714

Updated at:

Problem description

When you call RestoreObject using the .NET SDK, the request fails with the following error:

The XML you provided was not well-formed or did not validate against our published schema.

Causes

The XML request body contains an Unknown node. RestoreObject does not support this node and rejects the request.

Examples

The following example shows a request that triggers the error. The XML body includes an Unknown node that RestoreObject does not accept:

POST /coldarchiveobject?restore HTTP/1.1
Host: cold-archive-bucket.oss-cn-hangzhou.aliyuncs.com
Authorization: AWS qn6q**************:77Dv****************
Date: Tue, 21 Apr 2020 11:09:19 GMT
<RestoreRequest>
  <Days>2</Days>
  <Unknown></Unknown>
</RestoreRequest>

Solutions

Remove the Unknown node from the XML request body. The parameters you need to set depend on your SDK version and the storage class of the object.

C# SDK V2 (Preview) — recommended

Upgrade to C# SDK V2 (Preview). This version automatically applies the correct restoration rules for each storage class. For a working example, see the RestoreObject sample on GitHub.

C# SDK V1

Set both request.Days and request.Tier. The required values depend on the storage class:

Storage classrequest.Tierrequest.Days
ArchivenullRequired — number of days the restored object remains available
Cold ArchiveExpedited, Standard, or BulkRequired
Deep Cold ArchiveExpedited, Standard, or BulkRequired

References

RestoreObject