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

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.


Returns information about a deployment target.

Request Syntax

{ "deploymentId": "string", "targetId": "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.


The unique ID of a deployment.

Type: String

Required: No


The unique ID of a deployment target.

Type: String

Required: No

Response Syntax

{ "deploymentTarget": { "deploymentTargetType": "string", "ecsTarget": { "deploymentId": "string", "lastUpdatedAt": number, "lifecycleEvents": [ { "diagnostics": { "errorCode": "string", "logTail": "string", "message": "string", "scriptName": "string" }, "endTime": number, "lifecycleEventName": "string", "startTime": number, "status": "string" } ], "status": "string", "targetArn": "string", "targetId": "string", "taskSetsInfo": [ { "desiredCount": number, "identifer": "string", "pendingCount": number, "runningCount": number, "status": "string", "targetGroup": { "name": "string" }, "taskSetLabel": "string", "trafficWeight": number } ] }, "instanceTarget": { "deploymentId": "string", "instanceLabel": "string", "lastUpdatedAt": number, "lifecycleEvents": [ { "diagnostics": { "errorCode": "string", "logTail": "string", "message": "string", "scriptName": "string" }, "endTime": number, "lifecycleEventName": "string", "startTime": number, "status": "string" } ], "status": "string", "targetArn": "string", "targetId": "string" }, "lambdaTarget": { "deploymentId": "string", "lambdaFunctionInfo": { "currentVersion": "string", "functionAlias": "string", "functionName": "string", "targetVersion": "string", "targetVersionWeight": number }, "lastUpdatedAt": number, "lifecycleEvents": [ { "diagnostics": { "errorCode": "string", "logTail": "string", "message": "string", "scriptName": "string" }, "endTime": number, "lifecycleEventName": "string", "startTime": number, "status": "string" } ], "status": "string", "targetArn": "string", "targetId": "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.


A deployment target that contains information about a deployment such as its status, lifecyle events, and when it was last updated. It also contains metadata about the deployment target. The deployment target metadata depends on the deployment target's type (instanceTarget, lambdaTarget, or ecsTarget).

Type: DeploymentTarget object


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


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

HTTP Status Code: 400


At least one deployment ID must be specified.

HTTP Status Code: 400


The specified deployment has not started.

HTTP Status Code: 400


The provided target ID does not belong to the attempted deployment.

HTTP Status Code: 400


A deployment target ID was not provided.

HTTP Status Code: 400


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

HTTP Status Code: 400


The target ID provided was not valid.

HTTP Status Code: 400


The on-premises instance name was specified in an invalid format.

HTTP Status Code: 400

See Also

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