Retrieve Service
Endpoints on
vCenter
Server
Instances
vCenter
Server
InstancesYou can create a
function that obtains the endpoint URLs of a service on all
vCenter
Server
instances in the environment. You can modify that function to obtain the
endpoint URL of a service on a particular
vCenter
Server
instance.
- Establish a connection with the Lookup Service.
- Retrieve a service registration object.
- Create a registration filter object, which contains the following parts:
- A filter criterion for service information
- A filter criterion for endpoint information
OptionDescriptionOmit the node ID parameterRetrieves the endpoint URLs of the service on allvCenter Serverinstances.Include the node ID parameterRetrieves the endpoint URL of the service on a particularvCenter Serverinstance. - Retrieve the specified service information by using theList()function.
Depending on whether you
included the node ID parameter, the
List()
function returns one of the following results:
- A list of endpoint URLs for a service that is hosted on allvCenter Serverinstances in the environment.
- An endpoint URL of a service that runs on a particularvCenter Serverinstance.
Call the function that you
implemented to retrieve service endpoints. You can pass different filter
parameters depending on the service endpoints that you need. For more
information, see
Filter Parameters for Predefined Service Endpoints.
To retrieve a service endpoint
on a particular
vCenter
Server
instance, you must retrieve the node ID of that instance and pass it to the
function. For information about how to retrieve the ID of a
vCenter
Server
instance, see
Retrieve a vCenter Server ID by Using the Lookup Service.