getCertificateAuthorityCsr method
- required String certificateAuthorityArn,
Retrieves the certificate signing request (CSR) for your private certificate authority (CA). The CSR is created when you call the CreateCertificateAuthority action. Sign the CSR with your ACM Private CA-hosted or on-premises root or subordinate CA. Then import the signed certificate back into ACM Private CA by calling the ImportCertificateAuthorityCertificate action. The CSR is returned as a base64 PEM-encoded string.
May throw RequestInProgressException. May throw RequestFailedException. May throw ResourceNotFoundException. May throw InvalidArnException. May throw InvalidStateException.
Parameter certificateAuthorityArn
:
The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority
action. This must be of the form:
arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
Implementation
Future<GetCertificateAuthorityCsrResponse> getCertificateAuthorityCsr({
required String certificateAuthorityArn,
}) async {
ArgumentError.checkNotNull(
certificateAuthorityArn, 'certificateAuthorityArn');
_s.validateStringLength(
'certificateAuthorityArn',
certificateAuthorityArn,
5,
200,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'ACMPrivateCA.GetCertificateAuthorityCsr'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CertificateAuthorityArn': certificateAuthorityArn,
},
);
return GetCertificateAuthorityCsrResponse.fromJson(jsonResponse.body);
}