AWS SDK Version 2 for .NET
API Reference

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.

.NET Framework 4.5
 
Container for the parameters to the StopTask operation. Stops a running task.

When StopTask is called on a task, the equivalent of docker stop is issued to the containers running in the task. This results in a SIGTERM and a 30-second timeout, after which SIGKILL is sent and the containers are forcibly stopped. If the container handles the SIGTERM gracefully and exits within 30 seconds from receiving it, no SIGKILL is sent.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ECS.AmazonECSRequest
      Amazon.ECS.Model.StopTaskRequest

Namespace: Amazon.ECS.Model
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class StopTaskRequest : AmazonECSRequest
         IRequestEvents

The StopTaskRequest type exposes the following members

Constructors

NameDescription
Public Method StopTaskRequest()

Properties

NameTypeDescription
Public Property Cluster System.String Gets and sets the property Cluster.

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task to stop. If you do not specify a cluster, the default cluster is assumed..

Public Property Reason System.String Gets and sets the property Reason.

An optional message specified when a task is stopped. For example, if you are using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message will appear in subsequent DescribeTasks API operations on this task. Up to 255 characters are allowed in this message.

Public Property Task System.String Gets and sets the property Task.

The task ID or full Amazon Resource Name (ARN) entry of the task to stop.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8