Skip to content

put_configuration_set_archiving_options

put_configuration_set_archiving_options(
    configuration_set_name: ConfigurationSetName,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    archive_arn: Optional[ArchiveArn] = None,
) -> PutConfigurationSetArchivingOptionsResponse

Associate the configuration set with a MailManager archive. When you send email using the SendEmail or SendBulkEmail operations the message as it will be given to the receiving SMTP server will be archived, along with the recipient information.

Parameters:

  • configuration_set_name (ConfigurationSetName) –

    The name of the configuration set to associate with a MailManager archive.

  • archive_arn (Optional[ArchiveArn], default: None ) –

    The Amazon Resource Name (ARN) of the MailManager archive that the Amazon SES API v2 sends email to.

Raises:

Examples:

Used to associate an MailManager archive with a ConfigurationSet. This example associates an archive arn with a configuration set.

>>> client.put_configuration_set_archiving_options(configuration_set_name='sample-configuration-name', archive_arn='arn:aws:ses:us-west-2:123456789012:mailmanager-archive/a-abcdefghijklmnopqrstuvwxyz')
Source code in docs_src/capo_sesv2/_services/se_sv2.py
def put_configuration_set_archiving_options(
    self,
    configuration_set_name: "capo_sesv2.types.configuration_set_name.ConfigurationSetName",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    archive_arn: Optional["capo_sesv2.types.archive_arn.ArchiveArn"] = None,
) -> "capo_sesv2.types.put_configuration_set_archiving_options_response.PutConfigurationSetArchivingOptionsResponse":
    """<p>Associate the configuration set with a MailManager archive. When you send email using the <code>SendEmail</code> or <code>SendBulkEmail</code> operations the message as it will be given to the receiving SMTP server will be archived, along with the recipient information.</p>

    Args:
        configuration_set_name: <p>The name of the configuration set to associate with a MailManager archive.</p>
        archive_arn: <p>The Amazon Resource Name (ARN) of the MailManager archive that the Amazon SES API v2 sends email to.</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.

    Examples:
        Used to associate an MailManager archive with a ConfigurationSet.
        This example associates an archive arn with a configuration set.

        >>> client.put_configuration_set_archiving_options(configuration_set_name='sample-configuration-name', archive_arn='arn:aws:ses:us-west-2:123456789012:mailmanager-archive/a-abcdefghijklmnopqrstuvwxyz')
    """

    def _handler(
        req: "OperationRequest[capo_sesv2.types.put_configuration_set_archiving_options_request.PutConfigurationSetArchivingOptionsRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.put_configuration_set_archiving_options_response.PutConfigurationSetArchivingOptionsResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.put_configuration_set_archiving_options

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutConfigurationSetArchivingOptions")
    )
    input_: capo_sesv2.types.put_configuration_set_archiving_options_request.PutConfigurationSetArchivingOptionsRequest = {
        "configuration_set_name": configuration_set_name
    }
    if archive_arn is not None:
        input_["archive_arn"] = archive_arn

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