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::TagAssociation Class Reference
Inheritance diagram for Com::Vmware::Cis::Tagging::TagAssociation:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  BatchResult
 
class  ObjectToTags
 
class  TagToObjects
 

Avaliable Methods

public method list_attached_tags_on_objects ()
 
public method list_attached_tags ()
 
public method detach ()
 
public method list_attached_objects ()
 
public method attach_multiple_tags_to_object ()
 
public method list_attached_objects_on_tags ()
 
public method attach_tag_to_multiple_objects ()
 
public method list_attachable_tags ()
 
public method new ()
 
public method attach ()
 
public method detach_multiple_tags_from_object ()
 
public method detach_tag_from_multiple_objects ()
 

Detailed Description

The Com::Vmware::Cis::Tagging::TagAssociation interface provides methods to attach, detach, and query tags.

Member Function Documentation

public method Com::Vmware::Cis::Tagging::TagAssociation::attach ( )

Attaches the given tag to the input object. The tag needs to meet the cardinality ( :attr:Com::Vmware::Cis::Tagging::CategoryModel.cardinality ) and associability ( :attr:Com::Vmware::Cis::Tagging::CategoryModel.associable_types ) criteria in order to be eligible for attachment. If the tag is already attached to the object, then this method* is a no-op and an error will not be thrown. To invoke this method , you need the attach tag privilege on the tag and the read privilege on the object.

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.
object_id[REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID.
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::InvalidArgumentif the input tag is not eligible to be attached to this object or if the object_id is not valid.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to attach the tag or do not have the privilege to read the object.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::attach_multiple_tags_to_object ( )

Attaches the given tags to the input object. If a tag is already attached to the object, then the individual method is a no-op and an error will not be added to :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages . To invoke this method , you need the read privilege on the object and the attach tag privilege on each tag.

Parameters
object_id[REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID.
tag_ids[REQUIRED] The identifiers of the input tags. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be Array of str.
Return values
Theoutcome of the batch method and the list of error messages ( :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages ) describing attachment failures. The return type will be Com::Vmware::Cis::Tagging::TagAssociation::BatchResult
Exceptions
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to read the object.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::attach_tag_to_multiple_objects ( )

Attaches the given tag to the input objects. If a tag is already attached to the object, then the individual method is a no-op and an error will not be added to :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages . To invoke this method , you need the attach tag privilege on the tag and the read privilege on each object.

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.
object_ids[REQUIRED] The identifiers of the input objects. . The value must be Array of Com::Vmware::Vapi::Std::DynamicID.
Return values
Theoutcome of the batch method and the list of error messages ( :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages ) describing attachment failures. The return type will be Com::Vmware::Cis::Tagging::TagAssociation::BatchResult
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 attach tag privilege on the tag.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::detach ( )

Detaches the tag from the given object. If the tag is already removed from the object, then this method is a no-op and an error will not be thrown. To invoke this method , you need the attach tag privilege on the tag and the read privilege on the object.

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.
object_id[REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID.
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 detach the tag or do not have the privilege to read the given object.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::detach_multiple_tags_from_object ( )

Detaches the given tags from the input object. If a tag is already removed from the object, then the individual method is a no-op and an error will not be added to :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages . To invoke this method , you need the read privilege on the object and the attach tag privilege each tag.

Parameters
object_id[REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID.
tag_ids[REQUIRED] The identifiers of the input tags. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be Array of str.
Return values
Theoutcome of the batch method and the list of error messages ( :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages ) describing detachment failures. The return type will be Com::Vmware::Cis::Tagging::TagAssociation::BatchResult
Exceptions
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the privilege to read the object.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::detach_tag_from_multiple_objects ( )

Detaches the given tag from the input objects. If a tag is already removed from the object, then the individual method is a no-op and an error will not be added to :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages . To invoke this method , you need the attach tag privilege on the tag and the read privilege on each object.

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.
object_ids[REQUIRED] The identifiers of the input objects. . The value must be Array of Com::Vmware::Vapi::Std::DynamicID.
Return values
Theoutcome of the batch method and the list of error messages ( :attr:Com::Vmware::Cis::Tagging::TagAssociation::BatchResult.error_messages ) describing detachment failures. The return type will be Com::Vmware::Cis::Tagging::TagAssociation::BatchResult
Exceptions
Com::Vmware::Vapi::Std::Errors::NotFoundif the tag for the given tag does not exist in the system.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif you do not have the attach tag privilege on the tag.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::list_attachable_tags ( )

Fetches the list of attachable tags for the given object, omitting the tags that have already been attached. Criteria for attachability is calculated based on tagging cardinality ( :attr:Com::Vmware::Cis::Tagging::CategoryModel.cardinality ) and associability ( :attr:Com::Vmware::Cis::Tagging::CategoryModel.associable_types ) constructs. To invoke this method , you need the read privilege on the input object. The list will only contain those tags for which you have read privileges.

Parameters
object_id[REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID.
Return values
Thelist of tag identifiers that are eligible to be attached to the given object. 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::Unauthorizedif you do not have the privilege to read the object.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::list_attached_objects ( )

Fetches the list of attached objects for the given tag. To invoke this method , you need the read privilege on the input tag. Only those objects for which you have the read privilege will be returned.

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
Thelist of attached object identifiers. The return type will be Array of Com::Vmware::Vapi::Std::DynamicID
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 read the tag.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::list_attached_objects_on_tags ( )

Fetches the list of class Com::Vmware::Cis::Tagging::TagAssociation::TagToObjects describing the input tag identifiers and the objects they are attached to. To invoke this method* , you need the read privilege on each input tag. The :attr:Com::Vmware::Cis::Tagging::TagAssociation::TagToObjects.object_ids will only contain those objects for which you have the read privilege.

Parameters
tag_ids[REQUIRED] The identifiers of the input tags. The value must be an identifier for the resource type getQualifiedName(com.vmware.cis.tagging.Tag). . The value must be Array of str.
Return values
Thelist of the tag identifiers to all object identifiers that each tag is attached to. The return type will be Array of Com::Vmware::Cis::Tagging::TagAssociation::TagToObjects
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::list_attached_tags ( )

Fetches the list of tags attached to the given object. To invoke this method , you need the read privilege on the input object. The list will only contain those tags for which you have the read privileges.

Parameters
object_id[REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID.
Return values
Thelist of all tag identifiers that correspond to the tags attached to the given object. 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::Unauthorizedif you do not have the privilege to read the object.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::list_attached_tags_on_objects ( )

Fetches the list of class Com::Vmware::Cis::Tagging::TagAssociation::ObjectToTags describing the input object identifiers and the tags attached to each object. To invoke this method , you need the read privilege on each input object. The :attr:Com::Vmware::Cis::Tagging::TagAssociation::ObjectToTags.tag_ids will only contain those tags for which you have the read privilege.

Parameters
object_ids[REQUIRED] The identifiers of the input objects. . The value must be Array of Com::Vmware::Vapi::Std::DynamicID.
Return values
Thelist of the object identifiers to all tag identifiers that are attached to that object. The return type will be Array of Com::Vmware::Cis::Tagging::TagAssociation::ObjectToTags
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::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

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