Skip to content

get_journey_date_range_kpi async

get_journey_date_range_kpi(
    application_id: __string,
    journey_id: __string,
    kpi_name: __string,
    *,
    config_overrides: Optional[AsyncPinpointClientConfig] = None,
    end_time: Optional[__timestampIso8601] = None,
    next_token: Optional[__string] = None,
    page_size: Optional[__string] = None,
    start_time: Optional[__timestampIso8601] = None,
) -> GetJourneyDateRangeKpiResponse

Retrieves (queries) pre-aggregated data for a standard engagement metric that applies to a journey.

Parameters:

  • application_id (__string) –

    The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

  • end_time (Optional[__timestampIso8601], default: None ) –

    The last date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-26T20:00:00Z for 8:00 PM UTC July 26, 2019.

  • journey_id (__string) –

    The unique identifier for the journey.

  • kpi_name (__string) –

    The name of the metric, also referred to as a key performance indicator (KPI), to retrieve data for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. Examples are email-open-rate and successful-delivery-rate. For a list of valid values, see the Amazon Pinpoint Developer Guide.

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

    The string that specifies which page of results to return in a paginated response. This parameter is not supported for application, campaign, and journey metrics.

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

    The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.

  • start_time (Optional[__timestampIso8601], default: None ) –

    The first date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-19T20:00:00Z for 8:00 PM UTC July 19, 2019. This value should also be fewer than 90 days from the current day.

Raises:

Source code in docs_src/capo_pinpoint/_services/async_pinpoint.py
async def get_journey_date_range_kpi(
    self,
    application_id: "capo_pinpoint.types.__string.__string",
    journey_id: "capo_pinpoint.types.__string.__string",
    kpi_name: "capo_pinpoint.types.__string.__string",
    *,
    config_overrides: Optional[AsyncPinpointClientConfig] = None,
    end_time: Optional[
        "capo_pinpoint.types.__timestamp_iso8601.__timestampIso8601"
    ] = None,
    next_token: Optional["capo_pinpoint.types.__string.__string"] = None,
    page_size: Optional["capo_pinpoint.types.__string.__string"] = None,
    start_time: Optional[
        "capo_pinpoint.types.__timestamp_iso8601.__timestampIso8601"
    ] = None,
) -> "capo_pinpoint.types.get_journey_date_range_kpi_response.GetJourneyDateRangeKpiResponse":
    """<p>Retrieves (queries) pre-aggregated data for a standard engagement metric that applies to a journey.</p>

    Args:
        application_id: <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
        end_time: <p>The last date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-26T20:00:00Z for 8:00 PM UTC July 26, 2019.</p>
        journey_id: <p>The unique identifier for the journey.</p>
        kpi_name: <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, to retrieve data for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. Examples are email-open-rate and successful-delivery-rate. For a list of valid values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
        next_token: <p>The string that specifies which page of results to return in a paginated response. This parameter is not supported for application, campaign, and journey metrics.</p>
        page_size: <p>The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.</p>
        start_time: <p>The first date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-19T20:00:00Z for 8:00 PM UTC July 19, 2019. This value should also be fewer than 90 days from the current day.</p>

    Raises:
        capo_pinpoint.errors.bad_request_exception.BadRequestException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.forbidden_exception.ForbiddenException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.internal_server_error_exception.InternalServerErrorException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.method_not_allowed_exception.MethodNotAllowedException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.not_found_exception.NotFoundException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.payload_too_large_exception.PayloadTooLargeException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.too_many_requests_exception.TooManyRequestsException: <p>Provides information about an API request or response.</p>
        capo_pinpoint.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pinpoint.types.get_journey_date_range_kpi_request.GetJourneyDateRangeKpiRequest]",
    ) -> AsyncOperationResponse[
        "capo_pinpoint.types.get_journey_date_range_kpi_response.GetJourneyDateRangeKpiResponse"
    ]:
        import capo_pinpoint._operations.pinpoint.get_journey_date_range_kpi

        (
            output,
            http_response,
        ) = await capo_pinpoint._operations.pinpoint.get_journey_date_range_kpi.async_get_journey_date_range_kpi(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetJourneyDateRangeKpi")
    )
    input_: capo_pinpoint.types.get_journey_date_range_kpi_request.GetJourneyDateRangeKpiRequest = {
        "application_id": application_id,
        "journey_id": journey_id,
        "kpi_name": kpi_name,
    }
    if end_time is not None:
        input_["end_time"] = end_time
    if next_token is not None:
        input_["next_token"] = next_token
    if page_size is not None:
        input_["page_size"] = page_size
    if start_time is not None:
        input_["start_time"] = start_time

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