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.
Parameters:
-
expiry_events
(Optional[ExpiryEventsConfiguration], default:
None
)
–
Specifies expiration events associated with an account.
-
idempotency_token
(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.
Raises:
-
AccessDeniedException
–
You do not have access required to perform this action.
-
ConflictException
–
You are trying to update a resource or configuration that is already being created or updated. Wait for the previous operation to finish and try again.
-
ThrottlingException
–
The request was denied because it exceeded a quota.
-
ValidationException
–
The supplied input failed to satisfy constraints of an Amazon Web Services service.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_acm/_services/acm.py
| def put_account_configuration(
self,
idempotency_token: "capo_acm.types.idempotency_token.IdempotencyToken",
*,
config_overrides: Optional[ACMClientConfig] = None,
expiry_events: Optional[
"capo_acm.types.expiry_events_configuration.ExpiryEventsConfiguration"
] = None,
) -> None:
"""<p>Adds or modifies account-level configurations in ACM. </p> <p>The supported configuration option is <code>DaysBeforeExpiry</code>. This option specifies the number of days prior to certificate expiration when ACM starts generating <code>EventBridge</code> events. ACM sends one event per day per certificate until the certificate expires. By default, accounts receive events starting 45 days before certificate expiration.</p>
Args:
expiry_events: <p>Specifies expiration events associated with an account.</p>
idempotency_token: <p>Customer-chosen string used to distinguish between calls to <code>PutAccountConfiguration</code>. Idempotency tokens time out after one hour. If you call <code>PutAccountConfiguration</code> 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.</p>
Raises:
capo_acm.errors.access_denied_exception.AccessDeniedException: <p>You do not have access required to perform this action.</p>
capo_acm.errors.conflict_exception.ConflictException: <p>You are trying to update a resource or configuration that is already being created or updated. Wait for the previous operation to finish and try again.</p>
capo_acm.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded a quota.</p>
capo_acm.errors.validation_exception.ValidationException: <p>The supplied input failed to satisfy constraints of an Amazon Web Services service.</p>
capo_acm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_acm.types.put_account_configuration_request.PutAccountConfigurationRequest]",
) -> OperationResponse[None]:
import capo_acm._operations.certificate_manager.put_account_configuration
output, http_response = (
capo_acm._operations.certificate_manager.put_account_configuration.put_account_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutAccountConfiguration")
)
input_: capo_acm.types.put_account_configuration_request.PutAccountConfigurationRequest = {
"idempotency_token": idempotency_token
}
if expiry_events is not None:
input_["expiry_events"] = expiry_events
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|