listChannels method
Retrieves all channels in a specific channel group that are configured in AWS Elemental MediaPackage.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter channelGroupName :
The name that describes the channel group. The name is the primary
identifier for the channel group, and must be unique for your account in
the AWS Region.
Parameter maxResults :
The maximum number of results to return in the response.
Parameter nextToken :
The pagination token from the GET list request. Use the token to fetch the
next page of results.
Implementation
Future<ListChannelsResponse> listChannels({
required String channelGroupName,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/channelGroup/${Uri.encodeComponent(channelGroupName)}/channel',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListChannelsResponse.fromJson(response);
}