:doc:`EventBridge <../../events>` / Client / list_rule_names_by_target

*************************
list_rule_names_by_target
*************************



.. py:method:: EventBridge.Client.list_rule_names_by_target(**kwargs)

  

  Lists the rules for the specified target. You can see which of the rules in Amazon EventBridge can invoke a specific target in your account.

   

  The maximum number of results per page for requests is 100.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListRuleNamesByTarget>`_  


  **Request Syntax**
  ::

    response = client.list_rule_names_by_target(
        TargetArn='string',
        EventBusName='string',
        NextToken='string',
        Limit=123
    )
    
  :type TargetArn: string
  :param TargetArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the target resource.

    

  
  :type EventBusName: string
  :param EventBusName: 

    The name or ARN of the event bus to list rules for. If you omit this, the default event bus is used.

    

  
  :type NextToken: string
  :param NextToken: 

    The token returned by a previous call, which you can use to retrieve the next set of results.

     

    The value of ``nextToken`` is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.

     

    Using an expired pagination token results in an ``HTTP 400 InvalidToken`` error.

    

  
  :type Limit: integer
  :param Limit: 

    The maximum number of results to return.

    

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

    
    ::

      {
          'RuleNames': [
              'string',
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RuleNames** *(list) --* 

        The names of the rules that can invoke the given target.

        
        

        - *(string) --* 
    
      

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

        A token indicating there are more results available. If there are no more results, no token is included in the response.

         

        The value of ``nextToken`` is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.

         

        Using an expired pagination token results in an ``HTTP 400 InvalidToken`` error.

        
  
  **Exceptions**
  
  *   :py:class:`EventBridge.Client.exceptions.InternalException`

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

  