Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 2.06 KB

File metadata and controls

63 lines (39 loc) · 2.06 KB

\VMPowerManagementApi

All URIs are relative to http://localhost/api

Method HTTP request Description
ChangePowerState Put /vms/{id}/power Changes the VM power state
GetPowerState Get /vms/{id}/power Returns the power state of the VM

ChangePowerState

VmPowerState ChangePowerState(ctx, id, operation) Changes the VM power state

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID of VM
operation VmPowerOperation VM power operation: on, off, shutdown, suspend, pause, unpause

Return type

VmPowerState

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPowerState

VmPowerState GetPowerState(ctx, id) Returns the power state of the VM

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID of VM

Return type

VmPowerState

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.vmware.vmw.rest-v1+json
  • Accept: application/vnd.vmware.vmw.rest-v1+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]