Skip to content

get_domain_statistics_report

get_domain_statistics_report(
    domain: Identity,
    start_date: Timestamp,
    end_date: Timestamp,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
) -> GetDomainStatisticsReportResponse

Retrieve inbox placement and engagement rates for the domains that you use to send email.

Parameters:

  • domain (Identity) –

    The domain that you want to obtain deliverability metrics for.

  • start_date (Timestamp) –

    The first day (in Unix time) that you want to obtain domain deliverability metrics for.

  • end_date (Timestamp) –

    The last day (in Unix time) that you want to obtain domain deliverability metrics for. The EndDate that you specify has to be less than or equal to 30 days after the StartDate.

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def get_domain_statistics_report(
    self,
    domain: "capo_sesv2.types.identity.Identity",
    start_date: "capo_sesv2.types.timestamp.Timestamp",
    end_date: "capo_sesv2.types.timestamp.Timestamp",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
) -> "capo_sesv2.types.get_domain_statistics_report_response.GetDomainStatisticsReportResponse":
    """<p>Retrieve inbox placement and engagement rates for the domains that you use to send email.</p>

    Args:
        domain: <p>The domain that you want to obtain deliverability metrics for.</p>
        start_date: <p>The first day (in Unix time) that you want to obtain domain deliverability metrics for.</p>
        end_date: <p>The last day (in Unix time) that you want to obtain domain deliverability metrics for. The <code>EndDate</code> that you specify has to be less than or equal to 30 days after the <code>StartDate</code>.</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.get_domain_statistics_report_request.GetDomainStatisticsReportRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.get_domain_statistics_report_response.GetDomainStatisticsReportResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.get_domain_statistics_report

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDomainStatisticsReport")
    )
    input_: capo_sesv2.types.get_domain_statistics_report_request.GetDomainStatisticsReportRequest = {
        "domain": domain,
        "start_date": start_date,
        "end_date": end_date,
    }

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