Outposts / Client / start_capacity_task
start_capacity_task#
- Outposts.Client.start_capacity_task(**kwargs)#
Starts the specified capacity task. You can have one active capacity task per order or Outpost.
See also: AWS API Documentation
Request Syntax
response = 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' )
- Parameters:
OutpostIdentifier (string) –
[REQUIRED]
The ID or ARN of the Outposts associated with the specified capacity task.
OrderId (string) – The ID of the Amazon Web Services Outposts order associated with the specified capacity task.
InstancePools (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.
InstancesToExclude (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) –
DryRun (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.
TaskActionOnBlockingInstances (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.
- Return type:
dict
- Returns:
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.
Exceptions