Skip to main content

host_keys

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

Overview

Namehost_keys
TypeResource
Idaws.transfer.host_keys

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe unique Amazon Resource Name (ARN) for the host key. (pattern: <code>arn:\S+</code>)
date_importedstring (date-time)The date on which the host key was added to the server.
descriptionstringThe text description for this host key. (pattern: <code>[\p{Print}]*</code>)
host_key_fingerprintstringThe public key fingerprint, which is a short sequence of bytes used to identify the longer public key.
host_key_idstringA unique identifier for the host key. (pattern: <code>hostkey-[0-9a-f]{17}</code>)
tagsarrayKey-value pairs that can be used to group and search for host keys.
typestringThe 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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_host_keyselectregionReturns the details of the host key that's specified by the HostKeyId and ServerId.
list_host_keysselectregionReturns a list of host keys for the server that's specified by the ServerId parameter.
update_host_keyupdateregion, ServerId, HostKeyId, DescriptionUpdates the description for the host key that's specified by the ServerId and HostKeyId parameters.
delete_host_keydeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

UPDATE examples

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

Deletes the host key that's specified in the HostKeyId parameter.

DELETE FROM aws.transfer.host_keys
WHERE region = '{{ region }}' --required
;