environments_public_key
Creates, updates, deletes, gets or lists a environments_public_key
resource.
Overview
Name | environments_public_key |
Type | Resource |
Id | google.cloudshell.environments_public_key |
Fields
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
add_public_key | INSERT | environmentsId, usersId | Adds 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_key | DELETE | environmentsId, usersId | Removes 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.cloudshell.environments_public_key (
environmentsId,
usersId,
key
)
SELECT
'{{ environmentsId }}',
'{{ usersId }}',
'{{ key }}'
;
- name: your_resource_model_name
props:
- name: key
value: string
DELETE
example
Deletes the specified environments_public_key
resource.
/*+ delete */
DELETE FROM google.cloudshell.environments_public_key
WHERE environmentsId = '{{ environmentsId }}'
AND usersId = '{{ usersId }}';