VMware

Tag Namespace

The Tag namespace provides commands to create, read, update, delete, and enumerate tags.

List of commands:



Create Command

dcli com vmware cis tagging tag create

Description

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

Options

Option Name Type Required Description
name string Yes The display name of the tag. The name must be unique within its category.
description string Yes The description of the tag.
category‑id string Yes The unique identifier of the parent category in which this tag will be created. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.cis.tagging.Category. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.cis.tagging.Category.

Example

dcli com vmware cis tagging tag create --name testString --description testString --category-id testId


Get Command

dcli com vmware cis tagging tag get

Description

Fetches the tag information for the given tag identifier. To invoke this command, you need the read privilege on the tag in order to view the tag info.

Options

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

Example

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


Update Command

dcli com vmware cis tagging tag update

Description

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

Options

Option Name Type Required Description
tag‑id string Yes The identifier of the input tag. The parameter must be an identifier for the resource type: com.vmware.cis.tagging.Tag.
name string No The display name of the tag. If unset the name will not be modified.
description string No The description of the tag. If unset the description will not be modified.

Example

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


Delete Command

dcli com vmware cis tagging tag delete

Description

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

Options

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

Example

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


List Command

dcli com vmware cis tagging tag list

Description

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

Example

dcli com vmware cis tagging tag list


ListUsedTags Command

dcli com vmware cis tagging tag listusedtags

Description

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

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 tag listusedtags --used-by-entity testString


ListTagsForCategory Command

dcli com vmware cis tagging tag listtagsforcategory

Description

Enumerates all tags for the given category. To invoke this command, you need the read privilege on the given category and the individual tags in that 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 tag listtagsforcategory --category-id testId


AddToUsedBy Command

dcli com vmware cis tagging tag addtousedby

Description

Adds the used-by-entity to the TagModel.used-by subscribers set. If the used-by-entity is already in the set, then this becomes a no-op. To invoke this command, you need the modify TagModel.used-by privilege on the tag.

Options

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

Example

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


RemoveFromUsedBy Command

dcli com vmware cis tagging tag removefromusedby

Description

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

Options

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

Example

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


RevokePropagatingPermissions Command

dcli com vmware cis tagging tag revokepropagatingpermissions

Description

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

Options

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

Example

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