listChannelsAssociatedWithChannelFlow method
Lists all channels associated with a specified channel flow. You can associate a channel flow with multiple channels, but you can only associate a channel with one channel flow. This is a developer API.
May throw BadRequestException.
May throw ForbiddenException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter channelFlowArn :
The ARN of the channel flow.
Parameter maxResults :
The maximum number of channels that you want to return.
Parameter nextToken :
The token passed by previous API calls until all requested channels are
returned.
Implementation
Future<ListChannelsAssociatedWithChannelFlowResponse>
listChannelsAssociatedWithChannelFlow({
required String channelFlowArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
'channel-flow-arn': [channelFlowArn],
if (maxResults != null) 'max-results': [maxResults.toString()],
if (nextToken != null) 'next-token': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/channels?scope=channel-flow-associations',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListChannelsAssociatedWithChannelFlowResponse.fromJson(response);
}