Class: Bmc::Sdk::EditSSHKey

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, sshKey) ⇒ EditSSHKey

Returns a new instance of EditSSHKey.



271
272
273
274
# File 'lib/commands.rb', line 271

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

Instance Attribute Details

#sshKeyObject

Returns the value of attribute sshKey.



269
270
271
# File 'lib/commands.rb', line 269

def sshKey
  @sshKey
end

Instance Method Details

#executeObject



276
277
278
279
280
281
# File 'lib/commands.rb', line 276

def execute
  return @client.put(
    "#{Entrypoint}ssh-keys/#{@sshKey.id}",
    headers: {'Content-Type': 'application/json'},
    body: @sshKey.to_json)
end