0016-00000714
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 class | request.Tier | request.Days |
|---|---|---|
| Archive | null | Required — number of days the restored object remains available |
| Cold Archive | Expedited, Standard, or Bulk | Required |
| Deep Cold Archive | Expedited, Standard, or Bulk | Required |