class Bmc::Sdk::PowerOff
PowerOff
command will power off a specific server.
@see developers.phoenixnap.com/docs/bmc/1/routes/servers/%7Bserver_id%7D/actions/power-off/post
Attributes
serverID[RW]
Public Class Methods
new(client, serverID)
click to toggle source
# File lib/commands.rb, line 91 def initialize(client, serverID) @client = client @serverID = serverID end
Public Instance Methods
execute()
click to toggle source
# File lib/commands.rb, line 96 def execute return @client.post( "#{Entrypoint}servers/#{serverID}/actions/power-off", headers: {'Content-Type': 'application/json'}) end