:doc:`LexModelBuildingService <../../lex-models>` / Client / get_bot_channel_associations

****************************
get_bot_channel_associations
****************************



.. py:method:: LexModelBuildingService.Client.get_bot_channel_associations(**kwargs)

  

  Returns a list of all of the channels associated with the specified bot.

   

  The ``GetBotChannelAssociations`` operation requires permissions for the ``lex:GetBotChannelAssociations`` action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociations>`_  


  **Request Syntax**
  ::

    response = client.get_bot_channel_associations(
        botName='string',
        botAlias='string',
        nextToken='string',
        maxResults=123,
        nameContains='string'
    )
    
  :type botName: string
  :param botName: **[REQUIRED]** 

    The name of the Amazon Lex bot in the association.

    

  
  :type botAlias: string
  :param botAlias: **[REQUIRED]** 

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

    

  
  :type nextToken: string
  :param nextToken: 

    A pagination token for fetching the next page of associations. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of associations, specify the pagination token in the next request.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of associations to return in the response. The default is 50.

    

  
  :type nameContains: string
  :param nameContains: 

    Substring to match in channel association names. An association will be returned if any part of its name matches the substring. For example, "xyz" matches both "xyzabc" and "abcxyz." To return all bot channel associations, use a hyphen ("-") as the ``nameContains`` parameter.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'botChannelAssociations': [
              {
                  'name': 'string',
                  'description': 'string',
                  'botAlias': 'string',
                  'botName': 'string',
                  'createdDate': datetime(2015, 1, 1),
                  'type': 'Facebook'|'Slack'|'Twilio-Sms'|'Kik',
                  'botConfiguration': {
                      'string': 'string'
                  },
                  'status': 'IN_PROGRESS'|'CREATED'|'FAILED',
                  'failureReason': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **botChannelAssociations** *(list) --* 

        An array of objects, one for each association, that provides information about the Amazon Lex bot and its association with the channel.

        
        

        - *(dict) --* 

          Represents an association between an Amazon Lex bot and an external messaging platform.

          
          

          - **name** *(string) --* 

            The name of the association between the bot and the channel.

            
          

          - **description** *(string) --* 

            A text description of the association you are creating.

            
          

          - **botAlias** *(string) --* 

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

            
          

          - **botName** *(string) --* 

            The name of the Amazon Lex bot to which this association is being made.

             

            .. note::

              

              Currently, Amazon Lex supports associations with Facebook and Slack, and Twilio.

              

            
          

          - **createdDate** *(datetime) --* 

            The date that the association between the Amazon Lex bot and the channel was created.

            
          

          - **type** *(string) --* 

            Specifies the type of association by indicating the type of channel being established between the Amazon Lex bot and the external messaging platform.

            
          

          - **botConfiguration** *(dict) --* 

            Provides information necessary to communicate with the messaging platform.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **status** *(string) --* 

            The status of the bot channel.

             

            
            * ``CREATED`` - The channel has been created and is ready for use.
             
            * ``IN_PROGRESS`` - Channel creation is in progress.
             
            * ``FAILED`` - There was an error creating the channel. For information about the reason for the failure, see the ``failureReason`` field.
            

            
          

          - **failureReason** *(string) --* 

            If ``status`` is ``FAILED``, Amazon Lex provides the reason that it failed to create the association.

            
      
    
      

      - **nextToken** *(string) --* 

        A pagination token that fetches the next page of associations. If the response to this call is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of associations, specify the pagination token in the next request.

        
  
  **Exceptions**
  
  *   :py:class:`LexModelBuildingService.Client.exceptions.LimitExceededException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.InternalFailureException`

  
  *   :py:class:`LexModelBuildingService.Client.exceptions.BadRequestException`

  