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

ListDeploymentTargets

Returns an array of target IDs that are associated a deployment.

Request Syntax

{ "deploymentId": "string", "nextToken": "string", "targetFilters": { "string" : [ "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 unique ID of a deployment.

Type: String

Required: No

nextToken

A token identifier returned from the previous ListDeploymentTargets call. It can be used to return the next set of deployment targets in the list.

Type: String

Required: No

targetFilters

A key used to filter the returned targets.

Type: String to array of strings map

Valid Keys: TargetStatus | ServerInstanceLabel

Required: No

Response Syntax

{ "nextToken": "string", "targetIds": [ "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.

nextToken

If a large amount of information is returned, a token identifier is also returned. It can be used in a subsequent ListDeploymentTargets call to return the next set of deployment targets in the list.

Type: String

targetIds

The unique IDs of deployment targets.

Type: Array of strings

Errors

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

DeploymentDoesNotExistException

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

HTTP Status Code: 400

DeploymentIdRequiredException

At least one deployment ID must be specified.

HTTP Status Code: 400

DeploymentNotStartedException

The specified deployment has not started.

HTTP Status Code: 400

InvalidDeploymentIdException

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

HTTP Status Code: 400

InvalidDeploymentInstanceTypeException

An instance type was specified for an in-place deployment. Instance types are supported for blue/green deployments only.

HTTP Status Code: 400

InvalidInstanceStatusException

The specified instance status does not exist.

HTTP Status Code: 400

InvalidInstanceTypeException

An invalid instance type was specified for instances in a blue/green deployment. Valid values include "Blue" for an original environment and "Green" for a replacement environment.

HTTP Status Code: 400

InvalidNextTokenException

The next token 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: