Class: Bmc::Sdk::CreateSSHKey

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

Overview

CreateSSHKey command will create a new SSH key with the provided properties.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, sshKey) ⇒ CreateSSHKey

Returns a new instance of CreateSSHKey.



210
211
212
213
# File 'lib/commands.rb', line 210

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

Instance Attribute Details

#sshKeyObject

Returns the value of attribute sshKey.



208
209
210
# File 'lib/commands.rb', line 208

def sshKey
  @sshKey
end

Instance Method Details

#executeObject



215
216
217
218
219
220
# File 'lib/commands.rb', line 215

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