Skip to content
SaltwaterC edited this page Nov 15, 2011 · 8 revisions

About

This is the low level method that makes the AWS query APIs requests.

Reference

query.request(action, [query], callback)
  • 'action' - the action argument required by each specific query API (eg: EC2, RDS, etc.).
  • 'query' - optional argument. Must be an object containing the parameters of the query API.
  • 'callback' - callback argument that would be executed when the processing finishes. Has a couple of arguments: error and response. For more details follow: HTTP Errors, XML Parser.
  • If there's an error, the callback receives the error argument as Error instance.
  • If the error argument is null, then the response argument contains a JavaScript object containing the requested data. The library parses the XML returned by the AWS API.

The passed query key - values pairs take precedence over the embedded value, therefore you may override from the request() call certain parameters. For example, you may pass something like {Version: 'YYYY-MM-DD'} in order to change on the fly the query API version number for a certain call.

Clone this wiki locally