Class: Bmc::Sdk::GetSSHKey

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

Overview

GetSSHKey command will retrieve the SSH key with the specified ID.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, sshKeyID) ⇒ GetSSHKey

Returns a new instance of GetSSHKey.



251
252
253
254
# File 'lib/commands.rb', line 251

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

Instance Attribute Details

#sshKeyIDObject

Returns the value of attribute sshKeyID.



249
250
251
# File 'lib/commands.rb', line 249

def sshKeyID
  @sshKeyID
end

Instance Method Details

#executeObject



256
257
258
259
260
# File 'lib/commands.rb', line 256

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