Skip to content

A Go implementation of the CloudHealth Cloud Management Platform API

License

Notifications You must be signed in to change notification settings

claranet/cloudhealth-sdk-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Go Report Card

CloudHealth API in Go

A Go wrapper for the CloudHealth Cloud Management Platform API.

Getting Started

Run the following command to retrieve the SDK:

go get -u github.com/nextgenhealthcare/cloudhealth-sdk-go

You will also need an API Key from CloudHealth. For more information, see Getting Your API Key

import cloudhealth "github.com/nextgenhealthcare/cloudhealth-sdk-go"

client, _ := cloudhealth.NewClient("api_key", "https://chapi.cloudhealthtech.com/v1/")

account, err := client.GetSingleAwsAccount(1234567890)
if err == cloudhealth.ErrAwsAccountNotFound {
	log.Fatalf("AWS Account not found: %s\n", err)
}
if err != nil {
	log.Fatalf("Unknown error: %s\n", err)
}

log.Printf("AWS Account %s\n", account.Name)

Available Endpoints

Endpoint HTTP Method SDK Method Description Status
/aws_accounts POST CreateAwsAccount() Enable AWS Account ✔️
/aws_accounts GET GetAwsAccounts() AWS Accounts in CloudHealth ✔️
/aws_accounts/:id GET GetSingleAwsAccount() Single AWS Account ✔️
/aws_accounts/:id PUT UpdateAwsAccount() Update Existing AWS Account ✔️
/aws_accounts/:id DELETE DeleteAwsAccount() Delete AWS Account ✔️
/aws_accounts/:id/generate_external_id GET GetAwsExternalID() Get External ID ✔️
/customers POST CreateCustomer() Create Partner Customer ✔️
/customers/:id PUT UpdateCustomer() Modify Existing Customer ✔️
/customers/:id DELETE DeleteCustomer Delete Existing Customer ✔️
/customers/:id GET GetSingleCustomer() Get Single Customer ✔️
/customers GET GetCustomers Get All Customers ✔️
/customer_statements GET GetSingleCustomerStatements() Statement for Single Customer ✔️
/customer_statements GET GetCustomerStatements() Statements for All Customers ✔️
/aws_account_assignments POST CreateAwsAccountAssignment() Create AWS Account Assignment ✔️
/aws_account_assignments GET GetAwsAccountAssignments() Read All AWS Account Assignments ✔️
/aws_account_assignments/:id GET ``GetSingleAwsAccountAssignment()` Read Single AWS Account Assignment ✔️
/aws_account_assignments/:id PUT UpdateAwsAccountAssignment() Update AWS Account Assignment ✔️
/aws_account_assignments/:id DELETE DeleteAwsAccountAssignment() Delete AWS Account Assignment ✔️
/price_book_assignments GET GetCustomerPriceBookAssignments() Read all Customer Price Book Assignments ✔️
/price_book_assignments/:id GET GetSingleCustomerPriceBookAssignment() Read Single Customer Price Book Assignment ✔️
/price_book_assignments/:id DELETE DeleteCustomerPriceBookAssignment() Delete Customer Price Book Assignment ✔️
/price_book_account_assignments GET GetAccountPriceBookAssignments() Read all Account Price Book Assignments ✔️
/price_book_account_assignments/:id GET GetSingleAccountPriceBookAssignment() Read Single Account Price Book Assignment ✔️

Contributing

Any and all contributions are welcome. Please don't hesitate to submit an issue or pull request.

Roadmap

The initial release was focused on being consumed by a Terraform provider in AWS environments such as support for managing AWS Accounts in CloudHealth.

The current state is a global SDK with all major primitives to set up your CloudHealth environment.

Development

Build and Install with make or make build. Run gofmt with make fmt. Run unit tests with make test. Run coverage tests with make cover.

About

A Go implementation of the CloudHealth Cloud Management Platform API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.9%
  • Shell 1.8%
  • Makefile 1.3%