getCertificateAuthorityCertificate method

Future<GetCertificateAuthorityCertificateResponse> getCertificateAuthorityCertificate({
  1. required String certificateAuthorityArn,
})

Retrieves the certificate and certificate chain for your private certificate authority (CA) or one that has been shared with you. Both the certificate and the chain are base64 PEM-encoded. The chain does not include the CA certificate. Each certificate in the chain signs the one before it.

May throw ResourceNotFoundException. May throw InvalidStateException. May throw InvalidArnException.

Parameter certificateAuthorityArn : The Amazon Resource Name (ARN) of your private CA. This is of the form:

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 .

Implementation

Future<GetCertificateAuthorityCertificateResponse>
    getCertificateAuthorityCertificate({
  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.GetCertificateAuthorityCertificate'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CertificateAuthorityArn': certificateAuthorityArn,
    },
  );

  return GetCertificateAuthorityCertificateResponse.fromJson(
      jsonResponse.body);
}