Access a
vSphere
Automation
Service
vSphere
Automation
Service To access a
vSphere
Automation
service, you must have a valid session connection. The sequence for accessing a
vSphere
Automation
service includes creating a protocol connection object and using it to create
the service stub.
Establish a connection to the
vSphere
Automation
Endpoint URL. For more information about the authentication mechanisms that you
can use, see
Authentication Mechanisms.
- Create a protocol factory object.
- Create a protocol connection object to access an API provider.ThevSphere AutomationAPI clients useApiProviderinstances to invoke operations on services running in the virtual environment. To invoke an operation, you must specify the target service and operation, input parameters, and execution context.
- Create aStubFactoryobject by using theApiProviderinstance.
- Create aStubConfigurationinstance and set the security context to be used for the service stub.
- Create the stub for thevSphere Automationservice interface by calling the create method of theStubFactoryinstance. Pass the service class and theStubConfigurationinstance as arguments.