:doc:`CodeStarNotifications <../../codestar-notifications>` / Client / update_notification_rule

************************
update_notification_rule
************************



.. py:method:: CodeStarNotifications.Client.update_notification_rule(**kwargs)

  

  Updates a notification rule for a resource. You can change the events that trigger the notification rule, the status of the rule, and the targets that receive the notifications.

   

  .. note::

    

    To add or remove tags for a notification rule, you must use  TagResource and  UntagResource.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codestar-notifications-2019-10-15/UpdateNotificationRule>`_  


  **Request Syntax**
  ::

    response = client.update_notification_rule(
        Arn='string',
        Name='string',
        Status='ENABLED'|'DISABLED',
        EventTypeIds=[
            'string',
        ],
        Targets=[
            {
                'TargetType': 'string',
                'TargetAddress': 'string'
            },
        ],
        DetailType='BASIC'|'FULL'
    )
    
  :type Arn: string
  :param Arn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the notification rule.

    

  
  :type Name: string
  :param Name: 

    The name of the notification rule.

    

  
  :type Status: string
  :param Status: 

    The status of the notification rule. Valid statuses include enabled (sending notifications) or disabled (not sending notifications).

    

  
  :type EventTypeIds: list
  :param EventTypeIds: 

    A list of event types associated with this notification rule. For a complete list of event types and IDs, see `Notification concepts <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api>`__ in the *Developer Tools Console User Guide*.

    

  
    - *(string) --* 

    

  :type Targets: list
  :param Targets: 

    The address and type of the targets to receive notifications from this notification rule.

    

  
    - *(dict) --* 

      Information about the Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients associated with a notification rule.

      

    
      - **TargetType** *(string) --* 

        The target type. Can be an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.

         

        
        * Amazon Q Developer in chat applications topics are specified as ``SNS``.
         
        * Amazon Q Developer in chat applications clients are specified as ``AWSChatbotSlack``.
        

        

      
      - **TargetAddress** *(string) --* 

        The Amazon Resource Name (ARN) of the Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.

        

      
    

  :type DetailType: string
  :param DetailType: 

    The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by CodeStar Notifications and/or the service for the resource for which the notification is created.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`CodeStarNotifications.Client.exceptions.ValidationException`

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

  
  *   :py:class:`CodeStarNotifications.Client.exceptions.ConfigurationException`

  