Gets the encryption key if a KMS key has been specified to be used to encrypt content in Amazon Fraud Detector.
Raises:
-
AccessDeniedException
–
An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as PutExternalModel, that specifies a role that is not in your account.
-
InternalServerException
–
An exception indicating an internal server error.
-
ResourceNotFoundException
–
An exception indicating the specified resource was not found.
-
ThrottlingException
–
An exception indicating a throttling error.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_frauddetector/_services/fraud_detector.py
| def get_kms_encryption_key(
self, *, config_overrides: Optional[FraudDetectorClientConfig] = None
) -> "capo_frauddetector.types.get_kms_encryption_key_result.GetKMSEncryptionKeyResult":
"""<p>Gets the encryption key if a KMS key has been specified to be used to encrypt content in Amazon Fraud Detector.</p>
Raises:
capo_frauddetector.errors.access_denied_exception.AccessDeniedException: <p>An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as <code>PutExternalModel</code>, that specifies a role that is not in your account.</p>
capo_frauddetector.errors.internal_server_exception.InternalServerException: <p>An exception indicating an internal server error.</p>
capo_frauddetector.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception indicating the specified resource was not found.</p>
capo_frauddetector.errors.throttling_exception.ThrottlingException: <p>An exception indicating a throttling error.</p>
capo_frauddetector.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[None]",
) -> OperationResponse[
"capo_frauddetector.types.get_kms_encryption_key_result.GetKMSEncryptionKeyResult"
]:
import capo_frauddetector._operations.aws_hawks_nest_service_facade.get_kms_encryption_key
output, http_response = (
capo_frauddetector._operations.aws_hawks_nest_service_facade.get_kms_encryption_key.get_kms_encryption_key(
req.options
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetKMSEncryptionKey")
)
response = execute_pipeline(
OperationRequest(input=None, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|