Documentation ¶
Index ¶
- Variables
- func NewAlarmSource(client *cloudwatch.Client, accountID string, region string) ...
- func SuggestedQuery(namespace string, scope string, dimensions []types.Dimension) (*sdp.LinkedItemQuery, error)
- func ToQueryString(input *cloudwatch.DescribeAlarmsForMetricInput) (string, error)
- type Alarm
- type CloudwatchClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoQuery = errors.New("no query found")
Functions ¶
func NewAlarmSource ¶
func NewAlarmSource(client *cloudwatch.Client, accountID string, region string) *sources.DescribeOnlySource[*cloudwatch.DescribeAlarmsInput, *cloudwatch.DescribeAlarmsOutput, CloudwatchClient, *cloudwatch.Options]
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) }
Click to show internal directories.
Click to hide internal directories.