Skip to content

put_whats_app_business_account_event_destinations

put_whats_app_business_account_event_destinations(
    id: LinkedWhatsAppBusinessAccountId,
    event_destinations: WhatsAppBusinessAccountEventDestinations,
    *,
    config_overrides: Optional[SocialMessagingClientConfig] = None,
) -> PutWhatsAppBusinessAccountEventDestinationsOutput

Add an event destination to log event data from WhatsApp for a WhatsApp Business Account (WABA). A WABA can only have one event destination at a time. All resources associated with the WABA use the same event destination.

Parameters:

Raises:

Source code in docs_src/capo_socialmessaging/_services/social_messaging.py
def put_whats_app_business_account_event_destinations(
    self,
    id: "capo_socialmessaging.types.linked_whats_app_business_account_id.LinkedWhatsAppBusinessAccountId",
    event_destinations: "capo_socialmessaging.types.whats_app_business_account_event_destinations.WhatsAppBusinessAccountEventDestinations",
    *,
    config_overrides: Optional[SocialMessagingClientConfig] = None,
) -> "capo_socialmessaging.types.put_whats_app_business_account_event_destinations_output.PutWhatsAppBusinessAccountEventDestinationsOutput":
    """<p>Add an event destination to log event data from WhatsApp for a WhatsApp Business Account (WABA). A WABA can only have one event destination at a time. All resources associated with the WABA use the same event destination.</p>

    Args:
        id: <p>The unique identifier of your WhatsApp Business Account. WABA identifiers are formatted as <code>waba-01234567890123456789012345678901</code>. Use <a href="https://docs.aws.amazon.com/social-messaging/latest/APIReference/API_ListLinkedWhatsAppBusinessAccounts.html">ListLinkedWhatsAppBusinessAccounts</a> to list all WABAs and their details.</p>
        event_destinations: <p>An array of <code>WhatsAppBusinessAccountEventDestination</code> event destinations.</p>

    Raises:
        capo_socialmessaging.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_socialmessaging.errors.validation_exception.ValidationException: <p>The request contains an invalid parameter value. </p>
        capo_socialmessaging.errors.internal_service_exception.InternalServiceException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
        capo_socialmessaging.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the action are not valid.</p>
        capo_socialmessaging.errors.throttled_request_exception.ThrottledRequestException: <p>The request was denied due to request throttling.</p>
        capo_socialmessaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_socialmessaging.types.put_whats_app_business_account_event_destinations_input.PutWhatsAppBusinessAccountEventDestinationsInput]",
    ) -> OperationResponse[
        "capo_socialmessaging.types.put_whats_app_business_account_event_destinations_output.PutWhatsAppBusinessAccountEventDestinationsOutput"
    ]:
        import capo_socialmessaging._operations.social_messaging.put_whats_app_business_account_event_destinations

        output, http_response = (
            capo_socialmessaging._operations.social_messaging.put_whats_app_business_account_event_destinations.put_whats_app_business_account_event_destinations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("PutWhatsAppBusinessAccountEventDestinations"),
    )
    input_: capo_socialmessaging.types.put_whats_app_business_account_event_destinations_input.PutWhatsAppBusinessAccountEventDestinationsInput = {
        "id": id,
        "event_destinations": event_destinations,
    }

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