Documentation ¶
Index ¶
- Constants
- func GeneratePricesCSV(o *OfferCurrentVersionIndexFile, outputFilename string) error
- func GenerateProductCSV(o *OfferCurrentVersionIndexFile, outputFilename string) error
- type Attributes
- type Offer
- type OfferCurrentVersionIndexFile
- type OfferIndexFile
- type PricePerUnit
- type Product
- type Term
- type TermAttributes
Constants ¶
View Source
const ( PricePerHourPriceTermCode = "6YS6EN2CT7" UpfrontFeePriceTermCode = "2TG2D8R56U" )
View Source
const (
OnDemandOfferTermCode = "JRTCKXETXF"
)
For each SKU, following six
Variables ¶
This section is empty.
Functions ¶
func GeneratePricesCSV ¶
func GeneratePricesCSV(o *OfferCurrentVersionIndexFile, outputFilename string) error
func GenerateProductCSV ¶
func GenerateProductCSV(o *OfferCurrentVersionIndexFile, outputFilename string) error
Types ¶
type Attributes ¶
type Attributes struct { ServiceCode string `json:"servicecode"` Location string `json:"location"` LocationType string `json:"locationType"` InstanceType string `json:"instanceType"` CurrentGeneration string `json:"currentGeneration"` InstanceFamily string `json:"instanceFamily"` VCPU string `json:"vcpu"` PhysicalProcessor string `json:"physicalProcessor"` ClockSpeed string `json:"clockSpeed"` Memory string `json:"memory"` Storage string `json:"storage"` NetworkPerformance string `json:"networkPerformance"` ProcessorArchitecture string `json:"processorArchitecture"` // "Shared", "Host" or "Dedicated" Tenancy string `json:"tenancy"` OperatingSystem string `json:"operatingSystem"` LicenseModel string `json:"licenseModel"` CapacityStatus string `json:"capacitystatus"` PreInstalledSw string `json:"preInstalledSw"` }
type OfferCurrentVersionIndexFile ¶
type OfferCurrentVersionIndexFile struct { FormatVersion string `json:"formatVersion"` Disclaimer string `json:"disclaimer"` OfferCode string `json:"offerCode"` Version string `json:"version"` PublicationDate string `json:"publicationDate"` Products map[string]Product `json:"products"` // The specific type of term that a term definition describes. // The valid term types are reserved and onDemand. Terms map[string]map[string]map[string]Term `json:"terms"` }
func ProcessOfferFile ¶
func ProcessOfferFile(filename string) (*OfferCurrentVersionIndexFile, error)
type OfferIndexFile ¶
type PricePerUnit ¶
type Product ¶
type Product struct { SKU string `json:"sku"` Attributes Attributes `json:"attributes"` }
type Term ¶
type Term struct { // SKU is a unique code for a product. SKU string `json:"sku"` // OfferTermCode is a unique code for a specific type of term. // For example, KCAKZHGHG. Product and price combinations are referenced // by the SKU code followed by the term code, separated by a period. // For example, U7ADXS4BEK5XXHRU.KCAKZHGHG. OfferTermCode string `json:"offerTermCode"` // EffectiveDate is the date that an offer file goes into effect. // For example, if a term has an EffectiveDate of November 1, 2017, // the price is not valid before November 1, 2017. EffectiveDate string `json:"effectiveDate"` // PriceDimensions is the pricing details for the offer file, // such as how usage is measured, the currency that you can use to pay with, // and the pricing tier limitations. PriceDimensions map[string]PricePerUnit `json:"priceDimensions"` TermAttributes TermAttributes `json:"termAttributes"` }
type TermAttributes ¶
type TermAttributes struct { // "1yr", "1 yr", "3yr", or "3 yr" LeaseContractLength string `json:"LeaseContractLength"` // "standard" or "convertible". OfferingClass string `json:"OfferingClass"` // "No Upfront", "Partial Upfront", "All Upfront", // "NoUpfront", "PartialUpfront", or "AllUpfront" PurchaseOption string `json:"PurchaseOption"` }
Click to show internal directories.
Click to hide internal directories.