Class: Com::Vmware::Cis::Tagging::TagAssociation
- Inherits:
-
VAPI::Bindings::VapiService
- Object
- VAPI::Bindings::VapiService
- Com::Vmware::Cis::Tagging::TagAssociation
- Defined in:
- /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb
Overview
The ``Com::Vmware::Cis::Tagging::TagAssociation`` class provides methods to attach, detach, and query tags.
Defined Under Namespace
Classes: BatchResult, ObjectToTags, TagToObjects
Instance Method Summary (collapse)
-
- (Void) attach(tag_id, object_id)
Attaches the given tag to the input object.
-
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) attach_multiple_tags_to_object(object_id, tag_ids)
Attaches the given tags to the input object.
-
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) attach_tag_to_multiple_objects(tag_id, object_ids)
Attaches the given tag to the input objects.
-
- (Void) detach(tag_id, object_id)
Detaches the tag from the given object.
-
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) detach_multiple_tags_from_object(object_id, tag_ids)
Detaches the given tags from the input object.
-
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) detach_tag_from_multiple_objects(tag_id, object_ids)
Detaches the given tag from the input objects.
-
- (TagAssociation) initialize(config)
constructor
Constructs a new instance.
-
- (Array<String>) list_attachable_tags(object_id)
Fetches the list of attachable tags for the given object, omitting the tags that have already been attached.
-
- (Array<Com::Vmware::Vapi::Std::DynamicID>) list_attached_objects(tag_id)
Fetches the list of attached objects for the given tag.
-
- (Array<Com::Vmware::Cis::Tagging::TagAssociation::TagToObjects>) list_attached_objects_on_tags(tag_ids)
Fetches the list of :class:`Com::Vmware::Cis::Tagging::TagAssociation::TagToObjects` describing the input tag identifiers and the objects they are attached to.
-
- (Array<String>) list_attached_tags(object_id)
Fetches the list of tags attached to the given object.
-
- (Array<Com::Vmware::Cis::Tagging::TagAssociation::ObjectToTags>) list_attached_tags_on_objects(object_ids)
Fetches the list of :class:`Com::Vmware::Cis::Tagging::TagAssociation::ObjectToTags` describing the input object identifiers and the tags attached to each object.
Constructor Details
- (TagAssociation) initialize(config)
Constructs a new instance.
1013 1014 1015 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1013 def initialize(config) super(config, @@service_info) end |
Instance Method Details
- (Void) attach(tag_id, object_id)
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.
1031 1032 1033 1034 1035 1036 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1031 def attach(tag_id, object_id) invoke_with_info(@@attach_info, { 'tag_id' => tag_id, 'object_id' => object_id, }) end |
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) attach_multiple_tags_to_object(object_id, tag_ids)
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.
1049 1050 1051 1052 1053 1054 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1049 def (object_id, tag_ids) invoke_with_info(@@attach_multiple_tags_to_object_info, { 'object_id' => object_id, 'tag_ids' => tag_ids, }) end |
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) attach_tag_to_multiple_objects(tag_id, object_ids)
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.
1069 1070 1071 1072 1073 1074 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1069 def attach_tag_to_multiple_objects(tag_id, object_ids) invoke_with_info(@@attach_tag_to_multiple_objects_info, { 'tag_id' => tag_id, 'object_ids' => object_ids, }) end |
- (Void) detach(tag_id, object_id)
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.
1088 1089 1090 1091 1092 1093 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1088 def detach(tag_id, object_id) invoke_with_info(@@detach_info, { 'tag_id' => tag_id, 'object_id' => object_id, }) end |
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) detach_multiple_tags_from_object(object_id, tag_ids)
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.
1106 1107 1108 1109 1110 1111 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1106 def (object_id, tag_ids) invoke_with_info(@@detach_multiple_tags_from_object_info, { 'object_id' => object_id, 'tag_ids' => tag_ids, }) end |
- (Com::Vmware::Cis::Tagging::TagAssociation::BatchResult) detach_tag_from_multiple_objects(tag_id, object_ids)
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.
1126 1127 1128 1129 1130 1131 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1126 def detach_tag_from_multiple_objects(tag_id, object_ids) invoke_with_info(@@detach_tag_from_multiple_objects_info, { 'tag_id' => tag_id, 'object_ids' => object_ids, }) end |
- (Array<String>) list_attachable_tags(object_id)
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.
1200 1201 1202 1203 1204 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1200 def (object_id) invoke_with_info(@@list_attachable_tags_info, { 'object_id' => object_id, }) end |
- (Array<Com::Vmware::Vapi::Std::DynamicID>) list_attached_objects(tag_id)
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.
1144 1145 1146 1147 1148 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1144 def list_attached_objects(tag_id) invoke_with_info(@@list_attached_objects_info, { 'tag_id' => tag_id, }) end |
- (Array<Com::Vmware::Cis::Tagging::TagAssociation::TagToObjects>) list_attached_objects_on_tags(tag_ids)
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.
1157 1158 1159 1160 1161 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1157 def (tag_ids) invoke_with_info(@@list_attached_objects_on_tags_info, { 'tag_ids' => tag_ids, }) end |
- (Array<String>) list_attached_tags(object_id)
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.
1172 1173 1174 1175 1176 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1172 def (object_id) invoke_with_info(@@list_attached_tags_info, { 'object_id' => object_id, }) end |
- (Array<Com::Vmware::Cis::Tagging::TagAssociation::ObjectToTags>) list_attached_tags_on_objects(object_ids)
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.
1185 1186 1187 1188 1189 |
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 1185 def (object_ids) invoke_with_info(@@list_attached_tags_on_objects_info, { 'object_ids' => object_ids, }) end |