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

*****************
list_hook_results
*****************



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

  

  Returns summaries of invoked Hooks. For more information, see `View invocation summaries for CloudFormation Hooks <https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/hooks-view-invocations.html>`__ in the *CloudFormation Hooks User Guide*.

   

  This operation supports the following parameter combinations:

   

  
  * No parameters: Returns all Hook invocation summaries.
   
  * ``TypeArn`` only: Returns summaries for a specific Hook.
   
  * ``TypeArn`` and ``Status``: Returns summaries for a specific Hook filtered by status.
   
  * ``TargetId`` and ``TargetType``: Returns summaries for a specific Hook invocation target.
  

  

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


  **Request Syntax**
  ::

    response = client.list_hook_results(
        TargetType='CHANGE_SET'|'STACK'|'RESOURCE'|'CLOUD_CONTROL',
        TargetId='string',
        TypeArn='string',
        Status='HOOK_IN_PROGRESS'|'HOOK_COMPLETE_SUCCEEDED'|'HOOK_COMPLETE_FAILED'|'HOOK_FAILED',
        NextToken='string'
    )
    
  :type TargetType: string
  :param TargetType: 

    Filters results by target type. Currently, only ``CHANGE_SET`` and ``CLOUD_CONTROL`` are supported filter options.

     

    Required when ``TargetId`` is specified and cannot be used otherwise.

    

  
  :type TargetId: string
  :param TargetId: 

    Filters results by the unique identifier of the target the Hook was invoked against.

     

    For change sets, this is the change set ARN. When the target is a Cloud Control API operation, this value must be the ``HookRequestToken`` returned by the Cloud Control API request. For more information on the ``HookRequestToken``, see `ProgressEvent <https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_ProgressEvent.html>`__.

     

    Required when ``TargetType`` is specified and cannot be used otherwise.

    

  
  :type TypeArn: string
  :param TypeArn: 

    Filters results by the ARN of the Hook. Can be used alone or in combination with ``Status``.

    

  
  :type Status: string
  :param Status: 

    Filters results by the status of Hook invocations. Can only be used in combination with ``TypeArn``. Valid values are:

     

    
    * ``HOOK_IN_PROGRESS``: The Hook is currently running.
     
    * ``HOOK_COMPLETE_SUCCEEDED``: The Hook completed successfully.
     
    * ``HOOK_COMPLETE_FAILED``: The Hook completed but failed validation.
     
    * ``HOOK_FAILED``: The Hook encountered an error during execution.
    

    

  
  :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**

    
    ::

      {
          'TargetType': 'CHANGE_SET'|'STACK'|'RESOURCE'|'CLOUD_CONTROL',
          'TargetId': 'string',
          'HookResults': [
              {
                  'HookResultId': 'string',
                  'InvocationPoint': 'PRE_PROVISION',
                  'FailureMode': 'FAIL'|'WARN',
                  'TypeName': 'string',
                  'TypeVersionId': 'string',
                  'TypeConfigurationVersionId': 'string',
                  'Status': 'HOOK_IN_PROGRESS'|'HOOK_COMPLETE_SUCCEEDED'|'HOOK_COMPLETE_FAILED'|'HOOK_FAILED',
                  'HookStatusReason': 'string',
                  'InvokedAt': datetime(2015, 1, 1),
                  'TargetType': 'CHANGE_SET'|'STACK'|'RESOURCE'|'CLOUD_CONTROL',
                  'TargetId': 'string',
                  'TypeArn': 'string',
                  'HookExecutionTarget': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **TargetType** *(string) --* 

        The target type.

        
      

      - **TargetId** *(string) --* 

        The unique identifier of the Hook invocation target.

        
      

      - **HookResults** *(list) --* 

        A list of ``HookResultSummary`` structures that provides the status and Hook status reason for each Hook invocation for the specified target.

        
        

        - *(dict) --* 

          A ``ListHookResults`` call returns a summary of a Hook invocation.

          
          

          - **HookResultId** *(string) --* 

            The unique identifier for this Hook invocation result.

            
          

          - **InvocationPoint** *(string) --* 

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

            
          

          - **FailureMode** *(string) --* 

            The failure mode of the invocation.

            
          

          - **TypeName** *(string) --* 

            The name of the Hook that was invoked.

            
          

          - **TypeVersionId** *(string) --* 

            The version of the Hook that was invoked.

            
          

          - **TypeConfigurationVersionId** *(string) --* 

            The version of the Hook configuration.

            
          

          - **Status** *(string) --* 

            The status of the Hook invocation. The following statuses are possible:

             

            
            * ``HOOK_IN_PROGRESS``: The Hook is currently running.
             
            * ``HOOK_COMPLETE_SUCCEEDED``: The Hook completed successfully.
             
            * ``HOOK_COMPLETE_FAILED``: The Hook completed but failed validation.
             
            * ``HOOK_FAILED``: The Hook encountered an error during execution.
            

            
          

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

            A description of the Hook results status. For example, if the Hook result is in a failed state, this may contain additional information for the failed state.

            
          

          - **InvokedAt** *(datetime) --* 

            The timestamp when the Hook was invoked.

             

            Only shown in responses when the request does not specify ``TargetType`` and ``TargetId`` filters.

            
          

          - **TargetType** *(string) --* 

            The target type that the Hook was invoked against.

            
          

          - **TargetId** *(string) --* 

            The unique identifier of the Hook invocation target.

            
          

          - **TypeArn** *(string) --* 

            The ARN of the Hook that was invoked.

            
          

          - **HookExecutionTarget** *(string) --* 

            The Amazon Resource Name (ARN) of the target stack or request token of the Cloud Control API operation.

             

            Only shown in responses when the request does not specify ``TargetType`` and ``TargetId`` filters.

            
      
    
      

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

        Pagination token, ``null`` or empty if no more results.

        
  
  **Exceptions**
  
  *   :py:class:`CloudFormation.Client.exceptions.HookResultNotFoundException`

  