Documentation ¶
Index ¶
- func AssumeRole(roleArn string, region string, sessionName string) (*session.Session, error)
- func CEClientFromEnv() (*costexplorer.CostExplorer, error)
- func CWClientFromEnv(region string) (*cloudwatch.CloudWatch, error)
- func CostAndUsage(startDate time.Time, endDate time.Time, granularity string, dateFormat string) (*costexplorer.GetCostAndUsageOutput, error)
- func CostAndUsageInput(startDate time.Time, endDate time.Time, granularity string, dateFormat string) *costexplorer.GetCostAndUsageInput
- func GetListOfMetrics(cw *cloudwatch.CloudWatch) (metrics []*cloudwatch.Metric)
- func GetMetricsStats(cw *cloudwatch.CloudWatch, metrics []*cloudwatch.Metric, start time.Time, ...) (datapoints []*cloudwatch.Datapoint, err error)
- func NewSession(id string, secret string, token string, region string) (*session.Session, error)
- func NewSessionFromEnv() (*session.Session, error)
- func NewSessionFromEnvWithRegion(region string) (*session.Session, error)
- func RoleArn(account string, role string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssumeRole ¶
func CEClientFromEnv ¶ added in v1.5.0
func CEClientFromEnv() (*costexplorer.CostExplorer, error)
CEClientFromEnv returns a cost explorer client
func CWClientFromEnv ¶ added in v1.5.0
func CWClientFromEnv(region string) (*cloudwatch.CloudWatch, error)
CWClientFromEnv returns a cloudwatch client
func CostAndUsage ¶
func CostAndUsage(startDate time.Time, endDate time.Time, granularity string, dateFormat string) (*costexplorer.GetCostAndUsageOutput, error)
func CostAndUsageInput ¶
func CostAndUsageInput(startDate time.Time, endDate time.Time, granularity string, dateFormat string) *costexplorer.GetCostAndUsageInput
func GetListOfMetrics ¶ added in v1.5.0
func GetListOfMetrics(cw *cloudwatch.CloudWatch) (metrics []*cloudwatch.Metric)
GetListOfMetrics returns all metrics that are tracking uptime percentages within this account which can then be used to get the statistics to show uptime amount
func GetMetricsStats ¶ added in v1.5.0
func GetMetricsStats(cw *cloudwatch.CloudWatch, metrics []*cloudwatch.Metric, start time.Time, end time.Time, ) (datapoints []*cloudwatch.Datapoint, err error)
GetMetricsStats returns all data points for the health check metrics - so allows us to track the % uptime of the service
As the namespace and metrics are identical, we can do one call to hte api by merging the dimension values together
func NewSession ¶
func NewSessionFromEnv ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.