All Products
Search
Document Center

Hybrid Backup Recovery:DeleteSnapshot

Last Updated:Nov 14, 2022

Deletes a backup file.

Operation Description

If you delete the most recent backup file for a data source, you must set the Force parameter to true. Otherwise, an error occurs.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TokenstringNo

The token.

02WJDOE7
VaultIdstringNo

The ID of the backup vault.

v-*********************
ClientIdstringNo

The ID of the backup client. If you delete a backup file for Elastic Compute Service (ECS) instances, you must set one of the InstanceId and ClientId parameters.

c-*********************
SnapshotIdstringYes

The ID of the backup file.

s-*********************
SourceTypestringNo

The type of the backup source. Valid values:

  • ECS_FILE: indicates backup files for ECS instances.
  • OSS: indicates backup files for Object Storage Service (OSS) buckets.
  • NAS: indicates the backup files for Apsara File Storage NAS file systems.
ECS_FILE
InstanceIdstringNo

The ID of the ECS instance. If you delete a backup file for Elastic Compute Service (ECS) instances, you must set one of the ClientId and InstanceId parameters.

i-*********************
ForcebooleanNo

Specifies whether to forcibly delete the most recent backup file. Valid values:

  • true: The system forcibly deletes the last backup file.
  • false: The system does not forcibly delete the last backup file. Default value: false.
false

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code. The status code 200 indicates that the request is successful.

200
Messagestring

The message that is returned. If the request is successful, a value of successful is returned. If the request fails, an error message is returned.

successful
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
Successboolean

Indicates whether the request is successful. Valid values:

  • true: indicates that the request is successful.
  • false: indicates that the request fails.
true

Example

Request example

http(s)://[Endpoint]/?Action=DeleteSnapshot
&Token=02WJDOE7
&VaultId=v-*********************
&ClientId=c-*********************
&SnapshotId=s-*********************
&SourceType=ECS_FILE
&InstanceId=i-*********************
&Force=false
&Common request parameters

Normal return example

JSONFormat

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Success": true
}

Error codes

For a list of error codes, visit the API error center.