cost-api

command module
v0.1.6-pre03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2019 License: AGPL-3.0 Imports: 8 Imported by: 0

README

cost-api

This API provides simple restful API access to Amazon's Cost explorer service.

Endpoints

GET /v1/cost/ping
GET /v1/cost/version
GET /v1/cost/metrics

GET /v1/cost/{account}/spaces/{spaceid}
GET /v1/cost/{account}/spaces/{spaceid}[?StartTime=2019-10-01&EndTime=2019-10-30]

Usage

Get the cost and usage for a space ID

By default, this will get the month to date costs for a space id (based on the spinup:spaceid tag).

Request

GET /v1/cost/{account}/spaces/{spaceid}

Response
{
    "TBD"
}

Caching

Caching data (using go-cache) from AWS Cost Explorer configurable via config.json: CacheExpireTime and CachePurgeTIme. The cache can also be purged via daemon restart.

Authentication

Authentication is accomplished via a pre-shared key. This is done via the X-Auth-Token header.

Author

E Camden Fisher camden.fisher@yale.edu

License

GNU Affero General Public License v3.0 (GNU AGPLv3)
Copyright (c) 2019 Yale University

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL