update_host_key
¶
update_host_key(
server_id: ServerId,
host_key_id: HostKeyId,
*,
config_overrides: Optional[TransferClientConfig] = None,
description: Optional[HostKeyDescription] = None,
storage_type: Optional[HostKeyStorageType] = None,
kms_key: Optional[KmsKey] = None,
) -> UpdateHostKeyResponse
Updates the host key that's specified by the ServerId and HostKeyId parameters. You can update the description of the host key, change where the host key is stored by specifying the StorageType, 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_MANAGED to SECRETS_MANAGER, you must have the transfer:ExportHostKey permission. transfer:ExportHostKey is a permission-only action that has no corresponding API operation.
Parameters:
-
server_id(ServerId) –The identifier of the server that contains the host key that you are updating.
-
host_key_id(HostKeyId) –The identifier of the host key that you are updating.
-
description(Optional[HostKeyDescription], default:None) –An updated description for the host key.
-
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.
-
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
2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 | |