:doc:`SageMaker <../../sagemaker>` / Client / list_cluster_events

*******************
list_cluster_events
*******************



.. py:method:: SageMaker.Client.list_cluster_events(**kwargs)

  

  Retrieves a list of event summaries for a specified HyperPod cluster. The operation supports filtering, sorting, and pagination of results. This functionality is only supported when the ``NodeProvisioningMode`` is set to ``Continuous``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListClusterEvents>`_  


  **Request Syntax**
  ::

    response = client.list_cluster_events(
        ClusterName='string',
        InstanceGroupName='string',
        NodeId='string',
        EventTimeAfter=datetime(2015, 1, 1),
        EventTimeBefore=datetime(2015, 1, 1),
        SortBy='EventTime',
        SortOrder='Ascending'|'Descending',
        ResourceType='Cluster'|'InstanceGroup'|'Instance',
        MaxResults=123,
        NextToken='string'
    )
    
  :type ClusterName: string
  :param ClusterName: **[REQUIRED]** 

    The name or Amazon Resource Name (ARN) of the HyperPod cluster for which to list events.

    

  
  :type InstanceGroupName: string
  :param InstanceGroupName: 

    The name of the instance group to filter events. If specified, only events related to this instance group are returned.

    

  
  :type NodeId: string
  :param NodeId: 

    The EC2 instance ID to filter events. If specified, only events related to this instance are returned.

    

  
  :type EventTimeAfter: datetime
  :param EventTimeAfter: 

    The start of the time range for filtering events. Only events that occurred after this time are included in the results.

    

  
  :type EventTimeBefore: datetime
  :param EventTimeBefore: 

    The end of the time range for filtering events. Only events that occurred before this time are included in the results.

    

  
  :type SortBy: string
  :param SortBy: 

    The field to use for sorting the event list. Currently, the only supported value is ``EventTime``.

    

  
  :type SortOrder: string
  :param SortOrder: 

    The order in which to sort the results. Valid values are ``Ascending`` or ``Descending`` (the default is ``Descending``).

    

  
  :type ResourceType: string
  :param ResourceType: 

    The type of resource for which to filter events. Valid values are ``Cluster``, ``InstanceGroup``, or ``Instance``.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of events to return in the response. Valid range is 1 to 100.

    

  
  :type NextToken: string
  :param NextToken: 

    A token to retrieve the next set of results. This token is obtained from the output of a previous ``ListClusterEvents`` call.

    

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

    
    ::

      {
          'NextToken': 'string',
          'Events': [
              {
                  'EventId': 'string',
                  'ClusterArn': 'string',
                  'ClusterName': 'string',
                  'InstanceGroupName': 'string',
                  'InstanceId': 'string',
                  'ResourceType': 'Cluster'|'InstanceGroup'|'Instance',
                  'EventTime': datetime(2015, 1, 1),
                  'Description': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        A token to retrieve the next set of results. Include this token in subsequent ``ListClusterEvents`` calls to fetch more events.

        
      

      - **Events** *(list) --* 

        A list of event summaries matching the specified criteria.

        
        

        - *(dict) --* 

          A summary of an event in a HyperPod cluster.

          
          

          - **EventId** *(string) --* 

            The unique identifier (UUID) of the event.

            
          

          - **ClusterArn** *(string) --* 

            The Amazon Resource Name (ARN) of the HyperPod cluster associated with the event.

            
          

          - **ClusterName** *(string) --* 

            The name of the HyperPod cluster associated with the event.

            
          

          - **InstanceGroupName** *(string) --* 

            The name of the instance group associated with the event, if applicable.

            
          

          - **InstanceId** *(string) --* 

            The Amazon Elastic Compute Cloud (EC2) instance ID associated with the event, if applicable.

            
          

          - **ResourceType** *(string) --* 

            The type of resource associated with the event. Valid values are ``Cluster``, ``InstanceGroup``, or ``Instance``.

            
          

          - **EventTime** *(datetime) --* 

            The timestamp when the event occurred.

            
          

          - **Description** *(string) --* 

            A brief, human-readable description of the event.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`SageMaker.Client.exceptions.ResourceNotFound`

  