Cloudability

Build Status Code Climate Coverage Status Gem Version

Ruby wrapper for the Cloudability API. Supports most public API endpoints, including some legacy ones such as budgets. Converts JSON responses to objects with Hashie::Mash.

This is the README for version 0.1.0 of the gem. v0.1.0 introduces a radically different interface. If you're still on v0.0.5, please refer to it's README.

Installation

Add this line to your application's Gemfile:

gem 'cloudability'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cloudability

Usage

Supported endpoints:

  • Credentials
  • Organizations (Including invitations and roles.)
  • Budgets
  • Billing Reports
  • Cost Reporrts
  • Usage Reports
  • Users

You will need to generate an API token to use the API. Read more here.

Feel free to shoot me an email at [email protected] if you have any questions or need help.

Examples

client = Cloudability::Client.new(auth_token: 'auth_token')

Users

client.users # List users in your organization
client.add_user # Add a user to your organization
client.update_user # Update a user in your organization
client.delete_user # Delete a user in your organization.

Credentials

credentials = client.credentials # Get all of your connected credentials
puts .last.
puts credentials.first.

Organizations

client.invite_user('[email protected]', name: 'Colby Aley') # Invite a user to your org
client.delete_invite(1) # Delete invite 1
client.update_invite(103,1) # Update invitation 103 to have role id 1
client.my_organization # Get info about your org
client.organization_invitations # List invitations for your org
client.organization_roles # List roles for your org

Budgets

client.budgets # List your current budgets

Billing Reports

client.billing_report # Generate a report of your spend
client.billing_report(vendor: 'Amazon', by: 'period')
client.billing_report(by: 'vendor')

Cost Reports

client.cost_reports # List cost reports
client.cost_measures # List measures supported by server
client.cost_filters # List filters supported by the server

Usage Reports

client.usage_reports # List usage reports
client.usage_measures # List measures supported by server
client.usage_filters # List filters supported by the server

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request