Querying a Specified Protectable Resource
Function
This API is used to query a specified resource that can be protected by its ID.
URI
GET /v3/{project_id}/protectables/{protectable_type}/instances/{instance_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instance_id |
Yes |
String |
Resource ID |
|
project_id |
Yes |
String |
Project ID |
|
protectable_type |
Yes |
String |
Protection type Enumeration values:
|
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
instance |
ProtectablesResp object |
|
Parameter |
Type |
Description |
|---|---|---|
|
children |
Array<Object> |
Child resource |
|
detail |
Object |
Resource details |
|
id |
String |
id |
|
name |
String |
Resource name |
|
protectable |
ProtectableResult object |
Whether backup is supported |
|
size |
String |
Size of the resource, in GB |
|
status |
String |
Resource status Enumeration values:
|
|
type |
String |
Type of the resource to be backed up. Possible values are as follows: OS::Nova::Server, OS::Cinder::Volume, OS::Ironic::BareMetalServer, OS::Native::Server, and OS::Sfs::Turbo |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Error code returned indicating backup is not supported |
|
reason |
String |
Reason why backup is not supported |
|
result |
String |
Whether backup is supported |
|
vault |
VaultGet object |
Associated vault |
|
Parameter |
Type |
Description |
|---|---|---|
|
billing |
Billing object |
Operation info |
|
description |
String |
User-defined vault description Minimum: 0 Maximum: 255 |
|
id |
String |
Vault ID |
|
name |
String |
Vault name Minimum: 1 Maximum: 64 |
|
project_id |
String |
Project ID |
|
provider_id |
String |
Vault type |
|
resources |
Array of VaultResourceIntancesResp objects |
Resource |
|
tags |
Array of TagsResp objects |
Tags |
|
enterprise_project_id |
String |
Enterprise project ID. The default value is 0. |
|
auto_bind |
Boolean |
Specifies whether automatic association is enabled. The default value is false, indicating that automatic association is disabled. |
|
bind_rules |
VaultBindRules object |
Association rule |
|
user_id |
String |
User ID |
|
created_at |
String |
Creation time, such as 2020-02-05T10:38:34.209782 |
|
auto_expand |
Boolean |
Whether to enable auto capacity expansion for the vault. Only pay-per-use vaults support this function. |
|
updated_at |
String |
Update time, for example, 2020-02-05T10:38:34.209782 |
|
version |
String |
Version |
|
Parameter |
Type |
Description |
|---|---|---|
|
resources |
Array of TagResource objects |
List of matched resources (This parameter is not displayed if action is set to count.) |
|
total_count |
Integer |
Total number of matched resources |
|
Parameter |
Type |
Description |
|---|---|---|
|
resource_id |
String |
Resource ID |
|
resource_detail |
Array of Vault objects |
Resource details |
|
tags |
Array of Tag objects |
Tag list. If there is no tag, an empty array is used by default. |
|
resource_name |
String |
Resource name |
|
sys_tags |
Array of SysTag objects |
Only users with the op_service permission can obtain this field. Currently, only one structure resource_tag is used. key: _sys_enterprise_project_id value: enterprise project ID. The value 0 indicates the default enterprise project. This field cannot be returned in the non-op_service scenario. |
|
Parameter |
Type |
Description |
|---|---|---|
|
billing |
Billing object |
Operation info |
|
description |
String |
User-defined vault description Minimum: 0 Maximum: 255 |
|
id |
String |
Vault ID |
|
name |
String |
Vault name Minimum: 1 Maximum: 64 |
|
project_id |
String |
Project ID |
|
provider_id |
String |
Vault type |
|
resources |
Array of ResourceResp objects |
Vault resources |
|
tags |
Array of Tag objects |
Vault tags |
|
enterprise_project_id |
String |
Enterprise project ID. The default value is 0. |
|
auto_bind |
Boolean |
Specifies whether automatic association is enabled. The default value is false, indicating that automatic association is disabled. |
|
bind_rules |
VaultBindRules object |
Association rule |
|
user_id |
String |
User ID |
|
created_at |
String |
Creation time, such as 2020-02-05T10:38:34.209782 |
|
auto_expand |
Boolean |
Whether to enable auto capacity expansion for the vault. Only pay-per-use vaults support this function. |
|
Parameter |
Type |
Description |
|---|---|---|
|
allocated |
Integer |
Allocated capacity, in MB. |
|
charging_mode |
String |
Creation mode Enumeration values:
|
|
cloud_type |
String |
Cloud platform Enumeration values:
|
|
consistent_level |
String |
Backup specifications |
|
object_type |
String |
Object type. Possible values are server (cloud servers), disk (EVS disks), and turbo (SFS Turbo file systems). |
|
order_id |
String |
Order ID |
|
product_id |
String |
Product ID |
|
protect_type |
String |
Protection type Enumeration values:
|
|
size |
Integer |
Capacity, in GB Minimum: 1 Maximum: 10485760 |
|
spec_code |
String |
Specification code Enumeration values:
|
|
status |
String |
Vault status Enumeration values:
|
|
storage_unit |
String |
Name of the bucket for the vault |
|
used |
Integer |
Used capacity, in MB. |
|
frozen_scene |
String |
Scenario when an account is frozen |
|
Parameter |
Type |
Description |
|---|---|---|
|
extra_info |
ResourceExtraInfo object |
Extra information of the resource |
|
id |
String |
ID of the resource to be backed up |
|
name |
String |
Name of the resource to be backed up Minimum: 0 Maximum: 255 |
|
protect_status |
String |
Protection status Enumeration values:
|
|
size |
Integer |
Allocated capacity for the associated resource, in GB |
|
type |
String |
Type of the resource to be backed up. Possible values are as follows: OS::Nova::Server, OS::Cinder::Volume, OS::Ironic::BareMetalServer, OS::Native::Server, and OS::Sfs::Turbo |
|
backup_size |
Integer |
Backup size |
|
backup_count |
Integer |
Number of backups |
|
Parameter |
Type |
Description |
|---|---|---|
|
exclude_volumes |
Array of strings |
ID of the disk that is excluded from the backup. This parameter is used only when there are VM disk backups. |
|
include_volumes |
Array of ResourceExtraInfoIncludeVolumes objects |
Disk to be backed up |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
EVS disk ID. Only UUID is supported. |
|
os_version |
String |
OS type |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key. Key of the system tag, which is obtained from the whitelist and cannot be defined randomly. Currently, only the _sys_enterprise_project_id field is supported, and the corresponding value indicates the enterprise project ID. |
|
value |
String |
Value. Currently, only the enterprise project ID is used. The default enterprise project ID is 0. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key. It consists of up to 36 characters. It cannot be an empty string. It can contain only Chinese characters, letters, digits, hyphens, and underscores. |
|
values |
String |
List of values. It consists of up to 43 characters. It can be an empty string. It can contain only Chinese characters, letters, digits, hyphens, and underscores. |
|
Parameter |
Type |
Description |
|---|---|---|
|
tags |
Array of Tag objects |
Filters automatically associated resources by tag. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key. It consists of up to 36 characters. It cannot be an empty string. Spaces before and after a key will be deprecated. It cannot contain ASCII (0-31) or the following characters: =*<>,|/ It can contain only Chinese characters, letters, digits, hyphens, and underscores. |
|
value |
String |
Value. The value of this parameter is mandatory when a tag is added and optional when a tag is deleted. It consists of up to 43 characters. It can be an empty string. Spaces before and after a value will be deprecated. It cannot contain ASCII (0-31) or the following characters: =*<>,|/ It can contain only Chinese characters, letters, digits, hyphens, and underscores. |
Example Requests
None
Example Responses
Status code: 200
OK
{
"instance" : {
"status" : "ACTIVE",
"children" : [ {
"status" : "in-use",
"name" : "volume-f926-0001",
"detail" : {
"attachments" : [ {
"server_id" : "55ecd8b8-1457-4a2a-a9df-53756a690082",
"attachment_id" : "3b32cb75-bd96-493b-8fb2-13f063c876d5",
"volume_id" : "8d3d519f-d409-4be3-8a1f-9f7a5ecb7a99",
"attached_at" : "2019-05-08T06:56:25.891730",
"device" : "/dev/vdb",
"id" : "8d3d519f-d409-4be3-8a1f-9f7a5ecb7a99"
} ],
"links" : [ {
"href" : "https://volume.region.cn-cmcc1.internal.cmclouds.com/v2/3aec9116a6a5487ca14987121d2818fe/volumes/8d3d519f-d409-4be3-8a1f-9f7a5ecb7a99",
"rel" : "self"
}, {
"href" : "https://volume.region.cn-cmcc1.internal.cmclouds.com/3aec9116a6a5487ca14987121d2818fe/volumes/8d3d519f-d409-4be3-8a1f-9f7a5ecb7a99",
"rel" : "bookmark"
} ],
"availability_zone" : "cn-cmcc1a-01",
"os-vol-host-attr:host" : "cn-cmcc1a-01.cn-cmcc1#FusionStorage",
"encrypted" : false,
"updated_at" : "2019-05-08T06:56:26.207240",
"replication_status" : "disabled",
"id" : "8d3d519f-d409-4be3-8a1f-9f7a5ecb7a99",
"size" : 10,
"user_id" : "f3d66502790d4ddaadef5056059ed8f4",
"os-vol-tenant-attr:tenant_id" : "3aec9116a6a5487ca14987121d2818fe",
"metadata" : {
"policy" : "cf3274fc-d23e-4c12-8be7-1e41b3c2faea",
"readonly" : "False",
"hw:passthrough" : "false",
"attached_mode" : "rw"
},
"status" : "in-use",
"multiattach" : false,
"name" : "volume-f926-0001",
"bootable" : "false",
"created_at" : "2019-03-26T09:30:46.783578",
"volume_type" : "SATA",
"shareable" : false
},
"children" : [ ],
"type" : "OS::Cinder::Volume",
"id" : "8d3d519f-d409-4be3-8a1f-9f7a5ecb7a99",
"size" : 10
}, {
"status" : "in-use",
"name" : "no_delete_for_cbr_interface-volume-0000",
"detail" : {
"attachments" : [ {
"server_id" : "55ecd8b8-1457-4a2a-a9df-53756a690082",
"attachment_id" : "e16631fa-0522-4ac8-8f78-19db435caf68",
"volume_id" : "13eb535f-8635-4faf-9f08-584d21e78f0a",
"attached_at" : "2019-05-08T06:55:26.563986",
"device" : "/dev/vda",
"id" : "13eb535f-8635-4faf-9f08-584d21e78f0a"
} ],
"links" : [ {
"href" : "https://volume.region.cn-cmcc1.internal.cmclouds.com/v2/3aec9116a6a5487ca14987121d2818fe/volumes/13eb535f-8635-4faf-9f08-584d21e78f0a",
"rel" : "self"
}, {
"href" : "https://volume.region.cn-cmcc1.internal.cmclouds.com/3aec9116a6a5487ca14987121d2818fe/volumes/13eb535f-8635-4faf-9f08-584d21e78f0a",
"rel" : "bookmark"
} ],
"availability_zone" : "cn-cmcc1a-01",
"os-vol-host-attr:host" : "cn-cmcc1a-03.cn-cmcc1#kvm_fusionstorage",
"encrypted" : false,
"updated_at" : "2019-05-08T08:33:07.855484",
"replication_status" : "disabled",
"id" : "13eb535f-8635-4faf-9f08-584d21e78f0a",
"size" : 40,
"user_id" : "3204777a731c4ebea330350c04f41b92",
"os-vol-tenant-attr:tenant_id" : "3aec9116a6a5487ca14987121d2818fe",
"metadata" : {
"policy" : "2ecbcffd-08ba-43f7-bf8d-95daba753464",
"readonly" : "False",
"attached_mode" : "rw"
},
"status" : "in-use",
"volume_image_metadata" : {
"container_format" : "bare",
"min_ram" : "0",
"__account_code" : "",
"__os_bit" : "64",
"size" : "2",
"__os_version" : "CentOS 7.2 64bit",
"__backup_id" : "",
"__description" : "",
"__support_diskintensive" : "true",
"disk_format" : "vhd",
"__isregistered" : "true",
"__image_size" : "3295645696",
"__platform" : "CentOS",
"__root_origin" : "file",
"__originalimagename" : "703eb90a-a65f-4c72-b4c1-f070a55d068b",
"__quick_start" : "true",
"image_name" : "CentOS7.2-cloudinit",
"image_id" : "703eb90a-a65f-4c72-b4c1-f070a55d068b",
"__os_type" : "Linux",
"__image_location" : "172.100.45.130:443:pcsimsf8bd00bf6c304d2e8cf4e2beb0aed702:703eb90a-a65f-4c72-b4c1-f070a55d068b",
"min_disk" : "40",
"__data_origin" : "file,jingxiang:CentOS-7.2-64bit.zvhd2",
"__support_kvm" : "true",
"virtual_env_type" : "FusionCompute",
"__image_source_type" : "uds",
"__support_xen" : "true",
"checksum" : "99914b932bd37a50b983c5e7c90ae93b",
"__imagetype" : "gold",
"__productcode" : ""
},
"multiattach" : false,
"name" : "no_delete_for_cbr_interface-volume-0000",
"bootable" : "true",
"created_at" : "2019-05-08T06:54:58.477749",
"volume_type" : "SATA",
"shareable" : false
},
"children" : [ ],
"type" : "OS::Cinder::Volume",
"id" : "13eb535f-8635-4faf-9f08-584d21e78f0a",
"size" : 40
} ],
"protectable" : {
"reason" : "",
"code" : "",
"result" : true
},
"name" : "no_delete_for_cbr_interface",
"detail" : {
"addresses" : {
"94b88790-c906-4450-b7c2-1c2b1ea639bf" : [ {
"OS-EXT-IPS-MAC:mac_addr" : "fa:16:3e:9b:9d:af",
"version" : 4,
"addr" : "192.168.1.44",
"OS-EXT-IPS:type" : "fixed"
}, {
"OS-EXT-IPS-MAC:mac_addr" : "fa:16:3e:9b:9d:af",
"version" : 4,
"addr" : "100.78.0.199",
"OS-EXT-IPS:type" : "floating"
} ]
},
"links" : [ {
"href" : "https://compute.region.cn-cmcc1.internal.cmclouds.com/v2.1/3aec9116a6a5487ca14987121d2818fe/servers/55ecd8b8-1457-4a2a-a9df-53756a690082",
"rel" : "self"
}, {
"href" : "https://compute.region.cn-cmcc1.internal.cmclouds.com/3aec9116a6a5487ca14987121d2818fe/servers/55ecd8b8-1457-4a2a-a9df-53756a690082",
"rel" : "bookmark"
} ],
"image" : "",
"OS-EXT-STS:vm_state" : "active",
"OS-EXT-SRV-ATTR:instance_name" : "instance-0004456e",
"OS-SRV-USG:launched_at" : "2019-05-08T06:55:38.000000",
"flavor" : {
"id" : "s3.small.1",
"links" : [ {
"href" : "https://compute.region.cn-cmcc1.internal.cmclouds.com/3aec9116a6a5487ca14987121d2818fe/flavors/s3.small.1",
"rel" : "bookmark"
} ]
},
"id" : "55ecd8b8-1457-4a2a-a9df-53756a690082",
"security_groups" : [ {
"name" : "default"
} ],
"user_id" : "f3d66502790d4ddaadef5056059ed8f4",
"OS-DCF:diskConfig" : "MANUAL",
"accessIPv4" : "",
"accessIPv6" : "",
"progress" : 0,
"OS-EXT-STS:power_state" : 1,
"OS-EXT-AZ:availability_zone" : "cn-cmcc1a-01",
"config_drive" : "",
"status" : "ACTIVE",
"updated" : "2019-05-08T06:57:02Z",
"hostId" : "179f22cafe6b951921bd6deb3b13a978df620427fb37bbb7c619de98",
"OS-EXT-SRV-ATTR:host" : "cn-cmcc1a-03.cn-cmcc1",
"OS-EXT-SRV-ATTR:hypervisor_hostname" : "nova003@36",
"name" : "no_delete_for_cbr_interface",
"created" : "2019-05-08T06:55:22Z",
"tenant_id" : "3aec9116a6a5487ca14987121d2818fe",
"os-extended-volumes:volumes_attached" : [ {
"id" : "8d3d519f-d409-4be3-8a1f-9f7a5ecb7a99"
}, {
"id" : "13eb535f-8635-4faf-9f08-584d21e78f0a"
} ],
"metadata" : {
"metering.image_id" : "703eb90a-a65f-4c72-b4c1-f070a55d068b",
"metering.imagetype" : "gold",
"metering.resourcespeccode" : "s3.small.1.linux",
"metering.cloudServiceType" : "sys.service.type.ec2",
"virtual_env_type" : "FusionCompute",
"image_name" : "CentOS7.2-cloudinit",
"metering.resourcetype" : "1",
"vpc_id" : "94b88790-c906-4450-b7c2-1c2b1ea639bf",
"os_bit" : "64",
"cascaded.instance_extrainfo" : "",
"os_type" : "Linux",
"charging_mode" : "0"
}
},
"type" : "OS::Nova::Server",
"id" : "55ecd8b8-1457-4a2a-a9df-53756a690082",
"size" : 50
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
Error Codes
See Error Codes.
Last Article: Querying Protectable Resources
Next Article: Querying the Replication Capability
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.