AWS.FreeTier — AWS SDK for JavaScript (original) (raw)

We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.FreeTier

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

You can use the Amazon Web Services Free Tier API to query programmatically your Free Tier usage data.

Free Tier tracks your monthly usage data for all free tier offers that are associated with your Amazon Web Services account. You can use the Free Tier API to filter and show only the data that you want.

Service endpoint

The Free Tier API provides the following endpoint:

For more information, see Using the Amazon Web Services Free Tier in the Billing User Guide.

Sending a Request Using FreeTier

var freetier = new AWS.FreeTier();
freetier.getFreeTierUsage(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the FreeTier object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var freetier = new AWS.FreeTier({apiVersion: '2023-09-07'});

You can also set the API version globally in AWS.config.apiVersions using the freetier service identifier:

AWS.config.apiVersions = {
  freetier: '2023-09-07',
  // other service API versions
};

var freetier = new AWS.FreeTier();

Constructor Summarycollapse

Property Summarycollapse

Properties inherited from AWS.Service

apiVersions

Method Summarycollapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.FreeTier(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Property Details

endpointAWS.Endpoint

Returns an Endpoint object representing the endpoint URL for service requests.

Method Details

getFreeTierUsage(params = {}, callback) ⇒ AWS.Request

Returns a list of all Free Tier usage objects that match your filters.