listBlockingInstancesForCapacityTask method

Future<ListBlockingInstancesForCapacityTaskOutput> listBlockingInstancesForCapacityTask({
  1. required String capacityTaskId,
  2. required String outpostIdentifier,
  3. int? maxResults,
  4. String? nextToken,
})

A list of Amazon EC2 instances running on the Outpost and belonging to the account that initiated the capacity task. Use this list to specify the instances you cannot stop to free up capacity to run the capacity task.

May throw AccessDeniedException. May throw InternalServerException. May throw NotFoundException. May throw ValidationException.

Parameter capacityTaskId : The ID of the capacity task.

Parameter outpostIdentifier : The ID or ARN of the Outpost associated with the specified capacity task.

Implementation

Future<ListBlockingInstancesForCapacityTaskOutput>
    listBlockingInstancesForCapacityTask({
  required String capacityTaskId,
  required String outpostIdentifier,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/outposts/${Uri.encodeComponent(outpostIdentifier)}/capacity/${Uri.encodeComponent(capacityTaskId)}/blockingInstances',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListBlockingInstancesForCapacityTaskOutput.fromJson(response);
}