AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Stops a running task.
When StopTask is called on a task, the equivalent of
is issued to the containers running in the task. This results in a
and a default 30-second timeout, after which
SIGKILL is sent and the
containers are forcibly stopped. If the container handles the
gracefully and exits within 30 seconds from receiving it, no
The default 30-second timeout can be configured on the Amazon ECS container agent
ECS_CONTAINER_STOP_TIMEOUT variable. For more information, see
ECS Container Agent Configuration in the Amazon Elastic Container Service Developer
For .NET Core and PCL this operation is only available in asynchronous form. Please refer to StopTaskAsync.
public abstract StopTaskResponse StopTask( StopTaskRequest request )
Container for the necessary parameters to execute the StopTask service method.
|ClientException||These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.|
|ClusterNotFoundException||The specified cluster could not be found. You can view your available clusters with ListClusters. Amazon ECS clusters are region-specific.|
|InvalidParameterException||The specified parameter is invalid. Review the available parameters for the API request.|
|ServerException||These errors are usually caused by a server issue.|
Supported in: 4.5, 4.0, 3.5
Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms