awscostexplorer

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateFormat = "2006-01-02"
)

Variables

Functions

This section is empty.

Types

type Report

type Report struct {
	Name        string
	Accounts    []*string
	TimePeriod  *costexplorer.DateInterval
	Granularity *string
	Metrics     []*string
	Filter      *costexplorer.Expression
	GroupBy     []*costexplorer.GroupDefinition

	Output *costexplorer.GetCostAndUsageOutput
}

func (*Report) Print

func (report *Report) Print()

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

func NewReporter

func NewReporter(awsSession *session.Session) *Reporter

func (*Reporter) GetServices

func (r *Reporter) GetServices(timePeriod *costexplorer.DateInterval) (services []string, err error)

GetServices returns the available names for services (useful to find new services)

func (*Reporter) NewServiceDetailReports

func (r *Reporter) NewServiceDetailReports(startTime, endTime time.Time, granularity string, accounts []string) (*Reports, error)

func (*Reporter) NewSummaryReports

func (r *Reporter) NewSummaryReports(startTime, endTime time.Time, granularity string, accounts []string) *Reports

func (*Reporter) Run

func (r *Reporter) Run(report *Report) error

type Reports

type Reports struct {
	Name           string
	Start, End     time.Time
	Granularity    string
	AccountReports map[string][]*Report // accountid -> reports
	// contains filtered or unexported fields
}

func (Reports) Print

func (pr Reports) Print()

func (*Reports) Run

func (pr *Reports) Run() error

Jump to

Keyboard shortcuts

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