getDashboard method

Future<GetDashboardResponse> getDashboard({
  1. required String dashboardId,
})

Returns the specified dashboard.

May throw ResourceNotFoundException. May throw UnsupportedOperationException.

Parameter dashboardId : The name or ARN for the dashboard.

Implementation

Future<GetDashboardResponse> getDashboard({
  required String dashboardId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CloudTrail_20131101.GetDashboard'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DashboardId': dashboardId,
    },
  );

  return GetDashboardResponse.fromJson(jsonResponse.body);
}