describeChannel method
Retrieves information about a channel.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw ThrottlingException.
Parameter channelName
:
The name of the channel whose information is retrieved.
Parameter includeStatistics
:
If true, additional statistical information about the channel is included
in the response. This feature cannot be used with a channel whose S3
storage is customer-managed.
Implementation
Future<DescribeChannelResponse> describeChannel({
required String channelName,
bool? includeStatistics,
}) async {
ArgumentError.checkNotNull(channelName, 'channelName');
_s.validateStringLength(
'channelName',
channelName,
1,
128,
isRequired: true,
);
final $query = <String, List<String>>{
if (includeStatistics != null)
'includeStatistics': [includeStatistics.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/channels/${Uri.encodeComponent(channelName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DescribeChannelResponse.fromJson(response);
}