Documentation ¶
Index ¶
- Constants
- type CostExplorer
- func (svc *CostExplorer) DoGetCostAndUsage(input *SDK.GetCostAndUsageInput) (UsageResult, error)
- func (svc *CostExplorer) Errorf(format string, v ...interface{})
- func (svc *CostExplorer) GetCostAndUsage(input GetCostAndUsageInput) (UsageResult, error)
- func (svc *CostExplorer) Infof(format string, v ...interface{})
- func (svc *CostExplorer) SetLogger(logger log.Logger)
- type GetCostAndUsageInput
- type Group
- type GroupDefinition
- type MetricValue
- type MetricValues
- type ResultByTime
- type UsageResult
Constants ¶
View Source
const ( GranularityMonthly = SDK.GranularityMonthly GranularityDaily = SDK.GranularityDaily GranularityHourly = SDK.GranularityHourly GroupByDimension = SDK.GroupDefinitionTypeDimension GroupByTag = SDK.GroupDefinitionTypeTag MetricBlendedCost = SDK.MetricBlendedCost MetricUnblendedCost = SDK.MetricUnblendedCost MetricAmortizedCost = SDK.MetricAmortizedCost MetricNetUnblendedCost = SDK.MetricNetUnblendedCost MetricNetAmortizedCost = SDK.MetricNetAmortizedCost MetricUsageQuantity = SDK.MetricUsageQuantity MetricNormalizedUsageAmount = SDK.MetricNormalizedUsageAmount )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostExplorer ¶
type CostExplorer struct {
// contains filtered or unexported fields
}
CostExplorer has *SDK.CostExplorer client.
func New ¶
func New(conf config.Config) (*CostExplorer, error)
New returns initialized *CostExplorer.
func (*CostExplorer) DoGetCostAndUsage ¶
func (svc *CostExplorer) DoGetCostAndUsage(input *SDK.GetCostAndUsageInput) (UsageResult, error)
DoGetCostAndUsage executes GetCostAndUsage operation.
func (*CostExplorer) Errorf ¶
func (svc *CostExplorer) Errorf(format string, v ...interface{})
Errorf logging error information.
func (*CostExplorer) GetCostAndUsage ¶
func (svc *CostExplorer) GetCostAndUsage(input GetCostAndUsageInput) (UsageResult, error)
GetCostAndUsage executes GetCostAndUsage operation with customized input.
func (*CostExplorer) Infof ¶
func (svc *CostExplorer) Infof(format string, v ...interface{})
Infof logging information.
func (*CostExplorer) SetLogger ¶
func (svc *CostExplorer) SetLogger(logger log.Logger)
SetLogger sets logger.
type GetCostAndUsageInput ¶
type GetCostAndUsageInput struct { NextPageToken string TimePeriodStart time.Time TimePeriodEnd time.Time GranularityMonthly bool GranularityDaily bool GranularityHourly bool GroupByDimensionAZ bool GroupByDimensionInstanceType bool GroupByDimensionLegalEntityName bool GroupByDimensionLinkedAccount bool GroupByDimensionOperation bool GroupByDimensionPlatform bool GroupByDimensionPurchaseType bool GroupByDimensionService bool GroupByDimensionTenancy bool GroupByDimensionRecordType bool GroupByDimensionUsageType bool GroupByTagKeys []string MetricAmortizedCost bool MetricBlendedCost bool MetricNetAmortizedCost bool MetricNetUnblendedCost bool MetricNormalizedUsageAmount bool MetricUnblendedCost bool MetricUsageQuantity bool Filter *SDK.Expression }
GetCostAndUsageInput is optional parameters for `GetCostAndUsage`.
func (GetCostAndUsageInput) ToInput ¶
func (u GetCostAndUsageInput) ToInput() *SDK.GetCostAndUsageInput
ToInput converts to *SDK.GetCostAndUsageInput.
type Group ¶
type Group struct { Keys []string MetricValues }
type GroupDefinition ¶
type MetricValue ¶
type MetricValues ¶
type MetricValues struct { AmortizedCost MetricValue NetAmortizedCost MetricValue BlendedCost MetricValue UnblendedCost MetricValue NetUnblendedCost MetricValue NormalizedUsageAmount MetricValue UsageQuantity MetricValue }
func (MetricValues) GetOne ¶
func (v MetricValues) GetOne() (amount, unit string)
type ResultByTime ¶
type ResultByTime struct { Estimated bool TimePeriodStart string TimePeriodEnd string Groups []Group Total MetricValues }
type UsageResult ¶
type UsageResult struct { GroupDefinitions []GroupDefinition ResultsByTime []ResultByTime NextPageToken string }
UsageResult represents results from `GetCostAndUsage` operation.
func NewUsageResult ¶
func NewUsageResult(output *SDK.GetCostAndUsageOutput) UsageResult
Click to show internal directories.
Click to hide internal directories.