During tag creation, if a tag exists (both the key and value are the same as those of an existing tag), the tag is successfully processed by default.
POST /v1.0/{project_id}/dedicated-host-tags/{dedicated_host_id}/tags/action
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. |
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
tags |
Array of objects |
Yes |
Specifies the tag list. |
action |
String |
Yes |
Specifies the operation. Only lowercase letters are supported. For example, create indicates the creation operation. |
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
key |
String |
Yes |
Specifies the tag key.
|
value |
String |
Yes |
Specifies the tag value.
|
POST https://{Endpoint}/v1.0/9c53a566cb3443ab910cf0daebca90c4/dedicated-host-tags/74259164-e63a-4ad9-9c77-a1bd2c9aa187/tags/action
{
"action": "create",
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}
]
}
N/A
See Status Codes.