Adding Tags for a BMS
Function
- This API is used to add tags for a specified BMS in batches.
- The Tag Management Service (TMS) uses this API to manage BMS tags.
This is an idempotent API. If a tag being created already exists (it has the same key and value as an existing tag), a successful result will be returned. A new tag will overwrite the original one if their keys are the same but values are different.
Constraints
A maximum of 20 tags can be added for a BMS.
Authorization Information
Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permission listed below is required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
bms:servers:batchCreateBaremetalServerTags
write
instance*
- g:ResourceTag/<tag-key>
- g:TagKeys
- g:EnterpriseProjectId
bms:servers:put
-
Request Parameters
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
tags |
List <resource_tag> |
Yes |
Specifies the tag list. For details, see Table 2. |
|
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 |
No |
Specifies the tag value.
|
Example Request
{
"action": "create",
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value3"
}
]
}
Response Message
None
Returned Values
- Normal
Returned Values
Description
204
No Content
- Abnormal
Returned Values
Description
400
Invalid tag.
401
Authentication failed.
403
Insufficient permission.
404
The requested resource was not found.
500
A system exception occurred.
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