Skip to content

list_associations async

list_associations(
    chat_configuration: ChatConfigurationArn,
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[String] = None,
) -> ListAssociationsResult

Lists resources associated with a channel configuration.

Parameters:

  • chat_configuration (ChatConfigurationArn) –

    The channel configuration to list associations for.

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

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

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

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

Raises:

Examples:

List custom actions associated with a configuration

>>> await client.list_associations(chat_configuration='arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-channel')
Source code in docs_src/capo_chatbot/_services/async_chatbot.py
async def list_associations(
    self,
    chat_configuration: "capo_chatbot.types.chat_configuration_arn.ChatConfigurationArn",
    *,
    config_overrides: Optional[AsyncchatbotClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_chatbot.types.string.String"] = None,
) -> "capo_chatbot.types.list_associations_result.ListAssociationsResult":
    """<p>Lists resources associated with a channel configuration.</p>

    Args:
        chat_configuration: <p>The channel configuration to list associations for.</p>
        max_results: <p>The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.</p>
        next_token: <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.</p>

    Raises:
        capo_chatbot.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List custom actions associated with a configuration

        >>> await client.list_associations(chat_configuration='arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-channel')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_chatbot.types.list_associations_request.ListAssociationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_chatbot.types.list_associations_result.ListAssociationsResult"
    ]:
        import capo_chatbot._operations.wheatley_orchestration_20171011.list_associations

        (
            output,
            http_response,
        ) = await capo_chatbot._operations.wheatley_orchestration_20171011.list_associations.async_list_associations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAssociations")
    )
    input_: capo_chatbot.types.list_associations_request.ListAssociationsRequest = {
        "chat_configuration": chat_configuration
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output