resource_metrics
Creates, updates, deletes, gets or lists a resource_metrics resource.
Overview
| Name | resource_metrics |
| Type | Resource |
| Id | aws.pi.resource_metrics |
Fields
The following fields are returned by SELECT queries:
- get_resource_metrics
| Name | Datatype | Description |
|---|---|---|
aligned_end_time | string (date-time) | The end time for the returned metrics, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater than or equal to the value of the user-specified Endtime. |
aligned_start_time | string (date-time) | The start time for the returned metrics, after alignment to a granular boundary (as specified by PeriodInSeconds). AlignedStartTime will be less than or equal to the value of the user-specified StartTime. |
identifier | string | An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the console, the identifier is shown as ResourceID. When you call DescribeDBInstances, the identifier is returned as DbiResourceId. (pattern: <code>.\S.</code>) |
metric_list | array | An array of metric results, where each array element contains all of the data points for a particular dimension. |
next_token | string | An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by MaxRecords. (pattern: <code>^[a-zA-Z0-9_=-]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_resource_metrics | select | region | Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide specific dimension groups and dimensions, and provide filtering criteria for each group. You must specify an aggregate function for each metric. Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are 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_resource_metrics
Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide specific dimension groups and dimensions, and provide filtering criteria for each group. You must specify an aggregate function for each metric. Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.
SELECT
aligned_end_time,
aligned_start_time,
identifier,
metric_list,
next_token
FROM aws.pi.resource_metrics
WHERE region = '{{ region }}' -- required
;