ssh_keys
Creates, updates, deletes, gets or lists a ssh_keys
resource.
Overview
Name | ssh_keys |
Type | Resource |
Id | google.baremetalsolution.ssh_keys |
Fields
The following fields are returned by SELECT
queries:
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of this SSH key. Currently, the only valid value for the location is "global". |
publicKey | string | The public SSH key. This must be in OpenSSH .authorized_keys format. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | projectsId , locationsId | pageSize , pageToken | Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature. |
create | insert | projectsId , locationsId | sshKeyId | Register a public SSH key in the specified project for use with the interactive serial console feature. |
delete | delete | projectsId , locationsId , sshKeysId | Deletes a public SSH key registered in the specified project. |
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 |
---|---|---|
locationsId | string | |
projectsId | string | |
sshKeysId | string | |
pageSize | integer (int32) | |
pageToken | string | |
sshKeyId | string |
SELECT
examples
- list
Lists the public SSH keys registered for the specified project. These SSH keys are used only for the interactive serial console feature.
SELECT
name,
publicKey
FROM google.baremetalsolution.ssh_keys
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Register a public SSH key in the specified project for use with the interactive serial console feature.
INSERT INTO google.baremetalsolution.ssh_keys (
data__publicKey,
projectsId,
locationsId,
sshKeyId
)
SELECT
'{{ publicKey }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ sshKeyId }}'
RETURNING
name,
publicKey
;
# Description fields are for documentation purposes
- name: ssh_keys
props:
- name: projectsId
value: string
description: Required parameter for the ssh_keys resource.
- name: locationsId
value: string
description: Required parameter for the ssh_keys resource.
- name: publicKey
value: string
description: >
The public SSH key. This must be in OpenSSH .authorized_keys format.
- name: sshKeyId
value: string
DELETE
examples
- delete
Deletes a public SSH key registered in the specified project.
DELETE FROM google.baremetalsolution.ssh_keys
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND sshKeysId = '{{ sshKeysId }}' --required;