Aws.ecsListTasks()

Return a list of tasks for a specified cluster.

Usage

Hover over inputs/exits for more info.

var Aws = require('machinepack-aws');


// Return a list of tasks for a specified cluster.

Aws.ecsListTasks({

accessKeyId: 'akid',

secretAccessKey: 'secret',

region: 'us-west-2',

apiVersion: '2014-11-13',

cluster: 'default',

family: 'aFamily',

nextToken: 'aTokenValue',

maxResults: 100,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

accessKeyId required

AWS IAM user access key id.

'akid'
secretAccessKey required

AWS IAM user secret access key

'secret'
region

Which region to use. Defaults to us-west-2

'us-west-2'
apiVersion

Which api version to use. Defaults to: latest

'2014-11-13'
cluster

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks you want to list. Defaults to `default`

'default'
family

The full family name that you want to filter the ListTasks results with.

'aFamily'
nextToken

The nextToken value returned from a previous paginated ListTasks request where maxResults was used and the results exceeded the value of that parameter.

'aTokenValue'
maxResults

The maximum number of task definition results returned by ListTasks in paginated output.

100

Exits

error

An unexpected error occurred.

success

OK.

{ taskArns: [ 'arn:aws:ecs:us-west-2:575431834730:task/55b9b3b1-f189-4e5e-9e3a-83832c69b57e' ] }