getChannelMessage method

Future<GetChannelMessageResponse> getChannelMessage({
  1. required String channelArn,
  2. required String messageId,
})

Gets the full details of a channel message.

May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw UnauthorizedClientException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter channelArn : The ARN of the channel.

Parameter messageId : The ID of the message.

Implementation

Future<GetChannelMessageResponse> getChannelMessage({
  required String channelArn,
  required String messageId,
}) async {
  ArgumentError.checkNotNull(channelArn, 'channelArn');
  _s.validateStringLength(
    'channelArn',
    channelArn,
    5,
    1600,
    isRequired: true,
  );
  ArgumentError.checkNotNull(messageId, 'messageId');
  _s.validateStringLength(
    'messageId',
    messageId,
    1,
    128,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/channels/${Uri.encodeComponent(channelArn)}/messages/${Uri.encodeComponent(messageId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetChannelMessageResponse.fromJson(response);
}