Skip to content

get_bot_channel_association

get_bot_channel_association(
    name: BotChannelName,
    bot_name: BotName,
    bot_alias: AliasName,
    *,
    config_overrides: Optional[LexModelBuildingServiceClientConfig] = None,
) -> GetBotChannelAssociationResponse

Returns information about the association between an Amazon Lex bot and a messaging platform.

This operation requires permissions for the lex:GetBotChannelAssociation action.

Parameters:

  • name (BotChannelName) –

    The name of the association between the bot and the channel. The name is case sensitive.

  • bot_name (BotName) –

    The name of the Amazon Lex bot.

  • bot_alias (AliasName) –

    An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.

Raises:

  • BadRequestException –

    The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.

  • InternalFailureException –

    An internal Amazon Lex error occurred. Try your request again.

  • LimitExceededException –

    The request exceeded a limit. Try your request again.

  • NotFoundException –

    The resource specified in the request was not found. Check the resource and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_lex_model_building_service/_services/lex_model_building_service.py
def get_bot_channel_association(
    self,
    name: "capo_lex_model_building_service.types.bot_channel_name.BotChannelName",
    bot_name: "capo_lex_model_building_service.types.bot_name.BotName",
    bot_alias: "capo_lex_model_building_service.types.alias_name.AliasName",
    *,
    config_overrides: Optional[LexModelBuildingServiceClientConfig] = None,
) -> "capo_lex_model_building_service.types.get_bot_channel_association_response.GetBotChannelAssociationResponse":
    """<p>Returns information about the association between an Amazon Lex bot and a messaging platform.</p> <p>This operation requires permissions for the <code>lex:GetBotChannelAssociation</code> action.</p>

    Args:
        name: <p>The name of the association between the bot and the channel. The name is case sensitive. </p>
        bot_name: <p>The name of the Amazon Lex bot.</p>
        bot_alias: <p>An alias pointing to the specific version of the Amazon Lex bot to which this association is being made.</p>

    Raises:
        capo_lex_model_building_service.errors.bad_request_exception.BadRequestException: <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.</p>
        capo_lex_model_building_service.errors.internal_failure_exception.InternalFailureException: <p>An internal Amazon Lex error occurred. Try your request again.</p>
        capo_lex_model_building_service.errors.limit_exceeded_exception.LimitExceededException: <p>The request exceeded a limit. Try your request again.</p>
        capo_lex_model_building_service.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. Check the resource and try again.</p>
        capo_lex_model_building_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lex_model_building_service.types.get_bot_channel_association_request.GetBotChannelAssociationRequest]",
    ) -> OperationResponse[
        "capo_lex_model_building_service.types.get_bot_channel_association_response.GetBotChannelAssociationResponse"
    ]:
        import capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_bot_channel_association

        output, http_response = (
            capo_lex_model_building_service._operations.aws_deep_sense_model_building_service.get_bot_channel_association.get_bot_channel_association(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_lex_model_building_service.types.get_bot_channel_association_response.GetBotChannelAssociationResponse",
    ) -> dict[str, Any]:
        import capo_lex_model_building_service.types.get_bot_channel_association_response

        return capo_lex_model_building_service.types.get_bot_channel_association_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetBotChannelAssociation", redact_output=_redact_output),
    )
    input_: capo_lex_model_building_service.types.get_bot_channel_association_request.GetBotChannelAssociationRequest = {
        "name": name,
        "bot_name": bot_name,
        "bot_alias": bot_alias,
    }

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