Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PowerAction ¶
func PowerAction(client *golangsdk.ServiceClient, opts PowerOptsBuilder, option string) (r cloudservers.JobResult)
PowerAction uses a option parameter to control the power state of the ECS instance. The option only supports 'os-start' (power on), 'os-stop' (power off) and 'reboot'.
Types ¶
type PowerOpts ¶
type PowerOpts struct { Servers []ServerInfo `json:"servers" required:"true"` Type string `json:"type,omitempty"` }
PowerOpts allows batch update of the ECS instances power state through the API. Parameter 'Type' supports two methods of 'SOFT' and 'HARD' to shut down and reboot the machine's power.
type PowerOptsBuilder ¶
PowerOptsBuilder allows extensions to add additional parameters to the PowerAction(power on/off and reboot) request.
type ServerInfo ¶
type ServerInfo struct {
ID string `json:"id" required:"true"`
}
Click to show internal directories.
Click to hide internal directories.