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 Amazon Web Services Private CA-hosted or on-premises root or subordinate CA. Then import the signed certificate back into Amazon Web Services Private CA by calling the ImportCertificateAuthorityCertificate action. The CSR is returned as a base64 PEM-encoded string.
May throw InvalidArnException.
May throw InvalidStateException.
May throw RequestFailedException.
May throw RequestInProgressException.
May throw ResourceNotFoundException.
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 {
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);
}