Skip to content

Commit f4cbfec

Browse files
fixed
1 parent d7c25a8 commit f4cbfec

12 files changed

+68
-69
lines changed

awscli/examples/pi/create-performance-analysis-report.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
**To create a performance analysis report**
22

3-
The following ``create-perforamnce-analysis-report`` example creates a performance analysis report with the start time ``1682969503`` and end time ``1682979503`` for the database ``db-loadtest-0``. ::
3+
The following ``create-performance-analysis-report`` example creates a performance analysis report with the start time ``1682969503`` and end time ``1682979503`` for the database ``db-abcdefg123456789``. ::
44

55
aws pi create-performance-analysis-report \
66
--service-type RDS \
7-
--identifier db-loadtest-0 \
7+
--identifier db-abcdefg123456789 \
88
--start-time 1682969503 \
9-
--end-time 1682979503 \
10-
--region us-west-2
9+
--end-time 1682979503
1110

1211
Output::
1312

awscli/examples/pi/delete-performance-analysis-report.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
**To delete a performance analysis report**
22

3-
The following ``delete-perforamnce-analysis-report`` example deletes the performance analysis report with the report ID ``report-0d99cc91c4422ee61``. ::
3+
The following ``delete-performance-analysis-report`` example deletes the performance analysis report with the report ID ``report-0d99cc91c4422ee61``. ::
44

55
aws pi delete-performance-analysis-report \
66
--service-type RDS \
7-
--identifier db-loadtest-0 \
8-
--analysis-report-id report-0d99cc91c4422ee61 \
9-
--region us-west-2
7+
--identifier db-abcdefg123456789 \
8+
--analysis-report-id report-0d99cc91c4422ee61
109

1110
This command produces no output.
1211

awscli/examples/pi/describe-dimension-keys.rst

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**To describe dimension keys**
1+
**Example 1: To describe dimension keys**
22

33
This example requests the names of all wait events. The data is summarized by event name, and the aggregate values of those events over the specified time period.
44

@@ -54,3 +54,35 @@ Output::
5454
}
5555
]
5656
}
57+
58+
**Example 2: To find the SQL ID for statements contributing the most to DB load**
59+
60+
The following ``describe-dimension-keys`` requests the SQL statement and SQL ID for the 10 statements that contributed the most to DB load. ::
61+
62+
aws pi describe-dimension-keys \
63+
--service-type RDS \
64+
--identifier db-abcdefg123456789 \
65+
--start-time 2023-05-01T00:00:00Z \
66+
--end-time 2023-05-01T01:00:00Z \
67+
--metric db.load.avg \
68+
--group-by '{"Group": "db.sql", "Dimensions": ["db.sql.id", "db.sql.statement"],"Limit": 10}'
69+
70+
Output::
71+
72+
{
73+
"AlignedEndTime": 1.5270804E9,
74+
"AlignedStartTime": 1.5270264E9,
75+
"Identifier": "db-abcdefg123456789",
76+
"MetricList": [
77+
{
78+
"Keys": [
79+
{
80+
"Dimensions": {"db.sql.id": "AKIAIOSFODNN7EXAMPLE", "db.sql.statement": "SELECT * FROM customers WHERE customer_id = 123"},
81+
"Total": 25.5,"Partitions": [12.3, 13.2]
82+
}
83+
]
84+
}
85+
]
86+
}
87+
88+
For more information about dimensions in Performance Insights, see `Database load <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.ActiveSessions.html>`__ in the *Amazon RDS User Guide* and `Database load <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights.Overview.ActiveSessions.html>`__ in the *Amazon Aurora User Guide*.

awscli/examples/pi/get-dimension-key-details.rst

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,23 @@
11
**To get details for a specified dimension group for a DB instance**
22

3-
The following ``get-dimension-key-details`` example retrieves the full text of a SQL statement for DB instance ``db-10BCD2EFGHIJ3KL4M5NO6PQRS5``. The ``--group`` is ``db.sql``, and the ``--group-identifier`` is ``db.sql.id``. In this example, ``my-sql-id`` represents a SQL ID retrieved by using the ``get-resource-metrics`` or ``describe-dimension-keys`` operations. In this example, the dimensions details are available. Thus, Performance Insights retrieves the full text of the SQL statement, without truncating it. ::
3+
The following ``get-dimension-key-details`` example retrieves the full text of a SQL statement for DB instance ``db-10BCD2EFGHIJ3KL4M5NO6PQRS5``. The ``--group`` is ``db.sql``, and the ``--group-identifier`` is ``db.sql.id``. In this example, ``example-sql-id`` represents a SQL ID retrieved by using the ``get-resource-metrics`` or ``describe-dimension-keys`` operations. In this example, the dimensions details are available. Thus, Performance Insights retrieves the full text of the SQL statement, without truncating it. ::
44

55
aws pi get-dimension-key-details \
66
--service-type RDS \
77
--identifier db-10BCD2EFGHIJ3KL4M5NO6PQRS5 \
88
--group db.sql \
9-
--group-identifier my-sql-id \
9+
--group-identifier example-sql-id \
1010
--requested-dimensions statement
1111

1212
Output::
1313

1414
{
1515
"Dimensions":[
16-
{
17-
"Value": "SELECT e.last_name, d.department_name FROM employees e, departments d WHERE e.department_id=d.department_id",
18-
"Dimension": "db.sql.statement",
19-
"Status": "AVAILABLE"
20-
},
21-
...
22-
]
23-
}
24-
25-
For more information about dimensions in Performance Insights, see `Database load <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.Overview.ActiveSessions.html>`__ in the *Amazon RDS User Guide* and `Database load <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_PerfInsights.Overview.ActiveSessions.html>`__ in the *Amazon Aurora User Guide*.
26-
27-
**To get details for a specified dimension group for a DB instance (Windows)**
28-
29-
The following ``get-dimension-key-details`` example retrieves the full text of a SQL statement for DB instance ``db-10BCD2EFGHIJ3KL4M5NO6PQRS5``. The ``--group`` is ``db.sql``, and the ``--group-identifier`` is ``db.sql.id``. In this example, ``my-sql-id`` represents a SQL ID retrieved by using the ``get-resource-metrics`` or ``describe-dimension-keys`` operations. ::
30-
31-
aws pi get-dimension-key-details ^
32-
--service-type RDS ^
33-
--identifier db-10BCD2EFGHIJ3KL4M5NO6PQRS5 ^
34-
--group db.sql ^
35-
--group-identifier my-sql-id ^
36-
--requested-dimensions statement
37-
38-
Output::
39-
40-
{
41-
"Dimensions":[
42-
{
43-
"Value": "SELECT e.last_name, d.department_name FROM employees e, departments d WHERE e.department_id=d.department_id",
44-
"Dimension": "db.sql.statement",
45-
"Status": "AVAILABLE"
46-
},
16+
{
17+
"Value": "SELECT e.last_name, d.department_name FROM employees e, departments d WHERE e.department_id=d.department_id",
18+
"Dimension": "db.sql.statement",
19+
"Status": "AVAILABLE"
20+
},
4721
...
4822
]
4923
}

awscli/examples/pi/get-performance-analysis-report.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
**To get a performance analysis report**
22

3-
The following ``get-perforamnce-analysis-report`` example gets the performance analysis report for the database ``db-loadtest-0`` with the report ID ``report-0d99cc91c4422ee61``. The response provides the report status, ID, time details, and insights. ::
3+
The following ``get-performance-analysis-report`` example gets the performance analysis report for the database ``db-abcdefg123456789`` with the report ID ``report-0d99cc91c4422ee61``. The response provides the report status, ID, time details, and insights. ::
44

55
aws pi get-performance-analysis-report \
66
--service-type RDS \
7-
--identifier db-loadtest-0 \
8-
--analysis-report-id report-0d99cc91c4422ee61 \
9-
--region us-west-2
7+
--identifier db-abcdefg123456789 \
8+
--analysis-report-id report-0d99cc91c4422ee61
109

1110
Output::
1211

1312
{
1413
"AnalysisReport": {
1514
"Status": "Succeeded",
1615
"ServiceType": "RDS",
17-
"Identifier": "db-loadtest-0",
16+
"Identifier": "db-abcdefg123456789",
1817
"StartTime": 1680583486.584,
1918
"AnalysisReportId": "report-0d99cc91c4422ee61",
2019
"EndTime": 1680587086.584,

awscli/examples/pi/get-resource-metadata.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
**To get resource metadata for a database**
22

3-
The following ``get-resource-metadata`` example gets the resource metadata for the database ``db-loadtest-0`` with the report ID ``report-0d99cc91c4422ee61``. The response shows that SQL digest statistics are enabled. ::
3+
The following ``get-resource-metadata`` example gets the resource metadata for the database ``db-abcdefg123456789``. The response shows that SQL digest statistics are enabled. ::
44

55
aws pi get-resource-metadata \
66
--service-type RDS \
7-
--identifier db-loadtest-0
7+
--identifier db-abcdefg123456789
88

99
Output::
1010

1111
{
12-
"Identifier": "db-loadtest-0",
12+
"Identifier": "db-abcdefg123456789",
1313
"Features":{
1414
"SQL_DIGEST_STATISTICS":{
1515
"Status": "ENABLED"

awscli/examples/pi/list-available-resource-dimensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
**To list the dimensions that can be queried for a metric type on a DB instance**
22

3-
The following ``list-available-resource-dimensions`` example lists the ``db.load`` metrics you can query for the database ``db-loadtest-0``. ::
3+
The following ``list-available-resource-dimensions`` example lists the ``db.load`` metrics you can query for the database ``db-abcdefg123456789``. ::
44

55
aws pi list-available-resource-dimensions \
66
--service-type RDS \
7-
--identifier db-loadtest-0 \
7+
--identifier db-abcdefg123456789 \
88
--metrics db.load
99

1010
Output::

awscli/examples/pi/list-available-resource-metrics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
**To list the metrics that can be queried for a metric type on a DB instance**
22

3-
The following ``list-available-resource-metrics`` example lists the ``db.load`` metrics you can query for the database ``db-loadtest-0``. ::
3+
The following ``list-available-resource-metrics`` example lists the ``db.load`` metrics you can query for the database ``db-abcdefg123456789``. ::
44

55
aws pi list-available-resource-metrics \
66
--service-type RDS \
7-
--identifier db-loadtest-0 \
7+
--identifier db-abcdefg123456789 \
88
--metric-types "os" "db"
99

1010
Output::

awscli/examples/pi/list-performance-analysis-reports.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
**To list performance analysis reports for a database**
22

3-
The following ``list-performance-analysis-reports`` example lists performance analysis reports for the database ``db-loadtest-0``. The response lists all the reports with the report ID, status, and time period details. ::
3+
The following ``list-performance-analysis-reports`` example lists performance analysis reports for the database ``db-abcdefg123456789``. The response lists all the reports with the report ID, status, and time period details. ::
44

55
aws pi list-performance-analysis-reports \
66
--service-type RDS \
7-
--identifier db-loadtest-0 \
8-
--region us-west-2
7+
--identifier db-abcdefg123456789
98

109
Output::
1110

@@ -14,28 +13,28 @@ Output::
1413
{
1514
"Status": "Succeeded",
1615
"EndTime": 1680587086.584,
17-
"CreationTime": 1680587087.139,
16+
"CreateTime": 1680587087.139,
1817
"StartTime": 1680583486.584,
1918
"AnalysisReportId": "report-0d99cc91c4422ee61"
2019
},
2120
{
2221
"Status": "Succeeded",
2322
"EndTime": 1681491137.914,
24-
"CreationTime": 1681491145.973,
23+
"CreateTime": 1681491145.973,
2524
"StartTime": 1681487537.914,
2625
"AnalysisReportId": "report-002633115cc002233"
2726
},
2827
{
2928
"Status": "Succeeded",
3029
"EndTime": 1681493499.849,
31-
"CreationTime": 1681493507.762,
30+
"CreateTime": 1681493507.762,
3231
"StartTime": 1681489899.849,
3332
"AnalysisReportId": "report-043b1e006b47246f9"
3433
},
3534
{
3635
"Status": "InProgress",
3736
"EndTime": 1682979503.0,
38-
"CreationTime": 1682979618.994,
37+
"CreateTime": 1682979618.994,
3938
"StartTime": 1682969503.0,
4039
"AnalysisReportId": "report-01ad15f9b88bcbd56"
4140
}

awscli/examples/pi/list-tags-for-resource.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ The following ``list-tags-for-resource`` example lists tags for a performance an
44

55
aws pi list-tags-for-resource \
66
--service-type RDS \
7-
--resource-arn arn:aws:pi:us-west-2:123456789012:perf-reports/RDS/db-loadtest-0/report-0d99cc91c4422ee61 \
8-
--region us-west-2
7+
--resource-arn arn:aws:pi:us-west-2:123456789012:perf-reports/RDS/db-abcdefg123456789/report-0d99cc91c4422ee61
98

109
Output::
1110

awscli/examples/pi/tag-resource.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ The following ``tag-resource`` example adds the tag key ``name`` with the tag va
44

55
aws pi tag-resource \
66
--service-type RDS \
7-
--resource-arn arn:aws:pi:us-west-2:123456789012:perf-reports/RDS/db-loadtest-0/report-0d99cc91c4422ee61 \
8-
--tags Key=name,Value=test-tag \
9-
--region us-west-2
7+
--resource-arn arn:aws:pi:us-west-2:123456789012:perf-reports/RDS/db-abcdefg123456789/report-0d99cc91c4422ee61 \
8+
--tags Key=name,Value=test-tag
109

1110
This command produces no output.
1211

awscli/examples/pi/untag-resource.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ The following ``untag-resource`` example deletes the tag ``name`` for a performa
44

55
aws pi untag-resource \
66
--service-type RDS \
7-
--resource-arn arn:aws:pi:us-west-2:123456789012:perf-reports/RDS/db-loadtest-0/report-0d99cc91c4422ee61 \
8-
--tag-keys name \
9-
--region us-west-2
7+
--resource-arn arn:aws:pi:us-west-2:123456789012:perf-reports/RDS/db-abcdefg123456789/report-0d99cc91c4422ee61 \
8+
--tag-keys name
109

1110
This command produces no output.
1211

0 commit comments

Comments
 (0)