Class: Com::Vmware::Cis::Tagging::Category

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::Category`` class provides methods to create, read, update, delete, and enumerate categories.

Defined Under Namespace

Classes: CreateSpec, UpdateSpec

Instance Method Summary (collapse)

Constructor Details

- (Category) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



161
162
163
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 161

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

Instance Method Details

- (Void) add_to_used_by(category_id, used_by_entity)

Adds the ``used_by_entity`` to the :attr:`Com::Vmware::Cis::Tagging::CategoryModel.used_by` subscribers set for the specified category. If the ``used_by_entity`` is already in the set , then this becomes an idempotent no-op. To invoke this method , you need the modify :attr:`Com::Vmware::Cis::Tagging::CategoryModel.used_by` privilege on the category.

Parameters:

  • category_id (String)

    The identifier of the input category.

  • used_by_entity (String)

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

Returns:

  • (Void)

Raises:



274
275
276
277
278
279
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 274

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

- (String) create(create_spec)

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

Parameters:

Returns:

  • (String)

    The identifier of the created category.

Raises:



178
179
180
181
182
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 178

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

- (Void) delete(category_id)

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

Parameters:

  • category_id (String)

    The identifier of category to be deleted.

Returns:

  • (Void)

Raises:



234
235
236
237
238
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 234

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

- (Com::Vmware::Cis::Tagging::CategoryModel) get(category_id)

Fetches the category information for the given category identifier. In order to view the category information, you need the read privilege on the category.

Parameters:

  • category_id (String)

    The identifier of the input category.

Returns:

Raises:



195
196
197
198
199
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 195

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

- (Array<String>) list

Enumerates the categories in the system. To invoke this method , you need the read privilege on the individual categories. The list will only contain those categories for which you have read privileges.

Returns:

  • (Array<String>)

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



245
246
247
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 245

def list()
    invoke_with_info(@@list_info)
end

- (Array<String>) list_used_categories(used_by_entity)

Enumerates all categories for which the ``used_by_entity`` is part of the :attr:`Com::Vmware::Cis::Tagging::CategoryModel.used_by` subscribers set . To invoke this method , you need the read privilege on the individual categories.

Parameters:

  • used_by_entity (String)

    The field on which the results will be filtered.

Returns:

  • (Array<String>)

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



256
257
258
259
260
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 256

def list_used_categories(used_by_entity)
    invoke_with_info(@@list_used_categories_info, {
        'used_by_entity' => used_by_entity,
    })
end

- (Void) remove_from_used_by(category_id, used_by_entity)

Removes the ``used_by_entity`` from the :attr:`Com::Vmware::Cis::Tagging::CategoryModel.used_by` subscribers set . If the ``used_by_entity`` is not using this category, then this becomes a no-op. To invoke this method , you need the modify :attr:`Com::Vmware::Cis::Tagging::CategoryModel.used_by` privilege on the category.

Parameters:

  • category_id (String)

    The identifier of the input category.

  • used_by_entity (String)

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

Returns:

  • (Void)

Raises:



293
294
295
296
297
298
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 293

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

- (Void) revoke_propagating_permissions(category_id)

Revokes all propagating permissions on the given category. You should then attach a direct permission with tagging privileges on the given category. To invoke this method , you need category related privileges (direct or propagating) on the concerned category.

Parameters:

  • category_id (String)

    The identifier of the input category.

Returns:

  • (Void)

Raises:



310
311
312
313
314
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 310

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

- (Void) update(category_id, update_spec)

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

Parameters:

Returns:

  • (Void)

Raises:



217
218
219
220
221
222
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/cis/tagging.rb', line 217

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