|
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
|
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 () |
The Com::Vmware::Cis::Tagging::TagAssociation interface provides methods to attach, detach, and query tags.
| 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.
| 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. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the tag for the given tag_id does not exist in the system. |
| Com::Vmware::Vapi::Std::Errors::InvalidArgument | if 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::Unauthorized | if you do not have the privilege to attach the tag or do not have the privilege to read the object. |
Code:
| 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.
| 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. |
| The | outcome 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 |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the privilege to read the object. |
| 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.
| 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. |
| The | outcome 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 |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the tag for the given tag_id does not exist in the system. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the attach tag privilege on the tag. |
Code:
| 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.
| 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. |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the tag for the given tag_id does not exist in the system. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the privilege to detach the tag or do not have the privilege to read the given object. |
Code:
| 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.
| 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. |
| The | outcome 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 |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the privilege to read the object. |
| 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.
| 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. |
| The | outcome 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 |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the tag for the given tag does not exist in the system. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the attach tag privilege on the tag. |
Code:
| 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.
| object_id | [REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID. |
| The | list 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 |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the privilege to read the object. |
| 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.
| 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. |
| The | list of attached object identifiers. The return type will be Array of Com::Vmware::Vapi::Std::DynamicID |
| Com::Vmware::Vapi::Std::Errors::NotFound | if the tag for the given tag_id does not exist in the system. |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the privilege to read the tag. |
Code:
| 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.
| 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. |
| The | list 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 |
| 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.
| object_id | [REQUIRED] The identifier of the input object. . The value must be Com::Vmware::Vapi::Std::DynamicID. |
| The | list 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 |
| Com::Vmware::Vapi::Std::Errors::Unauthorized | if you do not have the privilege to read the object. |
| 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.
| object_ids | [REQUIRED] The identifiers of the input objects. . The value must be Array of Com::Vmware::Vapi::Std::DynamicID. |
| The | list 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 |
| public method Com::Vmware::Cis::Tagging::TagAssociation::new | ( | ) |
Constructor to initialize the object
| api_provider | - protocol connection to use with stubs created by this factory |
| StubConfig | - Stub's additional configuration |
| Blessed | object |
Code: