Class: Com::Vmware::Cis::Tagging::Tag

Inherits:
VAPI::Bindings::VapiService
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb

Overview

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

Defined Under Namespace

Classes: CreateSpec, UpdateSpec

Instance Method Summary (collapse)

Constructor Details

- (Tag) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



581
582
583
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 581

def initialize(config)
    super(config, @@service_info)
end

Instance Method Details

- (Void) add_to_used_by(tag_id, used_by_entity)

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 (String)

    The identifier of the input tag.

  • used_by_entity (String)

    The name of the user to be added to the :attr:`Com::Vmware::Cis::Tagging::TagModel.used_by` set .

Returns:

  • (Void)

Raises:



713
714
715
716
717
718
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 713

def add_to_used_by(tag_id, used_by_entity)
    invoke_with_info(@@add_to_used_by_info, {
        'tag_id' => tag_id,
        'used_by_entity' => used_by_entity,
    })
end

- (String) create(create_spec)

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

Parameters:

Returns:

  • (String)

    The identifier of the created tag.

Raises:



600
601
602
603
604
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 600

def create(create_spec)
    invoke_with_info(@@create_info, {
        'create_spec' => create_spec,
    })
end

- (Void) delete(tag_id)

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

Parameters:

  • tag_id (String)

    The identifier of the input tag.

Returns:

  • (Void)

Raises:



656
657
658
659
660
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 656

def delete(tag_id)
    invoke_with_info(@@delete_info, {
        'tag_id' => tag_id,
    })
end

- (Com::Vmware::Cis::Tagging::TagModel) get(tag_id)

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 (String)

    The identifier of the input tag.

Returns:

Raises:



617
618
619
620
621
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 617

def get(tag_id)
    invoke_with_info(@@get_info, {
        'tag_id' => tag_id,
    })
end

- (Array<String>) 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.

Returns:

  • (Array<String>)

    The list of resource identifiers for the tags in the system.



667
668
669
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 667

def list()
    invoke_with_info(@@list_info)
end

- (Array<String>) list_tags_for_category(category_id)

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 (String)

    The identifier of the input category.

Returns:

  • (Array<String>)

    The list of resource identifiers for the tags in the given input category.

Raises:



695
696
697
698
699
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 695

def list_tags_for_category(category_id)
    invoke_with_info(@@list_tags_for_category_info, {
        'category_id' => category_id,
    })
end

- (Array<String>) list_used_tags(used_by_entity)

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 (String)

    The field on which the results will be filtered.

Returns:

  • (Array<String>)

    The list of resource identifiers for the tags in the system that are used by ``used_by_entity`` .



678
679
680
681
682
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 678

def list_used_tags(used_by_entity)
    invoke_with_info(@@list_used_tags_info, {
        'used_by_entity' => used_by_entity,
    })
end

- (Void) remove_from_used_by(tag_id, used_by_entity)

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 (String)

    The identifier of the input tag.

  • used_by_entity (String)

    The name of the user to be removed from the :attr:`Com::Vmware::Cis::Tagging::TagModel.used_by` set .

Returns:

  • (Void)

Raises:



732
733
734
735
736
737
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 732

def remove_from_used_by(tag_id, used_by_entity)
    invoke_with_info(@@remove_from_used_by_info, {
        'tag_id' => tag_id,
        'used_by_entity' => used_by_entity,
    })
end

- (Void) revoke_propagating_permissions(tag_id)

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 (String)

    The identifier of the input tag.

Returns:

  • (Void)

Raises:



749
750
751
752
753
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 749

def revoke_propagating_permissions(tag_id)
    invoke_with_info(@@revoke_propagating_permissions_info, {
        'tag_id' => tag_id,
    })
end

- (Void) update(tag_id, update_spec)

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

Parameters:

Returns:

  • (Void)

Raises:



639
640
641
642
643
644
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 639

def update(tag_id, update_spec)
    invoke_with_info(@@update_info, {
        'tag_id' => tag_id,
        'update_spec' => update_spec,
    })
end