class Vultr::SshKeysResource

Public Instance Methods

create(**attributes) click to toggle source
# File lib/vultr/resources/ssh_keys.rb, line 8
def create(**attributes)
  SshKey.new post_request("ssh-keys", body: attributes).body.dig("ssh_key")
end
delete(ssh_key_id:) click to toggle source
# File lib/vultr/resources/ssh_keys.rb, line 20
def delete(ssh_key_id:)
  delete_request("ssh-keys/#{ssh_key_id}")
end
list(**params) click to toggle source
# File lib/vultr/resources/ssh_keys.rb, line 3
def list(**params)
  response = get_request("ssh-keys", params: params)
  Collection.from_response(response, key: "ssh_keys", type: SshKey)
end
retrieve(ssh_key_id:) click to toggle source
# File lib/vultr/resources/ssh_keys.rb, line 12
def retrieve(ssh_key_id:)
  SshKey.new get_request("ssh-keys/#{ssh_key_id}").body.dig("ssh_key")
end
update(ssh_key_id:, **attributes) click to toggle source
# File lib/vultr/resources/ssh_keys.rb, line 16
def update(ssh_key_id:, **attributes)
  patch_request("ssh-keys/#{ssh_key_id}", body: attributes)
end