This API is used to query whether a resource can be backed up.
POST https://{endpoint}/v1/{project_id}/providers/{provider_id}/resources/action
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
provider_id |
Yes |
String |
Backup provider ID, which specifies whether the backup object is a server or disk. This parameter has a fixed value. For CSBS, the value is fc4d5750-22e7-4798-8a46-f48f62c4c1da. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
check_protectable |
Yes |
List<protectable_param> |
Query parameter list For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_id |
Yes |
String |
ID of the resource (server or disk) to be checked For details about how to obtain the server ID, see the Elastic Cloud Server API Reference. For details about how to obtain the disk ID, see the Elastic Volume Service API Reference. |
resource_type |
Yes |
String |
Type of the resource to be checked, for example, OS::Nova::Server for an ECS |
POST https://{endpoint}/v1/{project_id}/providers/{provider_id}/resources/action { "check_protectable" : [ { "resource_id" : "6507cb66-90dc-4a12-a573-c9f3398f899d", "resource_type" : "OS::Nova::Server" } ] }
Parameter |
Type |
Description |
---|---|---|
protectable |
List<check_resp> |
Check result list For details, see Table 5. |
Parameter |
Type |
Description |
---|---|---|
result |
Boolean |
Whether the resource can be backed up true: yes false: no |
resource_type |
String |
Resource type Possible values are OS::Nova::Server (ECS) and OS::Ironic::BareMetalServer (BMS). |
error_code |
String |
Error code. If an error occurs, a value is returned. |
error_msg |
String |
Error message, which will be returned if the VM is associated with a backup policy. If an error occurs, a value is returned. |
resource_id |
String |
Resource ID |
{ "protectable" : [ { "resource_id" : "6507cb66-90dc-4a12-a573-c9f3398f899d", "resource_type" : "OS::Nova::Server", "result" : true } ] }
Status Code |
Description |
---|---|
200 |
OK |
Status Code |
Description |
---|---|
400 |
Invalid request parameters. |
401 |
Authentication failed. |
403 |
No operation permission. |
404 |
Requested object not found. |
500 |
Service internal error. |
503 |
Service unavailable. |
For details, see Error Codes.