0.0.7 • Published 8 years ago

ecs-info v0.0.7

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

ecs-info

Library for querying the state of an AWS::ECS::Cluster

work in progress

var ecs = require('ecs-info');
ecs.Cluster.describe('my-cluster', 'us-east-1')
  .then(clusterData => { ... });

Cluster description

The object that comes back has circular references that you can use to trace the relationships between EC2 instances, ECS services, and ECS tasks that are part of the cluster. Basically:

Cluster {
  tasks: [ ...Task {} ],
  instances: [ ...Instance {} ],
  services: [ ...Service {} ]
}

A Cluster is the response from an ecs.describeClusters request with additional properties:

  • tasks an array of tasks running or stopped on the cluster
  • services an array of services running on the cluster
  • instances an array of instances in the cluster

A Task is the response from an ecs.describeTasks request with additional properties:

A Service is the response from an ecs.describeServices request with additional properties:

An Instance is the response from an ecs.describeContainerInstances request with additional properties:

Futhermore, each of these classes have a set of prototype methods that they implement. These can be useful for formatting or resolving specific information about a cluster, task, service, or instance.

Additional treats

Return an array of IAM policy statements providing permission to run the API requests involved in this library:

ecs.iamPermissions('my-cluster-name');
0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago