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.
Container for the parameters to the DescribeTasks operation. Describes a specified task or tasks.
Currently, stopped tasks appear in the returned results for at least one hour.
If you have tasks with tags, and then delete the cluster, the tagged tasks are returned in the response. If you create a new cluster with the same name as the deleted cluster, the tagged tasks are not included in the response.
Namespace: Amazon.ECS.Model
Assembly: AWSSDK.ECS.dll
Version: 3.x.y.z
public class DescribeTasksRequest : AmazonECSRequest IAmazonWebServiceRequest
The DescribeTasksRequest type exposes the following members
Name | Description | |
---|---|---|
DescribeTasksRequest() |
Name | Type | Description | |
---|---|---|---|
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 or tasks to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the task or tasks you are describing were launched in any cluster other than the default cluster. |
|
Include | System.Collections.Generic.List<System.String> |
Gets and sets the property Include.
Specifies whether you want to see the resource tags for the task. If |
|
Tasks | System.Collections.Generic.List<System.String> |
Gets and sets the property Tasks. A list of up to 100 task IDs or full ARN entries. |
This example provides a description of the specified task, using the task UUID as an identifier.
var client = new AmazonECSClient(); var response = client.DescribeTasks(new DescribeTasksRequest { Tasks = new List<string> { "c5cba4eb-5dad-405e-96db-71ef8eefe6a8" } }); List<Failure> failures = response.Failures; List<Task> tasks = response.Tasks;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5