AWS SDK Version 3 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.

Starts a new task from the specified task definition on the specified container instance or instances.

On March 21, 2024, a change was made to resolve the task definition revision before authorization. When a task definition revision is not specified, authorization will occur using the latest revision of a task definition.

Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.

Alternatively, you can use RunTask to place tasks for you. For more information, see Scheduling Tasks in the Amazon Elastic Container Service Developer Guide.

You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or updating a service. For more infomation, see Amazon EBS volumes in the Amazon Elastic Container Service Developer Guide.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to StartTaskAsync.

Namespace: Amazon.ECS
Assembly: AWSSDK.ECS.dll
Version: 3.x.y.z

Syntax

C#
public virtual StartTaskResponse StartTask(
         StartTaskRequest request
)

Parameters

request
Type: Amazon.ECS.Model.StartTaskRequest

Container for the necessary parameters to execute the StartTask service method.

Return Value


The response from the StartTask service method, as returned by ECS.

Exceptions

ExceptionCondition
ClientException These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.
ClusterNotFoundException The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
InvalidParameterException The specified parameter isn't valid. Review the available parameters for the API request.
ServerException These errors are usually caused by a server issue.
UnsupportedFeatureException The specified task isn't supported in this Region.

Version Information

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

See Also