getRoom method

Future<GetRoomResponse> getRoom({
  1. String? roomArn,
})

Gets room details by room ARN.

May throw NotFoundException.

Parameter roomArn : The ARN of the room for which to request details. Required.

Implementation

Future<GetRoomResponse> getRoom({
  String? roomArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.GetRoom'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (roomArn != null) 'RoomArn': roomArn,
    },
  );

  return GetRoomResponse.fromJson(jsonResponse.body);
}