cos:PostObjectRestore. For more authorization details, see CAM-supported business APIs.cos.restoreObject({Bucket: 'examplebucket-1250000000', /* Your bucket (required) */Region: 'COS_REGION', /* Bucket region (required), such as ap-beijing */Key: '1.jpg', /* Object key stored in the bucket (required), such as `1.jpg` and `a/b/test.txt`. */RestoreRequest: {Days: 1,CASJobParameters: {Tier: 'Expedited'}},}, function(err, data) {console.log(err || data);});
Parameter | Description | Type | Required |
Bucket | Bucket name in the format of BucketName-APPID, The bucket name entered here must adhere to this format | String | Yes |
Region | String | Yes | |
Key | Object key (object name), which is the unique identifier of an object in a bucket. For more information, see Object Overview. | String | Yes |
RestoreRequest | Container for data restoration | Object | Yes |
- Days | Expiration time of the temporary copy | Number | Yes |
- CASJobParameters | Container for archive job parameters | Object | Yes |
- - Tier | Describes the retrieval mode for the object. For restoring data of the ARCHIVE storage class, the valid values are Expedited, Standard, and Bulk, which correspond to expedited, standard, and batch retrieval modes, respectively. For restoring data of the DEEP_ARCHIVE storage class, the valid values are Standard and Bulk. | String | Yes |
function(err, data) { ... }
Parameter | Description | Type |
err | The object returned when an error (network error or service error) occurs. If the request is successful, this parameter is empty. For more information, see Error Codes. | Object |
- statusCode | Returned HTTP status code, such as 200, 403, and 404. | Number |
- headers | Returned headers | Object |
data | The object returned when the request is successful. If an error occurs with the request, this parameter is empty. | Object |
- statusCode | Returned HTTP status code, such as 200, 403, and 404. | Number |
- headers | Returned headers | Object |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários