Updated on 2025-10-17 GMT+08:00

Associating Resources

Function

This API is used to associate resources with 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

POST /v3/{project_id}/vaults/{vault_id}/addresources

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. Default value: N/A

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

vault_id

Yes

String

Vault ID. Default value: N/A

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

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Default value: N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

resources

Yes

Array of ResourceCreate objects

Resource list

Minimum length: 1

Maximum length: 256

Table 4 ResourceCreate

Parameter

Mandatory

Type

Description

extra_info

No

ResourceExtraInfo object

Extra information of the resource

id

Yes

String

ID of the resource to be backed up. The resource must have been associated with the vault and can be backed up. Default value: N/A

For details about how to obtain the ID, see Querying Information About the Resources Associated with a Vault and Querying Protectable Resources.

type

Yes

String

Type of the resource to be backed up: OS::Nova::Server: ECS; OS::Cinder::Volume: EVS disks; OS::Ironic::BareMetalServer: Bare Metal Servers; OS::Sfs::Turbo: SFS Turbo file systems; OS::Workspace::DesktopV2: Workspaces Default value: N/A

name

No

String

Name of the resource. The value can contain a maximum of 255 characters. Default value: N/A

Table 5 ResourceExtraInfo

Parameter

Mandatory

Type

Description

exclude_volumes

No

Array of strings

ID of the volume that does not need to be backed up. This parameter is valid only for multi-disk backup. It specifies the disks that do not need to be backed up. When a disk is newly attached to a VM, the volume that does not need to be backed up can also be excluded. Default value: N/A

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

add_resource_ids

Array of strings

List of added resource IDs. Multiple resource IDs are separated by commas (,). The resource IDs are in UUID format.

Example Requests

POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/vaults/79bd9daa-884f-4f84-b8fe-235d58cd927d/addresources

{
  "resources" : [ {
    "extra_info" : {
      "exclude_volumes" : [ "bdef09bb-293f-446a-88a4-86e9f14408c4" ]
    },
    "id" : "97595625-198e-4e4d-879b-9d53f68ba551",
    "type" : "OS::Nova::Server"
  } ]
}

Example Responses

Status code: 200

OK

{
  "add_resource_ids" : [ "97595625-198e-4e4d-879b-9d53f68ba551" ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.