VMware

Category Namespace

The Category namespace provides commands to create, read, update, delete, and enumerate categories.

List of commands:



Create Command

dcli com vmware cis tagging category create

Description

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

Options

Option Name Type Required Description
name string Yes The display name of the category.
description string Yes The description of the category.
cardinality string Yes The associated cardinality (SINGLE, MULTIPLE) of the category. Valid values are: {SINGLE, MULTIPLE}
associable‑types string Yes Object types to which this category's tags can be attached.

Example

dcli com vmware cis tagging category create --name testString --description testString --cardinality test --associable-types testString


Get Command

dcli com vmware cis tagging category get

Description

Fetches the category information for the given category identifier. In order to view the category information, you need the read privilege on the category.

Options

Option Name Type Required Description
category‑id string Yes The identifier of the input category. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Category.

Example

dcli com vmware cis tagging category get --category-id testId


Update Command

dcli com vmware cis tagging category update

Description

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

Options

Option Name Type Required Description
category‑id string Yes The identifier of the category to be updated. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Category.
name string No The display name of the category. If unset the name will not be modified.
description string No The description of the category. If unset the description will not be modified.
cardinality string No The associated cardinality (SINGLE, MULTIPLE) of the category. If unset the cardinality will not be modified. Valid values are: {SINGLE, MULTIPLE}
associable‑types string No 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.

Example

dcli com vmware cis tagging category update --category-id testId


Delete Command

dcli com vmware cis tagging category delete

Description

Deletes an existing category. To invoke this command, you need the delete privilege on the category.

Options

Option Name Type Required Description
category‑id string Yes The identifier of category to be deleted. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Category.

Example

dcli com vmware cis tagging category delete --category-id testId


List Command

dcli com vmware cis tagging category list

Description

Enumerates the categories in the system. To invoke this command, you need the read privilege on the individual categories. The list will only contain those categories for which you have read privileges.

Example

dcli com vmware cis tagging category list


ListUsedCategories Command

dcli com vmware cis tagging category listusedcategories

Description

Enumerates all categories for which the used-by-entity is part of the CategoryModel.used-by subscribers set. To invoke this command, you need the read privilege on the individual categories.

Options

Option Name Type Required Description
used‑by‑entity string Yes The field on which the results will be filtered.

Example

dcli com vmware cis tagging category listusedcategories --used-by-entity testString


AddToUsedBy Command

dcli com vmware cis tagging category addtousedby

Description

Adds the used-by-entity to the CategoryModel.used-by subscribers set for the specified category. If the used-by-entity is already in the set, then this becomes an idempotent no-op. To invoke this command, you need the modify CategoryModel.used-by privilege on the category.

Options

Option Name Type Required Description
category‑id string Yes The identifier of the input category. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Category.
used‑by‑entity string Yes The name of the user to be added to the CategoryModel.used-by set.

Example

dcli com vmware cis tagging category addtousedby --category-id testId --used-by-entity testString


RemoveFromUsedBy Command

dcli com vmware cis tagging category removefromusedby

Description

Removes the used-by-entity from the CategoryModel.used-by subscribers set. If the used-by-entity is not using this category, then this becomes a no-op. To invoke this command, you need the modify CategoryModel.used-by privilege on the category.

Options

Option Name Type Required Description
category‑id string Yes The identifier of the input category. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Category.
used‑by‑entity string Yes The name of the user to be removed from the CategoryModel.used-by set.

Example

dcli com vmware cis tagging category removefromusedby --category-id testId --used-by-entity testString


RevokePropagatingPermissions Command

dcli com vmware cis tagging category revokepropagatingpermissions

Description

Revokes all propagating permissions on the given category. You should then attach a direct permission with tagging privileges on the given category. To invoke this command, you need category related privileges (direct or propagating) on the concerned category.

Options

Option Name Type Required Description
category‑id string Yes The identifier of the input category. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Category.

Example

dcli com vmware cis tagging category revokepropagatingpermissions --category-id testId