Documentation ¶
Index ¶
Constants ¶
View Source
const ( YEAR_HOURS = 8760 MONTH_HOURS = 730 )
View Source
const (
API_URL = "https://prices.azure.com/api/retail/prices?$filter="
)
Variables ¶
This section is empty.
Functions ¶
func GetArnForAzureApiItem ¶
func GetArnForAzureApiItem(priceItem *AzurePricingApiItem) string
Types ¶
type ApiResp ¶
type ApiResp struct { //Future Work //PriceItems []ApiRespPriceItem `json:"price_items"` UnsupportedResources []string `json:"unsupported_resources,omitempty",yaml:"unsupported_resources,omitempty"` UnestimateableResources []string `json:"unestimateable_resources,omitempty",yaml:"unestimateable_resources,omitempty"` TotalEstimate EstimateTotal `json:"estimate_summary",yaml:"estimate_summary"` }
type ApiRespPriceItem ¶
type AzurePriceableAsset ¶
This interface has a function that returns a query that can be run against the Azure pricing API
type AzurePricingApiItem ¶
type AzurePricingApiItem struct { CurrencyCode string `json:"currencyCode"` TierMinimumUnits float64 `json:"tierMinimumUnits"` RetailPrice float64 `json:"retailPrice"` UnitPrice float64 `json:"unitPrice"` ArmRegionName string `json:"armRegionName"` Location string `json:"location"` EffectiveStartDate time.Time `json:"effectiveStartDate"` MeterID string `json:"meterId"` MeterName string `json:"meterName"` ProductID string `json:"productId"` ReservationTerm string `json:"reservationTerm"` SkuID string `json:"skuId"` ProductName string `json:"productName"` SkuName string `json:"skuName"` ServiceName string `json:"serviceName"` ServiceID string `json:"serviceId"` ServiceFamily string `json:"serviceFamily"` UnitOfMeasure string `json:"unitOfMeasure"` Type string `json:"type"` IsPrimaryMeterRegion bool `json:"isPrimaryMeterRegion"` ArmSkuName string `json:"armSkuName"` }
type AzurePricingApiResp ¶
type AzurePricingApiResp struct { BillingCurrency string `json:"BillingCurrency"` CustomerEntityID string `json:"CustomerEntityId"` CustomerEntityType string `json:"CustomerEntityType"` Items []AzurePricingApiItem `json:"Items"` NextPageLink *string `json:"NextPageLink"` Count int `json:"Count"` }
func ExecuteAzurePriceQuery ¶
func ExecuteAzurePriceQuery(ctx context.Context, p AzurePriceableAsset) (*AzurePricingApiResp, error)
type EstimateTotal ¶
type PlanFile ¶
type PlanFile struct {
ResourceChanges []ResourceChange `json:"resource_changes"`
}
Click to show internal directories.
Click to hide internal directories.