ssh_public_keys
Creates, updates, deletes, gets or lists a ssh_public_keys
resource.
Overview
Name | ssh_public_keys |
Type | Resource |
Id | azure.compute.ssh_public_keys |
Fields
- vw_ssh_public_keys
- ssh_public_keys
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
location | text | Resource location |
public_key | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sshPublicKeyName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags |
type | text | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
location | string | Resource location |
properties | object | Properties of the SSH public key. |
tags | object | Resource tags |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, sshPublicKeyName, subscriptionId | Retrieves information about an SSH public key. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys. |
list_by_subscription | SELECT | subscriptionId | Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys. |
create | INSERT | resourceGroupName, sshPublicKeyName, subscriptionId | Creates a new SSH public key resource. |
delete | DELETE | resourceGroupName, sshPublicKeyName, subscriptionId | Delete an SSH public key. |
update | UPDATE | resourceGroupName, sshPublicKeyName, subscriptionId | Updates a new SSH public key resource. |
generate_key_pair | EXEC | resourceGroupName, sshPublicKeyName, subscriptionId | Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource. |
SELECT
examples
Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.
- vw_ssh_public_keys
- ssh_public_keys
SELECT
id,
name,
location,
public_key,
resourceGroupName,
sshPublicKeyName,
subscriptionId,
tags,
type
FROM azure.compute.vw_ssh_public_keys
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.compute.ssh_public_keys
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new ssh_public_keys
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.compute.ssh_public_keys (
resourceGroupName,
sshPublicKeyName,
subscriptionId,
properties,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ sshPublicKeyName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: publicKey
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
UPDATE
example
Updates a ssh_public_keys
resource.
/*+ update */
UPDATE azure.compute.ssh_public_keys
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND sshPublicKeyName = '{{ sshPublicKeyName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified ssh_public_keys
resource.
/*+ delete */
DELETE FROM azure.compute.ssh_public_keys
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND sshPublicKeyName = '{{ sshPublicKeyName }}'
AND subscriptionId = '{{ subscriptionId }}';