Documentation
¶
Index ¶
- type Attributes
- type AwsClient
- type Ec2Product
- func (e Ec2Product) GetConvertible1yrNoUpfrontPrice() string
- func (e Ec2Product) GetInstanceMemory() string
- func (e Ec2Product) GetInstanceType() string
- func (e Ec2Product) GetInstanceVcpu() string
- func (e Ec2Product) GetOnDemandPrice() string
- func (e Ec2Product) GetProductFamily() string
- func (e Ec2Product) GetReservedPrice(offeringClass types.OfferingClassType, offeringType types.OfferingTypeValues, ...) string
- func (e Ec2Product) GetStandard1yrNoUpfrontPrice() string
- func (e Ec2Product) GetTerms() Terms
- type PriceDimension
- type PricePerUnit
- type PricingRepository
- type Product
- type Term
- type TermAttributes
- type Terms
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
type Attributes struct { EnhancedNetworkingSupported string `json:"enhancedNetworkingSupported"` IntelTurboAvailable string `json:"intelTurboAvailable"` Memory string `json:"memory"` DedicatedEbsThroughput string `json:"dedicatedEbsThroughput"` Vcpu string `json:"vcpu"` ClassicNetworkingSupport string `json:"classicnetworkingsupport"` CapacityStatus string `json:"capacitystatus"` LocationType string `json:"locationType"` Storage string `json:"storage"` InstanceFamily string `json:"instanceFamily"` OperatingSystem string `json:"operatingSystem"` IntelAvx2Available string `json:"intelAvx2Available"` RegionCode string `json:"regionCode"` PhysicalProcessor string `json:"physicalProcessor"` ClockSpeed string `json:"clockSpeed"` Ecu string `json:"ecu"` NetworkPerformance string `json:"networkPerformance"` ServiceName string `json:"servicename"` GpuMemory string `json:"gpuMemory"` VpcNetworkingSupport string `json:"vpcnetworkingsupport"` InstanceType string `json:"instanceType"` Tenancy string `json:"tenancy"` UsageType string `json:"usagetype"` NormalizationSizeFactor string `json:"normalizationSizeFactor"` IntelAvxAvailable string `json:"intelAvxAvailable"` ServiceCode string `json:"servicecode"` LicenseModel string `json:"licenseModel"` CurrentGeneration string `json:"currentGeneration"` PreInstalledSw string `json:"preInstalledSw"` Location string `json:"location"` ProcessorArchitecture string `json:"processorArchitecture"` MarketOption string `json:"marketoption"` Operation string `json:"operation"` AvailabilityZone string `json:"availabilityzone"` }
type Ec2Product ¶
type Ec2Product struct { Product Product `json:"product"` ServiceCode string `json:"serviceCode"` Terms Terms `json:"terms"` Version string `json:"version"` PublicationDate string `json:"publicationDate"` }
func NewEc2Product ¶
func NewEc2Product(priceList string) (*Ec2Product, error)
func (Ec2Product) GetConvertible1yrNoUpfrontPrice ¶
func (e Ec2Product) GetConvertible1yrNoUpfrontPrice() string
func (Ec2Product) GetInstanceMemory ¶
func (e Ec2Product) GetInstanceMemory() string
func (Ec2Product) GetInstanceType ¶
func (e Ec2Product) GetInstanceType() string
func (Ec2Product) GetInstanceVcpu ¶
func (e Ec2Product) GetInstanceVcpu() string
func (Ec2Product) GetOnDemandPrice ¶
func (e Ec2Product) GetOnDemandPrice() string
func (Ec2Product) GetProductFamily ¶
func (e Ec2Product) GetProductFamily() string
func (Ec2Product) GetReservedPrice ¶
func (e Ec2Product) GetReservedPrice( offeringClass types.OfferingClassType, offeringType types.OfferingTypeValues, leaseContractLength string, ) string
func (Ec2Product) GetStandard1yrNoUpfrontPrice ¶
func (e Ec2Product) GetStandard1yrNoUpfrontPrice() string
func (Ec2Product) GetTerms ¶
func (e Ec2Product) GetTerms() Terms
type PriceDimension ¶
type PricePerUnit ¶
type PricePerUnit struct {
USD string `json:"USD"`
}
type PricingRepository ¶
type PricingRepository struct {
// contains filtered or unexported fields
}
func NewPricingRepository ¶
func NewPricingRepository(ctx context.Context, client AwsClient) *PricingRepository
func (*PricingRepository) GetInstancePricing ¶
func (r *PricingRepository) GetInstancePricing(region ptypes.AwsRegion, instanceType ec2types.InstanceType) (*Ec2Product, error)
GetInstancePricing fetches the pricing for a given instance type using the AWS Pricing API.
func (*PricingRepository) GetInstancePricingByInput ¶
func (r *PricingRepository) GetInstancePricingByInput(query *pricing.GetProductsInput) ([]string, error)
GetInstancePricingByInput fetches the pricing for a given instance type using the AWS Pricing API.
func (*PricingRepository) GetRegion ¶
func (r *PricingRepository) GetRegion() ptypes.AwsRegion
type Product ¶
type Product struct { ProductFamily string `json:"productFamily"` Attributes Attributes `json:"attributes"` SKU string `json:"sku"` }
type Term ¶
type Term struct { PriceDimensions map[string]PriceDimension `json:"priceDimensions"` SKU string `json:"sku"` EffectiveDate string `json:"effectiveDate"` OfferTermCode string `json:"offerTermCode"` TermAttributes TermAttributes `json:"termAttributes"` }
type TermAttributes ¶
type TermAttributes struct { LeaseContractLength string `json:"LeaseContractLength,omitempty"` OfferingClass types.OfferingClassType `json:"OfferingClass,omitempty"` PurchaseOption types.OfferingTypeValues `json:"PurchaseOption,omitempty"` }
Click to show internal directories.
Click to hide internal directories.