cis tagging tag association: detach tag from multiple objects
Detaches the given tag from the input objects. If a tag is already removed from 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 attach tag privilege on the tag and the read privilege on each object.
Request:
HTTP request
POST https://{server}/rest/com/vmware/cis/tagging/tag-association/id:{tag_id}?~action=detach-tag-from-multiple-objects
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
tag_id | string | The identifier of the input tag. |
Request Body Structure:
{
"object_ids": [
{
"id": "obj-103",
"type": "string"
},
{
"id": "obj-103",
"type": "string"
}
]
}
"object_ids": [
{
"id": "obj-103",
"type": "string"
},
{
"id": "obj-103",
"type": "string"
}
]
}
<?xml version="1.0" ?>
<ns0:DetachTagFromMultipleObjects-Input xmlns:ns0="http://vmware.com/cis/tagging/tag_association" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<object_ids-array>
<array-item>
<id>obj-103</id>
<type>string</type>
</array-item>
<array-item>
<id>obj-103</id>
<type>string</type>
</array-item>
</object_ids-array>
</ns0:DetachTagFromMultipleObjects-Input>
<ns0:DetachTagFromMultipleObjects-Input xmlns:ns0="http://vmware.com/cis/tagging/tag_association" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<object_ids-array>
<array-item>
<id>obj-103</id>
<type>string</type>
</array-item>
<array-item>
<id>obj-103</id>
<type>string</type>
</array-item>
</object_ids-array>
</ns0:DetachTagFromMultipleObjects-Input>
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
object_ids | dynamic_ID[] | The identifiers of the input objects. |
object_ids[].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_ids[].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. |
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:DetachTagFromMultipleObjects-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:DetachTagFromMultipleObjects-Result>
<ns0:DetachTagFromMultipleObjects-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:DetachTagFromMultipleObjects-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 detachment 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 |
---|---|---|
404 | not_found | if the tag for the given tag does not exist in the system. |
403 | unauthorized | if you do not have the attach tag privilege on the tag. |