Java Example of Retrieving a List of All Local Libraries with a Specific Name
This example retrieves a list of all local libraries with the name AcmeLibrary that exist in your virtual environment.
Note: For related code samples, see the
vsphere-automation-sdk-java VMware repository at GitHub.
... // Create a FindSpec instance to set your search criteria. FindSpec findSpec = new FindSpec(); // Filter the local content libraries by using a library name. findSpec.setName("AcmeLibrary"); findSpec.setType(LibraryType.LOCAL); List<String> ids = libraryService.find(findSpec);