put_lifecycle_event_hook_execution_status
async
¶
put_lifecycle_event_hook_execution_status(
*,
config_overrides: Optional[AsyncCodeDeployClientConfig] = 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/async_code_deploy.py
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 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 | |