Update Category
Updates an existing category. To invoke this operation, you need the edit privilege on the category.
Request
URLURL
Path Parameters
Path Parameters
The identifier of the category to be updated. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Category.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification to update the category.
{
"associable_types": [
"string"
],
"cardinality": "SINGLE",
"description": "string",
"name": "string"
}
Object types to which this category’s tags can be attached. The set of associable types cannot be updated incrementally. For example, if Category.UpdateSpec.associable-types originally contains {A,B,C} and you want to add D, then you need to pass {A,B,C,D} in your update specification. You also cannot remove any item from this set. For example, if you have {A,B,C}, then you cannot remove say {A} from it. Similarly, if you start with an empty set, then that implies that you can tag any object and hence you cannot later pass say {A}, because that would be restricting the type of objects you want to tag. Thus, associable types can only grow and not shrink.
If unset the associable types will not be modified.
The CategoryModel.Cardinality enumerated type defines the number of tags in a category that can be assigned to an object.
SINGLE : An object can only be assigned one of the tags in this category. For example, if a category is “Operating System”, then different tags of this category would be “Windows”, “Linux”, and so on. In this case a VM object can be assigned only one of these tags and hence the cardinality of the associated category here is single.
MULTIPLE : An object can be assigned several of the tags in this category. For example, if a category is “Server”, then different tags of this category would be “AppServer”, “DatabaseServer” and so on. In this case a VM object can be assigned more than one of the above tags and hence the cardinality of the associated category here is multiple.
Possible values are: SINGLE , MULTIPLE
The description of the category. If unset the description will not be modified.
The display name of the category. If unset the name will not be modified.
Authentication
Errors
Errors
com.vmware.vapi.std.errors.already_exists : if the Category.UpdateSpec.name provided in the updateSpec is the name of an already existing category. | com.vmware.vapi.std.errors.invalid_argument : if any of the information in the updateSpec is invalid.
com.vmware.vapi.std.errors.unauthorized : if you do not have the privilege to update the category.
com.vmware.vapi.std.errors.not_found : if the category for the given categoryId does not exist in the system.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: patch
x-vmw-doc-deprecated-path: /rest/com/vmware/cis/tagging/category/id:{category_id}
x-vmw-doc-operation: update