Skip to content

delete_event_destination async

delete_event_destination(
    configuration_set_name: ConfigurationSetNameOrArn,
    event_destination_name: EventDestinationName,
    *,
    config_overrides: Optional[AsyncPinpointSMSVoiceV2ClientConfig] = None,
) -> DeleteEventDestinationResult

Deletes an existing event destination.

An event destination is a location where you send response information about the messages that you send. For example, when a message is delivered successfully, you can send information about that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.

Parameters:

  • configuration_set_name (ConfigurationSetNameOrArn) –

    The name of the configuration set or the configuration set's Amazon Resource Name (ARN) to remove the event destination from. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.

  • event_destination_name (EventDestinationName) –

    The name of the event destination to delete.

Raises:

Source code in docs_src/capo_pinpoint_sms_voice_v2/_services/async_pinpoint_sms_voice_v2.py
async def delete_event_destination(
    self,
    configuration_set_name: "capo_pinpoint_sms_voice_v2.types.configuration_set_name_or_arn.ConfigurationSetNameOrArn",
    event_destination_name: "capo_pinpoint_sms_voice_v2.types.event_destination_name.EventDestinationName",
    *,
    config_overrides: Optional[AsyncPinpointSMSVoiceV2ClientConfig] = None,
) -> "capo_pinpoint_sms_voice_v2.types.delete_event_destination_result.DeleteEventDestinationResult":
    """<p>Deletes an existing event destination.</p> <p>An event destination is a location where you send response information about the messages that you send. For example, when a message is delivered successfully, you can send information about that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.</p>

    Args:
        configuration_set_name: <p>The name of the configuration set or the configuration set's Amazon Resource Name (ARN) to remove the event destination from. The ConfigurateSetName and ConfigurationSetArn can be found using the <a>DescribeConfigurationSets</a> action.</p>
        event_destination_name: <p>The name of the event destination to delete.</p>

    Raises:
        capo_pinpoint_sms_voice_v2.errors.access_denied_exception.AccessDeniedException: <p>The request was denied because you don't have sufficient permissions to access the resource.</p>
        capo_pinpoint_sms_voice_v2.errors.internal_server_exception.InternalServerException: <p>The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.</p>
        capo_pinpoint_sms_voice_v2.errors.resource_not_found_exception.ResourceNotFoundException: <p>A requested resource couldn't be found.</p>
        capo_pinpoint_sms_voice_v2.errors.throttling_exception.ThrottlingException: <p>An error that occurred because too many requests were sent during a certain amount of time.</p>
        capo_pinpoint_sms_voice_v2.errors.validation_exception.ValidationException: <p>A validation exception for a field.</p>
        capo_pinpoint_sms_voice_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pinpoint_sms_voice_v2.types.delete_event_destination_request.DeleteEventDestinationRequest]",
    ) -> AsyncOperationResponse[
        "capo_pinpoint_sms_voice_v2.types.delete_event_destination_result.DeleteEventDestinationResult"
    ]:
        import capo_pinpoint_sms_voice_v2._operations.pinpoint_sms_voice_v2.delete_event_destination

        (
            output,
            http_response,
        ) = await capo_pinpoint_sms_voice_v2._operations.pinpoint_sms_voice_v2.delete_event_destination.async_delete_event_destination(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteEventDestination")
    )
    input_: capo_pinpoint_sms_voice_v2.types.delete_event_destination_request.DeleteEventDestinationRequest = {
        "configuration_set_name": configuration_set_name,
        "event_destination_name": event_destination_name,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output