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

Avaliable Methods

public method list_attached_tags ()
 
public method detach ()
 
public method list_attachable_tags ()
 
public method attach ()
 
public method new ()
 
public method list_attached_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. 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 concerned object. The tag needs to pass the cardinality and associability test in order to be eligible for attachment.
Code:
click to view
public method Com::Vmware::Cis::Tagging::TagAssociation::detach ( )

Detaches the tag from the given object. 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 concerned object.
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 read privileges 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_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 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::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: