:doc:`MediaTailor <../../mediatailor>` / Client / list_alerts

***********
list_alerts
***********



.. py:method:: MediaTailor.Client.list_alerts(**kwargs)

  

  Lists the alerts that are associated with a MediaTailor channel assembly resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediatailor-2018-04-23/ListAlerts>`_  


  **Request Syntax**
  ::

    response = client.list_alerts(
        MaxResults=123,
        NextToken='string',
        ResourceArn='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of alerts that you want MediaTailor to return in response to the current request. If there are more than ``MaxResults`` alerts, use the value of ``NextToken`` in the response to get the next page of results.

     

    The default value is 100. MediaTailor uses DynamoDB-based pagination, which means that a response might contain fewer than ``MaxResults`` items, including 0 items, even when more results are available. To retrieve all results, you must continue making requests using the ``NextToken`` value from each response until the response no longer includes a ``NextToken`` value.

    

  
  :type NextToken: string
  :param NextToken: 

    Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

     

    For the first ``ListAlerts`` request, omit this value. For subsequent requests, get the value of ``NextToken`` from the previous response and specify that value for ``NextToken`` in the request. Continue making requests until the response no longer includes a ``NextToken`` value, which indicates that all results have been retrieved.

    

  
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the resource.

    

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

    
    ::

      {
          'Items': [
              {
                  'AlertCode': 'string',
                  'AlertMessage': 'string',
                  'LastModifiedTime': datetime(2015, 1, 1),
                  'RelatedResourceArns': [
                      'string',
                  ],
                  'ResourceArn': 'string',
                  'Category': 'SCHEDULING_ERROR'|'PLAYBACK_WARNING'|'INFO'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Items** *(list) --* 

        A list of alerts that are associated with this resource.

        
        

        - *(dict) --* 

          Alert configuration parameters.

          
          

          - **AlertCode** *(string) --* 

            The code for the alert. For example, ``NOT_PROCESSED``.

            
          

          - **AlertMessage** *(string) --* 

            If an alert is generated for a resource, an explanation of the reason for the alert.

            
          

          - **LastModifiedTime** *(datetime) --* 

            The timestamp when the alert was last modified.

            
          

          - **RelatedResourceArns** *(list) --* 

            The Amazon Resource Names (ARNs) related to this alert.

            
            

            - *(string) --* 
        
          

          - **ResourceArn** *(string) --* 

            The Amazon Resource Name (ARN) of the resource.

            
          

          - **Category** *(string) --* 

            The category that MediaTailor assigns to the alert.

            
      
    
      

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

        Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

        
  