key_sshes
Creates, updates, deletes, gets or lists a key_sshes resource.
Overview​
| Name | key_sshes |
| Type | Resource |
| Id | ovh.hosting_web.key_sshes |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
public_key | string | Public key (wire: publicKey) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Returns the SSH public key of the hosting. | |
create | insert | service_name | Generates an SSH key pair for the hosting and returns its public 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"}}) |
service_name | string | Service name (wire: serviceName) |
SELECT examples​
- get
Returns the SSH public key of the hosting.
SELECT
public_key
FROM ovh.hosting_web.key_sshes
WHERE service_name = '{{ service_name }}' -- required
;
INSERT examples​
- create
- Manifest
Generates an SSH key pair for the hosting and returns its public key.
INSERT INTO ovh.hosting_web.key_sshes (
service_name
)
SELECT
'{{ service_name }}'
RETURNING
public_key
;
# Description fields are for documentation purposes
- name: key_sshes
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the key_sshes resource.