| 283 | } |
| 284 | |
| 285 | func (c *Client) RetrieveTasks(clusterName string, taskARNs []string) ([]*_ecs.Task, error) { |
| 286 | if len(taskARNs) == 0 { |
| 287 | return []*_ecs.Task{}, nil |
| 288 | } |
| 289 | |
| 290 | params := &_ecs.DescribeTasksInput{ |
| 291 | Cluster: _aws.String(clusterName), |
| 292 | Tasks: _aws.StringSlice(taskARNs), |
| 293 | } |
| 294 | |
| 295 | res, err := c.svc.DescribeTasks(params) |
| 296 | if err != nil { |
| 297 | return nil, err |
| 298 | } |
| 299 | |
| 300 | return res.Tasks, nil |
| 301 | } |
| 302 | |
| 303 | func (c *Client) ListContainerInstanceARNs(clusterName string) ([]string, error) { |
| 304 | var nextToken *string |