Transfer / Client / import_host_key
import_host_key#
- Transfer.Client.import_host_key(**kwargs)#
Adds a host key to the server that’s specified by the
ServerId
parameter.See also: AWS API Documentation
Request Syntax
response = client.import_host_key( ServerId='string', HostKeyBody='string', Description='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
ServerId (string) –
[REQUIRED]
The identifier of the server that contains the host key that you are importing.
HostKeyBody (string) –
[REQUIRED]
The private key portion of an SSH key pair.
Transfer Family accepts RSA, ECDSA, and ED25519 keys.
Description (string) – The text description that identifies this host key.
Tags (list) –
Key-value pairs that can be used to group and search for host keys.
(dict) –
Creates a key-value pair for a specific resource. Tags are metadata that you can use to search for and group a resource for various purposes. You can apply tags to servers, users, and roles. A tag key can take more than one value. For example, to group servers for accounting purposes, you might create a tag called
Group
and assign the valuesResearch
andAccounting
to that group.Key (string) – [REQUIRED]
The name assigned to the tag that you create.
Value (string) – [REQUIRED]
Contains one or more values that you assigned to the key name you create.
- Return type:
dict
- Returns:
Response Syntax
{ 'ServerId': 'string', 'HostKeyId': 'string' }
Response Structure
(dict) –
ServerId (string) –
Returns the server identifier that contains the imported key.
HostKeyId (string) –
Returns the host key identifier for the imported key.
Exceptions