putAccountConfiguration method

Future<void> putAccountConfiguration({
  1. required String idempotencyToken,
  2. ExpiryEventsConfiguration? expiryEvents,
})

Adds or modifies account-level configurations in ACM.

The supported configuration option is DaysBeforeExpiry. This option specifies the number of days prior to certificate expiration when ACM starts generating EventBridge events. ACM sends one event per day per certificate until the certificate expires. By default, accounts receive events starting 45 days before certificate expiration.

May throw AccessDeniedException. May throw ConflictException. May throw ThrottlingException. May throw ValidationException.

Parameter idempotencyToken : Customer-chosen string used to distinguish between calls to PutAccountConfiguration. Idempotency tokens time out after one hour. If you call PutAccountConfiguration multiple times with the same unexpired idempotency token, ACM treats it as the same request and returns the original result. If you change the idempotency token for each call, ACM treats each call as a new request.

Parameter expiryEvents : Specifies expiration events associated with an account.

Implementation

Future<void> putAccountConfiguration({
  required String idempotencyToken,
  ExpiryEventsConfiguration? expiryEvents,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CertificateManager.PutAccountConfiguration'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'IdempotencyToken': idempotencyToken,
      if (expiryEvents != null) 'ExpiryEvents': expiryEvents,
    },
  );
}