Querying DeHs
Function
This API is used to query the DeH list.
URI
GET /v1.0/{project_id}/dedicated-hosts
Table 1 describes the parameters.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request
You can add parameters host_type, host_type_name, flavor, dedicated_host_id, state, tenant, availability_zone, name, limit, marker, tags, instance_uuid, or changes-since to the URI to filter the search result,
for example, /v1.0/{project_id}/dedicated-hosts?host_type={host_type}&state={state}.
Parameter |
In |
Type |
Mandatory |
Description |
---|---|---|---|---|
dedicated_host_id |
query |
String |
No |
Specifies the DeH ID. |
name |
query |
String |
No |
Specifies the DeH name. |
host_type |
query |
String |
No |
Specifies the DeH type. |
host_type_name |
query |
String |
No |
Specifies the name of the DeH type. |
flavor |
query |
String |
No |
Specifies the flavor ID. |
state |
query |
String |
No |
Specifies the DeH status. The value can be available, fault, or released. |
tenant |
query |
String |
No |
The value can be a tenant ID or all. Only users with the DeH administrator permissions can specify this parameter. |
availability_zone |
query |
String |
No |
Specifies the AZ to which the DeH belongs. |
limit |
query |
String |
No |
Specifies the number of records displayed per page. |
marker |
query |
String |
No |
Specifies the ID of the last record on the previous page. If the marker value is invalid, status code 400 is returned. |
tags |
query |
String |
No |
Specifies the DeH tags. |
instance_uuid |
query |
String |
No |
Specifies the ID of the ECS on the DeH. |
changes-since |
query |
String |
No |
Filters the response by date and timestamp when the DeH status changes. To help keep track of changes, this parameter may also display recently deleted DeHs. The format of the date and timestamp is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm If the hh:mm value is included, the time zone is returned as the UTC offset, for example, 2015-08-27T09:49:58-05:00. If you omit the time zone, the UTC time zone is assumed. |
Response
Parameter |
In |
Type |
Description |
---|---|---|---|
dedicated_hosts |
body |
Array of objects |
Specifies the DeHs that meet the search criteria. For details, see Table 1. |
total |
body |
Integer |
Specifies the quantity of DeHs that meet the search criteria. |
Example Request
GET https://{Endpoint}/v1.0/9c53a566cb3443ab910cf0daebca90c4/dedicated-hosts?state=available
Example Response
{ "dedicated_hosts": [ { "dedicated_host_id": "d465d0ae-f859-4a83-a508-8db654c05e7e", "name": "DEH001", "auto_placement": "off", "availability_zone": "cn-east-3a", "host_properties": { "vcpus": 74, "cores": 22, "sockets": 2, "memory": 151552, "host_type": "c6", "host_type_name": "dedicated_general_purpose", "available_instance_capacities": [ { "flavor": "c6.large.2" }, { "flavor": "c6.xlarge.2" }, { "flavor": "c6.2xlarge.2" }, { "flavor": "c6.3xlarge.2" }, { "flavor": "c6.6xlarge.2" }, { "flavor": "c6.16xlarge.2" } ] }, "state": "available", "project_id": "9c53a566cb3443ab910cf0daebca90c4", "available_vcpus": 20, "available_memory": 40960, "instance_total": 5, "allocated_at": "2016-10-10T14:35:47Z", "released_at": "" } ], "total": 1 }
Status Code
See Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot