Class: Bmc::Sdk::DeleteSSHKey

Inherits:
Object
  • Object
show all
Defined in:
lib/commands.rb

Overview

DeleteSSHKey command will delete the SSH key with the specified ID.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, sshKeyID) ⇒ DeleteSSHKey

Returns a new instance of DeleteSSHKey.



231
232
233
234
# File 'lib/commands.rb', line 231

def initialize(client, sshKeyID)
  @client = client
  @sshKeyID = sshKeyID
end

Instance Attribute Details

#sshKeyIDObject

Returns the value of attribute sshKeyID.



229
230
231
# File 'lib/commands.rb', line 229

def sshKeyID
  @sshKeyID
end

Instance Method Details

#executeObject



236
237
238
239
240
# File 'lib/commands.rb', line 236

def execute
  return @client.delete(
    "#{Entrypoint}ssh-keys/#{sshKeyID}",
    headers: {'Content-Type': 'application/json'})
end