:doc:`Chatbot <../../chatbot>` / Client / get_custom_action

*****************
get_custom_action
*****************



.. py:method:: Chatbot.Client.get_custom_action(**kwargs)

  

  Returns a custom action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chatbot-2017-10-11/GetCustomAction>`_  


  **Request Syntax**
  ::

    response = client.get_custom_action(
        CustomActionArn='string'
    )
    
  :type CustomActionArn: string
  :param CustomActionArn: **[REQUIRED]** 

    Returns the fully defined Amazon Resource Name (ARN) of the custom action.

    

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

    
    ::

      {
          'CustomAction': {
              'CustomActionArn': 'string',
              'Definition': {
                  'CommandText': 'string'
              },
              'AliasName': 'string',
              'Attachments': [
                  {
                      'NotificationType': 'string',
                      'ButtonText': 'string',
                      'Criteria': [
                          {
                              'Operator': 'HAS_VALUE'|'EQUALS',
                              'VariableName': 'string',
                              'Value': 'string'
                          },
                      ],
                      'Variables': {
                          'string': 'string'
                      }
                  },
              ],
              'ActionName': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CustomAction** *(dict) --* 

        Returns the custom action.

        
        

        - **CustomActionArn** *(string) --* 

          The fully defined Amazon Resource Name (ARN) of the custom action.

          
        

        - **Definition** *(dict) --* 

          The definition of the command to run when invoked an alias or as an action button.

          
          

          - **CommandText** *(string) --* 

            The command string to run which may include variables by prefixing with a dollar sign ($).

            
      
        

        - **AliasName** *(string) --* 

          The name used to invoke this action in the chat channel. For example, ``@aws run my-alias``.

          
        

        - **Attachments** *(list) --* 

          Defines when this custom action button should be attached to a notification.

          
          

          - *(dict) --* 

            Defines when a custom action button should be attached to a notification.

            
            

            - **NotificationType** *(string) --* 

              The type of notification that the custom action should be attached to.

              
            

            - **ButtonText** *(string) --* 

              The text of the button that appears on the notification.

              
            

            - **Criteria** *(list) --* 

              The criteria for when a button should be shown based on values in the notification.

              
              

              - *(dict) --* 

                A criteria for when a button should be shown based on values in the notification

                
                

                - **Operator** *(string) --* 

                  The operation to perform on the named variable.

                  
                

                - **VariableName** *(string) --* 

                  The name of the variable to operate on.

                  
                

                - **Value** *(string) --* 

                  A value that is compared with the actual value of the variable based on the behavior of the operator.

                  
            
          
            

            - **Variables** *(dict) --* 

              The variables to extract from the notification.

              
              

              - *(string) --* 
                

                - *(string) --* 
          
        
        
      
        

        - **ActionName** *(string) --* 

          The name of the custom action that is included in the ARN.

          
    
  
  **Exceptions**
  
  *   :py:class:`Chatbot.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Chatbot.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Chatbot.Client.exceptions.InternalServiceError`

  
  *   :py:class:`Chatbot.Client.exceptions.UnauthorizedException`

  