Skip to content

put_configuration_set_delivery_options

put_configuration_set_delivery_options(
    configuration_set_name: ConfigurationSetName,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tls_policy: Optional[TlsPolicy] = None,
    sending_pool_name: Optional[SendingPoolName] = None,
    max_delivery_seconds: Optional[MaxDeliverySeconds] = None,
    shared_pool_delivery_mode: Optional[SharedPoolDeliveryMode] = None,
) -> PutConfigurationSetDeliveryOptionsResponse

Associate a configuration set with a dedicated IP pool. You can use dedicated IP pools to create groups of dedicated IP addresses for sending specific types of email.

Parameters:

  • configuration_set_name (ConfigurationSetName) –

    The name of the configuration set to associate with a dedicated IP pool.

  • tls_policy (Optional[TlsPolicy], default: None ) –

    Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is REQUIRE, messages are only delivered if a TLS connection can be established. If the value is OPTIONAL, messages can be delivered in plain text if a TLS connection can't be established.

  • sending_pool_name (Optional[SendingPoolName], default: None ) –

    The name of the dedicated IP pool to associate with the configuration set.

  • max_delivery_seconds (Optional[MaxDeliverySeconds], default: None ) –

    The maximum amount of time, in seconds, that Amazon SES API v2 will attempt delivery of email. If specified, the value must greater than or equal to 300 seconds (5 minutes) and less than or equal to 50400 seconds (840 minutes).

  • shared_pool_delivery_mode (Optional[SharedPoolDeliveryMode], default: None ) –

    The shared pool delivery mode for email that you send with the configuration set from shared IP addresses. This setting overrides the shared pool delivery mode of your account. Can be one of the following:

    • GLOBAL – Amazon SES delivers from your sending Region first and, when it improves your deliverability, also uses Amazon SES shared IP addresses with established sending history in other Amazon Web Services Regions within the same Amazon Web Services partition.

    • REGIONAL – Amazon SES delivers your email only from shared IP addresses in your sending Region.

    • ACCOUNT – The configuration set uses the shared pool delivery mode of your account.

    If you don't specify a value, the current value doesn't change.

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def put_configuration_set_delivery_options(
    self,
    configuration_set_name: "capo_sesv2.types.configuration_set_name.ConfigurationSetName",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tls_policy: Optional["capo_sesv2.types.tls_policy.TlsPolicy"] = None,
    sending_pool_name: Optional[
        "capo_sesv2.types.sending_pool_name.SendingPoolName"
    ] = None,
    max_delivery_seconds: Optional[
        "capo_sesv2.types.max_delivery_seconds.MaxDeliverySeconds"
    ] = None,
    shared_pool_delivery_mode: Optional[
        "capo_sesv2.types.shared_pool_delivery_mode.SharedPoolDeliveryMode"
    ] = None,
) -> "capo_sesv2.types.put_configuration_set_delivery_options_response.PutConfigurationSetDeliveryOptionsResponse":
    """<p>Associate a configuration set with a dedicated IP pool. You can use dedicated IP pools to create groups of dedicated IP addresses for sending specific types of email.</p>

    Args:
        configuration_set_name: <p>The name of the configuration set to associate with a dedicated IP pool.</p>
        tls_policy: <p>Specifies whether messages that use the configuration set are required to use Transport Layer Security (TLS). If the value is <code>REQUIRE</code>, messages are only delivered if a TLS connection can be established. If the value is <code>OPTIONAL</code>, messages can be delivered in plain text if a TLS connection can't be established.</p>
        sending_pool_name: <p>The name of the dedicated IP pool to associate with the configuration set.</p>
        max_delivery_seconds: <p>The maximum amount of time, in seconds, that Amazon SES API v2 will attempt delivery of email. If specified, the value must greater than or equal to 300 seconds (5 minutes) and less than or equal to 50400 seconds (840 minutes). </p>
        shared_pool_delivery_mode: <p>The shared pool delivery mode for email that you send with the configuration set from shared IP addresses. This setting overrides the shared pool delivery mode of your account. Can be one of the following:</p> <ul> <li> <p> <code>GLOBAL</code> – Amazon SES delivers from your sending Region first and, when it improves your deliverability, also uses Amazon SES shared IP addresses with established sending history in other Amazon Web Services Regions within the same Amazon Web Services partition.</p> </li> <li> <p> <code>REGIONAL</code> – Amazon SES delivers your email only from shared IP addresses in your sending Region.</p> </li> <li> <p> <code>ACCOUNT</code> – The configuration set uses the shared pool delivery mode of your account.</p> </li> </ul> <p>If you don't specify a value, the current value doesn't change.</p>

    Raises:
        capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</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.put_configuration_set_delivery_options_request.PutConfigurationSetDeliveryOptionsRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.put_configuration_set_delivery_options_response.PutConfigurationSetDeliveryOptionsResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.put_configuration_set_delivery_options

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutConfigurationSetDeliveryOptions")
    )
    input_: capo_sesv2.types.put_configuration_set_delivery_options_request.PutConfigurationSetDeliveryOptionsRequest = {
        "configuration_set_name": configuration_set_name
    }
    if tls_policy is not None:
        input_["tls_policy"] = tls_policy
    if sending_pool_name is not None:
        input_["sending_pool_name"] = sending_pool_name
    if max_delivery_seconds is not None:
        input_["max_delivery_seconds"] = max_delivery_seconds
    if shared_pool_delivery_mode is not None:
        input_["shared_pool_delivery_mode"] = shared_pool_delivery_mode

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