Skip to content

list_domain_deliverability_campaigns async

list_domain_deliverability_campaigns(
    start_date: Timestamp,
    end_date: Timestamp,
    subscribed_domain: Domain,
    *,
    config_overrides: Optional[AsyncPinpointEmailClientConfig] = 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 (PutDeliverabilityDashboardOption operation) for the domain.

Parameters:

  • start_date (Timestamp) –

    The first day, in Unix time format, that you want to obtain deliverability data for.

  • end_date (Timestamp) –

    The last day, in Unix time format, 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_pinpoint_email/_services/async_pinpoint_email.py
async def list_domain_deliverability_campaigns(
    self,
    start_date: "capo_pinpoint_email.types.timestamp.Timestamp",
    end_date: "capo_pinpoint_email.types.timestamp.Timestamp",
    subscribed_domain: "capo_pinpoint_email.types.domain.Domain",
    *,
    config_overrides: Optional[AsyncPinpointEmailClientConfig] = None,
    next_token: Optional["capo_pinpoint_email.types.next_token.NextToken"] = None,
    page_size: Optional["capo_pinpoint_email.types.max_items.MaxItems"] = None,
) -> "capo_pinpoint_email.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 (<code>PutDeliverabilityDashboardOption</code> operation) for the domain.</p>

    Args:
        start_date: <p>The first day, in Unix time format, that you want to obtain deliverability data for.</p>
        end_date: <p>The last day, in Unix time format, 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_pinpoint_email.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_pinpoint_email.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</p>
        capo_pinpoint_email.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
        capo_pinpoint_email.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pinpoint_email.types.list_domain_deliverability_campaigns_request.ListDomainDeliverabilityCampaignsRequest]",
    ) -> AsyncOperationResponse[
        "capo_pinpoint_email.types.list_domain_deliverability_campaigns_response.ListDomainDeliverabilityCampaignsResponse"
    ]:
        import capo_pinpoint_email._operations.amazon_pinpoint_email_service.list_domain_deliverability_campaigns

        (
            output,
            http_response,
        ) = await capo_pinpoint_email._operations.amazon_pinpoint_email_service.list_domain_deliverability_campaigns.async_list_domain_deliverability_campaigns(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomainDeliverabilityCampaigns")
    )
    input_: capo_pinpoint_email.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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output