put_lifecycle_event_hook_execution_status
¶
put_lifecycle_event_hook_execution_status(
*,
config_overrides: Optional[CodeDeployClientConfig] = None,
deployment_id: Optional[DeploymentId] = None,
lifecycle_event_hook_execution_id: Optional[LifecycleEventHookExecutionId] = None,
status: Optional[LifecycleEventStatus] = None,
) -> PutLifecycleEventHookExecutionStatusOutput
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 and AppSpec 'hooks' Section for an Amazon ECS Deployment.
Parameters:
-
deployment_id(Optional[DeploymentId], default:None) –The unique ID of a deployment. Pass this ID to a Lambda function that validates a deployment lifecycle event.
-
lifecycle_event_hook_execution_id(Optional[LifecycleEventHookExecutionId], default:None) –The execution ID of a deployment's lifecycle hook. A deployment lifecycle hook is specified in the
hookssection of the AppSpec file. -
status(Optional[LifecycleEventStatus], default:None) –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
SucceededandFailedcan be passed successfully in your API call.
Raises:
-
DeploymentDoesNotExistException–The deployment with the user or Amazon Web Services account does not exist.
-
DeploymentIdRequiredException–At least one deployment ID must be specified.
-
InvalidDeploymentIdException–At least one of the deployment IDs was specified in an invalid format.
-
InvalidLifecycleEventHookExecutionIdException–A lifecycle event hook is invalid. Review the
hookssection in your AppSpec file to ensure the lifecycle events andhooksfunctions are valid. -
InvalidLifecycleEventHookExecutionStatusException–The result of a Lambda validation function that verifies a lifecycle event is invalid. It should return
SucceededorFailed. -
LifecycleEventAlreadyCompletedException–An attempt to return the status of an already completed lifecycle event occurred.
-
UnsupportedActionForDeploymentTypeException–A call was submitted that is not supported for the specified deployment type.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codedeploy/_services/code_deploy.py
2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 | |