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.
Parameters:
-
outpost_identifier
(OutpostIdentifier)
–
The ID or ARN of the Outpost associated with the specified capacity task.
-
capacity_task_id
(CapacityTaskId)
–
The ID of the capacity task.
Raises:
Source code in docs_src/capo_outposts/_services/async_outposts.py
| async def list_blocking_instances_for_capacity_task(
self,
outpost_identifier: "capo_outposts.types.outpost_identifier.OutpostIdentifier",
capacity_task_id: "capo_outposts.types.capacity_task_id.CapacityTaskId",
*,
config_overrides: Optional[AsyncOutpostsClientConfig] = None,
max_results: Optional[
"capo_outposts.types.max_results1000.MaxResults1000"
] = None,
next_token: Optional["capo_outposts.types.token.Token"] = None,
) -> "capo_outposts.types.list_blocking_instances_for_capacity_task_output.ListBlockingInstancesForCapacityTaskOutput":
"""<p>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.</p>
Args:
outpost_identifier: <p>The ID or ARN of the Outpost associated with the specified capacity task.</p>
capacity_task_id: <p>The ID of the capacity task.</p>
Raises:
capo_outposts.errors.access_denied_exception.AccessDeniedException: <p>You do not have permission to perform this operation.</p>
capo_outposts.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
capo_outposts.errors.not_found_exception.NotFoundException: <p>The specified request is not valid.</p>
capo_outposts.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
capo_outposts.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_outposts.types.list_blocking_instances_for_capacity_task_input.ListBlockingInstancesForCapacityTaskInput]",
) -> AsyncOperationResponse[
"capo_outposts.types.list_blocking_instances_for_capacity_task_output.ListBlockingInstancesForCapacityTaskOutput"
]:
import capo_outposts._operations.outposts_olaf_service.list_blocking_instances_for_capacity_task
(
output,
http_response,
) = await capo_outposts._operations.outposts_olaf_service.list_blocking_instances_for_capacity_task.async_list_blocking_instances_for_capacity_task(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListBlockingInstancesForCapacityTask")
)
input_: capo_outposts.types.list_blocking_instances_for_capacity_task_input.ListBlockingInstancesForCapacityTaskInput = {
"outpost_identifier": outpost_identifier,
"capacity_task_id": capacity_task_id,
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|