Skip to content

get_journey_run_execution_metrics async

get_journey_run_execution_metrics(
    application_id: __string,
    journey_id: __string,
    run_id: __string,
    *,
    config_overrides: Optional[AsyncPinpointClientConfig] = None,
    next_token: Optional[__string] = None,
    page_size: Optional[__string] = None,
) -> GetJourneyRunExecutionMetricsResponse

Retrieves (queries) pre-aggregated data for a standard run execution 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.

  • journey_id (__string) –

    The unique identifier for the journey.

  • 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.

  • run_id (__string) –

    The unique identifier for the journey run.

Raises:

Examples:

To get the execution metrics for a journey run The following example gets execution metrics for a single run of a journey.

>>> await client.get_journey_run_execution_metrics(application_id='11111111112222222222333333333344', journey_id='aaaaaaaaaabbbbbbbbbbccccccccccdd', run_id='99999999998888888888777777777766')
Source code in docs_src/capo_pinpoint/_services/async_pinpoint.py
async def get_journey_run_execution_metrics(
    self,
    application_id: "capo_pinpoint.types.__string.__string",
    journey_id: "capo_pinpoint.types.__string.__string",
    run_id: "capo_pinpoint.types.__string.__string",
    *,
    config_overrides: Optional[AsyncPinpointClientConfig] = None,
    next_token: Optional["capo_pinpoint.types.__string.__string"] = None,
    page_size: Optional["capo_pinpoint.types.__string.__string"] = None,
) -> "capo_pinpoint.types.get_journey_run_execution_metrics_response.GetJourneyRunExecutionMetricsResponse":
    """<p>Retrieves (queries) pre-aggregated data for a standard run execution 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>
        journey_id: <p>The unique identifier for the journey.</p>
        next_token: <p>The <code/> 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>
        run_id: <p>The unique identifier for the journey run.</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.

    Examples:
        To get the execution metrics for a journey run
        The following example gets execution metrics for a single run of a journey.

        >>> await client.get_journey_run_execution_metrics(application_id='11111111112222222222333333333344', journey_id='aaaaaaaaaabbbbbbbbbbccccccccccdd', run_id='99999999998888888888777777777766')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pinpoint.types.get_journey_run_execution_metrics_request.GetJourneyRunExecutionMetricsRequest]",
    ) -> AsyncOperationResponse[
        "capo_pinpoint.types.get_journey_run_execution_metrics_response.GetJourneyRunExecutionMetricsResponse"
    ]:
        import capo_pinpoint._operations.pinpoint.get_journey_run_execution_metrics

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetJourneyRunExecutionMetrics")
    )
    input_: capo_pinpoint.types.get_journey_run_execution_metrics_request.GetJourneyRunExecutionMetricsRequest = {
        "application_id": application_id,
        "journey_id": journey_id,
        "run_id": run_id,
    }
    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