capacity_tasks
Creates, updates, deletes, gets or lists a capacity_tasks resource.
Overview
| Name | capacity_tasks |
| Type | Resource |
| Id | aws.outposts.capacity_tasks |
Fields
The following fields are returned by SELECT queries:
- get_capacity_task
- list_capacity_tasks
| Name | Datatype | Description |
|---|---|---|
asset_id | string | The 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_id | string | ID of the capacity task. (pattern: <code>^cap-[a-f0-9]{17}$</code>) |
capacity_task_status | string | Status 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_date | string (date-time) | The date the capacity task ran successfully. |
creation_date | string (date-time) | The date the capacity task was created. |
dry_run | boolean | Performs a dry run to determine if you are above or below instance capacity. |
failed | object | Reason why the capacity task failed. |
instances_to_exclude | object | Instances that the user specified they cannot stop in order to free up the capacity needed to run the capacity task. |
last_modified_date | string (date-time) | The date the capacity task was last modified. |
order_id | string | ID of the Amazon Web Services Outposts order associated with the specified capacity task. (pattern: <code>oo-[a-f0-9]{17}$</code>) |
outpost_id | string | ID 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_pools | array | List of instance pools requested in the capacity task. |
task_action_on_blocking_instances | string | User-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) |
| Name | Datatype | Description |
|---|---|---|
asset_id | string | The ID of the asset. An Outpost asset can be a single server within an Outposts rack or an Outposts server configuration. (pattern: <code>^(\w+)$</code>) |
capacity_task_id | string | The ID of the specified capacity task. (pattern: <code>^cap-[a-f0-9]{17}$</code>) |
capacity_task_status | string | The status of the capacity task. (REQUESTED, IN_PROGRESS, FAILED, COMPLETED, WAITING_FOR_EVACUATION, CANCELLATION_IN_PROGRESS, CANCELLED) |
completion_date | string (date-time) | The date that the specified capacity task successfully ran. |
creation_date | string (date-time) | The date that the specified capacity task was created. |
last_modified_date | string (date-time) | The date that the specified capacity was last modified. |
order_id | string | The ID of the Amazon Web Services Outposts order of the host associated with the capacity task. (pattern: <code>oo-[a-f0-9]{17}$</code>) |
outpost_id | string | The ID 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>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_capacity_task | select | capacity_task_id, outpost_id, region | Gets details of the specified capacity task. | |
list_capacity_tasks | select | region | OutpostIdentifierFilter, MaxResults, NextToken, CapacityTaskStatusFilter | Lists 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.
| Name | Datatype | Description |
|---|---|---|
capacity_task_id | string | ID of the capacity task. |
outpost_id | string | ID or ARN of the Outpost associated with the specified capacity task. |
region | string | AWS region (default: us-east-1) |
CapacityTaskStatusFilter | array | A list of statuses. For example, REQUESTED or WAITING_FOR_EVACUATION. |
MaxResults | integer | |
NextToken | string | |
OutpostIdentifierFilter | string | Filters the results by an Outpost ID or an Outpost ARN. |
SELECT examples
- get_capacity_task
- list_capacity_tasks
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
;
Lists 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.
SELECT
asset_id,
capacity_task_id,
capacity_task_status,
completion_date,
creation_date,
last_modified_date,
order_id,
outpost_id
FROM aws.outposts.capacity_tasks
WHERE region = '{{ region }}' -- required
AND OutpostIdentifierFilter = '{{ OutpostIdentifierFilter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND CapacityTaskStatusFilter = '{{ CapacityTaskStatusFilter }}'
;