Transfer / Client / update_host_key
update_host_key¶
- Transfer.Client.update_host_key(**kwargs)¶
Updates the host key that’s specified by the
ServerIdandHostKeyIdparameters. You can update the description of the host key, change where the host key is stored by specifying theStorageType, and specify the KMS key used to encrypt the host key when it’s stored in Secrets Manager.To change a host key’s storage type from
SERVICE_MANAGEDtoSECRETS_MANAGER, you must have thetransfer:ExportHostKeypermission.transfer:ExportHostKeyis a permission-only action that has no corresponding API operation.See also: AWS API Documentation
Request Syntax
response = client.update_host_key( ServerId='string', HostKeyId='string', Description='string', StorageType='SERVICE_MANAGED'|'SECRETS_MANAGER', KmsKey='string' )
- Parameters:
ServerId (string) –
[REQUIRED]
The identifier of the server that contains the host key that you are updating.
HostKeyId (string) –
[REQUIRED]
The identifier of the host key that you are updating.
Description (string) – An updated description for the host key.
StorageType (string) – 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.KmsKey (string) – 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.
- Return type:
dict
- Returns:
Response Syntax
{ 'ServerId': 'string', 'HostKeyId': 'string' }
Response Structure
(dict) –
ServerId (string) –
Returns the server identifier for the server that contains the updated host key.
HostKeyId (string) –
Returns the host key identifier for the updated host key.
Exceptions