public interface Power extends Service, PowerTypes
Power
interface provides methods for managing the guest operating
system power state of a virtual machine. This interface was added in vSphere API
6.7.PowerTypes.Info, PowerTypes.State
_VAPI_SERVICE_ID
Modifier and Type | Method and Description |
---|---|
PowerTypes.Info |
get(java.lang.String vm)
Returns information about the guest operating system power state.
|
void |
get(java.lang.String vm,
AsyncCallback<PowerTypes.Info> asyncCallback)
Returns information about the guest operating system power state.
|
void |
get(java.lang.String vm,
AsyncCallback<PowerTypes.Info> asyncCallback,
InvocationConfig invocationConfig)
Returns information about the guest operating system power state.
|
PowerTypes.Info |
get(java.lang.String vm,
InvocationConfig invocationConfig)
Returns information about the guest operating system power state.
|
void |
reboot(java.lang.String vm)
Issues a request to the guest operating system asking it to perform a reboot.
|
void |
reboot(java.lang.String vm,
AsyncCallback<java.lang.Void> asyncCallback)
Issues a request to the guest operating system asking it to perform a reboot.
|
void |
reboot(java.lang.String vm,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Issues a request to the guest operating system asking it to perform a reboot.
|
void |
reboot(java.lang.String vm,
InvocationConfig invocationConfig)
Issues a request to the guest operating system asking it to perform a reboot.
|
void |
shutdown(java.lang.String vm)
Issues a request to the guest operating system asking it to perform a clean
shutdown of all services.
|
void |
shutdown(java.lang.String vm,
AsyncCallback<java.lang.Void> asyncCallback)
Issues a request to the guest operating system asking it to perform a clean
shutdown of all services.
|
void |
shutdown(java.lang.String vm,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Issues a request to the guest operating system asking it to perform a clean
shutdown of all services.
|
void |
shutdown(java.lang.String vm,
InvocationConfig invocationConfig)
Issues a request to the guest operating system asking it to perform a clean
shutdown of all services.
|
void |
standby(java.lang.String vm)
Issues a request to the guest operating system asking it to perform a suspend
operation.
|
void |
standby(java.lang.String vm,
AsyncCallback<java.lang.Void> asyncCallback)
Issues a request to the guest operating system asking it to perform a suspend
operation.
|
void |
standby(java.lang.String vm,
AsyncCallback<java.lang.Void> asyncCallback,
InvocationConfig invocationConfig)
Issues a request to the guest operating system asking it to perform a suspend
operation.
|
void |
standby(java.lang.String vm,
InvocationConfig invocationConfig)
Issues a request to the guest operating system asking it to perform a suspend
operation.
|
PowerTypes.Info get(java.lang.String vm)
Synchronous method overload. Result of the invocation will be reported as a method return value.
PowerTypes.Info get(java.lang.String vm, InvocationConfig invocationConfig)
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
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.NotFound
- if the virtual machine is not found.void get(java.lang.String vm, AsyncCallback<PowerTypes.Info> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Invocation Result:
Guest OS powerstate information.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the virtual machine is not found.
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void get(java.lang.String vm, AsyncCallback<PowerTypes.Info> asyncCallback, InvocationConfig invocationConfig)
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:
Guest OS powerstate information.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the virtual machine is not found.
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.void shutdown(java.lang.String vm)
Synchronous method overload. Result of the invocation will be reported as a method return value.
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.Error
- if the system reports an error while responding to the request.NotFound
- if the virtual machine is not found.AlreadyInDesiredState
- if the virtual machine is not powered on.ServiceUnavailable
- if VMware Tools is not running.NotAllowedInCurrentState
- if the virtual machine is suspended.ResourceBusy
- if the virtual machine is performing another operation.Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).void shutdown(java.lang.String vm, InvocationConfig invocationConfig)
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
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.NotFound
- if the virtual machine is not found.AlreadyInDesiredState
- if the virtual machine is not powered on.ServiceUnavailable
- if VMware Tools is not running.NotAllowedInCurrentState
- if the virtual machine is suspended.ResourceBusy
- if the virtual machine is performing another operation.Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).void shutdown(java.lang.String vm, AsyncCallback<java.lang.Void> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the virtual machine is not found.
AlreadyInDesiredState
- if the virtual machine is not powered on.
ServiceUnavailable
- if VMware Tools is not running.
NotAllowedInCurrentState
- if the virtual machine is suspended.
ResourceBusy
- if the virtual machine is performing another operation.
Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void shutdown(java.lang.String vm, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the virtual machine is not found.
AlreadyInDesiredState
- if the virtual machine is not powered on.
ServiceUnavailable
- if VMware Tools is not running.
NotAllowedInCurrentState
- if the virtual machine is suspended.
ResourceBusy
- if the virtual machine is performing another operation.
Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.void reboot(java.lang.String vm)
Synchronous method overload. Result of the invocation will be reported as a method return value.
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.Error
- if the system reports an error while responding to the request.NotFound
- if the virtual machine is not found.NotAllowedInCurrentState
- if the virtual machine is not powered on.ServiceUnavailable
- if VMware Tools is not running.ResourceBusy
- if the virtual machine is performing another operation.Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).void reboot(java.lang.String vm, InvocationConfig invocationConfig)
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
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.NotFound
- if the virtual machine is not found.NotAllowedInCurrentState
- if the virtual machine is not powered on.ServiceUnavailable
- if VMware Tools is not running.ResourceBusy
- if the virtual machine is performing another operation.Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).void reboot(java.lang.String vm, AsyncCallback<java.lang.Void> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the virtual machine is not found.
NotAllowedInCurrentState
- if the virtual machine is not powered on.
ServiceUnavailable
- if VMware Tools is not running.
ResourceBusy
- if the virtual machine is performing another operation.
Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void reboot(java.lang.String vm, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
Error
- if the system reports an error while responding to the request.
NotFound
- if the virtual machine is not found.
NotAllowedInCurrentState
- if the virtual machine is not powered on.
ServiceUnavailable
- if VMware Tools is not running.
ResourceBusy
- if the virtual machine is performing another operation.
Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.void standby(java.lang.String vm)
Synchronous method overload. Result of the invocation will be reported as a method return value.
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.Error
- if the system reports an error while responding to the request.AlreadyInDesiredState
- if the virtual machine is suspended.NotFound
- if the virtual machine is not found.ServiceUnavailable
- if VMware Tools is not running.NotAllowedInCurrentState
- if the virtual machine is not powered on.ResourceBusy
- if the virtual machine is performing another operation.Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).void standby(java.lang.String vm, InvocationConfig invocationConfig)
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
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.invocationConfig
- Configuration for the method invocation.Error
- if the system reports an error while responding to the request.AlreadyInDesiredState
- if the virtual machine is suspended.NotFound
- if the virtual machine is not found.ServiceUnavailable
- if VMware Tools is not running.NotAllowedInCurrentState
- if the virtual machine is not powered on.ResourceBusy
- if the virtual machine is performing another operation.Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).void standby(java.lang.String vm, AsyncCallback<java.lang.Void> asyncCallback)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Operation Errors:
Error
- if the system reports an error while responding to the request.
AlreadyInDesiredState
- if the virtual machine is suspended.
NotFound
- if the virtual machine is not found.
ServiceUnavailable
- if VMware Tools is not running.
NotAllowedInCurrentState
- if the virtual machine is not powered on.
ResourceBusy
- if the virtual machine is performing another operation.
Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.void standby(java.lang.String vm, AsyncCallback<java.lang.Void> asyncCallback, InvocationConfig invocationConfig)
Asynchronous method overload. Result of the invocation will be
reported via the specified asyncCallback
.
Use invocationConfig
to specify configuration for this particular invocation.
Operation Errors:
Error
- if the system reports an error while responding to the request.
AlreadyInDesiredState
- if the virtual machine is suspended.
NotFound
- if the virtual machine is not found.
ServiceUnavailable
- if VMware Tools is not running.
NotAllowedInCurrentState
- if the virtual machine is not powered on.
ResourceBusy
- if the virtual machine is performing another operation.
Unsupported
- if the virtual machine does not support being powered on (e.g. marked as a
template, serving as a fault-tolerance secondary virtual machine).
vm
- Identifier of the virtual machine.
The parameter must be an identifier for the resource type: VirtualMachine
.asyncCallback
- Receives the status (progress, result or error) of the operation invocation.invocationConfig
- Configuration for the method invocation.