Skip to content

list_domain_deliverability_campaigns

list_domain_deliverability_campaigns(
    start_date: Timestamp,
    end_date: Timestamp,
    subscribed_domain: Domain,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    next_token: Optional[NextToken] = None,
    page_size: Optional[MaxItems] = None,
) -> ListDomainDeliverabilityCampaignsResponse

Retrieve deliverability data for all the campaigns that used a specific domain to send email during a specified time range. This data is available for a domain only if you enabled the Deliverability dashboard for the domain.

Parameters:

  • start_date (Timestamp) –

    The first day that you want to obtain deliverability data for.

  • end_date (Timestamp) –

    The last day that you want to obtain deliverability data for. This value has to be less than or equal to 30 days after the value of the StartDate parameter.

  • subscribed_domain (Domain) –

    The domain to obtain deliverability data for.

  • next_token (Optional[NextToken], default: None ) –

    A token that’s returned from a previous call to the ListDomainDeliverabilityCampaigns operation. This token indicates the position of a campaign in the list of campaigns.

  • page_size (Optional[MaxItems], default: None ) –

    The maximum number of results to include in response to a single call to the ListDomainDeliverabilityCampaigns operation. If the number of results is larger than the number that you specify in this parameter, the response includes a NextToken element, which you can use to obtain additional results.

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def list_domain_deliverability_campaigns(
    self,
    start_date: "capo_sesv2.types.timestamp.Timestamp",
    end_date: "capo_sesv2.types.timestamp.Timestamp",
    subscribed_domain: "capo_sesv2.types.domain.Domain",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    next_token: Optional["capo_sesv2.types.next_token.NextToken"] = None,
    page_size: Optional["capo_sesv2.types.max_items.MaxItems"] = None,
) -> "capo_sesv2.types.list_domain_deliverability_campaigns_response.ListDomainDeliverabilityCampaignsResponse":
    """<p>Retrieve deliverability data for all the campaigns that used a specific domain to send email during a specified time range. This data is available for a domain only if you enabled the Deliverability dashboard for the domain.</p>

    Args:
        start_date: <p>The first day that you want to obtain deliverability data for.</p>
        end_date: <p>The last day that you want to obtain deliverability data for. This value has to be less than or equal to 30 days after the value of the <code>StartDate</code> parameter.</p>
        subscribed_domain: <p>The domain to obtain deliverability data for.</p>
        next_token: <p>A token that’s returned from a previous call to the <code>ListDomainDeliverabilityCampaigns</code> operation. This token indicates the position of a campaign in the list of campaigns.</p>
        page_size: <p>The maximum number of results to include in response to a single call to the <code>ListDomainDeliverabilityCampaigns</code> operation. If the number of results is larger than the number that you specify in this parameter, the response includes a <code>NextToken</code> element, which you can use to obtain additional results.</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.list_domain_deliverability_campaigns_request.ListDomainDeliverabilityCampaignsRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.list_domain_deliverability_campaigns_response.ListDomainDeliverabilityCampaignsResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.list_domain_deliverability_campaigns

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomainDeliverabilityCampaigns")
    )
    input_: capo_sesv2.types.list_domain_deliverability_campaigns_request.ListDomainDeliverabilityCampaignsRequest = {
        "start_date": start_date,
        "end_date": end_date,
        "subscribed_domain": subscribed_domain,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if page_size is not None:
        input_["page_size"] = page_size

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