This example shows how to use a datastore backing for a content library.

For more information about storing the contents of a local library, see Content Library Storage.

 use Com::Vmware::Content::Library;

# Create a StorageBacking instance of datastore type.
my $library_backing = new
   Com::Vmware::Content::Library::StorageBacking();
$library_backing->set_type(
   Com::Vmware::Content::Library::StorageBacking::Type::DATASTORE);

# Pass the value of the datastore managed object reference.
$library_backing->set_datastore_id('datastore-123');
my $library_model = new
   Com::Vmware::Content::LibraryModel();
$library_model->set_name('AcmeLibrary');
$library_model->set_storage_backings([library_backing]);