updateCertificateAuthority method

Future<void> updateCertificateAuthority({
  1. required String certificateAuthorityArn,
  2. RevocationConfiguration? revocationConfiguration,
  3. CertificateAuthorityStatus? status,
})

Updates the status or configuration of a private certificate authority (CA). Your private CA must be in the ACTIVE or DISABLED state before you can update it. You can disable a private CA that is in the ACTIVE state or make a CA that is in the DISABLED state active again.

May throw ConcurrentModificationException. May throw ResourceNotFoundException. May throw InvalidArgsException. May throw InvalidArnException. May throw InvalidStateException. May throw InvalidPolicyException.

Parameter certificateAuthorityArn : Amazon Resource Name (ARN) of the private CA that issued the certificate to be revoked. This must be of the form:

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

Parameter revocationConfiguration : Revocation information for your private CA.

Parameter status : Status of your private CA.

Implementation

Future<void> updateCertificateAuthority({
  required String certificateAuthorityArn,
  RevocationConfiguration? revocationConfiguration,
  CertificateAuthorityStatus? status,
}) 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.UpdateCertificateAuthority'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CertificateAuthorityArn': certificateAuthorityArn,
      if (revocationConfiguration != null)
        'RevocationConfiguration': revocationConfiguration,
      if (status != null) 'Status': status.toValue(),
    },
  );
}