Skip to main content

resource_metrics

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

Overview

Nameresource_metrics
TypeResource
Idaws.pi.resource_metrics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aligned_end_timestring (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_timestring (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.
identifierstringAn 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_listarrayAn array of metric results, where each array element contains all of the data points for a particular dimension.
next_tokenstringAn 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_resource_metricsselectregionRetrieve 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;