public interface Environment extends Service, EnvironmentTypes
Environment
interface provides methods to manage environment
variables in the guest operating system. This interface was added in vSphere API
7.0.2.0._VAPI_SERVICE_ID
Modifier and Type | Method and Description |
---|---|
java.lang.String |
get(java.lang.String vm,
Credentials credentials,
java.lang.String name)
Reads a single environment variable from the guest operating system.
|
void |
get(java.lang.String vm,
Credentials credentials,
java.lang.String name,
AsyncCallback<java.lang.String> asyncCallback)
Reads a single environment variable from the guest operating system.
|
void |
get(java.lang.String vm,
Credentials credentials,
java.lang.String name,
AsyncCallback<java.lang.String> asyncCallback,
InvocationConfig invocationConfig)
Reads a single environment variable from the guest operating system.
|
java.lang.String |
get(java.lang.String vm,
Credentials credentials,
java.lang.String name,
InvocationConfig invocationConfig)
Reads a single environment variable from the guest operating system.
|
java.util.Map<java.lang.String,java.lang.String> |
list(java.lang.String vm,
Credentials credentials,
java.util.Set<java.lang.String> names)
Reads a list of environment variables from the guest operating system.
|
void |
list(java.lang.String vm,
Credentials credentials,
java.util.Set<java.lang.String> names,
AsyncCallback<java.util.Map<java.lang.String,java.lang.String>> asyncCallback)
Reads a list of environment variables from the guest operating system.
|
void |
list(java.lang.String vm,
Credentials credentials,
java.util.Set<java.lang.String> names,
AsyncCallback<java.util.Map<java.lang.String,java.lang.String>> asyncCallback,
InvocationConfig invocationConfig)
Reads a list of environment variables from the guest operating system.
|
java.util.Map<java.lang.String,java.lang.String> |
list(java.lang.String vm,
Credentials credentials,
java.util.Set<java.lang.String> names,
InvocationConfig invocationConfig)
Reads a list of environment variables from the guest operating system.
|
java.lang.String get(java.lang.String vm, Credentials credentials, java.lang.String name)
If the
authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Synchronous method overload. Result of the invocation will be reported as a method return value.
vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.name
- The name of the environment variable to be read.name
environment variable.NotFound
- if the virtual machine vm
is not found.NotFound
- if the environment variable name
is not not set in the guest operating
system.Unsupported
- if the operation is not supported by the VMware tools in the guest OS.Unsupported
- if the operation is disabled by the VMware tools in the guest OS.NotAllowedInCurrentState
- if the virtual machine vm
is not running.ResourceBusy
- if the virtual machine is busy.Unauthenticated
- if the credentials
are not valid.ServiceUnavailable
- if the VMware tools are not running.Unauthorized
- if you do not have all of the privileges described as follows: VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. java.lang.String get(java.lang.String vm, Credentials credentials, java.lang.String name, InvocationConfig invocationConfig)
If the
authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.name
- The name of the environment variable to be read.invocationConfig
- Configuration for the method invocation.name
environment variable.NotFound
- if the virtual machine vm
is not found.NotFound
- if the environment variable name
is not not set in the guest operating
system.Unsupported
- if the operation is not supported by the VMware tools in the guest OS.Unsupported
- if the operation is disabled by the VMware tools in the guest OS.NotAllowedInCurrentState
- if the virtual machine vm
is not running.ResourceBusy
- if the virtual machine is busy.Unauthenticated
- if the credentials
are not valid.ServiceUnavailable
- if the VMware tools are not running.Unauthorized
- if you do not have all of the privileges described as follows: VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. void get(java.lang.String vm, Credentials credentials, java.lang.String name, AsyncCallback<java.lang.String> asyncCallback)
If the
authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
The value of the name
environment variable.
Operation Errors:
NotFound
- if the virtual machine vm
is not found.
NotFound
- if the environment variable name
is not not set in the guest operating
system.
Unsupported
- if the operation is not supported by the VMware tools in the guest OS.
Unsupported
- if the operation is disabled by the VMware tools in the guest OS.
NotAllowedInCurrentState
- if the virtual machine vm
is not running.
ResourceBusy
- if the virtual machine is busy.
Unauthenticated
- if the credentials
are not valid.
ServiceUnavailable
- if the VMware tools are not running.
Unauthorized
- if you do not have all of the privileges described as follows:
VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.name
- The name of the environment variable to be read.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void get(java.lang.String vm, Credentials credentials, java.lang.String name, AsyncCallback<java.lang.String> asyncCallback, InvocationConfig invocationConfig)
If the
authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation Result:
The value of the name
environment variable.
Operation Errors:
NotFound
- if the virtual machine vm
is not found.
NotFound
- if the environment variable name
is not not set in the guest operating
system.
Unsupported
- if the operation is not supported by the VMware tools in the guest OS.
Unsupported
- if the operation is disabled by the VMware tools in the guest OS.
NotAllowedInCurrentState
- if the virtual machine vm
is not running.
ResourceBusy
- if the virtual machine is busy.
Unauthenticated
- if the credentials
are not valid.
ServiceUnavailable
- if the VMware tools are not running.
Unauthorized
- if you do not have all of the privileges described as follows:
VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.name
- The name of the environment variable to be read.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.java.util.Map<java.lang.String,java.lang.String> list(java.lang.String vm, Credentials credentials, java.util.Set<java.lang.String> names)
If
the authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Synchronous method overload. Result of the invocation will be reported as a method return value.
vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.names
- The names of the variables to be read. If the Set
is empty,
then all the environment variables are returned.names
is not set, then nothing is returned for
that variable.NotFound
- if the virtual machine vm
is not found.Unsupported
- if the operation is not supported by the VMware tools in the guest OS.Unsupported
- if the operation is disabled by the VMware tools in the guest OS.NotAllowedInCurrentState
- if the virtual machine vm
is not running.ResourceBusy
- if the virtual machine is busy.Unauthenticated
- if the credentials
are not valid.ServiceUnavailable
- if the VMware tools are not running.Unauthorized
- if you do not have all of the privileges described as follows: VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. java.util.Map<java.lang.String,java.lang.String> list(java.lang.String vm, Credentials credentials, java.util.Set<java.lang.String> names, InvocationConfig invocationConfig)
If
the authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Synchronous method overload. Result of the invocation will be
reported as a method return value.
Use invocationConfig
to specify configuration for this particular invocation.
vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.names
- The names of the variables to be read. If the Set
is empty,
then all the environment variables are returned.invocationConfig
- Configuration for the method invocation.names
is not set, then nothing is returned for
that variable.NotFound
- if the virtual machine vm
is not found.Unsupported
- if the operation is not supported by the VMware tools in the guest OS.Unsupported
- if the operation is disabled by the VMware tools in the guest OS.NotAllowedInCurrentState
- if the virtual machine vm
is not running.ResourceBusy
- if the virtual machine is busy.Unauthenticated
- if the credentials
are not valid.ServiceUnavailable
- if the VMware tools are not running.Unauthorized
- if you do not have all of the privileges described as follows: VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. void list(java.lang.String vm, Credentials credentials, java.util.Set<java.lang.String> names, AsyncCallback<java.util.Map<java.lang.String,java.lang.String>> asyncCallback)
If
the authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
Mapping from environment variable names to environment variable values, or all
environment variables if nothing is specified. If any specified environment
variable contained in names
is not set, then nothing is returned for
that variable.
Operation Errors:
NotFound
- if the virtual machine vm
is not found.
Unsupported
- if the operation is not supported by the VMware tools in the guest OS.
Unsupported
- if the operation is disabled by the VMware tools in the guest OS.
NotAllowedInCurrentState
- if the virtual machine vm
is not running.
ResourceBusy
- if the virtual machine is busy.
Unauthenticated
- if the credentials
are not valid.
ServiceUnavailable
- if the VMware tools are not running.
Unauthorized
- if you do not have all of the privileges described as follows:
VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.names
- The names of the variables to be read. If the Set
is empty,
then all the environment variables are returned.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void list(java.lang.String vm, Credentials credentials, java.util.Set<java.lang.String> names, AsyncCallback<java.util.Map<java.lang.String,java.lang.String>> asyncCallback, InvocationConfig invocationConfig)
If
the authentication uses Credentials.getInteractiveSession()
, then the
environment being read will be that of the user logged into the desktop.
Otherwise it's the environment of the system user.
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Invocation Result:
Mapping from environment variable names to environment variable values, or all
environment variables if nothing is specified. If any specified environment
variable contained in names
is not set, then nothing is returned for
that variable.
Operation Errors:
NotFound
- if the virtual machine vm
is not found.
Unsupported
- if the operation is not supported by the VMware tools in the guest OS.
Unsupported
- if the operation is disabled by the VMware tools in the guest OS.
NotAllowedInCurrentState
- if the virtual machine vm
is not running.
ResourceBusy
- if the virtual machine is busy.
Unauthenticated
- if the credentials
are not valid.
ServiceUnavailable
- if the VMware tools are not running.
Unauthorized
- if you do not have all of the privileges described as follows:
VirtualMachine
referenced by the parameter vm
requires
VirtualMachine.GuestOperations.Query
. vm
- Virtual machine to perform the operation on.
The parameter must be an identifier for the resource type: VirtualMachine
.credentials
- The guest authentication data. See Credentials
.names
- The names of the variables to be read. If the Set
is empty,
then all the environment variables are returned.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.