SshKeyManager
- class SoftLayer.managers.SshKeyManager(client)[source]
Manages account SSH keys in SoftLayer.
See product information here: https://knowledgelayer.softlayer.com/procedure/ssh-keys
- Parameters:
client (SoftLayer.API.BaseClient) – the client instance
Methods
__init__
(client)add_key
(key, label[, notes])Adds a new SSH key to the account.
delete_key
(key_id)Permanently deletes an SSH key from the account.
edit_key
(key_id[, label, notes])Edits information about an SSH key.
get_key
(key_id)Returns full information about a single SSH key.
list_keys
([label])Lists all SSH keys on the account.
resolve_ids
(identifier)Takes a string and tries to resolve to a list of matching ids.
Attributes
resolvers
- add_key(key, label, notes=None)[source]
Adds a new SSH key to the account.
- Parameters:
key (string) – The SSH key to add
label (string) – The label for the key
notes (string) – Additional notes for the key
- Returns:
A dictionary of the new key’s information.
- delete_key(key_id)[source]
Permanently deletes an SSH key from the account.
- Parameters:
key_id (int) – The ID of the key to delete
- edit_key(key_id, label=None, notes=None)[source]
Edits information about an SSH key.
- Parameters:
key_id (int) – The ID of the key to edit
label (string) – The new label for the key
notes (string) – Notes to set or change on the key
- Returns:
A Boolean indicating success or failure
- get_key(key_id)[source]
Returns full information about a single SSH key.
- Parameters:
key_id (int) – The ID of the key to retrieve
- Returns:
A dictionary of information about the key
- list_keys(label=None)[source]
Lists all SSH keys on the account.
- Parameters:
label (string) – Filter list based on SSH key label
- Returns:
A list of dictionaries with information about each key
- resolve_ids(identifier)
Takes a string and tries to resolve to a list of matching ids.
What exactly ‘identifier’ can be depends on the resolvers
- Parameters:
identifier (string) – identifying string
- Returns list: