Skip to content

put_configuration_set_suppression_options async

put_configuration_set_suppression_options(
    configuration_set_name: ConfigurationSetName,
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = None,
    suppression_scope: Optional[SuppressionListScope] = None,
    suppressed_reasons: Optional[SuppressionListReasons] = None,
    validation_options: Optional[SuppressionValidationOptions] = None,
) -> PutConfigurationSetSuppressionOptionsResponse

Specify the suppression list preferences for a configuration set. You can also use this operation to specify a SuppressionScope to override the suppression scope of the tenant or account for emails sent using this configuration set.

Parameters:

  • configuration_set_name (ConfigurationSetName) –

    The name of the configuration set to change the suppression list preferences for.

  • suppression_scope (Optional[SuppressionListScope], default: None ) –

    The suppression scope for the configuration set. This overrides the tenant or account suppression scope for emails sent using this configuration set. Can be one of the following:

    • TENANT – Use the tenant's suppression list.

    • ACCOUNT – Use the account-level suppression list.

  • suppressed_reasons (Optional[SuppressionListReasons], default: None ) –

    A list that contains the reasons that email addresses are automatically added to the suppression list for your account or for a specific tenant. This list can contain any or all of the following:

    • COMPLAINT – Amazon SES adds an email address to the suppression list for your account or for a specific tenant when a message sent to that address results in a complaint.

    • BOUNCE – Amazon SES adds an email address to the suppression list for your account or for a specific tenant when a message sent to that address results in a hard bounce.

  • validation_options (Optional[SuppressionValidationOptions], default: None ) –

    An object that contains information about the email address suppression preferences for the configuration set in the current Amazon Web Services Region.

Raises:

Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
async def put_configuration_set_suppression_options(
    self,
    configuration_set_name: "capo_sesv2.types.configuration_set_name.ConfigurationSetName",
    *,
    config_overrides: Optional[AsyncSESv2ClientConfig] = None,
    suppression_scope: Optional[
        "capo_sesv2.types.suppression_list_scope.SuppressionListScope"
    ] = None,
    suppressed_reasons: Optional[
        "capo_sesv2.types.suppression_list_reasons.SuppressionListReasons"
    ] = None,
    validation_options: Optional[
        "capo_sesv2.types.suppression_validation_options.SuppressionValidationOptions"
    ] = None,
) -> "capo_sesv2.types.put_configuration_set_suppression_options_response.PutConfigurationSetSuppressionOptionsResponse":
    """<p>Specify the suppression list preferences for a configuration set. You can also use this operation to specify a <code>SuppressionScope</code> to override the suppression scope of the tenant or account for emails sent using this configuration set.</p>

    Args:
        configuration_set_name: <p>The name of the configuration set to change the suppression list preferences for.</p>
        suppression_scope: <p>The suppression scope for the configuration set. This overrides the tenant or account suppression scope for emails sent using this configuration set. Can be one of the following:</p> <ul> <li> <p> <code>TENANT</code> – Use the tenant's suppression list.</p> </li> <li> <p> <code>ACCOUNT</code> – Use the account-level suppression list.</p> </li> </ul>
        suppressed_reasons: <p>A list that contains the reasons that email addresses are automatically added to the suppression list for your account or for a specific tenant. This list can contain any or all of the following:</p> <ul> <li> <p> <code>COMPLAINT</code> – Amazon SES adds an email address to the suppression list for your account or for a specific tenant when a message sent to that address results in a complaint.</p> </li> <li> <p> <code>BOUNCE</code> – Amazon SES adds an email address to the suppression list for your account or for a specific tenant when a message sent to that address results in a hard bounce.</p> </li> </ul>
        validation_options: <p>An object that contains information about the email address suppression preferences for the configuration set in the current Amazon Web Services Region.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sesv2.types.put_configuration_set_suppression_options_request.PutConfigurationSetSuppressionOptionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sesv2.types.put_configuration_set_suppression_options_response.PutConfigurationSetSuppressionOptionsResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.put_configuration_set_suppression_options

        (
            output,
            http_response,
        ) = await capo_sesv2._operations.simple_email_service_v2.put_configuration_set_suppression_options.async_put_configuration_set_suppression_options(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutConfigurationSetSuppressionOptions")
    )
    input_: capo_sesv2.types.put_configuration_set_suppression_options_request.PutConfigurationSetSuppressionOptionsRequest = {
        "configuration_set_name": configuration_set_name
    }
    if suppression_scope is not None:
        input_["suppression_scope"] = suppression_scope
    if suppressed_reasons is not None:
        input_["suppressed_reasons"] = suppressed_reasons
    if validation_options is not None:
        input_["validation_options"] = validation_options

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