getChannel method

Future<GetChannelResponse> getChannel({
  1. required String channel,
})

Returns information about a specific channel.

May throw ChannelARNInvalidException. May throw ChannelNotFoundException. May throw OperationNotPermittedException. May throw UnsupportedOperationException.

Parameter channel : The ARN or UUID of a channel.

Implementation

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

  return GetChannelResponse.fromJson(jsonResponse.body);
}