Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
10 KiB
Modifying DeH Attributes
Function
This API is used to modify the auto_placement and name attributes of a DeH.
URI
PUT /v1.0/{project_id}/dedicated-hosts/{dedicated_host_id}
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 Required Information. |
dedicated_host_id |
String |
Yes |
Specifies the DeH ID. You can obtain the DeH ID from the DeH console or using the Querying DeHs API. |
Request
- Request parameters
Table 2 Request parameters Parameter
Mandatory
Type
Description
dedicated_host Yes
Object
Specifies the dedicated host. For details, see Table 3.
Table 3 dedicated_host field data structure description Parameter
Location
Type
Mandatory
Description
auto_placement
in
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.
name
in
String
No
Specifies the DeH name.
- Example request
PUT https://{Endpoint}/v1.0/9c53a566cb3443ab910cf0daebca90c4/dedicated-hosts/74259164-e63a-4ad9-9c77-a1bd2c9aa187 { "dedicated_host": { "auto_placement": "off", "name": "DeH_vm3" } }
Status Code
See Status Codes.