describeCertificateAuthority method

Future<DescribeCertificateAuthorityResponse> describeCertificateAuthority({
  1. required String certificateAuthorityArn,
})

Lists information about your private certificate authority (CA) or one that has been shared with you. You specify the private CA on input by its ARN (Amazon Resource Name). The output contains the status of your CA. This can be any of the following:

  • CREATING - ACM Private CA is creating your private certificate authority.
  • PENDING_CERTIFICATE - The certificate is pending. You must use your ACM Private CA-hosted or on-premises root or subordinate CA to sign your private CA CSR and then import it into PCA.
  • ACTIVE - Your private CA is active.
  • DISABLED - Your private CA has been disabled.
  • EXPIRED - Your private CA certificate has expired.
  • FAILED - Your private CA has failed. Your CA can fail because of problems such a network outage or backend AWS failure or other errors. A failed CA can never return to the pending state. You must create a new CA.
  • DELETED - Your private CA is within the restoration period, after which it is permanently deleted. The length of time remaining in the CA's restoration period is also included in this action's output.

May throw ResourceNotFoundException. May throw InvalidArnException.

Parameter certificateAuthorityArn : The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. This must be of the form:

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

Implementation

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

  return DescribeCertificateAuthorityResponse.fromJson(jsonResponse.body);
}