listDeploymentInstances method

  1. @Deprecated('Deprecated')
Future<ListDeploymentInstancesOutput> listDeploymentInstances({
  1. required String deploymentId,
  2. List<InstanceStatus>? instanceStatusFilter,
  3. List<InstanceType>? instanceTypeFilter,
  4. String? nextToken,
})
Lists the instance for a deployment associated with the IAM user or AWS account.

May throw DeploymentIdRequiredException. May throw DeploymentDoesNotExistException. May throw DeploymentNotStartedException. May throw InvalidNextTokenException. May throw InvalidDeploymentIdException. May throw InvalidInstanceStatusException. May throw InvalidInstanceTypeException. May throw InvalidDeploymentInstanceTypeException. May throw InvalidTargetFilterNameException. May throw InvalidComputePlatformException.

Parameter deploymentId : The unique ID of a deployment.

Parameter instanceStatusFilter : A subset of instances to list by status:

  • Pending: Include those instances with pending deployments.
  • InProgress: Include those instances where deployments are still in progress.
  • Succeeded: Include those instances with successful deployments.
  • Failed: Include those instances with failed deployments.
  • Skipped: Include those instances with skipped deployments.
  • Unknown: Include those instances with deployments in an unknown state.

Parameter instanceTypeFilter : The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.

Parameter nextToken : An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.

Implementation

@Deprecated('Deprecated')
Future<ListDeploymentInstancesOutput> listDeploymentInstances({
  required String deploymentId,
  List<InstanceStatus>? instanceStatusFilter,
  List<InstanceType>? instanceTypeFilter,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(deploymentId, 'deploymentId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeDeploy_20141006.ListDeploymentInstances'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'deploymentId': deploymentId,
      if (instanceStatusFilter != null)
        'instanceStatusFilter':
            instanceStatusFilter.map((e) => e.toValue()).toList(),
      if (instanceTypeFilter != null)
        'instanceTypeFilter':
            instanceTypeFilter.map((e) => e.toValue()).toList(),
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListDeploymentInstancesOutput.fromJson(jsonResponse.body);
}