Skip to content

Commit f542ac3

Browse files
author
awstools
committed
docs(client-pi): Clarifies how aggregation works for GetResourceMetrics in the Performance Insights API.
1 parent 39a8983 commit f542ac3

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

clients/client-pi/src/commands/GetResourceMetricsCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export interface GetResourceMetricsCommandOutput extends GetResourceMetricsRespo
2828

2929
/**
3030
* <p>Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide
31-
* specific dimension groups and dimensions, and provide aggregation and filtering criteria for
32-
* each group.</p>
31+
* specific dimension groups and dimensions, and provide filtering criteria for each group. You must specify an aggregate function for
32+
* each metric.</p>
3333
* <note>
3434
* <p>Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements,
3535
* only the first 500 bytes are returned.</p>

clients/client-pi/src/models/models_0.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,8 +1244,11 @@ export interface GetResourceMetadataResponse {
12441244
}
12451245

12461246
/**
1247-
* <p>A single query to be processed. You must provide the metric to query. If no other
1248-
* parameters are specified, Performance Insights returns all data points for the specified metric. Optionally, you can
1247+
* <p>A single query to be processed. You must provide the metric to query and append an aggregate function to the metric.
1248+
* For example, to find the average for the metric <code>db.load</code>
1249+
* you must use <code>db.load.avg</code>. Valid values for aggregate functions include <code>.avg</code>, <code>.min</code>,
1250+
* <code>.max</code>, and <code>.sum</code>.
1251+
* If no other parameters are specified, Performance Insights returns all data points for the specified metric. Optionally, you can
12491252
* request that the data points be aggregated by dimension group (<code>GroupBy</code>), and return only
12501253
* those data points that match your criteria (<code>Filter</code>).</p>
12511254
* @public
@@ -1268,6 +1271,10 @@ export interface MetricQuery {
12681271
* <p>The counter metrics listed in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS">Performance Insights
12691272
* operating system counters</a> in the <i>Amazon Aurora User Guide</i>.</p>
12701273
* </li>
1274+
* <li>
1275+
* <p>The counter metrics listed in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS">Performance Insights
1276+
* operating system counters</a> in the <i>Amazon RDS User Guide</i>.</p>
1277+
* </li>
12711278
* </ul>
12721279
* <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same
12731280
* value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the
@@ -1348,8 +1355,10 @@ export interface GetResourceMetricsRequest {
13481355
Identifier: string | undefined;
13491356

13501357
/**
1351-
* <p>An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can optionally specify aggregation and filtering
1352-
* criteria.</p>
1358+
* <p>An array of one or more queries to perform. Each query must specify a Performance Insights metric and specify an aggregate function, and you can provide filtering
1359+
* criteria. You must append the aggregate function to the metric. For example, to find the average for the metric <code>db.load</code>
1360+
* you must use <code>db.load.avg</code>. Valid values for aggregate functions include <code>.avg</code>, <code>.min</code>,
1361+
* <code>.max</code>, and <code>.sum</code>.</p>
13531362
* @public
13541363
*/
13551364
MetricQueries: MetricQuery[] | undefined;
@@ -1447,6 +1456,10 @@ export interface ResponseResourceMetricKey {
14471456
* <p>The counter metrics listed in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS">Performance Insights
14481457
* operating system counters</a> in the <i>Amazon Aurora User Guide</i>.</p>
14491458
* </li>
1459+
* <li>
1460+
* <p>The counter metrics listed in <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS">Performance Insights
1461+
* operating system counters</a> in the <i>Amazon RDS User Guide</i>.</p>
1462+
* </li>
14501463
* </ul>
14511464
* <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and
14521465
* <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the

codegen/sdk-codegen/aws-models/pi.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@
10961096
}
10971097
],
10981098
"traits": {
1099-
"smithy.api#documentation": "<p>Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide\n specific dimension groups and dimensions, and provide aggregation and filtering criteria for\n each group.</p>\n <note>\n <p>Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, \n only the first 500 bytes are returned.</p>\n </note>",
1099+
"smithy.api#documentation": "<p>Retrieve Performance Insights metrics for a set of data sources over a time period. You can provide\n specific dimension groups and dimensions, and provide filtering criteria for each group. You must specify an aggregate function for\n each metric.</p>\n <note>\n <p>Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, \n only the first 500 bytes are returned.</p>\n </note>",
11001100
"smithy.api#paginated": {
11011101
"inputToken": "NextToken",
11021102
"outputToken": "NextToken",
@@ -1124,7 +1124,7 @@
11241124
"MetricQueries": {
11251125
"target": "com.amazonaws.pi#MetricQueryList",
11261126
"traits": {
1127-
"smithy.api#documentation": "<p>An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can optionally specify aggregation and filtering\n criteria.</p>",
1127+
"smithy.api#documentation": "<p>An array of one or more queries to perform. Each query must specify a Performance Insights metric and specify an aggregate function, and you can provide filtering\n criteria. You must append the aggregate function to the metric. For example, to find the average for the metric <code>db.load</code> \n you must use <code>db.load.avg</code>. Valid values for aggregate functions include <code>.avg</code>, <code>.min</code>, \n <code>.max</code>, and <code>.sum</code>.</p>",
11281128
"smithy.api#required": {}
11291129
}
11301130
},
@@ -1742,7 +1742,7 @@
17421742
"Metric": {
17431743
"target": "com.amazonaws.pi#RequestString",
17441744
"traits": {
1745-
"smithy.api#documentation": "<p>The name of a Performance Insights metric to be measured.</p>\n <p>Valid values for <code>Metric</code> are:</p>\n <ul>\n <li>\n <p>\n <code>db.load.avg</code> - A scaled representation of the number of active sessions for the \n database engine.</p>\n </li>\n <li>\n <p>\n <code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p>\n </li>\n <li>\n <p>The counter metrics listed in <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS\">Performance Insights\n operating system counters</a> in the <i>Amazon Aurora User Guide</i>.</p>\n </li>\n </ul>\n <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same\n value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the\n scaled values, <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less than\n <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.</p>",
1745+
"smithy.api#documentation": "<p>The name of a Performance Insights metric to be measured.</p>\n <p>Valid values for <code>Metric</code> are:</p>\n <ul>\n <li>\n <p>\n <code>db.load.avg</code> - A scaled representation of the number of active sessions for the \n database engine.</p>\n </li>\n <li>\n <p>\n <code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p>\n </li>\n <li>\n <p>The counter metrics listed in <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS\">Performance Insights\n operating system counters</a> in the <i>Amazon Aurora User Guide</i>.</p>\n </li>\n <li>\n <p>The counter metrics listed in <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS\">Performance Insights\n operating system counters</a> in the <i>Amazon RDS User Guide</i>.</p>\n </li>\n </ul>\n <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and <code>db.sampledload.avg</code> are the same\n value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the\n scaled values, <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less than\n <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.</p>",
17461746
"smithy.api#required": {}
17471747
}
17481748
},
@@ -1760,7 +1760,7 @@
17601760
}
17611761
},
17621762
"traits": {
1763-
"smithy.api#documentation": "<p>A single query to be processed. You must provide the metric to query. If no other\n parameters are specified, Performance Insights returns all data points for the specified metric. Optionally, you can\n request that the data points be aggregated by dimension group (<code>GroupBy</code>), and return only \n those data points that match your criteria (<code>Filter</code>).</p>"
1763+
"smithy.api#documentation": "<p>A single query to be processed. You must provide the metric to query and append an aggregate function to the metric.\n For example, to find the average for the metric <code>db.load</code> \n you must use <code>db.load.avg</code>. Valid values for aggregate functions include <code>.avg</code>, <code>.min</code>, \n <code>.max</code>, and <code>.sum</code>.\n If no other parameters are specified, Performance Insights returns all data points for the specified metric. Optionally, you can\n request that the data points be aggregated by dimension group (<code>GroupBy</code>), and return only \n those data points that match your criteria (<code>Filter</code>).</p>"
17641764
}
17651765
},
17661766
"com.amazonaws.pi#MetricQueryFilterMap": {
@@ -2944,7 +2944,7 @@
29442944
"Metric": {
29452945
"target": "com.amazonaws.pi#String",
29462946
"traits": {
2947-
"smithy.api#documentation": "<p>The name of a Performance Insights metric to be measured.</p>\n <p>Valid values for <code>Metric</code> are:</p>\n <ul>\n <li>\n <p>\n <code>db.load.avg</code> - A scaled representation of the number of active sessions for the database engine.</p>\n </li>\n <li>\n <p>\n <code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p>\n </li>\n <li>\n <p>The counter metrics listed in <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS\">Performance Insights\n operating system counters</a> in the <i>Amazon Aurora User Guide</i>.</p>\n </li>\n </ul>\n <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and \n <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the \n internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the scaled values, \n <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less \n than <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.\n </p>",
2947+
"smithy.api#documentation": "<p>The name of a Performance Insights metric to be measured.</p>\n <p>Valid values for <code>Metric</code> are:</p>\n <ul>\n <li>\n <p>\n <code>db.load.avg</code> - A scaled representation of the number of active sessions for the database engine.</p>\n </li>\n <li>\n <p>\n <code>db.sampledload.avg</code> - The raw number of active sessions for the database engine.</p>\n </li>\n <li>\n <p>The counter metrics listed in <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS\">Performance Insights\n operating system counters</a> in the <i>Amazon Aurora User Guide</i>.</p>\n </li>\n <li>\n <p>The counter metrics listed in <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights_Counters.html#USER_PerfInsights_Counters.OS\">Performance Insights\n operating system counters</a> in the <i>Amazon RDS User Guide</i>.</p>\n </li>\n </ul>\n <p>If the number of active sessions is less than an internal Performance Insights threshold, <code>db.load.avg</code> and \n <code>db.sampledload.avg</code> are the same value. If the number of active sessions is greater than the \n internal threshold, Performance Insights samples the active sessions, with <code>db.load.avg</code> showing the scaled values, \n <code>db.sampledload.avg</code> showing the raw values, and <code>db.sampledload.avg</code> less \n than <code>db.load.avg</code>. For most use cases, you can query <code>db.load.avg</code> only.\n </p>",
29482948
"smithy.api#required": {}
29492949
}
29502950
},

0 commit comments

Comments
 (0)