ssh_keys
Creates, updates, deletes, gets or lists a ssh_keys resource.
Overview​
| Name | ssh_keys |
| Type | Resource |
| Id | ovh.me.ssh_keys |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
key_name | string | Name of this public SSH key (wire: keyName) |
key | string | ASCII encoded public SSH key |
Customer public SSH key, can be used for rescue netboot or server access after reinstallation
| Name | Datatype | Description |
|---|---|---|
key_name | string | Name of this public SSH key (wire: keyName) |
key | string | ASCII encoded public SSH key |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | key_name | Get this object properties | |
list | select | x_pagination_mode | List of your public SSH keys | |
create | insert | key, key_name | Add a new public SSH key | |
delete | delete | key_name | Remove this public SSH key |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
key_name | string | Name of this public SSH key (wire: keyName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get this object properties
SELECT
key_name,
key
FROM ovh.me.ssh_keys
WHERE key_name = '{{ key_name }}' -- required
;
List of your public SSH keys
SELECT
key_name,
key
FROM ovh.me.ssh_keys
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Add a new public SSH key
INSERT INTO ovh.me.ssh_keys (
key,
key_name
)
SELECT
'{{ key }}' /* required */,
'{{ key_name }}' /* required */
;
# Description fields are for documentation purposes
- name: ssh_keys
props:
- name: key
value: "{{ key }}"
description: |
ASCII encoded public SSH key to add
- name: key_name
value: "{{ key_name }}"
description: |
name of the new public SSH key
DELETE examples​
- delete
Remove this public SSH key
DELETE FROM ovh.me.ssh_keys
WHERE key_name = '{{ key_name }}' --required
;