:doc:`CodeDeploy <../../codedeploy>` / Client / put_lifecycle_event_hook_execution_status

*****************************************
put_lifecycle_event_hook_execution_status
*****************************************



.. py:method:: CodeDeploy.Client.put_lifecycle_event_hook_execution_status(**kwargs)

  

  Sets the result of a Lambda validation function. The function validates lifecycle hooks during a deployment that uses the Lambda or Amazon ECS compute platform. For Lambda deployments, the available lifecycle hooks are ``BeforeAllowTraffic`` and ``AfterAllowTraffic``. For Amazon ECS deployments, the available lifecycle hooks are ``BeforeInstall``, ``AfterInstall``, ``AfterAllowTestTraffic``, ``BeforeAllowTraffic``, and ``AfterAllowTraffic``. Lambda validation functions return ``Succeeded`` or ``Failed``. For more information, see `AppSpec 'hooks' Section for an Lambda Deployment <https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda>`__ and `AppSpec 'hooks' Section for an Amazon ECS Deployment <https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/PutLifecycleEventHookExecutionStatus>`_  


  **Request Syntax**
  ::

    response = client.put_lifecycle_event_hook_execution_status(
        deploymentId='string',
        lifecycleEventHookExecutionId='string',
        status='Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
    )
    
  :type deploymentId: string
  :param deploymentId: 

    The unique ID of a deployment. Pass this ID to a Lambda function that validates a deployment lifecycle event.

    

  
  :type lifecycleEventHookExecutionId: string
  :param lifecycleEventHookExecutionId: 

    The execution ID of a deployment's lifecycle hook. A deployment lifecycle hook is specified in the ``hooks`` section of the AppSpec file.

    

  
  :type status: string
  :param status: 

    The result of a Lambda function that validates a deployment lifecycle event. The values listed in **Valid Values** are valid for lifecycle statuses in general; however, only ``Succeeded`` and ``Failed`` can be passed successfully in your API call.

    

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

    
    ::

      {
          'lifecycleEventHookExecutionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **lifecycleEventHookExecutionId** *(string) --* 

        The execution ID of the lifecycle event hook. A hook is specified in the ``hooks`` section of the deployment's AppSpec file.

        
  
  **Exceptions**
  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidLifecycleEventHookExecutionStatusException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidLifecycleEventHookExecutionIdException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.LifecycleEventAlreadyCompletedException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentIdRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentDoesNotExistException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidDeploymentIdException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.UnsupportedActionForDeploymentTypeException`

  