Skip to content

create_configuration_set_event_destination

create_configuration_set_event_destination(
    configuration_set_name: ConfigurationSetName,
    event_destination_name: EventDestinationName,
    event_destination: EventDestinationDefinition,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
) -> CreateConfigurationSetEventDestinationResponse

Create an event destination. Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon EventBridge and associate a rule to send the event to the specified target.

A single configuration set can include more than one event destination.

Parameters:

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def create_configuration_set_event_destination(
    self,
    configuration_set_name: "capo_sesv2.types.configuration_set_name.ConfigurationSetName",
    event_destination_name: "capo_sesv2.types.event_destination_name.EventDestinationName",
    event_destination: "capo_sesv2.types.event_destination_definition.EventDestinationDefinition",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
) -> "capo_sesv2.types.create_configuration_set_event_destination_response.CreateConfigurationSetEventDestinationResponse":
    """<p>Create an event destination. <i>Events</i> include message sends, deliveries, opens, clicks, bounces, and complaints. <i>Event destinations</i> are places that you can send information about these events to. For example, you can send event data to Amazon EventBridge and associate a rule to send the event to the specified target.</p> <p>A single configuration set can include more than one event destination.</p>

    Args:
        configuration_set_name: <p>The name of the configuration set .</p>
        event_destination_name: <p>A name that identifies the event destination within the configuration set.</p>
        event_destination: <p>An object that defines the event destination.</p>

    Raises:
        capo_sesv2.errors.already_exists_exception.AlreadyExistsException: <p>The resource specified in your request already exists.</p>
        capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_sesv2.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</p>
        capo_sesv2.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</p>
        capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
        capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sesv2.types.create_configuration_set_event_destination_request.CreateConfigurationSetEventDestinationRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.create_configuration_set_event_destination_response.CreateConfigurationSetEventDestinationResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.create_configuration_set_event_destination

        output, http_response = (
            capo_sesv2._operations.simple_email_service_v2.create_configuration_set_event_destination.create_configuration_set_event_destination(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateConfigurationSetEventDestination")
    )
    input_: capo_sesv2.types.create_configuration_set_event_destination_request.CreateConfigurationSetEventDestinationRequest = {
        "configuration_set_name": configuration_set_name,
        "event_destination_name": event_destination_name,
        "event_destination": event_destination,
    }

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