class Bmc::Sdk::Shutdown

Shutdown command will shutdown a specific server

@see developers.phoenixnap.com/docs/bmc/1/routes/servers/%7Bserver_id%7D/actions/shutdown/post

Attributes

serverID[RW]

Public Class Methods

new(client, serverID) click to toggle source
# File lib/commands.rb, line 173
def initialize(client, serverID)
  @client = client
  @serverID = serverID
end

Public Instance Methods

execute() click to toggle source
# File lib/commands.rb, line 178
def execute
  return @client.post(
    "#{Entrypoint}servers/#{serverID}/actions/shutdown", 
    headers: {'Content-Type': 'application/json'})
end