Skip to main content

current_metric_datas

Creates, updates, deletes, gets or lists a current_metric_datas resource.

Overview

Namecurrent_metric_datas
TypeResource
Idaws.connect.current_metric_datas

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
approximate_total_countinteger (int64)The total count of the result, regardless of the current page size.
data_snapshot_timestring (date-time)The time at which the metrics were retrieved and cached for pagination.
metric_resultsarrayInformation about the real-time metrics.
next_tokenstringIf there are additional results, this is the token for the next set of results. The token expires after 5 minutes from the time it is created. Subsequent requests that use the token must use the same request parameters as the request that generated the token.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_current_metric_dataselectinstance_id, regionGets the real-time metric data from the specified Connect Customer instance. For a description of each metric, see Metrics definitions in the Connect Customer Administrator Guide. When you make a successful API request, you can expect the following metric values in the response: Metric value is null: The calculation cannot be performed due to divide by zero or insufficient data Metric value is a number (including 0) of defined type: The number provided is the calculation result MetricResult list is empty: The request cannot find any data in the system The following guidelines can help you work with the API: Each dimension in the metric response must contain a value Each item in MetricResult must include all requested metrics If the response is slow due to large result sets, try these approaches: Add filters to reduce the amount of data returned

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
instance_idstringThe identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
regionstringAWS region (default: us-east-1)

SELECT examples

Gets the real-time metric data from the specified Connect Customer instance. For a description of each metric, see Metrics definitions in the Connect Customer Administrator Guide. When you make a successful API request, you can expect the following metric values in the response: Metric value is null: The calculation cannot be performed due to divide by zero or insufficient data Metric value is a number (including 0) of defined type: The number provided is the calculation result MetricResult list is empty: The request cannot find any data in the system The following guidelines can help you work with the API: Each dimension in the metric response must contain a value Each item in MetricResult must include all requested metrics If the response is slow due to large result sets, try these approaches: Add filters to reduce the amount of data returned

SELECT
approximate_total_count,
data_snapshot_time,
metric_results,
next_token
FROM aws.connect.current_metric_datas
WHERE instance_id = '{{ instance_id }}' -- required
AND region = '{{ region }}' -- required
;