VMware vSphere Automation SDK Perl
The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities
 All Classes Files Functions
Classes | List of all members
Com::Vmware::Cis::Tagging::Tag Class Reference
Inheritance diagram for Com::Vmware::Cis::Tagging::Tag:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  CreateSpec
 
class  UpdateSpec
 

Avaliable Methods

public method remove_from_used_by ()
 
public method create ()
 
public method revoke_propagating_permissions ()
 
public method list_used_tags ()
 
public method add_to_used_by ()
 
public method get ()
 
public method delete ()
 
public method new ()
 
public method update ()
 
public method list_tags_for_category ()
 
public method list ()
 

Detailed Description

The Com::Vmware::Cis::Tagging::Tag interface provides methods to create, read, update, delete, and enumerate tags.

Member Function Documentation

public method Com::Vmware::Cis::Tagging::Tag::add_to_used_by ( )

Adds the used_by_entity to the :attr:Com::Vmware::Cis::Tagging::TagModel.used_by subscribers set . If the used_by_entity is already in the set , then this becomes a no-op. To invoke this method , you need the modify :attr:Com::Vmware::Cis::Tagging::TagModel.used_by privilege on the tag.

Parameters
tag_id[REQUIRED] The identifier of the input tag. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be str.
used_by_entity[REQUIRED] The name of the user to be added to the :attr:Com::Vmware::Cis::Tagging::TagModel.used_by set . . The value must be String.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the tag for the given tag_id does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to add an entity to the :attr:Com::Vmware::Cis::Tagging::TagModel.used_by field.
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::create ( )

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

Parameters
create_spec[REQUIRED] Specification for the new tag to be created. . The value must be Com::Vmware::Cis::Tagging::Tag::CreateSpec.
Return values
Theidentifier of the created tag. The value will be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). The return type will be str
Exceptions
Com::Vmware::Vapi::Std::Errors::AlreadyExistsif the :attr:Com::Vmware::Cis::Tagging::Tag::CreateSpec.name provided in the create_spec is the name of an already existing tag in the input category.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif any of the input information in the create_spec is invalid.
Com::Vmware::Vapi::Std::Errors::NotFoundif the category for in the given create_spec does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to create tag.
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::delete ( )

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

Parameters
tag_id[REQUIRED] The identifier of the input tag. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the tag for the given tag_id does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to delete the tag.
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::get ( )

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

Parameters
tag_id[REQUIRED] The identifier of the input tag. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be str.
Return values
Theclass Com::Vmware::Cis::Tagging::TagModel that corresponds to tag_id . The return type will be Com::Vmware::Cis::Tagging::TagModel
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the tag for the given tag_id does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user does not have the privilege to read the tag.
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::list ( )

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

Return values
Thelist of resource identifiers for the tags in the system. The value will be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). The return type will be Array of str
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::list_tags_for_category ( )

Enumerates all tags for the given category. To invoke this method , you need the read privilege on the given category and the individual tags in that category.

Parameters
category_id[REQUIRED] The identifier of the input category. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Category). . The value must be str.
Return values
Thelist of resource identifiers for the tags in the given input category. The value will be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). The return type will be Array of str
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the category for the given category_id does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to read the category.
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::list_used_tags ( )

Enumerates all tags for which the used_by_entity is part of the :attr:Com::Vmware::Cis::Tagging::TagModel.used_by subscribers set . To invoke this method* , you need the read privilege on the individual tags.

Parameters
used_by_entity[REQUIRED] The field on which the results will be filtered. . The value must be String.
Return values
Thelist of resource identifiers for the tags in the system that are used by used_by_entity . The value will be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). The return type will be Array of str
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::new ( )

Constructor to initialize the object

Parameters
api_provider- protocol connection to use with stubs created by this factory
StubConfig- Stub's additional configuration
Return values
Blessedobject
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::remove_from_used_by ( )

Removes the used_by_entity from the :attr:Com::Vmware::Cis::Tagging::TagModel.used_by subscribers set. If the used_by_entity is not using this tag, then this becomes a no-op. To invoke this method* , you need modify :attr:Com::Vmware::Cis::Tagging::TagModel.used_by privilege on the tag.

Parameters
tag_id[REQUIRED] The identifier of the input tag. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be str.
used_by_entity[REQUIRED] The name of the user to be removed from the :attr:Com::Vmware::Cis::Tagging::TagModel.used_by set . . The value must be String.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the tag for the given tag_id does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to remove an entity from the :attr:Com::Vmware::Cis::Tagging::TagModel.used_by field.
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::revoke_propagating_permissions ( )

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 method , you need tag related privileges (direct or propagating) on the concerned tag.

Parameters
tag_id[REQUIRED] The identifier of the input tag. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the tag for the given tag_id does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to revoke propagating permissions on the tag.
Code:
click to view
public method Com::Vmware::Cis::Tagging::Tag::update ( )

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

Parameters
tag_id[REQUIRED] The identifier of the input tag. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be str.
update_spec[REQUIRED] Specification to update the tag. . The value must be Com::Vmware::Cis::Tagging::Tag::UpdateSpec.
Exceptions
Com::Vmware::Vapi::Std::Errors::AlreadyExistsif the :attr:Com::Vmware::Cis::Tagging::Tag::UpdateSpec.name provided in the update_spec is the name of an already existing tag in the same category.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif any of the input information in the update_spec is invalid.
Com::Vmware::Vapi::Std::Errors::NotFoundif the tag for the given tag_id does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to update the tag.
Code:
click to view

The documentation for this class was generated from the following file: