Skip to content

update_outbound_email_contact_message

update_outbound_email_contact_message(
    instance_id: InstanceId,
    contact_id: ContactId,
    email_message: UpdateOutboundEmailContent,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
) -> UpdateOutboundEmailContactMessageResponse

Updates the draft outbound email message for a contact. Use this operation to save changes to an in-progress outbound email reply before you send it. This operation applies only to contacts with an OUTBOUND or AGENT_REPLY initiation method; it isn't supported for flow-initiated emails.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • contact_id (ContactId) –

    The identifier of the contact in this instance of Connect Customer.

  • email_message (UpdateOutboundEmailContent) –

    The email message body to update on the outbound email draft.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def update_outbound_email_contact_message(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    contact_id: "capo_connect.types.contact_id.ContactId",
    email_message: "capo_connect.types.update_outbound_email_content.UpdateOutboundEmailContent",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
) -> "capo_connect.types.update_outbound_email_contact_message_response.UpdateOutboundEmailContactMessageResponse":
    """<p>Updates the draft outbound email message for a contact. Use this operation to save changes to an in-progress outbound email reply before you send it. This operation applies only to contacts with an <code>OUTBOUND</code> or <code>AGENT_REPLY</code> initiation method; it isn't supported for flow-initiated emails.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        contact_id: <p>The identifier of the contact in this instance of Connect Customer. </p>
        email_message: <p>The email message body to update on the outbound email draft.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_conflict_exception.ResourceConflictException: <p>A resource already has that name.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.update_outbound_email_contact_message_request.UpdateOutboundEmailContactMessageRequest]",
    ) -> OperationResponse[
        "capo_connect.types.update_outbound_email_contact_message_response.UpdateOutboundEmailContactMessageResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.update_outbound_email_contact_message

        output, http_response = (
            capo_connect._operations.amazon_connect_service.update_outbound_email_contact_message.update_outbound_email_contact_message(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_connect.types.update_outbound_email_contact_message_request.UpdateOutboundEmailContactMessageRequest",
    ) -> dict[str, Any]:
        import capo_connect.types.update_outbound_email_contact_message_request

        return capo_connect.types.update_outbound_email_contact_message_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateOutboundEmailContactMessage", redact_input=_redact_input
        ),
    )
    input_: capo_connect.types.update_outbound_email_contact_message_request.UpdateOutboundEmailContactMessageRequest = {
        "instance_id": instance_id,
        "contact_id": contact_id,
        "email_message": email_message,
    }

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