:doc:`CloudFormation <../../cloudformation>` / Client / describe_stack_events

*********************
describe_stack_events
*********************



.. py:method:: CloudFormation.Client.describe_stack_events(**kwargs)

  

  Returns all stack related events for a specified stack in reverse chronological order. For more information about a stack's event history, see `Understand CloudFormation stack creation events <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html>`__ in the *CloudFormation User Guide*.

   

  .. note::

    

    You can list events for stacks that have failed to create or have been deleted by specifying the unique stack identifier (stack ID).

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackEvents>`_  


  **Request Syntax**
  ::

    response = client.describe_stack_events(
        StackName='string',
        NextToken='string'
    )
    
  :type StackName: string
  :param StackName: **[REQUIRED]** 

    The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:

     

    
    * Running stacks: You can specify either the stack's name or its unique stack ID.
     
    * Deleted stacks: You must specify the unique stack ID.
    

    

  
  :type NextToken: string
  :param NextToken: 

    The token for the next set of items to return. (You received this token from a previous call.)

    

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

    
    ::

      {
          'StackEvents': [
              {
                  'StackId': 'string',
                  'EventId': 'string',
                  'StackName': 'string',
                  'OperationId': 'string',
                  'LogicalResourceId': 'string',
                  'PhysicalResourceId': 'string',
                  'ResourceType': 'string',
                  'Timestamp': datetime(2015, 1, 1),
                  'ResourceStatus': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATE_COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'DELETE_SKIPPED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED'|'UPDATE_COMPLETE'|'IMPORT_FAILED'|'IMPORT_COMPLETE'|'IMPORT_IN_PROGRESS'|'IMPORT_ROLLBACK_IN_PROGRESS'|'IMPORT_ROLLBACK_FAILED'|'IMPORT_ROLLBACK_COMPLETE'|'EXPORT_FAILED'|'EXPORT_COMPLETE'|'EXPORT_IN_PROGRESS'|'EXPORT_ROLLBACK_IN_PROGRESS'|'EXPORT_ROLLBACK_FAILED'|'EXPORT_ROLLBACK_COMPLETE'|'UPDATE_ROLLBACK_IN_PROGRESS'|'UPDATE_ROLLBACK_COMPLETE'|'UPDATE_ROLLBACK_FAILED'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_COMPLETE'|'ROLLBACK_FAILED',
                  'ResourceStatusReason': 'string',
                  'ResourceProperties': 'string',
                  'ClientRequestToken': 'string',
                  'HookType': 'string',
                  'HookStatus': 'HOOK_IN_PROGRESS'|'HOOK_COMPLETE_SUCCEEDED'|'HOOK_COMPLETE_FAILED'|'HOOK_FAILED',
                  'HookStatusReason': 'string',
                  'HookInvocationPoint': 'PRE_PROVISION',
                  'HookInvocationId': 'string',
                  'HookFailureMode': 'FAIL'|'WARN',
                  'DetailedStatus': 'CONFIGURATION_COMPLETE'|'VALIDATION_FAILED'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The output for a  DescribeStackEvents action.

      
      

      - **StackEvents** *(list) --* 

        A list of ``StackEvents`` structures.

        
        

        - *(dict) --* 

          The ``StackEvent`` data type.

          
          

          - **StackId** *(string) --* 

            The unique ID name of the instance of the stack.

            
          

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

            The unique identifier of this event.

            
          

          - **StackName** *(string) --* 

            The name associated with a stack.

            
          

          - **OperationId** *(string) --* 

            The unique identifier of the operation that generated this stack event.

            
          

          - **LogicalResourceId** *(string) --* 

            The logical name of the resource specified in the template.

            
          

          - **PhysicalResourceId** *(string) --* 

            The name or unique identifier associated with the physical instance of the resource.

            
          

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

            Type of resource. For more information, see `Amazon Web Services resource and property types reference <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html>`__ in the *CloudFormation User Guide*.

            
          

          - **Timestamp** *(datetime) --* 

            Time the status was updated.

            
          

          - **ResourceStatus** *(string) --* 

            Current status of the resource.

            
          

          - **ResourceStatusReason** *(string) --* 

            Success/failure message associated with the resource.

            
          

          - **ResourceProperties** *(string) --* 

            BLOB of the properties used to create the resource.

            
          

          - **ClientRequestToken** *(string) --* 

            The token passed to the operation that generated this event.

             

            All events triggered by a given stack operation are assigned the same client request token, which you can use to track operations. For example, if you execute a ``CreateStack`` operation with the token ``token1``, then all the ``StackEvents`` generated by that operation will have ``ClientRequestToken`` set as ``token1``.

             

            In the console, stack operations display the client request token on the Events tab. Stack operations that are initiated from the console use the token format *Console-StackOperation-ID*, which helps you easily identify the stack operation . For example, if you create a stack using the console, each stack event would be assigned the same token in the following format: ``Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002``.

            
          

          - **HookType** *(string) --* 

            The name of the Hook.

            
          

          - **HookStatus** *(string) --* 

            Provides the status of the change set Hook.

            
          

          - **HookStatusReason** *(string) --* 

            Provides the reason for the Hook status.

            
          

          - **HookInvocationPoint** *(string) --* 

            The specific point in the provisioning process where the Hook is invoked.

            
          

          - **HookInvocationId** *(string) --* 

            The unique identifier of the Hook invocation.

            
          

          - **HookFailureMode** *(string) --* 

            Specify the Hook failure mode for non-compliant resources in the followings ways.

             

            
            * ``FAIL`` Stops provisioning resources.
             
            * ``WARN`` Allows provisioning to continue with a warning message.
            

            
          

          - **DetailedStatus** *(string) --* 

            An optional field that contains information about the detailed status of the stack event.

             

            
            * ``CONFIGURATION_COMPLETE`` - all of the resources in the stack have reached that event. For more information, see `Understand CloudFormation stack creation events <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html>`__ in the *CloudFormation User Guide*.
            

             

            
            * ``VALIDATION_FAILED`` - template validation failed because of invalid properties in the template. The ``ResourceStatusReason`` field shows what properties are defined incorrectly.
            

            
      
    
      

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

        If the output exceeds 1 MB in size, a string that identifies the next page of events. If no additional page exists, this value is null.

        
  