listDeploymentTargets method
Returns an array of target IDs that are associated a deployment.
May throw DeploymentIdRequiredException. May throw DeploymentDoesNotExistException. May throw DeploymentNotStartedException. May throw InvalidNextTokenException. May throw InvalidDeploymentIdException. May throw InvalidInstanceStatusException. May throw InvalidInstanceTypeException. May throw InvalidDeploymentInstanceTypeException.
Parameter deploymentId
:
The unique ID of a deployment.
Parameter 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.
Parameter targetFilters
:
A key used to filter the returned targets. The two valid values are:
-
TargetStatus
- ATargetStatus
filter string can beFailed
,InProgress
,Pending
,Ready
,Skipped
,Succeeded
, orUnknown
. -
ServerInstanceLabel
- AServerInstanceLabel
filter string can beBlue
orGreen
.
Implementation
Future<ListDeploymentTargetsOutput> listDeploymentTargets({
String? deploymentId,
String? nextToken,
Map<TargetFilterName, List<String>>? targetFilters,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeDeploy_20141006.ListDeploymentTargets'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (deploymentId != null) 'deploymentId': deploymentId,
if (nextToken != null) 'nextToken': nextToken,
if (targetFilters != null)
'targetFilters':
targetFilters.map((k, e) => MapEntry(k.toValue(), e)),
},
);
return ListDeploymentTargetsOutput.fromJson(jsonResponse.body);
}