describeTrustedAdvisorCheckResult method

Future<DescribeTrustedAdvisorCheckResultResponse> describeTrustedAdvisorCheckResult({
  1. required String checkId,
  2. String? language,
})

Returns the results of the AWS Trusted Advisor check that has the specified check ID. You can get the check IDs by calling the DescribeTrustedAdvisorChecks operation.

The response contains a TrustedAdvisorCheckResult object, which contains these three objects:

In addition, the response contains these fields:
  • status - The alert status of the check: "ok" (green), "warning" (yellow), "error" (red), or "not_available".
  • timestamp - The time of the last refresh of the check.
  • checkId - The unique identifier for the check.

May throw InternalServerError.

Parameter checkId : The unique identifier for the Trusted Advisor check.

Parameter language : The ISO 639-1 code for the language in which AWS provides support. AWS Support currently supports English ("en") and Japanese ("ja"). Language parameters must be passed explicitly for operations that take them.

Implementation

Future<DescribeTrustedAdvisorCheckResultResponse>
    describeTrustedAdvisorCheckResult({
  required String checkId,
  String? language,
}) async {
  ArgumentError.checkNotNull(checkId, 'checkId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSSupport_20130415.DescribeTrustedAdvisorCheckResult'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'checkId': checkId,
      if (language != null) 'language': language,
    },
  );

  return DescribeTrustedAdvisorCheckResultResponse.fromJson(
      jsonResponse.body);
}