cloud_cost

package
v0.0.0-...-d437eb7 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: NCSA Imports: 20 Imported by: 0

README

Cloud Cost

Get Data

see https://banzaicloud.com/cloudinfo/

curl -L -X GET 'https://banzaicloud.com/cloudinfo/api/v1/providers/amazon/services/compute/regions/us-east-1/products' > _fixtures/aws_instances.json
curl -L -X GET 'https://banzaicloud.com/cloudinfo/api/v1/providers/google/services/compute/regions/us-east4/products' > _fixtures/google_instances.json
curl -L -X GET 'https://banzaicloud.com/cloudinfo/api/v1/providers/azure/services/compute/regions/eastus/products' > _fixtures/azure_instances.json

Resources

https://github.com/aws/aws-sdk-go/tree/master/service/costexplorer

https://github.com/hacker65536/awspricing

https://github.com/alexjguy/AWS-costs-markdown

https://github.com/banzaicloud/cloudinfo/blob/master/internal/cloudinfo/testdata/products.json

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	CPU                  string `json:"cpu,omitempty"`
	InstanceTypeCategory string `json:"instanceTypeCategory,omitempty"`
	Memory               string `json:"memory,omitempty"`
	NetworkPerfCategory  string `json:"networkPerfCategory,omitempty"`
	GpuArch              string `json:"gpuArch,omitempty"`
}

type InstanceInformation

type InstanceInformation struct {
	Category        string      `json:"category,omitempty"`
	Type            string      `json:"type,omitempty"`
	OnDemandPrice   float64     `json:"onDemandPrice,omitempty"`
	SpotPrice       []SpotPrice `json:"spotPrice,omitempty"`
	CpusPerVM       int         `json:"cpusPerVm,omitempty"`
	MemPerVM        int         `json:"memPerVm,omitempty"`
	GpusPerVM       int         `json:"gpusPerVm,omitempty"`
	NtwPerf         string      `json:"ntwPerf,omitempty"`
	NtwPerfCategory string      `json:"ntwPerfCategory,omitempty"`
	Zones           interface{} `json:"zones,omitempty"`
	Attributes      Attributes  `json:"attributes,omitempty"`
	CurrentGen      bool        `json:"currentGen,omitempty"`
	Burst           bool        `json:"burst,omitempty"`
}

type InstanceInformations

type InstanceInformations struct {
	Products     []InstanceInformation `json:"products"`
	ScrapingTime string                `json:"scrapingTime"`
}

type SpotPrice

type SpotPrice struct {
	Zone  string  `json:"zone,omitempty"`
	Price float64 `json:"price,omitempty"`
}

Jump to

Keyboard shortcuts

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