Class: Com::Vmware::Content::SubscribedLibrary

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

Defined Under Namespace

Classes: ProbeResult

Instance Method Summary (collapse)

Constructor Details

- (SubscribedLibrary) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



587
588
589
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content.rb', line 587

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

Instance Method Details

- (String) create(create_spec, client_token = nil)

Creates a new subscribed library.


 Once created, the subscribed library will be empty. If the   :attr:`Com::Vmware::Content::LibraryModel.subscription_info`   property is set, the Content Library Service will attempt to synchronize to the remote source. This is an asynchronous operation so the content of the published library may not immediately appear.

    If not specified creation is not idempotent.

Parameters:

  • client_token (String, nil) (defaults to: nil)

    Unique token generated on the client for each creation request. The token should be a universally unique identifier (UUID), for example: ``b8a2a2e3-2314-43cd-a871-6ede0f429751`` . This token can be used to guarantee idempotent creation.

  • create_spec (Com::Vmware::Content::LibraryModel)

    Specification for the new subscribed library.

Returns:

  • (String)

    Identifier of the newly created subscribed library.

Raises:



611
612
613
614
615
616
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content.rb', line 611

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

- (Void) delete(library_id)

Deletes the specified subscribed library.


 Deleting a subscribed library will remove the entry immediately and begin an asynchronous task to remove all cached content for the library. If the asynchronous task fails, file content may remain on the storage backing. This content will require manual removal.

Parameters:

  • library_id (String)

    Identifier of the subscribed library to delete.

Returns:

  • (Void)

Raises:



630
631
632
633
634
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content.rb', line 630

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

- (Void) evict(library_id)

Evicts the cached content of an on-demand subscribed library.


 This  method  allows the cached content of a subscribed library to be removed to free up storage capacity. This  method  will only work when a subscribed library is synchronized on-demand.

Parameters:

  • library_id (String)

    Identifier of the subscribed library whose content should be evicted.

Returns:

  • (Void)

Raises:



650
651
652
653
654
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content.rb', line 650

def evict(library_id)
    invoke_with_info(@@evict_info, {
        'library_id' => library_id,
    })
end

- (Com::Vmware::Content::LibraryModel) get(library_id)

Returns a given subscribed library.

Parameters:

  • library_id (String)

    Identifier of the subscribed library to return.

Returns:

Raises:



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

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

- (Array<String>) list

Returns the identifiers of all subscribed libraries in the Content Library.

Returns:

  • (Array<String>)

    The list of identifiers of all subscribed libraries in the Content Library.



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

def list()
    invoke_with_info(@@list_info)
end

- (Com::Vmware::Content::SubscribedLibrary::ProbeResult) probe(subscription_info)

Probes remote library subscription information, including URL, SSL certificate and password. The resulting :class:`Com::Vmware::Content::SubscribedLibrary::ProbeResult` class describes whether or not the subscription configuration is successful.

Parameters:

Returns:



738
739
740
741
742
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content.rb', line 738

def probe(subscription_info)
    invoke_with_info(@@probe_info, {
        'subscription_info' => subscription_info,
    })
end

- (Void) sync(library_id)

Forces the synchronization of the subscribed library.


 Synchronizing a subscribed library forcefully with this  method  will perform the same synchronization behavior as would run periodically for the library. The   :attr:`Com::Vmware::Content::Library::SubscriptionInfo.on_demand`   setting is respected. Calling this  method  on a library that is already in the process of synchronizing will have no effect.

Parameters:

  • library_id (String)

    Identifier of the subscribed library to synchronize.

Returns:

  • (Void)

Raises:



698
699
700
701
702
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content.rb', line 698

def sync(library_id)
    invoke_with_info(@@sync_info, {
        'library_id' => library_id,
    })
end

- (Void) update(library_id, update_spec)

Updates the properties of a subscribed library.


 This is an incremental update to the subscribed library.  Fields  that are  nil  in the update specification will be left unchanged.

Parameters:

  • library_id (String)

    Identifier of the subscribed library to update.

  • update_spec (Com::Vmware::Content::LibraryModel)

    Specification of the new property values to set on the subscribed library.

Returns:

  • (Void)

Raises:



724
725
726
727
728
729
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content.rb', line 724

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