Help Center/ Cloud Backup and Recovery/ API Reference/ CBR APIs/ Vaults/ Setting Auto Backup for a Vault
Updated on 2024-05-11 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

vault_id

Yes

String

Vault ID

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

resource_ids

Yes

Array of strings

IDs of the resources to be set

action

Yes

String

Action for setting vault resources

Enumeration values:

  • suspend

  • unsuspend

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

set_resource_ids

Array of strings

IDs of the resources set in this operation

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.