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

***********************
list_notification_rules
***********************



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

  

  Returns a list of the notification rules for an Amazon Web Services account.

  

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


  **Request Syntax**
  ::

    response = client.list_notification_rules(
        Filters=[
            {
                'Name': 'EVENT_TYPE_ID'|'CREATED_BY'|'RESOURCE'|'TARGET_ADDRESS',
                'Value': 'string'
            },
        ],
        NextToken='string',
        MaxResults=123
    )
    
  :type Filters: list
  :param Filters: 

    The filters to use to return information by service or resource type. For valid values, see  ListNotificationRulesFilter.

     

    .. note::

      

      A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.

      

    

  
    - *(dict) --* 

      Information about a filter to apply to the list of returned notification rules. You can filter by event type, owner, resource, or target.

      

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

        The name of the attribute you want to use to filter the returned notification rules.

        

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

        The value of the attribute you want to use to filter the returned notification rules. For example, if you specify filtering by *RESOURCE* in Name, you might specify the ARN of a pipeline in CodePipeline for the value.

        

      
    

  :type NextToken: string
  :param NextToken: 

    An enumeration token that, when provided in a request, returns the next batch of the results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.

    

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

    
    ::

      {
          'NextToken': 'string',
          'NotificationRules': [
              {
                  'Id': 'string',
                  'Arn': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        An enumeration token that can be used in a request to return the next batch of the results.

        
      

      - **NotificationRules** *(list) --* 

        The list of notification rules for the Amazon Web Services account, by Amazon Resource Name (ARN) and ID.

        
        

        - *(dict) --* 

          Information about a specified notification rule.

          
          

          - **Id** *(string) --* 

            The unique ID of the notification rule.

            
          

          - **Arn** *(string) --* 

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

            
      
    
  
  **Exceptions**
  
  *   :py:class:`CodeStarNotifications.Client.exceptions.InvalidNextTokenException`

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

  