import_host_key
¶
import_host_key(
server_id: ServerId,
host_key_body: HostKey,
*,
config_overrides: Optional[TransferClientConfig] = None,
description: Optional[HostKeyDescription] = None,
tags: Optional[Tags] = None,
storage_type: Optional[HostKeyStorageType] = None,
kms_key: Optional[KmsKey] = None,
) -> ImportHostKeyResponse
Adds a host key to the server that's specified by the ServerId parameter.
Parameters:
-
server_id(ServerId) –The identifier of the server that contains the host key that you are importing.
-
host_key_body(HostKey) –The private key portion of an SSH key pair.
Transfer Family accepts RSA, ECDSA, and ED25519 keys.
-
description(Optional[HostKeyDescription], default:None) –The text description that identifies this host key.
-
tags(Optional[Tags], default:None) –Key-value pairs that can be used to group and search for host keys.
-
storage_type(Optional[HostKeyStorageType], default:None) –Specifies whether the host key is stored by Transfer Family (
SERVICE_MANAGED) or in Secrets Manager (SECRETS_MANAGER). When you specifySECRETS_MANAGER, Transfer Family stores the private host key material in an Secrets Manager secret. -
kms_key(Optional[KmsKey], default:None) –The Amazon Resource Name (ARN) of the KMS key used to encrypt the Secrets Manager secret that stores the host key. If you specify a customer managed key, its key policy must allow the
AWSServiceRoleForTransferservice-linked role to decrypt the secret. If you don't specify a value, Transfer Family uses the Amazon Web Services managed key for Secrets Manager.
Raises:
-
InternalServiceError–This exception is thrown when an error occurs in the Transfer Family service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
ResourceExistsException–The requested resource does not exist, or exists in a region other than the one specified for the command.
-
ResourceNotFoundException–This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
-
ServiceUnavailableException–The request has failed because the Amazon Web ServicesTransfer Family service is not available.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transfer/_services/transfer.py
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 | |