ssh_public_keys
Creates, updates, deletes, gets or lists a ssh_public_keys
resource.
Overview
Name | ssh_public_keys |
Type | Resource |
Id | google.oslogin.ssh_public_keys |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The canonical resource name. |
expirationTimeUsec | string | An expiration time in microseconds since epoch. |
fingerprint | string | Output only. The SHA-256 fingerprint of the SSH public key. |
key | string | Public key text in SSH format, defined by RFC4253 section 6.6. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | sshPublicKeysId, usersId | Retrieves an SSH public key. |
create | INSERT | usersId | Create an SSH public key |
delete | DELETE | sshPublicKeysId, usersId | Deletes an SSH public key. |
patch | UPDATE | sshPublicKeysId, usersId | Updates an SSH public key and returns the profile information. This method supports patch semantics. |
SELECT
examples
Retrieves an SSH public key.
SELECT
name,
expirationTimeUsec,
fingerprint,
key
FROM google.oslogin.ssh_public_keys
WHERE sshPublicKeysId = '{{ sshPublicKeysId }}'
AND usersId = '{{ usersId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new ssh_public_keys
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.oslogin.ssh_public_keys (
usersId,
key,
expirationTimeUsec
)
SELECT
'{{ usersId }}',
'{{ key }}',
'{{ expirationTimeUsec }}'
;
- name: your_resource_model_name
props:
- name: key
value: string
- name: expirationTimeUsec
value: string
- name: fingerprint
value: string
- name: name
value: string
UPDATE
example
Updates a ssh_public_keys
resource.
/*+ update */
UPDATE google.oslogin.ssh_public_keys
SET
key = '{{ key }}',
expirationTimeUsec = '{{ expirationTimeUsec }}'
WHERE
sshPublicKeysId = '{{ sshPublicKeysId }}'
AND usersId = '{{ usersId }}';
DELETE
example
Deletes the specified ssh_public_keys
resource.
/*+ delete */
DELETE FROM google.oslogin.ssh_public_keys
WHERE sshPublicKeysId = '{{ sshPublicKeysId }}'
AND usersId = '{{ usersId }}';