2024/11/11 - AWS Outposts - 2 new4 updated api methods
Changes This release updates StartCapacityTask to allow an active Outpost to be modified. It also adds a new API to list all running EC2 instances on the Outpost.
A list of Amazon EC2 instances, belonging to all accounts, running on the specified Outpost. Does not include Amazon EBS or Amazon S3 instances.
See also: AWS API Documentation
Request Syntax
client.list_asset_instances( OutpostIdentifier='string', AssetIdFilter=[ 'string', ], InstanceTypeFilter=[ 'string', ], AccountIdFilter=[ 'string', ], AwsServiceFilter=[ 'AWS'|'EC2'|'ELASTICACHE'|'ELB'|'RDS'|'ROUTE53', ], MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID of the Outpost.
list
Filters the results by asset ID.
(string) --
list
Filters the results by instance ID.
(string) --
list
Filters the results by account ID.
(string) --
The ID of the Amazon Web Services account.
list
Filters the results by Amazon Web Services service.
(string) --
integer
The maximum page size.
string
The pagination token.
dict
Response Syntax
{ 'AssetInstances': [ { 'InstanceId': 'string', 'InstanceType': 'string', 'AssetId': 'string', 'AccountId': 'string', 'AwsServiceName': 'AWS'|'EC2'|'ELASTICACHE'|'ELB'|'RDS'|'ROUTE53' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
AssetInstances (list) --
List of instances owned by all accounts on the Outpost. Does not include Amazon EBS or Amazon S3 instances.
(dict) --
An Amazon EC2 instance.
InstanceId (string) --
The ID of the instance.
InstanceType (string) --
The type of instance.
AssetId (string) --
The ID of the asset.
AccountId (string) --
The ID of the Amazon Web Services account.
AwsServiceName (string) --
The Amazon Web Services service name of the instance.
NextToken (string) --
The pagination token.
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.
See also: AWS API Documentation
Request Syntax
client.list_blocking_instances_for_capacity_task( OutpostIdentifier='string', CapacityTaskId='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The ID or ARN of the Outpost associated with the specified capacity task.
string
[REQUIRED]
The ID of the capacity task.
integer
The maximum page size.
string
The pagination token.
dict
Response Syntax
{ 'BlockingInstances': [ { 'InstanceId': 'string', 'AccountId': 'string', 'AwsServiceName': 'AWS'|'EC2'|'ELASTICACHE'|'ELB'|'RDS'|'ROUTE53' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
BlockingInstances (list) --
A list of all running Amazon EC2 instances on the Outpost. Stopping one or more of these instances can free up the capacity needed to run the capacity task.
(dict) --
A running Amazon EC2 instance that can be stopped to free up capacity needed to run the capacity task.
InstanceId (string) --
The ID of the blocking instance.
AccountId (string) --
The ID of the Amazon Web Services account.
AwsServiceName (string) --
The Amazon Web Services service name that owns the specified blocking instance.
NextToken (string) --
The pagination token.
{'CapacityTaskStatus': {'CANCELLATION_IN_PROGRESS', 'WAITING_FOR_EVACUATION'}, 'Failed': {'Type': {'BLOCKING_INSTANCES_NOT_EVACUATED', 'INTERNAL_SERVER_ERROR', 'RESOURCE_NOT_FOUND', 'UNEXPECTED_ASSET_STATE'}}, 'InstancesToExclude': {'AccountIds': ['string'], 'Instances': ['string'], 'Services': ['AWS | EC2 | ELASTICACHE | ELB | RDS | ' 'ROUTE53']}, 'TaskActionOnBlockingInstances': 'WAIT_FOR_EVACUATION | FAIL_TASK'}
Gets details of the specified capacity task.
See also: AWS API Documentation
Request Syntax
client.get_capacity_task( CapacityTaskId='string', OutpostIdentifier='string' )
string
[REQUIRED]
ID of the capacity task.
string
[REQUIRED]
ID or ARN of the Outpost associated with the specified capacity task.
dict
Response Syntax
{ 'CapacityTaskId': 'string', 'OutpostId': 'string', 'OrderId': 'string', 'RequestedInstancePools': [ { 'InstanceType': 'string', 'Count': 123 }, ], 'InstancesToExclude': { 'Instances': [ 'string', ], 'AccountIds': [ 'string', ], 'Services': [ 'AWS'|'EC2'|'ELASTICACHE'|'ELB'|'RDS'|'ROUTE53', ] }, 'DryRun': True|False, 'CapacityTaskStatus': 'REQUESTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED'|'WAITING_FOR_EVACUATION'|'CANCELLATION_IN_PROGRESS'|'CANCELLED', 'Failed': { 'Reason': 'string', 'Type': 'UNSUPPORTED_CAPACITY_CONFIGURATION'|'UNEXPECTED_ASSET_STATE'|'BLOCKING_INSTANCES_NOT_EVACUATED'|'INTERNAL_SERVER_ERROR'|'RESOURCE_NOT_FOUND' }, 'CreationDate': datetime(2015, 1, 1), 'CompletionDate': datetime(2015, 1, 1), 'LastModifiedDate': datetime(2015, 1, 1), 'TaskActionOnBlockingInstances': 'WAIT_FOR_EVACUATION'|'FAIL_TASK' }
Response Structure
(dict) --
CapacityTaskId (string) --
ID of the capacity task.
OutpostId (string) --
ID of the Outpost associated with the specified capacity task.
OrderId (string) --
ID of the Amazon Web Services Outposts order associated with the specified capacity task.
RequestedInstancePools (list) --
List of instance pools requested in the capacity task.
(dict) --
The instance type that you specify determines the combination of CPU, memory, storage, and networking capacity.
InstanceType (string) --
The instance type of the hosts.
Count (integer) --
The number of instances for the specified instance type.
InstancesToExclude (dict) --
Instances that the user specified they cannot stop in order to free up the capacity needed to run the capacity task.
Instances (list) --
List of user-specified instances that must not be stopped.
(string) --
AccountIds (list) --
IDs of the accounts that own each instance that must not be stopped.
(string) --
The ID of the Amazon Web Services account.
Services (list) --
Names of the services that own each instance that must not be stopped in order to free up the capacity needed to run the capacity task.
(string) --
DryRun (boolean) --
Performs a dry run to determine if you are above or below instance capacity.
CapacityTaskStatus (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.
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.
Failed (dict) --
Reason why the capacity task failed.
Reason (string) --
The reason that the specified capacity task failed.
Type (string) --
The type of failure.
CreationDate (datetime) --
The date the capacity task was created.
CompletionDate (datetime) --
The date the capacity task ran successfully.
LastModifiedDate (datetime) --
The date the capacity task was last modified.
TaskActionOnBlockingInstances (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.
{'Assets': {'ComputeAttributes': {'InstanceTypeCapacities': [{'Count': 'integer', 'InstanceType': 'string'}], 'MaxVcpus': 'integer'}}}
Lists the hardware assets for the specified Outpost.
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.
See also: AWS API Documentation
Request Syntax
client.list_assets( OutpostIdentifier='string', HostIdFilter=[ 'string', ], MaxResults=123, NextToken='string', StatusFilter=[ 'ACTIVE'|'RETIRING'|'ISOLATED', ] )
string
[REQUIRED]
The ID or the Amazon Resource Name (ARN) of the Outpost.
list
Filters the results by the host ID of a Dedicated Host.
(string) --
integer
The maximum page size.
string
The pagination token.
list
Filters the results by state.
(string) --
dict
Response Syntax
{ 'Assets': [ { 'AssetId': 'string', 'RackId': 'string', 'AssetType': 'COMPUTE', 'ComputeAttributes': { 'HostId': 'string', 'State': 'ACTIVE'|'ISOLATED'|'RETIRING', 'InstanceFamilies': [ 'string', ], 'InstanceTypeCapacities': [ { 'InstanceType': 'string', 'Count': 123 }, ], 'MaxVcpus': 123 }, 'AssetLocation': { 'RackElevation': ... } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Assets (list) --
Information about the hardware assets.
(dict) --
Information about hardware assets.
AssetId (string) --
The ID of the asset.
RackId (string) --
The rack ID of the asset.
AssetType (string) --
The type of the asset.
ComputeAttributes (dict) --
Information about compute hardware assets.
HostId (string) --
The host ID of the Dedicated Host on the asset.
State (string) --
The state.
ACTIVE - The asset is available and can provide capacity for new compute resources.
ISOLATED - The asset is undergoing maintenance and can't provide capacity for new compute resources. Existing compute resources on the asset are not affected.
RETIRING - The underlying hardware for the asset is degraded. Capacity for new compute resources is reduced. Amazon Web Services sends notifications for resources that must be stopped before the asset can be replaced.
InstanceFamilies (list) --
A list of the names of instance families that are currently associated with a given asset.
(string) --
InstanceTypeCapacities (list) --
The instance type capacities configured for this asset. This can be changed through a capacity task.
(dict) --
The capacity for each instance type.
InstanceType (string) --
The type of instance.
Count (integer) --
The number of each instance type.
MaxVcpus (integer) --
The maximum number of vCPUs possible for the specified asset.
AssetLocation (dict) --
The position of an asset in a rack.
RackElevation (float) --
The position of an asset in a rack measured in rack units.
NextToken (string) --
The pagination token.
{'CapacityTaskStatusFilter': {'CANCELLATION_IN_PROGRESS', 'WAITING_FOR_EVACUATION'}}Response
{'CapacityTasks': {'CapacityTaskStatus': {'CANCELLATION_IN_PROGRESS', 'WAITING_FOR_EVACUATION'}}}
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.
See also: AWS API Documentation
Request Syntax
client.list_capacity_tasks( OutpostIdentifierFilter='string', MaxResults=123, NextToken='string', CapacityTaskStatusFilter=[ 'REQUESTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED'|'WAITING_FOR_EVACUATION'|'CANCELLATION_IN_PROGRESS'|'CANCELLED', ] )
string
Filters the results by an Outpost ID or an Outpost ARN.
integer
The maximum page size.
string
The pagination token.
list
A list of statuses. For example, REQUESTED or WAITING_FOR_EVACUATION.
(string) --
dict
Response Syntax
{ 'CapacityTasks': [ { 'CapacityTaskId': 'string', 'OutpostId': 'string', 'OrderId': 'string', 'CapacityTaskStatus': 'REQUESTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED'|'WAITING_FOR_EVACUATION'|'CANCELLATION_IN_PROGRESS'|'CANCELLED', 'CreationDate': datetime(2015, 1, 1), 'CompletionDate': datetime(2015, 1, 1), 'LastModifiedDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
CapacityTasks (list) --
Lists all the capacity tasks.
(dict) --
The summary of the capacity task.
CapacityTaskId (string) --
The ID of the specified capacity task.
OutpostId (string) --
The ID of the Outpost associated with the specified capacity task.
OrderId (string) --
The ID of the Amazon Web Services Outposts order of the host associated with the capacity task.
CapacityTaskStatus (string) --
The status of the capacity task.
CreationDate (datetime) --
The date that the specified capacity task was created.
CompletionDate (datetime) --
The date that the specified capacity task successfully ran.
LastModifiedDate (datetime) --
The date that the specified capacity was last modified.
NextToken (string) --
The pagination token.
{'InstancesToExclude': {'AccountIds': ['string'], 'Instances': ['string'], 'Services': ['AWS | EC2 | ELASTICACHE | ELB | RDS | ' 'ROUTE53']}, 'TaskActionOnBlockingInstances': 'WAIT_FOR_EVACUATION | FAIL_TASK'}Response
{'CapacityTaskStatus': {'CANCELLATION_IN_PROGRESS', 'WAITING_FOR_EVACUATION'}, 'Failed': {'Type': {'BLOCKING_INSTANCES_NOT_EVACUATED', 'INTERNAL_SERVER_ERROR', 'RESOURCE_NOT_FOUND', 'UNEXPECTED_ASSET_STATE'}}, 'InstancesToExclude': {'AccountIds': ['string'], 'Instances': ['string'], 'Services': ['AWS | EC2 | ELASTICACHE | ELB | RDS | ' 'ROUTE53']}, 'TaskActionOnBlockingInstances': 'WAIT_FOR_EVACUATION | FAIL_TASK'}
Starts the specified capacity task. You can have one active capacity task per order or Outpost.
See also: AWS API Documentation
Request Syntax
client.start_capacity_task( OutpostIdentifier='string', OrderId='string', InstancePools=[ { 'InstanceType': 'string', 'Count': 123 }, ], InstancesToExclude={ 'Instances': [ 'string', ], 'AccountIds': [ 'string', ], 'Services': [ 'AWS'|'EC2'|'ELASTICACHE'|'ELB'|'RDS'|'ROUTE53', ] }, DryRun=True|False, TaskActionOnBlockingInstances='WAIT_FOR_EVACUATION'|'FAIL_TASK' )
string
[REQUIRED]
The ID or ARN of the Outposts associated with the specified capacity task.
string
The ID of the Amazon Web Services Outposts order associated with the specified capacity task.
list
[REQUIRED]
The instance pools specified in the capacity task.
(dict) --
The instance type that you specify determines the combination of CPU, memory, storage, and networking capacity.
InstanceType (string) -- [REQUIRED]
The instance type of the hosts.
Count (integer) -- [REQUIRED]
The number of instances for the specified instance type.
dict
List of user-specified running instances that must not be stopped in order to free up the capacity needed to run the capacity task.
Instances (list) --
List of user-specified instances that must not be stopped.
(string) --
AccountIds (list) --
IDs of the accounts that own each instance that must not be stopped.
(string) --
The ID of the Amazon Web Services account.
Services (list) --
Names of the services that own each instance that must not be stopped in order to free up the capacity needed to run the capacity task.
(string) --
boolean
You can request a dry run to determine if the instance type and instance size changes is above or below available instance capacity. Requesting a dry run does not make any changes to your plan.
string
Specify one of the following options in case an instance is blocking the capacity task from running.
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.
dict
Response Syntax
{ 'CapacityTaskId': 'string', 'OutpostId': 'string', 'OrderId': 'string', 'RequestedInstancePools': [ { 'InstanceType': 'string', 'Count': 123 }, ], 'InstancesToExclude': { 'Instances': [ 'string', ], 'AccountIds': [ 'string', ], 'Services': [ 'AWS'|'EC2'|'ELASTICACHE'|'ELB'|'RDS'|'ROUTE53', ] }, 'DryRun': True|False, 'CapacityTaskStatus': 'REQUESTED'|'IN_PROGRESS'|'FAILED'|'COMPLETED'|'WAITING_FOR_EVACUATION'|'CANCELLATION_IN_PROGRESS'|'CANCELLED', 'Failed': { 'Reason': 'string', 'Type': 'UNSUPPORTED_CAPACITY_CONFIGURATION'|'UNEXPECTED_ASSET_STATE'|'BLOCKING_INSTANCES_NOT_EVACUATED'|'INTERNAL_SERVER_ERROR'|'RESOURCE_NOT_FOUND' }, 'CreationDate': datetime(2015, 1, 1), 'CompletionDate': datetime(2015, 1, 1), 'LastModifiedDate': datetime(2015, 1, 1), 'TaskActionOnBlockingInstances': 'WAIT_FOR_EVACUATION'|'FAIL_TASK' }
Response Structure
(dict) --
CapacityTaskId (string) --
ID of the capacity task that you want to start.
OutpostId (string) --
ID of the Outpost associated with the capacity task.
OrderId (string) --
ID of the Amazon Web Services Outposts order of the host associated with the capacity task.
RequestedInstancePools (list) --
List of the instance pools requested in the specified capacity task.
(dict) --
The instance type that you specify determines the combination of CPU, memory, storage, and networking capacity.
InstanceType (string) --
The instance type of the hosts.
Count (integer) --
The number of instances for the specified instance type.
InstancesToExclude (dict) --
User-specified instances that must not be stopped in order to free up the capacity needed to run the capacity task.
Instances (list) --
List of user-specified instances that must not be stopped.
(string) --
AccountIds (list) --
IDs of the accounts that own each instance that must not be stopped.
(string) --
The ID of the Amazon Web Services account.
Services (list) --
Names of the services that own each instance that must not be stopped in order to free up the capacity needed to run the capacity task.
(string) --
DryRun (boolean) --
Results of the dry run showing if the specified capacity task is above or below the available instance capacity.
CapacityTaskStatus (string) --
Status of the specified capacity task.
Failed (dict) --
Reason that the specified capacity task failed.
Reason (string) --
The reason that the specified capacity task failed.
Type (string) --
The type of failure.
CreationDate (datetime) --
Date that the specified capacity task was created.
CompletionDate (datetime) --
Date that the specified capacity task ran successfully.
LastModifiedDate (datetime) --
Date that the specified capacity task was last modified.
TaskActionOnBlockingInstances (string) --
User-specified option in case an instance is blocking the capacity task from running.
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.