Skip to content

list_channels_associated_with_channel_flow

list_channels_associated_with_channel_flow(
    channel_flow_arn: ChimeArn,
    *,
    config_overrides: Optional[ChimeSDKMessagingClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListChannelsAssociatedWithChannelFlowResponse

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.

Parameters:

  • channel_flow_arn (ChimeArn) –

    The ARN of the channel flow.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of channels that you want to return.

  • next_token (Optional[NextToken], default: None ) –

    The token passed by previous API calls until all requested channels are returned.

Raises:

Source code in docs_src/capo_chime_sdk_messaging/_services/chime_sdk_messaging.py
def list_channels_associated_with_channel_flow(
    self,
    channel_flow_arn: "capo_chime_sdk_messaging.types.chime_arn.ChimeArn",
    *,
    config_overrides: Optional[ChimeSDKMessagingClientConfig] = None,
    max_results: Optional[
        "capo_chime_sdk_messaging.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_chime_sdk_messaging.types.next_token.NextToken"
    ] = None,
) -> "capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_response.ListChannelsAssociatedWithChannelFlowResponse":
    """<p>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.</p>

    Args:
        channel_flow_arn: <p>The ARN of the channel flow.</p>
        max_results: <p>The maximum number of channels that you want to return.</p>
        next_token: <p>The token passed by previous API calls until all requested channels are returned.</p>

    Raises:
        capo_chime_sdk_messaging.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
        capo_chime_sdk_messaging.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
        capo_chime_sdk_messaging.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
        capo_chime_sdk_messaging.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
        capo_chime_sdk_messaging.errors.throttled_client_exception.ThrottledClientException: <p>The client exceeded its request rate limit.</p>
        capo_chime_sdk_messaging.errors.unauthorized_client_exception.UnauthorizedClientException: <p>The client is not currently authorized to make the request.</p>
        capo_chime_sdk_messaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_request.ListChannelsAssociatedWithChannelFlowRequest]",
    ) -> OperationResponse[
        "capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_response.ListChannelsAssociatedWithChannelFlowResponse"
    ]:
        import capo_chime_sdk_messaging._operations.chime_messaging_service.list_channels_associated_with_channel_flow

        output, http_response = (
            capo_chime_sdk_messaging._operations.chime_messaging_service.list_channels_associated_with_channel_flow.list_channels_associated_with_channel_flow(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_request.ListChannelsAssociatedWithChannelFlowRequest",
    ) -> dict[str, Any]:
        import capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_request

        return capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_response.ListChannelsAssociatedWithChannelFlowResponse",
    ) -> dict[str, Any]:
        import capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_response

        return capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListChannelsAssociatedWithChannelFlow",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_chime_sdk_messaging.types.list_channels_associated_with_channel_flow_request.ListChannelsAssociatedWithChannelFlowRequest = {
        "channel_flow_arn": channel_flow_arn
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output