Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.
- What's New
- Service Overview
- Billing
- Getting Started
- User Guide
- API Reference
- SDK Reference
-
FAQs
-
DeH FAQs
- What Is DeH?
- When a DeH Is Needed?
- Can I Use DeHs to Build Websites?
- Can I Buy DeHs by Myself?
- What Hypervisor Is Used by DeHs?
- Does Each DeH Have a Unique ID?
- What Are the Differences Between DeHs and BMSs?
- What Are the Differences Between DeH and DeC?
- What Are the Differences Between DeHs and ECSs?
- How Can I Query the Number of Available Resources on a DeH?
- Why Is It Not Possible to Successfully Create an ECS on a DeH Even When There Are More Available Resources on the DeH Than What the ECS Requires?
- Does DeH Support Capacity Expansion?
- What Is BYOL?
- How Do I Bring My Own Licenses to a DeH?
- Can I Attach an EVS Disk to a DeH?
- Is There a Limit on the Number of DeHs That I Can Purchase?
-
ECS FAQs
- What Are the Differences Between ECSs on DeHs and Those on Shared Hosts?
- What Are the Restrictions on Creating ECSs on a DeH?
- Can I Create ECSs of Different Flavors on a DeH?
- Can I Modify the Specifications of ECSs on DeHs?
- What Should I Do If I Fail to Create an ECS on a DeH?
- Can I Migrate ECSs in Resource Pools to DeHs?
- Billing FAQs
-
DeH FAQs
- Videos
- Glossary
-
More Documents
-
User Guide (Paris Region)
- Product Introduction
- Getting Started
- DeH Management
- ECS Management
- Tag Management
- Key Operations Recorded by CTS
- Managing Enterprise Projects
- Permission Management
-
FAQs
-
DeH FAQs
- What Is DeH?
- When a DeH Is Needed?
- Can I Use DeHs Build Websites?
- Can I Allocate DeHs by Myself?
- What Hypervisor Is Used by DeHs?
- Does Each DeH Have a Unique ID?
- What Are the Differences Between DeHs and BMSs?
- What Are the Differences Between DeH and DeC?
- What Are the Differences Between DeHs and ECSs?
- How Can I Query the Number of Available Resources on a DeH?
- Does DeH Support Capacity Expansion?
- What Is BYOL?
- How Do I Bring My Own Licenses to a DeH?
- Can I Attach an EVS Disk to a DeH?
- Is There a Limit on the Number of DeHs That I Can Purchase?
-
ECS FAQs
- What Are the Differences Between ECSs on DeHs and Those on Shared Hosts?
- What Are the Restrictions on Creating ECSs on a DeH?
- Can I Create ECSs of Different Flavors on a DeH?
- Can I Modify the Specifications of ECSs on DeHs?
- What Should I Do If I Fail to Create an ECS on a DeH?
- Can I Migrate ECSs in Resource Pools to DeHs?
- Billing FAQs
-
DeH FAQs
- Change History
- API Reference (Paris Region)
-
User Guide (Paris Region)
- General Reference
Copied.
Allocating DeHs
Function
This API is used to allocate one or more DeHs and set required parameters, such as the flavor, AZ, and quantity.
Constraints
The number of allocatable DeHs depends on the DeH quota owned by the tenant.
URI
POST /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
Parameter |
In |
Type |
Mandatory |
Description |
---|---|---|---|---|
name |
body |
String |
Yes |
Specifies the DeH name. |
auto_placement |
body |
String |
No |
Specifies whether to allow an ECS to be placed on any available DeH if its DeH ID is not specified during its creation. The value can be on or off. The default value is on. |
availability_zone |
body |
String |
Yes |
Specifies the AZ to which the DeH belongs. |
host_type |
body |
String |
Yes |
Specifies the DeH type. |
quantity |
body |
Integer |
Yes |
Specifies the number of allocatable DeHs. |
tags |
body |
Array of objects |
No |
Specifies the DeH tags. For details, see Table 3. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
key |
String |
Yes |
Specifies the tag key.
|
value |
String |
Yes |
Specifies the tag value.
|
Response
Parameter |
In |
Type |
Description |
---|---|---|---|
dedicated_host_ids |
body |
Array of strings |
Specifies a group of IDs of allocated DeHs. The tenant can create ECSs on these DeHs. |
Example Request
POST https://{Endpoint}/v1.0/9c53a566cb3443ab910cf0daebca90c4/dedicated-hosts { "availability_zone": "dc1.az1", "name": "General-Purpose server1", "auto_placement": "off", "host_type": "s3", "quantity": 2, "tags": [ { "key": "key1", "value": "value1" } ] }
Example Response
{ "dedicated_host_ids": ["xxxxxxx1","xxxxxxx2"] }
Status Code
Error Code |
Description |
---|---|
403 Forbidden |
|
404 FlavorNotFound |
Invalid flavor. |
For more status codes, 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