Skip to content

send_activation_code

send_activation_code(
    arn: EmailContactArn,
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
) -> SendActivationCodeResponse

Sends an activation email to the email address associated with the specified email contact.

It might take a few minutes for the activation email to arrive. If it doesn't arrive, check in your spam folder or try sending another activation email.

Parameters:

  • arn (EmailContactArn) –

    The Amazon Resource Name (ARN) of the resource.

Raises:

Source code in docs_src/capo_notificationscontacts/_services/notifications_contacts.py
def send_activation_code(
    self,
    arn: "capo_notificationscontacts.types.email_contact_arn.EmailContactArn",
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
) -> "capo_notificationscontacts.types.send_activation_code_response.SendActivationCodeResponse":
    """<p>Sends an activation email to the email address associated with the specified email contact.</p> <note> <p>It might take a few minutes for the activation email to arrive. If it doesn't arrive, check in your spam folder or try sending another activation email.</p> </note>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the resource.</p>

    Raises:
        capo_notificationscontacts.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_notificationscontacts.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_notificationscontacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_notificationscontacts.errors.resource_not_found_exception.ResourceNotFoundException: <p>Your request references a resource which does not exist. </p>
        capo_notificationscontacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_notificationscontacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_notificationscontacts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_notificationscontacts.types.send_activation_code_request.SendActivationCodeRequest]",
    ) -> OperationResponse[
        "capo_notificationscontacts.types.send_activation_code_response.SendActivationCodeResponse"
    ]:
        import capo_notificationscontacts._operations.notifications_contacts.send_activation_code

        output, http_response = (
            capo_notificationscontacts._operations.notifications_contacts.send_activation_code.send_activation_code(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SendActivationCode")
    )
    input_: capo_notificationscontacts.types.send_activation_code_request.SendActivationCodeRequest = {
        "arn": arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output