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.

This is the response object from the ListTasks operation.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.ECS.Model.ListTasksResponse

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

Syntax

C#
public class ListTasksResponse : AmazonWebServiceResponse

The ListTasksResponse type exposes the following members

Constructors

NameDescription
Public Method ListTasksResponse()

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property NextToken System.String

Gets and sets the property NextToken.

The nextToken value to include in a future ListTasks request. When the results of a ListTasks request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property TaskArns System.Collections.Generic.List<System.String>

Gets and sets the property TaskArns.

The list of task ARN entries for the ListTasks request.

Examples

This example lists all of the tasks in a cluster.

To list the tasks in a cluster


var client = new AmazonECSClient();
var response = client.ListTasks(new ListTasksRequest 
{
    Cluster = "default"
});

List<string> taskArns = response.TaskArns;

            

This example lists the tasks of a specified container instance. Specifying a ``containerInstance`` value limits the results to tasks that belong to that container instance.

To list the tasks on a particular container instance


var client = new AmazonECSClient();
var response = client.ListTasks(new ListTasksRequest 
{
    Cluster = "default",
    ContainerInstance = "f6bbb147-5370-4ace-8c73-c7181ded911f"
});

List<string> taskArns = response.TaskArns;

            

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