2023/08/15 - AWS Performance Insights - 7 new api methods
Changes AWS Performance Insights for Amazon RDS is launching Performance Analysis On Demand, a new feature that allows you to analyze database performance metrics and find out the performance issues. You can now use SDK to create, list, get, delete, and manage tags of performance analysis reports.
Deletes a performance analysis report.
See also: AWS API Documentation
Request Syntax
client.delete_performance_analysis_report( ServiceType='RDS'|'DOCDB', Identifier='string', AnalysisReportId='string' )
string
[REQUIRED]
The Amazon Web Services service for which Performance Insights will return metrics. Valid value is RDS .
string
[REQUIRED]
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 .
To use a DB instance as a data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X .
string
[REQUIRED]
The unique identifier of the analysis report for deletion.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists all the analysis reports created for the DB instance. The reports are sorted based on the start time of each report.
See also: AWS API Documentation
Request Syntax
client.list_performance_analysis_reports( ServiceType='RDS'|'DOCDB', Identifier='string', NextToken='string', MaxResults=123, ListTags=True|False )
string
[REQUIRED]
The Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS .
string
[REQUIRED]
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 .
To use a DB instance as a data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X .
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 MaxResults .
integer
The maximum number of items to return in the response. If more items exist than the specified MaxResults value, a pagination token is included in the response so that the remaining results can be retrieved.
boolean
Specifies whether or not to include the list of tags in the response.
dict
Response Syntax
{ 'AnalysisReports': [ { 'AnalysisReportId': 'string', 'CreateTime': datetime(2015, 1, 1), 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Status': 'RUNNING'|'SUCCEEDED'|'FAILED', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
AnalysisReports (list) --
List of reports including the report identifier, start and end time, creation time, and status.
(dict) --
Retrieves the details of the performance analysis report.
AnalysisReportId (string) --
The name of the analysis report.
CreateTime (datetime) --
The time you created the analysis report.
StartTime (datetime) --
The start time of the analysis in the report.
EndTime (datetime) --
The end time of the analysis in the report.
Status (string) --
The status of the analysis report.
Tags (list) --
List of all the tags added to the analysis report.
(dict) --
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" ).
Value (string) --
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").
NextToken (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 MaxResults .
Creates a new performance analysis report for a specific time period for the DB instance.
See also: AWS API Documentation
Request Syntax
client.create_performance_analysis_report( ServiceType='RDS'|'DOCDB', Identifier='string', StartTime=datetime(2015, 1, 1), EndTime=datetime(2015, 1, 1), Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The Amazon Web Services service for which Performance Insights will return metrics. Valid value is RDS .
string
[REQUIRED]
An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from this data source.
To use an Amazon RDS instance as a data source, you specify its DbiResourceId value. For example, specify db-ADECBTYHKTSAUMUZQYPDS2GW4A .
datetime
[REQUIRED]
The start time defined for the analysis report.
datetime
[REQUIRED]
The end time defined for the analysis report.
list
The metadata assigned to the analysis report consisting of a key-value pair.
(dict) --
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) -- [REQUIRED]
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" ).
Value (string) -- [REQUIRED]
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").
dict
Response Syntax
{ 'AnalysisReportId': 'string' }
Response Structure
(dict) --
AnalysisReportId (string) --
A unique identifier for the created analysis report.
Deletes the metadata tags from the Amazon RDS Performance Insights resource.
See also: AWS API Documentation
Request Syntax
client.untag_resource( ServiceType='RDS'|'DOCDB', ResourceARN='string', TagKeys=[ 'string', ] )
string
[REQUIRED]
List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS .
string
[REQUIRED]
The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN) .
list
[REQUIRED]
The metadata assigned to an Amazon RDS Performance Insights resource consisting of a key-value pair.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Adds metadata tags to the Amazon RDS Performance Insights resource.
See also: AWS API Documentation
Request Syntax
client.tag_resource( ServiceType='RDS'|'DOCDB', ResourceARN='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS .
string
[REQUIRED]
The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN) .
list
[REQUIRED]
The metadata assigned to an Amazon RDS resource consisting of a key-value pair.
(dict) --
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) -- [REQUIRED]
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" ).
Value (string) -- [REQUIRED]
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").
dict
Response Syntax
{}
Response Structure
(dict) --
Retrieves the report including the report ID, status, time details, and the insights with recommendations. The report status can be RUNNING , SUCCEEDED , or FAILED . The insights include the description and recommendation fields.
See also: AWS API Documentation
Request Syntax
client.get_performance_analysis_report( ServiceType='RDS'|'DOCDB', Identifier='string', AnalysisReportId='string', TextFormat='PLAIN_TEXT'|'MARKDOWN', AcceptLanguage='EN_US' )
string
[REQUIRED]
The Amazon Web Services service for which Performance Insights will return metrics. Valid value is RDS .
string
[REQUIRED]
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 .
To use a DB instance as a data source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X .
string
[REQUIRED]
A unique identifier of the created analysis report. For example, report-12345678901234567
string
Indicates the text format in the report. The options are PLAIN_TEXT or MARKDOWN . The default value is plain text .
string
The text language in the report. The default language is EN_US (English).
dict
Response Syntax
{ 'AnalysisReport': { 'AnalysisReportId': 'string', 'Identifier': 'string', 'ServiceType': 'RDS'|'DOCDB', 'CreateTime': datetime(2015, 1, 1), 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Status': 'RUNNING'|'SUCCEEDED'|'FAILED', 'Insights': [ { 'InsightId': 'string', 'InsightType': 'string', 'Context': 'CAUSAL'|'CONTEXTUAL', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Severity': 'LOW'|'MEDIUM'|'HIGH', 'SupportingInsights': {'... recursive ...'}, 'Description': 'string', 'Recommendations': [ { 'RecommendationId': 'string', 'RecommendationDescription': 'string' }, ], 'InsightData': [ { 'PerformanceInsightsMetric': { 'Metric': 'string', 'DisplayName': 'string', 'Dimensions': { 'string': 'string' }, 'Value': 123.0 } }, ], 'BaselineData': [ { 'PerformanceInsightsMetric': { 'Metric': 'string', 'DisplayName': 'string', 'Dimensions': { 'string': 'string' }, 'Value': 123.0 } }, ] }, ] } }
Response Structure
(dict) --
AnalysisReport (dict) --
The summary of the performance analysis report created for a time period.
AnalysisReportId (string) --
The name of the analysis report.
Identifier (string) --
The unique identifier of the analysis report.
ServiceType (string) --
List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:
RDS
DOCDB
CreateTime (datetime) --
The time you created the analysis report.
StartTime (datetime) --
The analysis start time in the report.
EndTime (datetime) --
The analysis end time in the report.
Status (string) --
The status of the created analysis report.
Insights (list) --
The list of identified insights in the analysis report.
(dict) --
Retrieves the list of performance issues which are identified.
InsightId (string) --
The unique identifier for the insight. For example, insight-12345678901234567 .
InsightType (string) --
The type of insight. For example, HighDBLoad , HighCPU , or DominatingSQLs .
Context (string) --
Indicates if the insight is causal or correlated insight.
StartTime (datetime) --
The start time of the insight. For example, 2018-10-30T00:00:00Z .
EndTime (datetime) --
The end time of the insight. For example, 2018-10-30T00:00:00Z .
Severity (string) --
The severity of the insight. The values are: Low , Medium , or High .
SupportingInsights (list) --
List of supporting insights that provide additional factors for the insight.
Description (string) --
Description of the insight. For example: A high severity Insight found between 02:00 to 02:30, where there was an unusually high DB load 600x above baseline. Likely performance impact .
Recommendations (list) --
List of recommendations for the insight. For example, Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id .
(dict) --
The list of recommendations for the insight.
RecommendationId (string) --
The unique identifier for the recommendation.
RecommendationDescription (string) --
The recommendation details to help resolve the performance issue. For example, Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id
InsightData (list) --
List of data objects containing metrics and references from the time range while generating the insight.
(dict) --
List of data objects which provide details about source metrics. This field can be used to determine the PI metric to render for the insight. This data type also includes static values for the metrics for the Insight that were calculated and included in text and annotations on the DB load chart.
PerformanceInsightsMetric (dict) --
This field determines the Performance Insights metric to render for the insight. The name field refers to a Performance Insights metric.
Metric (string) --
The Performance Insights metric.
DisplayName (string) --
The Performance Insights metric name.
Dimensions (dict) --
A dimension map that contains the dimensions for this partition.
(string) --
(string) --
Value (float) --
The value of the metric. For example, 9 for db.load.avg .
BaselineData (list) --
Metric names and values from the timeframe used as baseline to generate the insight.
(dict) --
List of data objects which provide details about source metrics. This field can be used to determine the PI metric to render for the insight. This data type also includes static values for the metrics for the Insight that were calculated and included in text and annotations on the DB load chart.
PerformanceInsightsMetric (dict) --
This field determines the Performance Insights metric to render for the insight. The name field refers to a Performance Insights metric.
Metric (string) --
The Performance Insights metric.
DisplayName (string) --
The Performance Insights metric name.
Dimensions (dict) --
A dimension map that contains the dimensions for this partition.
(string) --
(string) --
Value (float) --
The value of the metric. For example, 9 for db.load.avg .
Retrieves all the metadata tags associated with Amazon RDS Performance Insights resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( ServiceType='RDS'|'DOCDB', ResourceARN='string' )
string
[REQUIRED]
List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS .
string
[REQUIRED]
Lists all the tags for the Amazon RDS Performance Insights resource. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN) .
dict
Response Syntax
{ 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }
Response Structure
(dict) --
Tags (list) --
The metadata assigned to an Amazon RDS resource consisting of a key-value pair.
(dict) --
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" ).
Value (string) --
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with aws: or rds: . The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$").