forked from SaltwaterC/aws2js
-
Notifications
You must be signed in to change notification settings - Fork 0
CloudWatch Client
SaltwaterC edited this page Nov 15, 2011
·
1 revision
aws.load('cloudwatch', [accessKeyId], [secretAccessKey])
cloudwatch.request(action, [query], callback)
The 'action' argument is the action required by the CloudWatch query API itself.
- cloudwatch.setCredentials(accessKeyId, secretAccessKey)
- cloudwatch.setRegion(region)
- cloudwatch.setMaxSockets(numberOfSockets)
- cloudwatch.getEndPoint()
- cloudwatch.getApiVersion()
- cloudwatch.setApiVersion(apiVersion)
// init the client
var cloudwatch = require('aws2js').load('cloudwatch', accessKeyId, secretAccessKey);
// call something of the CloudWatch query API
cloudwatch.request('action', {foo: 'bar'}, function (error, response) {
if (error) {
console.error(error);
} else {
console.log(response);
}
});