Skip to main content

ssh_keys

Creates, updates, deletes, gets or lists a ssh_keys resource.

Overview​

Namessh_keys
TypeResource
Idovh.me.ssh_keys

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
key_namestringName of this public SSH key (wire: keyName)
keystringASCII encoded public SSH key

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectkey_nameGet this object properties
listselectx_pagination_modeList of your public SSH keys
createinsertkey, key_nameAdd a new public SSH key
deletedeletekey_nameRemove 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.

NameDatatypeDescription
api_hoststringThe 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_namestringName of this public SSH key (wire: keyName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get this object properties

SELECT
key_name,
key
FROM ovh.me.ssh_keys
WHERE key_name = '{{ key_name }}' -- required
;

INSERT examples​

Add a new public SSH key

INSERT INTO ovh.me.ssh_keys (
key,
key_name
)
SELECT
'{{ key }}' /* required */,
'{{ key_name }}' /* required */
;

DELETE examples​

Remove this public SSH key

DELETE FROM ovh.me.ssh_keys
WHERE key_name = '{{ key_name }}' --required
;