current_metric_datas
Creates, updates, deletes, gets or lists a current_metric_datas resource.
Overview
| Name | current_metric_datas |
| Type | Resource |
| Id | aws.connect.current_metric_datas |
Fields
The following fields are returned by SELECT queries:
- get_current_metric_data
| Name | Datatype | Description |
|---|---|---|
approximate_total_count | integer (int64) | The total count of the result, regardless of the current page size. |
data_snapshot_time | string (date-time) | The time at which the metrics were retrieved and cached for pagination. |
metric_results | array | Information about the real-time metrics. |
next_token | string | If 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_current_metric_data | select | instance_id, region | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
instance_id | string | The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_current_metric_data
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
;