REST API - update

cis tagging category: update

Updates an existing category. To invoke this operation, you need the edit privilege on the category.

Request:

HTTP request

PATCH https://{server}/rest/com/vmware/cis/tagging/category/id:{category_id}

Path Parameters

Name Type Description
Required
category_id string The identifier of the category to be updated.

Request Body Structure:

{
    "update_spec"{
        "associable_types"[
            "string",
            "string"
        ],
        "name""string",
        "description""string",
        "cardinality""SINGLE"
    }
}

Request Body Parameters:

Name Type Description
bold = required
update_spec update_spec Specification to update the category.
update_spec.name string The display name of the category.

Optional. If unset the name will not be modified.

update_spec.description string The description of the category.

Optional. If unset the description will not be modified.

update_spec.cardinality string The associated cardinality (SINGLE, MULTIPLE) of the category.

Optional. If unset the cardinality will not be modified.

update_spec.associable_types string[] Object types to which this category's tags can be attached.

The set of associable types cannot be updated incrementally. For example, if cis.tagging.category.update_spec.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.

Optional. If unset the associable types will not be modified.

Response:

HTTP Status Code: 200

None

Errors:

HTTP Status Code Type Description
400 already_exists if the cis.tagging.category.update_spec.name provided in the update_spec is the name of an already existing category.
400 invalid_argument if any of the information in the update_spec is invalid.
404 not_found if the category for the given category_id does not exist in the system.
403 unauthorized if you do not have the privilege to update the category.