Menu
AWS CodeDeploy
API Reference (API Version 2014-10-06)

PutLifecycleEventHookExecutionStatus

Sets the result of a Lambda validation function. The function validates one or both lifecycle events (BeforeAllowTraffic and AfterAllowTraffic) and returns Succeeded or Failed.

Request Syntax

{ "deploymentId": "string", "lifecycleEventHookExecutionId": "string", "status": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

deploymentId

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

Type: String

Required: No

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

Required: No

status

The result of a Lambda function that validates a deployment lifecycle event (Succeeded or Failed).

Type: String

Valid Values: Pending | InProgress | Succeeded | Failed | Skipped | Unknown

Required: No

Response Syntax

{ "lifecycleEventHookExecutionId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

lifecycleEventHookExecutionId

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

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

DeploymentDoesNotExistException

The deployment does not exist with the applicable IAM user or AWS account.

HTTP Status Code: 400

DeploymentIdRequiredException

At least one deployment ID must be specified.

HTTP Status Code: 400

InvalidDeploymentIdException

At least one of the deployment IDs was specified in an invalid format.

HTTP Status Code: 400

InvalidLifecycleEventHookExecutionIdException

A lifecycle event hook is invalid. Review the hooks section in your AppSpec file to ensure the lifecycle events and hooks functions are valid.

HTTP Status Code: 400

InvalidLifecycleEventHookExecutionStatusException

The result of a Lambda validation function that verifies a lifecycle event is invalid. It should return Succeeded or Failed.

HTTP Status Code: 400

LifecycleEventAlreadyCompletedException

An attempt to return the status of an already completed lifecycle event occurred.

HTTP Status Code: 400

UnsupportedActionForDeploymentTypeException

A call was submitted that is not supported for the specified deployment type.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: