describeObservation method

Future<DescribeObservationResponse> describeObservation({
  1. required String observationId,
  2. String? accountId,
})

Describes an anomaly or error with the application.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter observationId : The ID of the observation.

Parameter accountId : The Amazon Web Services account ID for the resource group owner.

Implementation

Future<DescribeObservationResponse> describeObservation({
  required String observationId,
  String? accountId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'EC2WindowsBarleyService.DescribeObservation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ObservationId': observationId,
      if (accountId != null) 'AccountId': accountId,
    },
  );

  return DescribeObservationResponse.fromJson(jsonResponse.body);
}