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

********************
update_custom_action
********************



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

  

  Updates a custom action.

  

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


  **Request Syntax**
  ::

    response = client.update_custom_action(
        CustomActionArn='string',
        Definition={
            'CommandText': 'string'
        },
        AliasName='string',
        Attachments=[
            {
                'NotificationType': 'string',
                'ButtonText': 'string',
                'Criteria': [
                    {
                        'Operator': 'HAS_VALUE'|'EQUALS',
                        'VariableName': 'string',
                        'Value': 'string'
                    },
                ],
                'Variables': {
                    'string': 'string'
                }
            },
        ]
    )
    
  :type CustomActionArn: string
  :param CustomActionArn: **[REQUIRED]** 

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

    

  
  :type Definition: dict
  :param Definition: **[REQUIRED]** 

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

    

  
    - **CommandText** *(string) --* **[REQUIRED]** 

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

      

    
  
  :type AliasName: string
  :param AliasName: 

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

    

  
  :type Attachments: list
  :param Attachments: 

    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) --* **[REQUIRED]** 

            The operation to perform on the named variable.

            

          
          - **VariableName** *(string) --* **[REQUIRED]** 

            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) --* 

          
    
  
    

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

    
    ::

      {
          'CustomActionArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The fully defined ARN of the custom action.

        
  
  **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`

  