getReservation method

Future<GetReservationResponse> getReservation({
  1. required String reservationId,
})

Gets an Amazon Redshift Serverless reservation. A reservation gives you the option to commit to a specified number of Redshift Processing Units (RPUs) for a year at a discount from Serverless on-demand (OD) rates.

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

Parameter reservationId : The ID of the reservation to retrieve.

Implementation

Future<GetReservationResponse> getReservation({
  required String reservationId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'RedshiftServerless.GetReservation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'reservationId': reservationId,
    },
  );

  return GetReservationResponse.fromJson(jsonResponse.body);
}