getCertificateSigningRequest method
Future<GetCertificateSigningRequestOutput>
getCertificateSigningRequest({
- required CertificateSubjectType certificateSubject,
- required String keyIdentifier,
- required SigningAlgorithmType signingAlgorithm,
Creates a certificate signing request (CSR) from a key pair.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw ValidationException.
Parameter certificateSubject :
The metadata used to create the CSR.
Parameter keyIdentifier :
Asymmetric key used for generating the certificate signing request
Parameter signingAlgorithm :
The cryptographic algorithm used to sign your CSR.
Implementation
Future<GetCertificateSigningRequestOutput> getCertificateSigningRequest({
required CertificateSubjectType certificateSubject,
required String keyIdentifier,
required SigningAlgorithmType signingAlgorithm,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'PaymentCryptographyControlPlane.GetCertificateSigningRequest'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CertificateSubject': certificateSubject,
'KeyIdentifier': keyIdentifier,
'SigningAlgorithm': signingAlgorithm.value,
},
);
return GetCertificateSigningRequestOutput.fromJson(jsonResponse.body);
}