cos:PostObjectRestore. For more information on authorization, see the CAM-supported business APIs.cos.restoreObject({Bucket: 'examplebucket-1250000000', // Enter your own bucket. This is a required field.Region: 'COS_REGION', // The region where the bucket resides, for example, ap-beijing. This is a required field.Key: '1.jpg', // The object key stored in the bucket, for example, 1.jpg or a/b/test.txt. This is a required field.RestoreRequest: {Days: 1,CASJobParameters: {Tier: 'Expedited'}},}, function(err, data) {console.log(err || data);});
Parameter Name | Parameter Description | Type | Required |
Bucket | The name of the bucket. The naming format is BucketName-APPID. The bucket name entered here must follow this format. | String | Yes |
Region | String | Yes | |
Key | The object key (name of the Object). It is the unique identifier of an object within a bucket. For details, see Object Overview. | String | Yes |
RestoreRequest | Container for data restoration. | Object | Yes |
- Days | Expiration time of the temporary replica. | Number | Yes |
- CASJobParameters | Restores job parameters. | Object | Yes |
- - Tier | When data is being restored, Tier can be specified as one of the three restoration modes provided by COS: Standard (standard retrieval mode, restoration tasks complete within 3 - 5 hours), Expedited (expedited retrieval mode, restoration tasks complete within 1 - 5 minutes), and Bulk (batch retrieval mode, restoration tasks complete within 5 - 12 hours). | String | Yes |
function(err, data) { ... }
Parameter Name | Parameter Description | Type |
err | The object returned when an error occurs in the request, including network errors and business errors. It is null if the request is successful. For more details, see Error Codes. | Object |
- statusCode | HTTP status code returned by the request, for example, 200, 403, 404. | Number |
- headers | Header returned by the request | Object |
data | The object returned when the request is successful, or null if an error occurs in the request | Object |
- statusCode | HTTP status code returned by the request, for example, 200, 403, 404. | Number |
- headers | Header returned by the request | Object |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan