Class: Bmc::Sdk::CreateSSHKey
- Inherits:
-
Object
- Object
- Bmc::Sdk::CreateSSHKey
- Defined in:
- lib/commands.rb
Overview
CreateSSHKey command will create a new SSH key with the provided properties.
Instance Attribute Summary collapse
-
#sshKey ⇒ Object
Returns the value of attribute sshKey.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, sshKey) ⇒ CreateSSHKey
constructor
A new instance of CreateSSHKey.
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
#sshKey ⇒ Object
Returns the value of attribute sshKey.
208 209 210 |
# File 'lib/commands.rb', line 208 def sshKey @sshKey end |
Instance Method Details
#execute ⇒ Object
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 |