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.

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.

Inheritance Hierarchy

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

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

Syntax

C#
public class DescribeTasksRequest : AmazonECSRequest
         IAmazonWebServiceRequest

The DescribeTasksRequest type exposes the following members

Constructors

NameDescription
Public Method DescribeTasksRequest()

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 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.

Public Property 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 TAGS is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.

Public Property 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.

Examples

This example provides a description of the specified task, using the task UUID as an identifier.

To describe a task


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;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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