cloudwatch

package
v0.0.0-...-08deec1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoQuery = errors.New("no query found")

Functions

func SuggestedQuery

func SuggestedQuery(namespace string, scope string, dimensions []types.Dimension) (*sdp.LinkedItemQuery, error)

SuggestQueries Suggests a linked item query based on the namespace and dimensions of a metric. For metrics with many dimensions, it will use the most specific dimension since many metrics have overlapping dimensions that get more and more specific

The full list of services that provide cloudwatch metrics can be found here: https://github.com/awsdocs/amazon-cloudwatch-user-guide/blob/master/doc_source/aws-services-cloudwatch-metrics.md

The below list is not exhaustive and improvements are welcome

func ToQueryString

func ToQueryString(input *cloudwatch.DescribeAlarmsForMetricInput) (string, error)

ToQueryString Converts an alarm query input to the correct for search string

Types

type Alarm

type Alarm struct {
	Metric    *types.MetricAlarm
	Composite *types.CompositeAlarm
}

type CloudwatchClient

type CloudwatchClient interface {
	ListTagsForResource(ctx context.Context, params *cloudwatch.ListTagsForResourceInput, optFns ...func(*cloudwatch.Options)) (*cloudwatch.ListTagsForResourceOutput, error)
	DescribeAlarms(ctx context.Context, params *cloudwatch.DescribeAlarmsInput, optFns ...func(*cloudwatch.Options)) (*cloudwatch.DescribeAlarmsOutput, error)
	DescribeAlarmsForMetric(ctx context.Context, params *cloudwatch.DescribeAlarmsForMetricInput, optFns ...func(*cloudwatch.Options)) (*cloudwatch.DescribeAlarmsForMetricOutput, error)
}

Jump to

Keyboard shortcuts

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