riEc2

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const IndexPrefixReservedInstancesReport = "ri-ec2-reports"
View Source
const MonitorReservationStsSessionName = "monitor-reservation"
View Source
const TemplateLineItem = `` /* 1517-byte string literal not displayed */
View Source
const TemplateNameReservedInstancesReport = "ri-ec2-reports"
View Source
const TypeReservedInstancesReport = "ri-ec2-report"

Variables

This section is empty.

Functions

func FetchDailyReservationsStats

func FetchDailyReservationsStats(ctx context.Context, awsAccount taws.AwsAccount) error

FetchDailyReservationsStats fetches the stats of the reserved instances of an AwsAccount to import them in ElasticSearch. The stats are fetched from the last hour. In this way, FetchReservationsStats should be called every hour.

Types

type RecurringCharges

type RecurringCharges struct {
	Amount    float64
	Frequency string
}

RecurringCharges contains recurring charges informations of a reservation

type Reservation

type Reservation struct {
	ReservationBase
	Tags []utils.Tag `json:"tags"`
}

Reservation contains all the information of a reservation

type ReservationBase

type ReservationBase struct {
	Id                 string             `json:"id"`
	Region             string             `json:"region"`
	AvailabilityZone   string             `json:"availabilityZone"`
	Type               string             `json:"type"`
	OfferingClass      string             `json:"offeringClass"`
	OfferingType       string             `json:"offeringType"`
	ProductDescription string             `json:"productDescription"`
	State              string             `json:"state"`
	Start              time.Time          `json:"start"`
	End                time.Time          `json:"end"`
	InstanceCount      int64              `json:"instanceCount"`
	Tenancy            string             `json:"tenancy"`
	RecurringCharges   []RecurringCharges `json:"recurringCharges"`
}

ReservationBase contains basics information of a reserved instance

type ReservationReport

type ReservationReport struct {
	utils.ReportBase
	Reservation Reservation `json:"reservation"`
}

ReservationReport is saved in ES to have all the information of a reservation

Jump to

Keyboard shortcuts

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