update_host_key
async
¶
update_host_key(
server_id: ServerId,
host_key_id: HostKeyId,
*,
config_overrides: Optional[AsyncTransferClientConfig] = 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/async_transfer.py
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 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 | |