cis tagging category: create

Creates a category. To invoke this operation, you need the create category privilege.

Request:

HTTP request

POST https://{server}/rest/com/vmware/cis/tagging/category

Request Body Structure:

{
    "create_spec"{
        "associable_types"[
            "string",
            "string"
        ],
        "cardinality""SINGLE",
        "description""string",
        "name""string"
    }
}
<?xml version="1.0" ?>
<ns0:Create-Input xmlns:ns0="http://vmware.com/cis/tagging/category" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <create_spec>
    <associable_types-array>
      <array-item>string</array-item>
      <array-item>string</array-item>
    </associable_types-array>
    <description>string</description>
    <name>string</name>
    <cardinality>SINGLE</cardinality>
  </create_spec>
</ns0:Create-Input>

Request Body Parameters:

Name Type Description
bold = required
create_spec create_spec Specification for the new category to be created.
create_spec.name string The display name of the category.

create_spec.description string The description of the category.

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

Defines the number of tags in a category that can be assigned to an object. Value is one of:
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.

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

Response:

HTTP Status Code: 200

Representations:

{
    "value""obj-103"
}
<?xml version="1.0" ?>
<ns0:Create-Result xmlns:ns0="http://vmware.com/cis/tagging/category" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>obj-103</value>
</ns0:Create-Result>

Response Type:

Name Type Description
bold = required
value string The identifier of the created category.

Errors:

HTTP Status Code Type Description
400 already_exists if the cis.tagging.category.create_spec.name provided in the create_spec is the name of an already existing category.
400 invalid_argument if any of the information in the create_spec is invalid.
403 unauthorized if you do not have the privilege to create a category.