putKMSEncryptionKey method
Specifies the Key Management Service (KMS) customer master key (CMK) to be used to encrypt content in Amazon Fraud Detector.
May throw ValidationException. May throw ResourceNotFoundException. May throw InternalServerException. May throw AccessDeniedException.
Parameter kmsEncryptionKeyArn
:
The KMS encryption key ARN.
Implementation
Future<void> putKMSEncryptionKey({
required String kmsEncryptionKeyArn,
}) async {
ArgumentError.checkNotNull(kmsEncryptionKeyArn, 'kmsEncryptionKeyArn');
_s.validateStringLength(
'kmsEncryptionKeyArn',
kmsEncryptionKeyArn,
7,
90,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.PutKMSEncryptionKey'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'kmsEncryptionKeyArn': kmsEncryptionKeyArn,
},
);
}