getPerformanceAnalysisReport method
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.
May throw InternalServiceError.
May throw InvalidArgumentException.
May throw NotAuthorizedException.
Parameter analysisReportId :
A unique identifier of the created analysis report. For example,
report-12345678901234567
Parameter identifier :
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.
Parameter serviceType :
The Amazon Web Services service for which Performance Insights will return
metrics. Valid value is RDS.
Parameter acceptLanguage :
The text language in the report. The default language is
EN_US (English).
Parameter textFormat :
Indicates the text format in the report. The options are
PLAIN_TEXT or MARKDOWN. The default value is
plain text.
Implementation
Future<GetPerformanceAnalysisReportResponse> getPerformanceAnalysisReport({
required String analysisReportId,
required String identifier,
required ServiceType serviceType,
AcceptLanguage? acceptLanguage,
TextFormat? textFormat,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'PerformanceInsightsv20180227.GetPerformanceAnalysisReport'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AnalysisReportId': analysisReportId,
'Identifier': identifier,
'ServiceType': serviceType.value,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage.value,
if (textFormat != null) 'TextFormat': textFormat.value,
},
);
return GetPerformanceAnalysisReportResponse.fromJson(jsonResponse.body);
}