Help Center/ Cloud Backup and Recovery/ API Reference/ CBR APIs/ Vaults/ Setting Auto Backup for a Vault
Updated on 2025-08-25 GMT+08:00

Setting Auto Backup for a Vault

Function

This API is used to enable or disable auto backup for a vault.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

PUT /v3/{project_id}/vaults/{vault_id}/set-resources

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

vault_id

Yes

String

Vault ID.

For details about how to obtain the vault ID, see Obtaining a Vault ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

resource_ids

Yes

Array of strings

IDs of resources to be configured for automatic backup. Use commas (,) to separate multiple resource IDs. The resource IDs are in UUID format.

action

Yes

String

Action for setting vault resources

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

set_resource_ids

Array of strings

IDs of the resources configured in this operation. Multiple resource IDs are separated by commas (,) . The resource IDs are in UUID format.

Example Requests

Configuring auto backup for a vault

PUT https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/vaults/2b076f26-391f-40fa-bf71-a798940faccf/set_resource

{
  "resource_ids" : [ "2b076f26-391f-40fa-bf71-a798940facbb", "dfx76f26-391f-40fa-bf71-a798940facaa" ],
  "action" : "suspend"
}

Example Responses

Status code: 200

OK

{
  "set_resource_ids" : [ "2b076f26-391f-40fa-bf71-a798940facbb", "dfx76f26-391f-40fa-bf71-a798940facaa" ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.