List Guest Environment
Reads a list of environment variables from the guest operating system. If the authentication uses Credentials.interactive-session, then the environment being read will be that of the user logged into the desktop. Otherwise it’s the environment of the system user.
if you do not have all of the privileges described as follows: - The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.GuestOperations.Query.
Request
URLURL
Path Parameters
Path Parameters
Virtual machine to perform the operation on. The parameter must be an identifier for the resource type: VirtualMachine.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"credentials": {
"interactive_session": false,
"type": "USERNAME_PASSWORD"
},
"names": [
"string"
]
}
The names of the variables to be read. If the set is empty, then all the environment variables are returned.
Authentication
Response
Response BodyResponse Body
map
of
string
of type application/json
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.
Errors
com.vmware.vapi.std.errors.unsupported : if the operation is not supported by the VMware tools in the guest OS. if the operation is disabled by the VMware tools in the guest OS. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the virtual machine vm is not running.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: list