Skip to main content

capacity_tasks

Creates, updates, deletes, gets or lists a capacity_tasks resource.

Overview

Namecapacity_tasks
TypeResource
Idaws.outposts.capacity_tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
asset_idstringThe ID of the Outpost asset. An Outpost asset can be a single server within an Outposts rack or an Outposts server configuration. (pattern: <code>^(\w+)$</code>)
capacity_task_idstringID of the capacity task. (pattern: <code>^cap-[a-f0-9]{17}$</code>)
capacity_task_statusstringStatus of the capacity task. A capacity task can have one of the following statuses: REQUESTED - The capacity task was created and is awaiting the next step by Amazon Web Services Outposts. IN_PROGRESS - The capacity task is running and cannot be cancelled. FAILED - The capacity task could not be completed. COMPLETED - The capacity task has completed successfully. WAITING_FOR_EVACUATION - The capacity task requires capacity to run. You must stop the recommended EC2 running instances to free up capacity for the task to run. CANCELLATION_IN_PROGRESS - The capacity task has been cancelled and is in the process of cleaning up resources. CANCELLED - The capacity task is cancelled. (REQUESTED, IN_PROGRESS, FAILED, COMPLETED, WAITING_FOR_EVACUATION, CANCELLATION_IN_PROGRESS, CANCELLED)
completion_datestring (date-time)The date the capacity task ran successfully.
creation_datestring (date-time)The date the capacity task was created.
dry_runbooleanPerforms a dry run to determine if you are above or below instance capacity.
failedobjectReason why the capacity task failed.
instances_to_excludeobjectInstances that the user specified they cannot stop in order to free up the capacity needed to run the capacity task.
last_modified_datestring (date-time)The date the capacity task was last modified.
order_idstringID of the Amazon Web Services Outposts order associated with the specified capacity task. (pattern: <code>oo-[a-f0-9]{17}$</code>)
outpost_idstringID of the Outpost associated with the specified capacity task. (pattern: <code>^(arn:aws([a-z-]+)?:outposts:[a-z\d-]+:\d{12}:outpost/)?op-[a-f0-9]{17}$</code>)
requested_instance_poolsarrayList of instance pools requested in the capacity task.
task_action_on_blocking_instancesstringUser-specified option in case an instance is blocking the capacity task from running. Shows one of the following options: WAIT_FOR_EVACUATION - Checks every 10 minutes over 48 hours to determine if instances have stopped and capacity is available to complete the task. FAIL_TASK - The capacity task fails. (WAIT_FOR_EVACUATION, FAIL_TASK)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_capacity_taskselectcapacity_task_id, outpost_id, regionGets details of the specified capacity task.
list_capacity_tasksselectregionOutpostIdentifierFilter, MaxResults, NextToken, CapacityTaskStatusFilterLists the capacity tasks for your Amazon Web Services account. Use filters to return specific results. If you specify multiple filters, the results include only the resources that match all of the specified filters. For a filter where you can specify multiple values, the results include items that match any of the values that you specify for the filter.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
capacity_task_idstringID of the capacity task.
outpost_idstringID or ARN of the Outpost associated with the specified capacity task.
regionstringAWS region (default: us-east-1)
CapacityTaskStatusFilterarrayA list of statuses. For example, REQUESTED or WAITING_FOR_EVACUATION.
MaxResultsinteger
NextTokenstring
OutpostIdentifierFilterstringFilters the results by an Outpost ID or an Outpost ARN.

SELECT examples

Gets details of the specified capacity task.

SELECT
asset_id,
capacity_task_id,
capacity_task_status,
completion_date,
creation_date,
dry_run,
failed,
instances_to_exclude,
last_modified_date,
order_id,
outpost_id,
requested_instance_pools,
task_action_on_blocking_instances
FROM aws.outposts.capacity_tasks
WHERE capacity_task_id = '{{ capacity_task_id }}' -- required
AND outpost_id = '{{ outpost_id }}' -- required
AND region = '{{ region }}' -- required
;