cis tagging tag association: attach multiple tags to object
Attaches the given tags to the input object. If a tag is already attached to the object, then the individual operation is a no-op and an error will not be added to cis.tagging.tag_association.batch_result.error_messages. To invoke this operation, you need the read privilege on the object and the attach tag privilege on each tag.
Request:
HTTP request
POST https://{server}/rest/com/vmware/cis/tagging/tag-association?~action=attach-multiple-tags-to-object
Request Body Structure:
{
"object_id": {
"id": "obj-103",
"type": "string"
},
"tag_ids": [
"obj-103",
"obj-103"
]
}
"object_id": {
"id": "obj-103",
"type": "string"
},
"tag_ids": [
"obj-103",
"obj-103"
]
}
<?xml version="1.0" ?>
<ns0:AttachMultipleTagsToObject-Input xmlns:ns0="http://vmware.com/cis/tagging/tag_association" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tag_ids-array>
<array-item>obj-103</array-item>
<array-item>obj-103</array-item>
</tag_ids-array>
<object_id>
<id>obj-103</id>
<type>string</type>
</object_id>
</ns0:AttachMultipleTagsToObject-Input>
<ns0:AttachMultipleTagsToObject-Input xmlns:ns0="http://vmware.com/cis/tagging/tag_association" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tag_ids-array>
<array-item>obj-103</array-item>
<array-item>obj-103</array-item>
</tag_ids-array>
<object_id>
<id>obj-103</id>
<type>string</type>
</object_id>
</ns0:AttachMultipleTagsToObject-Input>
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
object_id | dynamic_ID | The identifier of the input object. |
object_id.type | string | The type of resource being identified (for example com.acme.Person ). Services that contain operations for creating and deleting resources typically contain a constant specifying the resource type for the resources being created and deleted. The API metamodel metadata services include a service that allows retrieving all the known resource types. |
object_id.id | string | The identifier for a resource whose type is specified by vapi.std.dynamic_ID.type. When clients pass a value of this structure as a parameter, the field type must contain the actual resource type. When operations return a value of this structure as a result, the field type will contain the actual resource type. |
tag_ids | string[] | The identifiers of the input tags. |
Response:
HTTP Status Code: 200
Representations:
{
"value": {
"error_messages": [
{
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
{
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
}
],
"success": true
}
}
"value": {
"error_messages": [
{
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
},
{
"args": [
"string",
"string"
],
"default_message": "string",
"id": "string"
}
],
"success": true
}
}
<?xml version="1.0" ?>
<ns0:AttachMultipleTagsToObject-Result xmlns:ns0="http://vmware.com/cis/tagging/tag_association" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>
<error_messages-array>
<array-item>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</array-item>
<array-item>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</array-item>
</error_messages-array>
<success>true</success>
</value>
</ns0:AttachMultipleTagsToObject-Result>
<ns0:AttachMultipleTagsToObject-Result xmlns:ns0="http://vmware.com/cis/tagging/tag_association" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<value>
<error_messages-array>
<array-item>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</array-item>
<array-item>
<default_message>string</default_message>
<id>string</id>
<args-array>
<array-item>string</array-item>
<array-item>string</array-item>
</args-array>
</array-item>
</error_messages-array>
<success>true</success>
</value>
</ns0:AttachMultipleTagsToObject-Result>
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | batch_result | The outcome of the batch operation and the array of error messages (cis.tagging.tag_association.batch_result.error_messages) describing attachment failures. |
value.success | boolean | This is true if the batch operation completed without any errors. Otherwise it is false and all or some operations have failed. |
value.error_messages | localizable_message[] | The array of error messages. |
value.error_messages[].id | string | Unique identifier of the localizable string or message template. This identifier is typically used to retrieve a locale-specific string or message template from a message catalog. |
value.error_messages[].default_message | string | The value of this localizable string or message template in the en_US (English) locale. If vapi.std.localizable_message.id refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog. |
value.error_messages[].args | string[] | Arguments to be substituted into a message template. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
403 | unauthorized | if you do not have the privilege to read the object. |