Skip to main content

environments_public_key

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

Overview

Nameenvironments_public_key
TypeResource
Idgoogle.cloudshell.environments_public_key

Fields

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

NameAccessible byRequired ParamsDescription
add_public_keyINSERTenvironmentsId, usersIdAdds a public SSH key to an environment, allowing clients with the corresponding private key to connect to that environment via SSH. If a key with the same content already exists, this will error with ALREADY_EXISTS.
remove_public_keyDELETEenvironmentsId, usersIdRemoves a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key. If a key with the same content is not present, this will error with NOT_FOUND.

INSERT example

Use the following StackQL query and manifest file to create a new environments_public_key resource.

/*+ create */
INSERT INTO google.cloudshell.environments_public_key (
environmentsId,
usersId,
key
)
SELECT
'{{ environmentsId }}',
'{{ usersId }}',
'{{ key }}'
;

DELETE example

Deletes the specified environments_public_key resource.

/*+ delete */
DELETE FROM google.cloudshell.environments_public_key
WHERE environmentsId = '{{ environmentsId }}'
AND usersId = '{{ usersId }}';