listDeploymentTargets method
Returns an array of target IDs that are associated a deployment.
May throw DeploymentDoesNotExistException.
May throw DeploymentIdRequiredException.
May throw DeploymentNotStartedException.
May throw InvalidDeploymentIdException.
May throw InvalidDeploymentInstanceTypeException.
May throw InvalidInstanceStatusException.
May throw InvalidInstanceTypeException.
May throw InvalidNextTokenException.
May throw InvalidTargetFilterNameException.
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- ATargetStatusfilter string can beFailed,InProgress,Pending,Ready,Skipped,Succeeded, orUnknown. -
ServerInstanceLabel- AServerInstanceLabelfilter string can beBlueorGreen.
Implementation
Future<ListDeploymentTargetsOutput> listDeploymentTargets({
required 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: {
'deploymentId': deploymentId,
if (nextToken != null) 'nextToken': nextToken,
if (targetFilters != null)
'targetFilters': targetFilters.map((k, e) => MapEntry(k.value, e)),
},
);
return ListDeploymentTargetsOutput.fromJson(jsonResponse.body);
}