getChannelMessage method
Gets the full details of a channel message.
May throw BadRequestException.
May throw ForbiddenException.
May throw NotFoundException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter channelArn :
The ARN of the channel.
Parameter chimeBearer :
The ARN of the AppInstanceUser or AppInstanceBot
that makes the API call.
Parameter messageId :
The ID of the message.
Parameter subChannelId :
The ID of the SubChannel in the request.
Implementation
Future<GetChannelMessageResponse> getChannelMessage({
required String channelArn,
required String chimeBearer,
required String messageId,
String? subChannelId,
}) async {
final headers = <String, String>{
'x-amz-chime-bearer': chimeBearer.toString(),
};
final $query = <String, List<String>>{
if (subChannelId != null) 'sub-channel-id': [subChannelId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/channels/${Uri.encodeComponent(channelArn)}/messages/${Uri.encodeComponent(messageId)}',
queryParams: $query,
headers: headers,
exceptionFnMap: _exceptionFns,
);
return GetChannelMessageResponse.fromJson(response);
}