Skip to content

batch_get_rum_metric_definitions async

batch_get_rum_metric_definitions(
    app_monitor_name: AppMonitorName,
    destination: MetricDestination,
    *,
    config_overrides: Optional[AsyncRUMClientConfig] = None,
    destination_arn: Optional[DestinationArn] = None,
    max_results: Optional[MaxResultsInteger] = None,
    next_token: Optional[str] = None,
) -> BatchGetRumMetricDefinitionsResponse

Retrieves the list of metrics and dimensions that a RUM app monitor is sending to a single destination.

Parameters:

  • app_monitor_name (AppMonitorName) –

    The name of the CloudWatch RUM app monitor that is sending the metrics.

  • destination (MetricDestination) –

    The type of destination that you want to view metrics for. Valid values are CloudWatch and Evidently.

  • destination_arn (Optional[DestinationArn], default: None ) –

    This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.

    This parameter specifies the ARN of the Evidently experiment that corresponds to the destination.

  • max_results (Optional[MaxResultsInteger], default: None ) –

    The maximum number of results to return in one operation. The default is 50. The maximum that you can specify is 100.

    To retrieve the remaining results, make another call with the returned NextToken value.

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

    Use the token returned by the previous operation to request the next page of results.

Raises:

Source code in docs_src/capo_rum/_services/async_rum.py
async def batch_get_rum_metric_definitions(
    self,
    app_monitor_name: "capo_rum.types.app_monitor_name.AppMonitorName",
    destination: "capo_rum.types.metric_destination.MetricDestination",
    *,
    config_overrides: Optional[AsyncRUMClientConfig] = None,
    destination_arn: Optional[
        "capo_rum.types.destination_arn.DestinationArn"
    ] = None,
    max_results: Optional[
        "capo_rum.types.max_results_integer.MaxResultsInteger"
    ] = None,
    next_token: Optional[str] = None,
) -> "capo_rum.types.batch_get_rum_metric_definitions_response.BatchGetRumMetricDefinitionsResponse":
    """<p>Retrieves the list of metrics and dimensions that a RUM app monitor is sending to a single destination.</p>

    Args:
        app_monitor_name: <p>The name of the CloudWatch RUM app monitor that is sending the metrics.</p>
        destination: <p>The type of destination that you want to view metrics for. Valid values are <code>CloudWatch</code> and <code>Evidently</code>.</p>
        destination_arn: <p>This parameter is required if <code>Destination</code> is <code>Evidently</code>. If <code>Destination</code> is <code>CloudWatch</code>, do not use this parameter.</p> <p>This parameter specifies the ARN of the Evidently experiment that corresponds to the destination.</p>
        max_results: <p>The maximum number of results to return in one operation. The default is 50. The maximum that you can specify is 100.</p> <p>To retrieve the remaining results, make another call with the returned <code>NextToken</code> value. </p>
        next_token: <p>Use the token returned by the previous operation to request the next page of results.</p>

    Raises:
        capo_rum.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
        capo_rum.errors.internal_server_exception.InternalServerException: <p>Internal service exception.</p>
        capo_rum.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found.</p>
        capo_rum.errors.validation_exception.ValidationException: <p>One of the arguments for the request is not valid.</p>
        capo_rum.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rum.types.batch_get_rum_metric_definitions_request.BatchGetRumMetricDefinitionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_rum.types.batch_get_rum_metric_definitions_response.BatchGetRumMetricDefinitionsResponse"
    ]:
        import capo_rum._operations.rum.batch_get_rum_metric_definitions

        (
            output,
            http_response,
        ) = await capo_rum._operations.rum.batch_get_rum_metric_definitions.async_batch_get_rum_metric_definitions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetRumMetricDefinitions")
    )
    input_: capo_rum.types.batch_get_rum_metric_definitions_request.BatchGetRumMetricDefinitionsRequest = {
        "app_monitor_name": app_monitor_name,
        "destination": destination,
    }
    if destination_arn is not None:
        input_["destination_arn"] = destination_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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