host_keys
Creates, updates, deletes, gets or lists a host_keys resource.
Overview
| Name | host_keys |
| Type | Resource |
| Id | aws.transfer.host_keys |
Fields
The following fields are returned by SELECT queries:
- describe_host_key
- list_host_keys
| Name | Datatype | Description |
|---|---|---|
arn | string | The unique Amazon Resource Name (ARN) for the host key. (pattern: <code>arn:\S+</code>) |
date_imported | string (date-time) | The date on which the host key was added to the server. |
description | string | The text description for this host key. (pattern: <code>[\p{Print}]*</code>) |
host_key_fingerprint | string | The public key fingerprint, which is a short sequence of bytes used to identify the longer public key. |
host_key_id | string | A unique identifier for the host key. (pattern: <code>hostkey-[0-9a-f]{17}</code>) |
tags | array | Key-value pairs that can be used to group and search for host keys. |
type | string | The encryption algorithm that is used for the host key. The Type parameter is specified by using one of the following values: ssh-rsa ssh-ed25519 ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 |
| Name | Datatype | Description |
|---|---|---|
host_keys | array | Returns an array, where each item contains the details of a host key. |
next_token | string | Returns a token that you can use to call ListHostKeys again and receive additional results, if there are any. |
server_id | string | Returns the server identifier that contains the listed host keys. (pattern: <code>s-([0-9a-f]{17})</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_host_key | select | region | Returns the details of the host key that's specified by the HostKeyId and ServerId. | |
list_host_keys | select | region | Returns a list of host keys for the server that's specified by the ServerId parameter. | |
update_host_key | update | region, ServerId, HostKeyId, Description | Updates the description for the host key that's specified by the ServerId and HostKeyId parameters. | |
delete_host_key | delete | region | Deletes the host key that's specified in the HostKeyId parameter. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_host_key
- list_host_keys
Returns the details of the host key that's specified by the HostKeyId and ServerId.
SELECT
arn,
date_imported,
description,
host_key_fingerprint,
host_key_id,
tags,
type
FROM aws.transfer.host_keys
WHERE region = '{{ region }}' -- required
;
Returns a list of host keys for the server that's specified by the ServerId parameter.
SELECT
host_keys,
next_token,
server_id
FROM aws.transfer.host_keys
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- update_host_key
Updates the description for the host key that's specified by the ServerId and HostKeyId parameters.
UPDATE aws.transfer.host_keys
SET
ServerId = '{{ ServerId }}',
HostKeyId = '{{ HostKeyId }}',
Description = '{{ Description }}'
WHERE
region = '{{ region }}' --required
AND ServerId = '{{ ServerId }}' --required
AND HostKeyId = '{{ HostKeyId }}' --required
AND Description = '{{ Description }}' --required
RETURNING
host_key_id,
server_id;
DELETE examples
- delete_host_key
Deletes the host key that's specified in the HostKeyId parameter.
DELETE FROM aws.transfer.host_keys
WHERE region = '{{ region }}' --required
;