metric_data_v2s
Creates, updates, deletes, gets or lists a metric_data_v2s resource.
Overview
| Name | metric_data_v2s |
| Type | Resource |
| Id | aws.connect.metric_data_v2s |
Fields
The following fields are returned by SELECT queries:
- get_metric_data_v2
| Name | Datatype | Description |
|---|---|---|
metric_results | array | Information about the metrics requested in the API request If no grouping is specified, a summary of metric data is returned. |
next_token | string | If there are additional results, this is the token for the next set of results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_metric_data_v2 | select | region | Gets metric data from the specified Connect Customer instance. GetMetricDataV2 offers more features than GetMetricData, the previous version of this API. It has new metrics, offers filtering at a metric level, and offers the ability to filter and group data by channels, queues, routing profiles, agents, and agent hierarchy levels. It can retrieve historical data for the last 3 months, at varying intervals. It does not support agent queues. For a description of the historical metrics that are supported by GetMetricDataV2 and GetMetricData, 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: Narrow the time range of your request 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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_metric_data_v2
Gets metric data from the specified Connect Customer instance. GetMetricDataV2 offers more features than GetMetricData, the previous version of this API. It has new metrics, offers filtering at a metric level, and offers the ability to filter and group data by channels, queues, routing profiles, agents, and agent hierarchy levels. It can retrieve historical data for the last 3 months, at varying intervals. It does not support agent queues. For a description of the historical metrics that are supported by GetMetricDataV2 and GetMetricData, 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: Narrow the time range of your request Add filters to reduce the amount of data returned
SELECT
metric_results,
next_token
FROM aws.connect.metric_data_v2s
WHERE region = '{{ region }}' -- required
;