aps

package
v0.0.96 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertManagerConfiguration_IsConstruct

func AlertManagerConfiguration_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AlertManagerInhibitRule_IsConstruct

func AlertManagerInhibitRule_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AlertManagerReceiver_IsConstruct

func AlertManagerReceiver_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func AlertManagerRoute_IsConstruct

func AlertManagerRoute_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func NewAlertManagerConfiguration_Override

func NewAlertManagerConfiguration_Override(a AlertManagerConfiguration, scope constructs.IConstruct, id *string, props *AlertManagerConfigurationProps)

Creates a new instance of the AlertManagerConfiguration class.

func NewAlertManagerDestination_Override

func NewAlertManagerDestination_Override(a AlertManagerDestination)

func NewAlertManagerInhibitRuleProps_Override

func NewAlertManagerInhibitRuleProps_Override(a AlertManagerInhibitRuleProps)

func NewAlertManagerInhibitRule_Override

func NewAlertManagerInhibitRule_Override(a AlertManagerInhibitRule, scope AlertManagerConfiguration, id *string, options AlertManagerInhibitRuleProps)

Creates a new instance of the AlertManagerInhibitRule class.

func NewAlertManagerReceiver_Override

func NewAlertManagerReceiver_Override(a AlertManagerReceiver, scope AlertManagerConfiguration, id *string, props *AlertManagerReceiverProps)

Creates a new instance of the AlertManagerReceiver class.

func NewAlertManagerRoute_Override

func NewAlertManagerRoute_Override(a AlertManagerRoute, scope interface{}, id *string, options *AlertManagerRouteProps)

Creates a new instance of the AlertManagerRoute class.

func NewAlertManagerSnsDestination_Override

func NewAlertManagerSnsDestination_Override(a AlertManagerSnsDestination, options *AlertManagerSnsDestinationProps)

Creates a new instance of the AlertManagerSnsDestination class.

func NewAlertingRule_Override

func NewAlertingRule_Override(a AlertingRule, props *AlertingRuleProps)

Creates a new instance of the AlertingRule class.

func NewPrometheusRule_Override

func NewPrometheusRule_Override(p PrometheusRule)

func NewRecordingRule_Override

func NewRecordingRule_Override(r RecordingRule, props *RecordingRuleProps)

Creates a new instance of the RecordingRule class.

func NewRuleGroupConfiguration_Override

func NewRuleGroupConfiguration_Override(r RuleGroupConfiguration, scope constructs.IConstruct, id *string, _props *RuleGroupConfigurationProps)

Creates a new instance of the RuleGroupConfiguration class.

func NewRuleGroup_Override

func NewRuleGroup_Override(r RuleGroup, scope constructs.IConstruct, id *string, props *RuleGroupProps)

Creates a new instance of the RuleGroup class.

func NewRuleGroupsNamespace_Override

func NewRuleGroupsNamespace_Override(r RuleGroupsNamespace, scope constructs.IConstruct, id *string, props *RuleGroupsNamespaceProps)

Creates a new instance of the RuleGroupsNamespace class.

func NewTimeIntervalEntry_Override

func NewTimeIntervalEntry_Override(t TimeIntervalEntry, options *TimeIntervalEntryProps)

Creates a new instance of the TimeIntervalEntry class.

func NewTimeInterval_Override

func NewTimeInterval_Override(t TimeInterval, scope AlertManagerConfiguration, id *string, options *TimeIntervalProps)

Creates a new instance of the TimeInterval class.

func NewWorkspace_Override

func NewWorkspace_Override(w Workspace, scope constructs.IConstruct, id *string, props *WorkspaceProps)

Creates a new instance of the Workspace class.

func RuleGroupConfiguration_IsConstruct

func RuleGroupConfiguration_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func RuleGroup_IsConstruct

func RuleGroup_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func RuleGroupsNamespace_IsConstruct

func RuleGroupsNamespace_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func RuleGroupsNamespace_IsOwnedResource

func RuleGroupsNamespace_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise.

func RuleGroupsNamespace_IsResource

func RuleGroupsNamespace_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

func TimeInterval_IsConstruct

func TimeInterval_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func Workspace_IsConstruct

func Workspace_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func Workspace_IsOwnedResource

func Workspace_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise.

func Workspace_IsResource

func Workspace_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

Types

type AlertManagerConfiguration

type AlertManagerConfiguration interface {
	constructs.Construct
	IAlertManagerConfiguration
	// The receiver configuring the destinations where all alerts that are not matched by a child route in the routing tree will be sent.
	// See: [Receiver Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#receiver)
	//
	DefaultReceiver() AlertManagerReceiver
	// The default root route withing the routing tree.
	//
	// Serves as the default
	// configuration for all alerts. Sends alerts to the default receiver.
	//
	// Must match all alerts and cannot be muted or deactivated. To add more
	// advanced configurations create additional routes as children of the
	// default route.
	// See: [Route OfficialDocumentation](https://prometheus.io/docs/alerting/latest/configuration/#route)
	//
	DefaultRoute() AlertManagerRoute
	// The topic that the default receiver will send messages to if no destinations are specified as inputs (input destinations are null/undefined).
	//
	// The creation of this topic can be skipped to allow the defferred
	// configuration of default destination by providing an empty list of
	// destinations as inputs.
	DefaultTopic() awssns.ITopic
	// Collection of inhibit rules that mute an alert under scecific sets of circumstances.
	// See: [Inhibit Rule Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule)
	//
	InhibitRules() *[]AlertManagerInhibitRule
	// The tree node.
	Node() constructs.Node
	// Collection of notification integrations that provide the details for how and where generated alerts should be sent.
	// See: [Receiver Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule)
	//
	Receivers() *[]AlertManagerReceiver
	// Collection of alert manager templates that the configuration uses to format the alerts that it sends.
	Templates() *[]AlertManagerTemplate
	// Collection of timing configurations that can be used to control when specific alerts should be muted or activated.
	// See: [Time Interval Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#time_interval)
	//
	TimeIntervals() *[]TimeInterval
	// Adds a new inhibit rule that can mute alerts under specific circumstances.
	//
	// Returns: The inhibit rule that was added to the configuration.
	AddInhibitRule(id *string, options AlertManagerInhibitRuleProps) AlertManagerInhibitRule
	// Adds a new receiver to the configuration.
	//
	// The receiver can be used to
	// specify one or more destinations where alerts should be sent when matched
	// by a route in the routing tree.
	//
	// Returns: The receiver that was added to the configuration.
	AddReciever(id *string, options *AlertManagerReceiverProps) AlertManagerReceiver
	// Adds a new template to the configuration.
	//
	// The template can be referenced
	// within the configuration to control the formatting of the alerts being sent.
	//
	// Returns: The configuration object where the template was added.
	AddTemplate(template AlertManagerTemplate) IAlertManagerConfiguration
	// Adds a new time interval to the configuration.
	//
	// Time intervals can be used
	// to mute or activate groups of alerts under specific circumstances.
	//
	// Time intervals are referenced by routes in the routing tree to control the
	// behavior of the route. Time intervals to mute or activate alerts cannot be
	// added to the default route.
	//
	// Returns: The time interval that was added to the configuration.
	AddTimeInterval(id *string, options *TimeIntervalProps) TimeInterval
	// Associates the configuration with a construct that is handling the configuration of alert manager for an APS workspace.
	//
	// Returns: Alert manager configuration details.
	Bind(scope constructs.IConstruct) *AlertManagerConfigurationDetails
	// Generates a unique name for a template that is being referenced by the alert manager configuration.
	//
	// The names are only used to distinguish different templates as internally
	// each template is saved to a file with this name.
	//
	// Knowing the name is not needed to use the templates as template references
	// rely on the name given to the `define` keyword in the template content
	// itself rather than the name of the template as it is generated here.
	//
	// Returns: A unique name for the template.
	GenerateTemplateName(idx *float64) *string
	// Renders an alert manager configuration to be used for configuring notifications on an APS workspace.
	//
	// Returns: The string representation of the rendered Prometheus alert
	// manager configuration.
	RenderAlertManagerConfig(scope constructs.IConstruct) *string
	// Renders the configuration templates into the structure that is expected for an APS workspace alert manager configuration.
	//
	// Returns: An object that represents the templates contained in this
	// configuration or undefined if the configuration has no templates.
	RenderTemplates(_scope constructs.IConstruct) *map[string]*string
	// Returns a string representation of this construct.
	ToString() *string
}

Represents a Prometheus alert manager configuration that can be used by Amazon APS to send generated alerts to one or more destinations.

Currently the only destination type supported by APS is Amazon SNS. See: [Alert manager configuration specification](https://prometheus.io/docs/alerting/latest/configuration/)

func NewAlertManagerConfiguration

func NewAlertManagerConfiguration(scope constructs.IConstruct, id *string, props *AlertManagerConfigurationProps) AlertManagerConfiguration

Creates a new instance of the AlertManagerConfiguration class.

type AlertManagerConfigurationDetails

type AlertManagerConfigurationDetails struct {
	// The rendered alert manager configuration in the format expected by an Amazon APS workspace.
	Contents *string `field:"required" json:"contents" yaml:"contents"`
}

The details that are needed to configure alert manager for an Amazon APS workspace.

type AlertManagerConfigurationProps

type AlertManagerConfigurationProps struct {
	// Destinations where all alerts generated by APS should be sent.
	//
	// If this property is not a provided, a new default topic will be created to
	// receive notifications. If a default topic is not desired (such as in cases
	// where topics will be registered dynamically later in the build) an empty
	// list can be provided. This will result in the default topic not being
	// created an no destinations being configured for the default receiver.
	//
	// Note that the default receiver requires at least one destination to be
	// registered, so if the default topic is skipped and no destinations are
	// provided here, at least one destination _must_ be registered for the
	// default route before the CDK app is synthed.
	DefaultReceiverDestinations *[]IAlertManagerDestination `field:"optional" json:"defaultReceiverDestinations" yaml:"defaultReceiverDestinations"`
	// Options for configuring the behavior of the default route that gets created for alerts.
	//
	// The default route for alert manager does not support all options allowed
	// by child routes.
	DefaultRoute *DefaultRouteOptions `field:"optional" json:"defaultRoute" yaml:"defaultRoute"`
	// Collection of templates to make available to alert manager.
	//
	// The templates
	// are available to be referenced in any field that supports templating by
	// using the `template` templating function and referencing the name of the
	// template as defined in the template content with the `define` keyword.
	// See: [Reference defined templates](https://pkg.go.dev/text/template#hdr-Nested_template_definitions)
	//
	Templates *[]AlertManagerTemplate `field:"optional" json:"templates" yaml:"templates"`
}

Configuration for alert manager running on Amazon APS.

type AlertManagerDestination

type AlertManagerDestination interface {
}

Provides an interface for creating various alert manager destination objects that can receive notifications when an alert happens in Prometheus.

func NewAlertManagerDestination

func NewAlertManagerDestination() AlertManagerDestination

type AlertManagerDestinationCategory

type AlertManagerDestinationCategory interface {
	// The name of the category, as it would appear as a key in the configuration for an alert manager receiver.
	Name() *string
}

Specifies the type of destination where alert manager can send notifications.

Corresponds with a config block inside an alert manager receiver configuration.

func AlertManagerDestinationCategory_EMAIL

func AlertManagerDestinationCategory_EMAIL() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_OPSGENIE

func AlertManagerDestinationCategory_OPSGENIE() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_Of

func AlertManagerDestinationCategory_Of(name *string) AlertManagerDestinationCategory

An escape hatch method that allows specifying arbitrary values for the type a receiver field a destination should be placed under.

In the event that new destination types are added by alert manager, this can be used to implement custom destinations in the event that it hasn't had the chance to be implemented here.

Whenever possible, it is recommended the static values provided be used.

Returns: An object that can be used when building a receiver that specifies the given destination.

func AlertManagerDestinationCategory_PAGERDUTY

func AlertManagerDestinationCategory_PAGERDUTY() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_PUSHOVER

func AlertManagerDestinationCategory_PUSHOVER() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_SLACK

func AlertManagerDestinationCategory_SLACK() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_SNS

func AlertManagerDestinationCategory_SNS() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_TELEGRAM

func AlertManagerDestinationCategory_TELEGRAM() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_VICTOROPS

func AlertManagerDestinationCategory_VICTOROPS() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_WEBEX

func AlertManagerDestinationCategory_WEBEX() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_WEBHOOK

func AlertManagerDestinationCategory_WEBHOOK() AlertManagerDestinationCategory

func AlertManagerDestinationCategory_WECHAT

func AlertManagerDestinationCategory_WECHAT() AlertManagerDestinationCategory

type AlertManagerInhibitRule

type AlertManagerInhibitRule interface {
	constructs.Construct
	// Collection of labels that must be equal for both matched source and target alerts in order for the inhibition to take effect.
	EqualLabels() *[]*string
	// The tree node.
	Node() constructs.Node
	// Collection of matchers for which one or more alerts have to exist for the inhibition to take effect.
	SourceMatchers() *[]AlertManagerMatcher
	// Collection of matchers that have to be fulfilled by the target alerts to be muted.
	TargetMatchers() *[]AlertManagerMatcher
	// Adds a label that must be equal for both matched source and target alerts in order for the inhibition to take effect.
	//
	// Returns: The inhibit rule to which the label was added.
	AddEqualLabel(label *string) AlertManagerInhibitRule
	// Adds a matcher for which one or more alerts have to exist in order for inhibition to take effect.
	//
	// Returns: The inhibit rule to which the matcher was added.
	AddSourceMatcher(matcher AlertManagerMatcher) AlertManagerInhibitRule
	// Adds a matcher that has to be fulfilled by a target alert in order to be muted.
	//
	// Returns: The inhibit rule to which the matcher was added.
	AddTargetMatcher(matcher AlertManagerMatcher) AlertManagerInhibitRule
	// Associates the inhibit rule with a construct that is handling the configuration of alert manager.
	//
	// Returns: An alert manager _inhibit_rule` object.
	Bind(_scope constructs.IConstruct) *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

An inhibition rule mutes an alert (target) matching a set of matchers when an alert (source) exists that matches another set of matchers.

Both target and source alerts can optionally be required to have the same label values for a specified list of label names.

Semantically, a missing label and a label with an empty value are the same thing. Therefore, if all the label names given for `equalLabels` are missing from both the source and target alerts, the inhibition rule will apply.

To prevent an alert from inhibiting itself, an alert that matches both the target and the source side of a rule cannot be inhibited by alerts for which the same is true (including itself). However, we recommend to choose target and source matchers in a way that alerts never match both sides. It is much easier to reason about and does not trigger this special case. See: [Inhibit Rule Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule)

func NewAlertManagerInhibitRule

func NewAlertManagerInhibitRule(scope AlertManagerConfiguration, id *string, options AlertManagerInhibitRuleProps) AlertManagerInhibitRule

Creates a new instance of the AlertManagerInhibitRule class.

type AlertManagerInhibitRuleProps

type AlertManagerInhibitRuleProps interface {
	// Labels that must have an equal value in the source and target alert for the inhibition to take effect.
	EqualLabels() *[]*string
	// A list of matchers for which one or more alerts have to exist for the inhibition to take effect.
	SourceMatchers() *[]AlertManagerMatcher
	// A list of matchers that have to be fulfilled by the target alerts to be muted.
	TargetMatchers() *[]AlertManagerMatcher
}

Configuration options for the alert manager inhibit rule.

func NewAlertManagerInhibitRuleProps

func NewAlertManagerInhibitRuleProps() AlertManagerInhibitRuleProps

type AlertManagerMatcher

type AlertManagerMatcher interface {
	// The PromQL like expression to use for the matcher.
	Expression() *string
}

An expression that alert manager can use to evaluate incoming alerts to determine the actions it should take.

func AlertManagerMatcher_FromComponents

func AlertManagerMatcher_FromComponents(label *string, operator MatchOperator, value *string) AlertManagerMatcher

Builds a simple matcher using the standard components supported by the matcher expression syntax.

Handles formatting an escaping of values.

Returns: A matcher object representing the given operation.

func AlertManagerMatcher_FromCompound

func AlertManagerMatcher_FromCompound(matchers ...AlertManagerMatcher) AlertManagerMatcher

Creates a compund matcher expression by joining one or more other matcher objects.

Returns: A compound matcher representing the joined expressions.

func AlertManagerMatcher_FromString

func AlertManagerMatcher_FromString(expression *string) AlertManagerMatcher

Creates a matcher from a raw string expression.

This allows for specifying arbitrary matching conditions that may be too complex to be supported by the other means of constructing matchers.

Returns: A matcher object representing the given expression. See: [Matcher expression syntax](https://prometheus.io/docs/alerting/latest/configuration/#matcher)

type AlertManagerReceiver

type AlertManagerReceiver interface {
	constructs.Construct
	// Collection of destinations which define details for alerting providers where events routed to this receiver should be sent.
	Destinations() *[]IAlertManagerDestination
	// The name of the receiver which can be referenced in the other parts of the configuration.
	Name() *string
	// The tree node.
	Node() constructs.Node
	// Adds a new generic destination that should receive alerts that have been routed to this receiver.
	//
	// Returns: The receiver where the destination was added.
	AddDestination(destination IAlertManagerDestination) AlertManagerReceiver
	// Adds a new SNS destination that should receive alerts that have been routed to this receiver.
	//
	// Returns: The SnsDestination object that was added to the receiver.
	AddSnsTopic(topic awssns.ITopic, options *AlertManagerSnsDestinationOptions) AlertManagerSnsDestination
	// Associates the receiver with a construct that is handling the configuration of alert manager that will consume the configuration.
	//
	// Returns: An alert manager `receiver` configuration object.
	Bind(scope constructs.IConstruct) *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

Represents a notification integration within alert manager. See: [Receiver configuration](https://prometheus.io/docs/alerting/latest/configuration/#receiver)

func NewAlertManagerReceiver

func NewAlertManagerReceiver(scope AlertManagerConfiguration, id *string, props *AlertManagerReceiverProps) AlertManagerReceiver

Creates a new instance of the AlertManagerReceiver class.

type AlertManagerReceiverProps

type AlertManagerReceiverProps struct {
	// Details for alerting providers where events routed to this receiver should be sent,.
	Destinations *[]IAlertManagerDestination `field:"optional" json:"destinations" yaml:"destinations"`
	// The name of the receiver which can be referenced in the other parts of the configuration.
	Name *string `field:"optional" json:"name" yaml:"name"`
}

Configuration for the aler manager route.

type AlertManagerRoute

type AlertManagerRoute interface {
	constructs.Construct
	// Times when the route should be active.
	//
	// An empty value means that the route
	// is always active. Additionally, the root node cannot have any active
	// times.
	//
	// The route will send notifications only when active, but otherwise acts
	// normally (including ending the route-matching process if the
	// `continueMatching` option is not set).
	ActiveTimeIntervals() *[]TimeInterval
	// Optional child routes to add to the node.
	Children() *[]AlertManagerRoute
	// Whether an alert should continue matching subsequent sibling nodes.
	ContinueMatching() *bool
	// The labels by which incoming alerts are grouped together.
	//
	// For example,
	// multiple alerts coming in for cluster=A and alertname=LatencyHigh would be
	// batched into a single group.
	GroupByLabels() *[]*string
	// How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent (usually ~5m or more).
	GroupInterval() awscdk.Duration
	// How long to initially wait to send a notification for a group of alerts.
	//
	// Allows to wait for an inhibiting alert to arrive or collect more initial
	// alerts for the same group (usually ~0s to few minutes).
	GroupWait() awscdk.Duration
	// A list of matchers that an alert has to fulfill to match the node.
	Matchers() *[]AlertManagerMatcher
	// Times when the route should be muted. The root node cannot have any mute times.
	//
	// When a route is muted it will not send any notifications, but otherwise
	// acts normally (including ending the route-matching process if the
	// `continueMatching` option is not set).
	MuteTimeIntervals() *[]TimeInterval
	// The tree node.
	Node() constructs.Node
	// The receiver that should be the target of alerts that are generated by the node.
	Receiver() AlertManagerReceiver
	// How long to wait before sending a notification again if it has already been sent successfully for an alert.
	//
	// (Usually ~3h or more).
	RepeatInterval() awscdk.Duration
	// Adds a new time when the route should be active. The root node cannot have any active times.
	//
	// The route will send notifications only when active, but otherwise acts
	// normally (including ending the route-matching process if the
	// `continueMatching` option is not set).
	//
	// Returns: The route where the interval was associated.
	AddActiveTimeInterval(interval TimeInterval) AlertManagerRoute
	// Adds a new child route to this node.
	//
	// Returns: The child route that was added.
	AddChild(id *string, options *AlertManagerRouteProps) AlertManagerRoute
	// Adds a label by which incoming alerts are grouped together.
	//
	// For example,
	// multiple alerts coming in for cluster=A and alertname=LatencyHigh would be
	// batched into a single group.
	//
	// Returns: The route where the label was associated.
	AddGroupByLabel(label *string) AlertManagerRoute
	// Adds a matcher that an alert has to fulfill to match the node.
	//
	// Returns: The route where the matcher was associated.
	AddMatcher(matcher AlertManagerMatcher) AlertManagerRoute
	// Adds a time when the route should be muted. The root node cannot have any mute times.
	//
	// When a route is muted it will not send any notifications, but otherwise
	// acts normally (including ending the route-matching process if the
	// `continueMatching` option is not set).
	AddMuteTimeInterval(interval TimeInterval) AlertManagerRoute
	// Associates the route with a construct that is handling the configuration of alert manager that will consume the configuration.
	//
	// Returns: An alert manager `route` configuration object.
	Bind(scope constructs.IConstruct) *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

Defines a node in a routing tree and its children.

Its optional configuration parameters are inherited from its parent node if not set.

Every alert enters the routing tree at the configured top-level route, which must match all alerts (i.e. not have any configured matchers). It then traverses the child nodes. If `continueMatching` is set to `false`, it stops after the first matching child. If `continueMatching` is `true` on a matching node, the alert will continue matching against subsequent siblings. If an alert does not match any children of a node (no matching child nodes, or none exist), the alert is handled based on the configuration parameters of the current node. See: [Route Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#route)

func NewAlertManagerRoute

func NewAlertManagerRoute(scope interface{}, id *string, options *AlertManagerRouteProps) AlertManagerRoute

Creates a new instance of the AlertManagerRoute class.

type AlertManagerRouteProps

type AlertManagerRouteProps struct {
	// The receiver that should be the target of alerts that are generated by the node.
	Receiver AlertManagerReceiver `field:"required" json:"receiver" yaml:"receiver"`
	// Times when the route should be active.
	//
	// An empty value means that the route
	// is always active. Additionally, the root node cannot have any active
	// times.
	//
	// The route will send notifications only when active, but otherwise acts
	// normally (including ending the route-matching process if the
	// `continueMatching` option is not set).
	ActiveTimeIntervals *[]TimeInterval `field:"optional" json:"activeTimeIntervals" yaml:"activeTimeIntervals"`
	// Optional child routes to add to the node.
	Children *[]*AlertManagerRouteProps `field:"optional" json:"children" yaml:"children"`
	// Whether an alert should continue matching subsequent sibling nodes.
	ContinueMatching *bool `field:"optional" json:"continueMatching" yaml:"continueMatching"`
	// The labels by which incoming alerts are grouped together.
	//
	// For example,
	// multiple alerts coming in for cluster=A and alertname=LatencyHigh would be
	// batched into a single group.
	GroupByLabels *[]*string `field:"optional" json:"groupByLabels" yaml:"groupByLabels"`
	// How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent (usually ~5m or more).
	GroupInterval awscdk.Duration `field:"optional" json:"groupInterval" yaml:"groupInterval"`
	// How long to initially wait to send a notification for a group of alerts.
	//
	// Allows to wait for an inhibiting alert to arrive or collect more initial
	// alerts for the same group (usually ~0s to few minutes).
	GroupWait awscdk.Duration `field:"optional" json:"groupWait" yaml:"groupWait"`
	// A list of matchers that an alert has to fulfill to match the node.
	Matchers *[]AlertManagerMatcher `field:"optional" json:"matchers" yaml:"matchers"`
	// Times when the route should be muted. The root node cannot have any mute times.
	//
	// When a route is muted it will not send any notifications, but otherwise
	// acts normally (including ending the route-matching process if the
	// `continueMatching` option is not set).
	MuteTimeInterval *[]TimeInterval `field:"optional" json:"muteTimeInterval" yaml:"muteTimeInterval"`
	// How long to wait before sending a notification again if it has already been sent successfully for an alert.
	//
	// (Usually ~3h or more).
	RepeatInterval awscdk.Duration `field:"optional" json:"repeatInterval" yaml:"repeatInterval"`
}

Configuration for the alert manager route.

type AlertManagerSnsDestination

type AlertManagerSnsDestination interface {
	IAlertManagerDestination
	// The SNS API URL i.e. https://sns.us-east-2.amazonaws.com.
	//
	// If not specified, the SNS API URL from the SNS SDK will be used.
	ApiUrl() *string
	// Attributes to be applied to SNS messages.
	Attributes() *map[string]*string
	// The destination type being configured.
	//
	// Represents a config block in an alert manager receiver configuration.
	Category() AlertManagerDestinationCategory
	// The message content of the SNS notification.
	Message() *string
	// Controls whether to notify about resolved alerts.
	SendResolved() *bool
	// Subject line when the message is delivered to email endpoints.
	Subject() *string
	// SNS topic where alerts will be sent.
	//
	// If you are using a FIFO SNS topic you should set a message group interval
	// longer than 5 minutes to prevent messages with the same group key being
	// deduplicated by the SNS default deduplication window.
	Topic() awssns.ITopic
	// Registers a new attribute to be added to sent SNS messages.
	//
	// Returns: The sns destination object the attribute was added to.
	AddAttribute(key *string, value *string) AlertManagerSnsDestination
	// Associates the destination with a construct that is handling the configuration of alert manager.
	//
	// Returns: An object representing the configured destination.
	Bind(scope constructs.IConstruct) *map[string]interface{}
}

An alert manager destination that provides details for sending alert notifications to an Amazon SNS topic. See: [Alert manager SNS configuration](https://prometheus.io/docs/alerting/latest/configuration/#sns_config)

func AlertManagerDestination_SnsTopic

func AlertManagerDestination_SnsTopic(topic awssns.ITopic, options *AlertManagerSnsDestinationOptions) AlertManagerSnsDestination

Creates an alert manager destination that sends alert notifications to an Amazon SNS topic.

Returns: An alert manager destination that represents the SNS topic.

func NewAlertManagerSnsDestination

func NewAlertManagerSnsDestination(options *AlertManagerSnsDestinationProps) AlertManagerSnsDestination

Creates a new instance of the AlertManagerSnsDestination class.

type AlertManagerSnsDestinationOptions

type AlertManagerSnsDestinationOptions struct {
	// The SNS API URL i.e. https://sns.us-east-2.amazonaws.com.
	//
	// If not specified, the SNS API URL from the SNS SDK will be used.
	ApiUrl *string `field:"optional" json:"apiUrl" yaml:"apiUrl"`
	// SNS message attributes.
	Attributes *map[string]*string `field:"optional" json:"attributes" yaml:"attributes"`
	// The message content of the SNS notification.
	Message *string `field:"optional" json:"message" yaml:"message"`
	// Controls whether to notify about resolved alerts.
	SendResolved *bool `field:"optional" json:"sendResolved" yaml:"sendResolved"`
	// Subject line when the message is delivered to email endpoints.
	Subject *string `field:"optional" json:"subject" yaml:"subject"`
}

Optional configuration for an alert manager SNS destination.

type AlertManagerSnsDestinationProps

type AlertManagerSnsDestinationProps struct {
	// The SNS API URL i.e. https://sns.us-east-2.amazonaws.com.
	//
	// If not specified, the SNS API URL from the SNS SDK will be used.
	ApiUrl *string `field:"optional" json:"apiUrl" yaml:"apiUrl"`
	// SNS message attributes.
	Attributes *map[string]*string `field:"optional" json:"attributes" yaml:"attributes"`
	// The message content of the SNS notification.
	Message *string `field:"optional" json:"message" yaml:"message"`
	// Controls whether to notify about resolved alerts.
	SendResolved *bool `field:"optional" json:"sendResolved" yaml:"sendResolved"`
	// Subject line when the message is delivered to email endpoints.
	Subject *string `field:"optional" json:"subject" yaml:"subject"`
	// SNS topic where alerts will be sent.
	//
	// If you are using a FIFO SNS topic you should set a message group interval
	// longer than 5 minutes to prevent messages with the same group key being
	// deduplicated by the SNS default deduplication window.
	Topic awssns.ITopic `field:"required" json:"topic" yaml:"topic"`
}

Configuration for an alert manager SNS destination.

type AlertManagerTemplate

type AlertManagerTemplate interface {
	// The template content as a string.
	//
	// Uses the Go templating system.
	Content() *string
}

A template that can be used for formatting alerts sent by alert manager. See: [Notification template examples](https://prometheus.io/docs/alerting/latest/notification_examples/)

func AlertManagerTemplate_FromFile

func AlertManagerTemplate_FromFile(path *string) AlertManagerTemplate

Loads an alert template from the local filesystem.

Returns: An object representing the template that can be used when configuring alert manager for Amzon APS.

func AlertManagerTemplate_FromString

func AlertManagerTemplate_FromString(content *string) AlertManagerTemplate

Loads an alert manager template using a template string.

Returns: An object representing the template that can be used when configuring alert manager for Amzon APS.

type AlertingRule

type AlertingRule interface {
	IPrometheusRule
	// The name of the alert.
	//
	// Must be a valid label value.
	Alert() *string
	// The PromQL expression to evaluate.
	//
	// Every evaluation cycle this is
	// evaluated at the current time, and all resultant time series become
	// pending/firing alerts.
	// See: [Querying prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/)
	//
	Expression() *string
	// Alerts are considered firing once they have been returned for this long.
	//
	// Alerts which have not yet fired for long enough are considered pending.
	Period() awscdk.Duration
	// Sets a new annotation that will be added to each generated alert.
	//
	// Returns: The alerting rule that the annotation was added to.
	AddAnnotation(label *string, template *string) AlertingRule
	// Sets a new label that will be added or overridden for each generated alert.
	//
	// Returns: The alerting rule that the label was added to.
	AddLabel(label *string, template *string) AlertingRule
	// Associates the alerting rule with a construct that is configuring an APS rule groups namespace.
	//
	// Returns: The rendered configuration for the rule as expected by an APS
	// rules config file.
	Bind(_scope constructs.IConstruct) *map[string]interface{}
}

Alerting rules allow you to define alert conditions based on Prometheus expression language expressions and to send notifications about firing alerts to an external service.

Whenever the alert expression results in one or more vector elements at a given point in time, the alert counts as active for these elements' label sets. See: [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)

func NewAlertingRule

func NewAlertingRule(props *AlertingRuleProps) AlertingRule

Creates a new instance of the AlertingRule class.

func PrometheusRule_AlertingRule

func PrometheusRule_AlertingRule(options *AlertingRuleProps) AlertingRule

type AlertingRuleProps

type AlertingRuleProps struct {
	// The name of the alert.
	//
	// Must be a valid label value.
	Alert *string `field:"required" json:"alert" yaml:"alert"`
	// The PromQL expression to evaluate.
	//
	// Every evaluation cycle this is
	// evaluated at the current time, and all resultant time series become
	// pending/firing alerts.
	// See: [Querying prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/)
	//
	Expression *string `field:"required" json:"expression" yaml:"expression"`
	// Annotations to add to each alert.
	//
	// Supports templating.
	Annotations *map[string]*string `field:"optional" json:"annotations" yaml:"annotations"`
	// Labels to add or overwrite for each alert.
	Labels *map[string]*string `field:"optional" json:"labels" yaml:"labels"`
	// Alerts are considered firing once they have been returned for this long.
	//
	// Alerts which have not yet fired for long enough are considered pending.
	Period awscdk.Duration `field:"optional" json:"period" yaml:"period"`
}

Options needed to configure a Prometheus alerting rule inside an APS rules configuration.

type DayOfMonthRange

type DayOfMonthRange struct {
	// The last day of the month for which the range should apply (inclusive).
	End *float64 `field:"required" json:"end" yaml:"end"`
	// The first day of the month for which the range should apply.
	Start *float64 `field:"required" json:"start" yaml:"start"`
}

A range specifying the numerical days in the month.

Days begin at 1. Negative values are also accepted which begin at the end of the month, e.g. -1 during January would represent January 31. For example: `start: 1` and `end: 5` or `start:-3` and `end: -1` would both be valid ranges.

Extending past the start or end of the month will cause it to be clamped. E.g. specifying `start: 1` and `end: 31` during February will clamp the actual end date to 28 or 29 depending on leap years.

Inclusive on both ends.

type DefaultRouteOptions

type DefaultRouteOptions struct {
	// The labels by which incoming alerts are grouped together.
	//
	// For example,
	// multiple alerts coming in for cluster=A and alertname=LatencyHigh would be
	// batched into a single group.
	GroupByLabels *[]*string `field:"optional" json:"groupByLabels" yaml:"groupByLabels"`
	// How long to wait before sending a notification about new alerts that are added to a group of alerts for which an initial notification has already been sent (usually ~5m or more).
	GroupInterval awscdk.Duration `field:"optional" json:"groupInterval" yaml:"groupInterval"`
	// How long to initially wait to send a notification for a group of alerts.
	//
	// Allows to wait for an inhibiting alert to arrive or collect more initial
	// alerts for the same group (usually ~0s to few minutes).
	GroupWait awscdk.Duration `field:"optional" json:"groupWait" yaml:"groupWait"`
	// A list of matchers that an alert has to fulfill to match the node.
	Matchers *[]AlertManagerMatcher `field:"optional" json:"matchers" yaml:"matchers"`
	// How long to wait before sending a notification again if it has already been sent successfully for an alert.
	//
	// (Usually ~3h or more).
	RepeatInterval awscdk.Duration `field:"optional" json:"repeatInterval" yaml:"repeatInterval"`
}

Configuration options that control the default behavior of alerts.

These are the settings that will be used for any alerts that do not match a child node in the default routing tree or alerts that do match a child node that doesn't override the settings provded here.

The default route does not support all the settings supported by other (child) routes.

type IAlertManagerConfiguration

type IAlertManagerConfiguration interface {
	// Associates the configuration with a construct that is handling the configuration of alert manager for an APS workspace.
	//
	// Returns: Alert manager configuration details.
	Bind(scope constructs.IConstruct) *AlertManagerConfigurationDetails
}

Represents an alert manager configuration object that can be used by resources configuring alerting for Amazon APS.

func AlertManagerConfiguration_FromFullConfigurationContent

func AlertManagerConfiguration_FromFullConfigurationContent(scope constructs.IConstruct, id *string, content *string) IAlertManagerConfiguration

Imports an alert manager configuration from a raw string in the format expected by Amazon APS.

The string should combine both the alert manager configuration and the alert template content into a single file. To import a configuration that has the alert manager configuration and templates being loaded from different files/sources use {@link fromSplitConfigurationContent} instead.

Returns: An object that can be used to configure alert manager for APS. See: [Alert manager configuration specification](https://prometheus.io/docs/alerting/latest/configuration/)

func AlertManagerConfiguration_FromFullConfigurationFile

func AlertManagerConfiguration_FromFullConfigurationFile(scope constructs.IConstruct, id *string, path *string) IAlertManagerConfiguration

Imports an alert manager configuration using a file in the format expected by Amazon APS.

The file should combine both the alert manager configuration and the alert template content into a single file. To import a configuration that has the alert manager configuration and templates being loaded from different files/sources use {@link fromSplitConfigurationFiles} instead.

Returns: An object that can be used to configure alert manager for APS. See: [Alert manager configuration specification](https://prometheus.io/docs/alerting/latest/configuration/)

func AlertManagerConfiguration_FromSplitConfigurationContent

func AlertManagerConfiguration_FromSplitConfigurationContent(scope constructs.IConstruct, id *string, content *string, templates *map[string]AlertManagerTemplate) IAlertManagerConfiguration

Imports an alert manager configuration from a raw string.

The string should be in YAML format and follow the alert manager configuration specifications. To import a configuration using a string that combines the alert manager configuration with the template content that is already in the format expected by Amazon APS use the import method {@link fromFullConfigurationContent} instead.

If the configuration references any templates then each template the configuration references should be specified using the `templates` argument. Templates can be read from their own separate files on disk or as a string.

Returns: An object that can be used to configure alert manager for APS. See: [Alert manager configuration specification](https://prometheus.io/docs/alerting/latest/configuration/)

func AlertManagerConfiguration_FromSplitConfigurationFiles

func AlertManagerConfiguration_FromSplitConfigurationFiles(scope constructs.IConstruct, id *string, path *string, templates *map[string]AlertManagerTemplate) IAlertManagerConfiguration

Imports an alert manager configuration from a file.

The file is a YAML file that follows the alert manager configuration specifications. To import a configuration file that combines the alert manager configuration with the template content that is already in the format expected by Amazon APS use the import method {@link fromFullConfigurationFile} instead.

If the configuration references any templates then each template the configuration references should be specified using the `templates` argument. Templates can be read from their own separate files on disk or as a string.

Returns: An object that can be used to configure alert manager for APS. See: [Alert manager configuration specification](https://prometheus.io/docs/alerting/latest/configuration/)

type IAlertManagerDestination

type IAlertManagerDestination interface {
	// Associates the destination with a construct that is handling the configuration of alert manager.
	//
	// Returns: An object representing the configured destination.
	Bind(scope constructs.IConstruct) *map[string]interface{}
	// The destination type being configured.
	//
	// Represents a config block in an alert manager receiver configuration.
	Category() AlertManagerDestinationCategory
}

Represents a destination where alert manager can send notifications.

type IPrometheusRule

type IPrometheusRule interface {
	// Associates the rule with a construct that is configuring an APS rule groups namespace.
	Bind(scope constructs.IConstruct) *map[string]interface{}
}

Represents a Prometheus rule that can be added to a rule group and used as part of an APS rules configuration.

type IRuleGroupConfiguration

type IRuleGroupConfiguration interface {
	constructs.IConstruct
	// Associates the configuration with a resource that is handling the creation of an APS rule groups namespace.
	//
	// Returns: Rule group configuration details.
	Bind(scope constructs.IConstruct) *RuleGroupConfigurationDetails
}

Represents a rules configuration that can be consumed by Amazon Managed Service for Prometheus when creating a rule groups namespace.

func RuleGroupConfiguration_FromContent

func RuleGroupConfiguration_FromContent(scope constructs.IConstruct, id *string, content *string) IRuleGroupConfiguration

Imports an APS rules configuration using a raw string.

The string should be in YAML format and follow the specification expected by the `aps:CreateRuleGroupsNamespace` API call.

Returns: An object that can be used to configure a rule groups namespace for APS. See: [Rules file specification](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-ruler-rulesfile.html)

func RuleGroupConfiguration_FromRulesFile

func RuleGroupConfiguration_FromRulesFile(scope constructs.IConstruct, id *string, path *string) IRuleGroupConfiguration

Imports an APS rules file from the local filesystem.

The file should be in YAML format and follow the specification expected by the `aps:CreateRuleGroupsNamespace` API call.

Returns: An object that can be used to configure a rule groups namespace for APS. See: [Rules file specification](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-ruler-rulesfile.html)

type IRuleGroupsNamespace

type IRuleGroupsNamespace interface {
	// The Amazon Resource Name (ARN) of the APS rule groups namespace.
	RulesGroupsNamespaceArn() *string
}

Represents an APS rule groups namespace in AWS.

func RuleGroupsNamespace_FromRuleGroupsNamespaceArn

func RuleGroupsNamespace_FromRuleGroupsNamespaceArn(scope constructs.IConstruct, id *string, arn *string) IRuleGroupsNamespace

Imports an existing APS rule groups namespace by specifying its Amazon Resource Name (ARN).

Returns: An object representing the imported APS rule groups namespace.

type IWorkspace

type IWorkspace interface {
	// The Amazon Resource Name (ARN) of the APS workspace.
	WorkspaceArn() *string
	// The ID generated by AWS for the APS workspace.
	WorkspaceId() *string
	// The Prometheus endpoint attribute of the workspace.
	//
	// This is the endpoint prefix without the remote_write or query API
	// appended.
	WorkspacePrometheusEndpoint() *string
	// The URL of the remote write endpoint which can be used to ingest metrics into the Prometheus workspace.
	WorkspaceQueryUrl() *string
	// The URL of the endpoint that other services can use to query the workspace.
	WorkspaceRemoteWriteUrl() *string
}

Represents an APS workspace in AWS.

func Workspace_FromWorkspaceArn

func Workspace_FromWorkspaceArn(scope constructs.IConstruct, id *string, workspaceArn *string) IWorkspace

Imports an existing APS workspace by specifying its Amazon Resource Name (ARN).

Returns: An object representing the imported APS workspace.

func Workspace_FromWorkspaceAttributes

func Workspace_FromWorkspaceAttributes(scope constructs.IConstruct, id *string, attrs *WorkspaceAttributes) IWorkspace

Imports an existing APS workspace by explicitly specifying its attributes.

Returns: An object representing the imported APS workspace.

func Workspace_FromWorkspaceId

func Workspace_FromWorkspaceId(scope constructs.IConstruct, id *string, workspaceId *string) IWorkspace

Imports an existing APS workspace by explicitly specifying its AWS generated ID.

Returns: An object representing the imported APS workspace.

type MatchOperator

type MatchOperator string

The logical operator an alert manager matcher should use when evaluating filters for labels.

const (
	// Evaluate an alert manager filter on the basis that the label matches the string it is being compared against.
	MatchOperator_EQUALS MatchOperator = "EQUALS"
	// Evaluate an alert manager filter on the basis that the label does not match the string it is being compared against.
	MatchOperator_NOT_EQUALS MatchOperator = "NOT_EQUALS"
	// Evaluate an alert manager filter on the basis that the label matches the regular expression it is being compared against.
	MatchOperator_RE_EQUALS MatchOperator = "RE_EQUALS"
	// Evaluate an alert manager filter on the basis that the label does not match the regular expression it is being compared against.
	MatchOperator_RE_NOT_EQUALS MatchOperator = "RE_NOT_EQUALS"
)

type MonthRange

type MonthRange struct {
	// The month where the range should start.
	Start *float64 `field:"required" json:"start" yaml:"start"`
	// The month at the end of the range if the range should cover multiple months (inclusive).
	End *float64 `field:"optional" json:"end" yaml:"end"`
}

A range of calendar months identified by number, where January = 1.

Ranges are also accepted by specifying `end` inclusive on both ends.

type PrometheusRule

type PrometheusRule interface {
}

func NewPrometheusRule

func NewPrometheusRule() PrometheusRule

type RecordingRule

type RecordingRule interface {
	IPrometheusRule
	// The PromQL expression to evaluate.
	//
	// Every evaluation cycle this is
	// evaluated at the current time, and the result recorded as a new set of
	// time series with the metric name as given by `record`.
	// See: [Querying prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/)
	//
	Expression() *string
	// Labels to add or overwrite before storing the result.
	Labels() *map[string]*string
	// The name of the time series to output to.
	//
	// Must be a valid metric name.
	Record() *string
	// Sets a new label and value that will be added or overridden before storing the result.
	//
	// Returns: The recording rule that the label was added to.
	AddLabel(label *string, value *string) RecordingRule
	// Associates the recording rule with a construct that is configuring an APS rule groups namespace.
	//
	// Returns: The rendered configuration for the rule as expected by and APS
	// rules config file.
	Bind(_scope constructs.IConstruct) *map[string]interface{}
}

Recording rules allow you to precompute frequently needed or computationally expensive expressions and save their result as a new set of time series.

Querying the precomputed result will then often be much faster than executing the original expression every time it is needed. This is especially useful for dashboards, which need to query the same expression repeatedly every time they refresh. See: [Defining recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)

func NewRecordingRule

func NewRecordingRule(props *RecordingRuleProps) RecordingRule

Creates a new instance of the RecordingRule class.

func PrometheusRule_RecordingRule

func PrometheusRule_RecordingRule(options *RecordingRuleProps) RecordingRule

type RecordingRuleProps

type RecordingRuleProps struct {
	// The PromQL expression to evaluate.
	//
	// Every evaluation cycle this is
	// evaluated at the current time, and the result recorded as a new set of
	// time series with the metric name as given by `record`.
	// See: [Querying prometheus](https://prometheus.io/docs/prometheus/latest/querying/basics/)
	//
	Expression *string `field:"required" json:"expression" yaml:"expression"`
	// The name of the time series to output to.
	//
	// Must be a valid metric name.
	Record *string `field:"required" json:"record" yaml:"record"`
	// Labels to add or overwrite before storing the result.
	Labels *map[string]*string `field:"optional" json:"labels" yaml:"labels"`
}

Options needed to configure a Prometheus recording rule inside an APS rules configuration.

type RuleGroup

type RuleGroup interface {
	constructs.Construct
	// How often rules in the group are evaluated.
	Interval() awscdk.Duration
	// Limit the number of alerts an alerting rule and series a recording rule can produce.
	//
	// 0 is no limit.
	Limit() *float64
	// The name of the group.
	//
	// Must be unique within the configuration.
	Name() *string
	// The tree node.
	Node() constructs.Node
	// Adds an alerting rule to the rule group.
	//
	// Returns: The alerting rule that was added.
	AddAlertingRule(options *AlertingRuleProps) AlertingRule
	// Adds a recording rule to the rule group.
	//
	// Returns: The recording rule that was added.
	AddRecordingRule(options *RecordingRuleProps) RecordingRule
	// Adds a Prometheus rule to the rule group.
	//
	// This method can be used to implement any rules that are created outside of
	// the the rule group that were created manually by calling their
	// constructors or for adding Prometheus rules that use their own custom
	// implementations.
	//
	// Returns: The rule group that the rule was added to.
	AddRule(rule IPrometheusRule) RuleGroup
	// Associates the rule group with a construct that is configuring an APS rule groups namespace.
	//
	// Returns: The rendered configuration for the rule group as expected by an
	// APS rules config file.
	Bind(scope constructs.IConstruct) *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

A group of alerting and recording rules for use inside an APS rule groups namespace configuration.

Rules within a group are run sequentially at a regular interval, with the same evaluation time. The names of recording rules must be valid metric names. The names of alerting rules must be valid label values. See: [Prometheus rule_group specification](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#rule_group)

func NewRuleGroup

func NewRuleGroup(scope constructs.IConstruct, id *string, props *RuleGroupProps) RuleGroup

Creates a new instance of the RuleGroup class.

type RuleGroupConfiguration

type RuleGroupConfiguration interface {
	constructs.Construct
	IRuleGroupConfiguration
	// The tree node.
	Node() constructs.Node
	// Collection of rule groups that are part of this configuration.
	RuleGroups() *[]RuleGroup
	// Adds a new rule group to the configuration.
	//
	// Returns: The rule group that was added.
	AddRuleGroup(id *string, options *RuleGroupProps) RuleGroup
	// Associates the configuration with a resource that is handling the creation of an APS rule groups namespace.
	//
	// Returns: Rule group configuration details.
	Bind(scope constructs.IConstruct) *RuleGroupConfigurationDetails
	// Returns a string representation of this construct.
	ToString() *string
}

Represents a rules file definition that can be consumed by Amazon Managed Service for Prometheus. See: [Creating a rules file](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-ruler-rulesfile.html)

func NewRuleGroupConfiguration

func NewRuleGroupConfiguration(scope constructs.IConstruct, id *string, _props *RuleGroupConfigurationProps) RuleGroupConfiguration

Creates a new instance of the RuleGroupConfiguration class.

type RuleGroupConfigurationDetails

type RuleGroupConfigurationDetails struct {
	// The content of the rules configuration definition, in the format of an APS rules configuration file.
	// See: [Creating a rules file](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-ruler-rulesfile.html)
	//
	Content *string `field:"required" json:"content" yaml:"content"`
}

The details that are needed to configure an APS rule groups namespace that will consume a rule group configuration.

type RuleGroupConfigurationProps

type RuleGroupConfigurationProps struct {
}

Configuration options for a Prometheus rule group configuration.

type RuleGroupProps

type RuleGroupProps struct {
	// How often rules in the group are evaluated.
	Interval awscdk.Duration `field:"optional" json:"interval" yaml:"interval"`
	// Limit the number of alerts an alerting rule and series a recording rule can produce.
	//
	// 0 is no limit.
	Limit *float64 `field:"optional" json:"limit" yaml:"limit"`
	// The name of the group.
	//
	// Must be unique within the configuration.
	Name *string `field:"optional" json:"name" yaml:"name"`
	// The rules to be evaluated per the rule group's configuration.
	Rules *[]IPrometheusRule `field:"optional" json:"rules" yaml:"rules"`
}

Options needed to configure a Prometheus rule group for use with an APS rule groups namespace configuration.

type RuleGroupsNamespace

type RuleGroupsNamespace interface {
	awscdk.Resource
	IRuleGroupsNamespace
	// The rules definition file for this namespace.
	// See: [RuleGroupsNamespace Data](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-data)
	//
	Configuration() IRuleGroupConfiguration
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *awscdk.ResourceEnvironment
	// The name of the rule groups namespace.
	// See: [RuleGroupsNamespace Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-name)
	//
	Name() *string
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	// The underlying RuleGroupsNamespace CloudFormation resource.
	// See: [AWS::APS::RuleGroupsNamespace](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html)
	//
	Resource() awsaps.CfnRuleGroupsNamespace
	// The Amazon Resource Name (ARN) of the APS rule groups namespace.
	RulesGroupsNamespaceArn() *string
	// The stack in which this resource is defined.
	Stack() awscdk.Stack
	// The APS workspace that contains this rule groups namespace.
	// See: [RuleGroupsNamespace Workspace](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-workspace)
	//
	Workspace() IWorkspace
	// Adds a new rule group to the configuration.
	//
	// Returns: The rule group that was added.
	AddRuleGroup(id *string, options *RuleGroupProps) RuleGroup
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	ToString() *string
}

Amazon Managed Service for Prometheus allows for the configuration of rules that configure alerting and precomputation of frequently needed expressions.

These rules are added to a workspace using configurations that define one or more resource groups. Eache group can contain one or more rules and configures the frequency that its rules should be evaluated.

You can have multiple configurations per workspace. Each configuration is contained in a separate _namespace_. Having multiple configuration lets you import existing Prometheus rules files to a workspace without having to change or combine them. Different rule group namespaces can also have different tags. See: [Recording rules and alerting rules](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-Ruler.html)

func NewRuleGroupsNamespace

func NewRuleGroupsNamespace(scope constructs.IConstruct, id *string, props *RuleGroupsNamespaceProps) RuleGroupsNamespace

Creates a new instance of the RuleGroupsNamespace class.

type RuleGroupsNamespaceProps

type RuleGroupsNamespaceProps struct {
	// The AWS account ID this resource belongs to.
	// Default: - the resource is in the same account as the stack it belongs to.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// ARN to deduce region and account from.
	//
	// The ARN is parsed and the account and region are taken from the ARN.
	// This should be used for imported resources.
	//
	// Cannot be supplied together with either `account` or `region`.
	// Default: - take environment from `account`, `region` parameters, or use Stack environment.
	//
	EnvironmentFromArn *string `field:"optional" json:"environmentFromArn" yaml:"environmentFromArn"`
	// The value passed in by users to the physical name prop of the resource.
	//
	// - `undefined` implies that a physical name will be allocated by
	//   CloudFormation during deployment.
	// - a concrete value implies a specific physical name
	// - `PhysicalName.GENERATE_IF_NEEDED` is a marker that indicates that a physical will only be generated
	//   by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation.
	// Default: - The physical name will be allocated by CloudFormation at deployment time.
	//
	PhysicalName *string `field:"optional" json:"physicalName" yaml:"physicalName"`
	// The AWS region this resource belongs to.
	// Default: - the resource is in the same region as the stack it belongs to.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
	// The APS workspace that contains this rule groups namespace.
	// See: [RuleGroupsNamespace Workspace](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-workspace)
	//
	Workspace IWorkspace `field:"required" json:"workspace" yaml:"workspace"`
	// The rules definition file for this namespace.
	// See: [RuleGroupsNamespace Data](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-data)
	//
	Configuration IRuleGroupConfiguration `field:"optional" json:"configuration" yaml:"configuration"`
	// The name of the rule groups namespace.
	// See: [RuleGroupsNamespace Name](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-name)
	//
	Name *string `field:"optional" json:"name" yaml:"name"`
}

Configuration for the RuleGroupsNamespace resource.

type TimeInterval

type TimeInterval interface {
	constructs.Construct
	// Collection of interval entries that defined the the full scope of the periods for which the time interval should apply.
	Intervals() *[]TimeIntervalEntry
	// The name of the time interval as it will be referenced throught the rest of the alert manager configuration.
	Name() *string
	// The tree node.
	Node() constructs.Node
	// Adds a new time interval entry to the time interval.
	//
	// Returns: The time interval which was added.
	AddInterval(interval TimeIntervalEntry) TimeIntervalEntry
	// Associates the time interval with a construct that is handling the configuration of alert manager.
	//
	// Returns: An alert manager `time_interval` configuration object.
	Bind(scope constructs.IConstruct) *map[string]interface{}
	// Returns a string representation of this construct.
	ToString() *string
}

Represents a named interval of time that may be referenced by the alert manager router to mute/activate particular routes for particular times of day. See: [Time Interval Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#time_interval-0)

func NewTimeInterval

func NewTimeInterval(scope AlertManagerConfiguration, id *string, options *TimeIntervalProps) TimeInterval

Creates a new instance of the TimeInterval class.

type TimeIntervalEntry

type TimeIntervalEntry interface {
	// Collection of day of the month ranges for which this time interval will apply.
	DaysOfTheMonth() *[]*DayOfMonthRange
	// Collection of month ranges for which this time interval will apply.
	Months() *[]*MonthRange
	// Collection of time ranges for which this time interval will apply.
	Times() *[]*TimeRange
	// A string that matches a location in the IANA time zone database.
	//
	// For example, 'Australia/Sydney'. The location provides the time zone for
	// the time interval.
	//
	// You may also use `Local` as a location to use the local time of the
	// machine where Alertmanager is running, or `UTC` for UTC time. If no
	// timezone is provided, the time interval is taken to be in UTC time.
	TimeZone() *string
	// Collection of weekday ranges for which this time interval will apply.
	Weekdays() *[]*WeekdayRange
	// Collection of year ranges for which this time interval will apply.
	Years() *[]*YearRange
	// Adds a range specifying the numerical days in the month.
	//
	// Days begin at 1. Negative values are also accepted which begin at the end
	// of the month, e.g. -1 during January would represent January 31. For
	// example: `start: 1` and `end: 5` or `start:-3` and `end: -1` would both be
	// valid ranges.
	//
	// Extending past the start or end of the month will cause it to be clamped.
	// E.g. specifying `start: 1` and `end: 31` during February will clamp the
	// actual end date to 28 or 29 depending on leap years.
	//
	// Inclusive on both ends.
	//
	// Returns: The time interval the range was added to.
	AddDaysOfTheMonth(start *float64, end *float64) TimeIntervalEntry
	// A range of calendar months identified by number, where January = 1.
	//
	// Ranges are also accepted by specifying `end` inclusive on both ends.
	//
	// Returns: The time interval the range was added to.
	AddMonth(start *float64, end *float64) TimeIntervalEntry
	// Ranges inclusive of the starting time and exclusive of the end time to make it easy to represent times that start/end on hour boundaries.
	//
	// For example, `start: '17:00'` and `end: '24:00'` will begin at 17:00 and
	// finish immediately before 24:00.
	//
	// Returns: The time interval the range was added to.
	AddTimes(start *string, end *string) TimeIntervalEntry
	// Adds a day of the week, where the week begins on Sunday and ends on Saturday.
	//
	// For convenience, ranges are also accepted by specifying `end` and are
	// inclusive on both ends.
	//
	// Returns: The time interval the range was added to.
	AddWeekday(start Weekday, end Weekday) TimeIntervalEntry
	// Adds a numerical range of years.
	//
	// Ranges to cover multiple years are accepted. For example, `start: 2020` and
	// `end: 2022`.
	//
	// Inclusive on both ends.
	//
	// Returns: The time interval the range was added to.
	AddYears(start *float64, end *float64) TimeIntervalEntry
	// Associates the time interval with a construct that is handling the configuration of alert manager.
	//
	// Returns: An alert manager `time_interval` configuration object.
	Bind(_scope constructs.IConstruct) *map[string]interface{}
}

An object specifying a collection of ranges that together make up an interval of time.

Referenced by alert manager to define periods for which certain settings should apply. See: [Time Interval Official Documentation](https://prometheus.io/docs/alerting/latest/configuration/#time_interval-0)

func NewTimeIntervalEntry

func NewTimeIntervalEntry(options *TimeIntervalEntryProps) TimeIntervalEntry

Creates a new instance of the TimeIntervalEntry class.

type TimeIntervalEntryProps

type TimeIntervalEntryProps struct {
	// A list of ranges specifying the days of the month that the time interval should apply for.
	DaysOfTheMonth *[]*DayOfMonthRange `field:"optional" json:"daysOfTheMonth" yaml:"daysOfTheMonth"`
	// A list of ranges specifying the months that the time interval should apply for.
	Months *[]*MonthRange `field:"optional" json:"months" yaml:"months"`
	// A list of ranges specifying the time periods that the time interval should apply for.
	Times *[]*TimeRange `field:"optional" json:"times" yaml:"times"`
	// A string that matches a location in the IANA time zone database.
	//
	// For example, 'Australia/Sydney'. The location provides the time zone for
	// the time interval.
	//
	// You may also use `Local` as a location to use the local time of the
	// machine where Alertmanager is running, or `UTC` for UTC time. If no
	// timezone is provided, the time interval is taken to be in UTC time.
	TimeZone *string `field:"optional" json:"timeZone" yaml:"timeZone"`
	// A list of ranges specifying the weekdays that the time interval should apply for.
	Weekdays *[]*WeekdayRange `field:"optional" json:"weekdays" yaml:"weekdays"`
	// A list of ranges specifying the years that the time interval should apply for.
	Years *[]*YearRange `field:"optional" json:"years" yaml:"years"`
}

Configuration for the alert manager time interval.

type TimeIntervalProps

type TimeIntervalProps struct {
	// The interval definitions that define the periods of time that the time interval should apply for.
	Intervals *[]TimeIntervalEntry `field:"optional" json:"intervals" yaml:"intervals"`
	// The name of the time interval as it will be referenced throught the rest of the alert manager configuration.
	Name *string `field:"optional" json:"name" yaml:"name"`
}

Configuration for the alert manager time interval.

type TimeRange

type TimeRange struct {
	// The end time, specified in the format 'HH:MM' using 24 hour time.
	End *string `field:"required" json:"end" yaml:"end"`
	// The start time, specified in the format 'HH:MM' using 24 hour time.
	Start *string `field:"required" json:"start" yaml:"start"`
}

Ranges inclusive of the starting time and exclusive of the end time to make it easy to represent times that start/end on hour boundaries.

For example, `start: '17:00'` and `end: '24:00'` will begin at 17:00 and finish immediately before 24:00.

type Weekday

type Weekday string

The days of the week to be used in Prometheus alert manager configurations.

const (
	// Sunday.
	Weekday_SUNDAY Weekday = "SUNDAY"
	// Monday.
	Weekday_MONDAY Weekday = "MONDAY"
	// Tuesday.
	Weekday_TUESDAY Weekday = "TUESDAY"
	// Wednesday.
	Weekday_WEDNESDAY Weekday = "WEDNESDAY"
	// Thursday.
	Weekday_THURSDAY Weekday = "THURSDAY"
	// Friday.
	Weekday_FRIDAY Weekday = "FRIDAY"
	// Saturday.
	Weekday_SATURDAY Weekday = "SATURDAY"
)

type WeekdayRange

type WeekdayRange struct {
	// The day of the week where the range should start.
	Start Weekday `field:"required" json:"start" yaml:"start"`
	// The day of the week where the range should end.
	//
	// If not specified, the range will end at the end of the day specified by
	// `start`.
	End Weekday `field:"optional" json:"end" yaml:"end"`
}

A day of the week, where the week begins on Sunday and ends on Saturday.

For convenience, ranges are also accepted by specifying `end` and are inclusive on both ends.

type Workspace

type Workspace interface {
	awscdk.Resource
	IWorkspace
	// The details used to configure alerting for the APS workspace.
	// See: [Workspace AlertManagerDefinition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-alertmanagerdefinition)
	//
	Alerting() *WorkspaceAlertingOptions
	// The configuration contolling how alerts are sent for the workspace.
	//
	// Only
	// available when alerting is enabled and the default alerting configuration
	// is used.
	AlertManagerConfiguration() AlertManagerConfiguration
	// The SNS topic where alerts generated by the workspace will be sent.
	//
	// Only
	// set if alerting is enabled and the default alert manager configuration is
	// used.
	AlertTopic() awssns.ITopic
	// An alias that you assign to this workspace to help you identify it. It does not need to be unique.
	//
	// The alias can be as many as 100 characters and can include any type of
	// characters.
	// See: [Workspace Alias](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-alias)
	//
	Alias() *string
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *awscdk.ResourceEnvironment
	// The details used for configuring logging for the APS workspace.
	// See: [Workspace LoggingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-loggingconfiguration)
	//
	Logging() *WorkspaceLoggingOptions
	// The CloudWatch log group where logs emitted by the APS workspace will be sent.
	LogGroup() awslogs.ILogGroup
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	// The underlying Workspace CloudFormation resource.
	// See: [AWS::APS::Workspace](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html)
	//
	Resource() awsaps.CfnWorkspace
	// The stack in which this resource is defined.
	Stack() awscdk.Stack
	// The Amazon Resource Name (ARN) of the APS workspace.
	WorkspaceArn() *string
	// The ID generated by AWS for the APS workspace.
	WorkspaceId() *string
	// The Prometheus endpoint attribute of the workspace.
	//
	// This is the endpoint prefix without the remote_write or query API
	// appended.
	WorkspacePrometheusEndpoint() *string
	// The URL of the remote write endpoint which can be used to ingest metrics into the Prometheus workspace.
	WorkspaceQueryUrl() *string
	// The URL of the endpoint that other services can use to query the workspace.
	WorkspaceRemoteWriteUrl() *string
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Returns a string representation of this construct.
	ToString() *string
}

Represents an Amazon Managed Service for Prometheus workspace.

A _workspace_ is a logical and isolated Prometheus server dedicated to Prometheus resources such as metrics.

You can have one or more workspaces in each Region in your account. See: [AWS::APS::Workspace](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#aws-resource-aps-workspace-return-values)

func NewWorkspace

func NewWorkspace(scope constructs.IConstruct, id *string, props *WorkspaceProps) Workspace

Creates a new instance of the Workspace class.

type WorkspaceAlertingOptions

type WorkspaceAlertingOptions struct {
	// The alert manager configuration to use when setting up alerting.
	//
	// If alerting is enabled and no configuration is given a default
	// configuration that sends all alerts to SNS will be used.
	Configuration IAlertManagerConfiguration `field:"optional" json:"configuration" yaml:"configuration"`
	// Controls whether alerting from the APS workspace should be configured.
	// Default: true.
	//
	Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"`
	// The SNS topic where alerts should be sent when using the default alerting configuration.
	//
	// If a custom alert manager configuration is provided this option is ignored.
	Topic awssns.ITopic `field:"optional" json:"topic" yaml:"topic"`
}

Alerting configuration to use when setting up an APS workspace.

type WorkspaceAttributes

type WorkspaceAttributes struct {
	// The Amazon Resource Name (ARN) of the APS workspace.
	WorkspaceArn *string `field:"optional" json:"workspaceArn" yaml:"workspaceArn"`
	// The ID generated by AWS for the APS workspace.
	WorkspaceId *string `field:"optional" json:"workspaceId" yaml:"workspaceId"`
	// The Prometheus endpoint attribute of the workspace.
	//
	// This is the endpoint prefix without the remote_write or query API
	// appended.
	WorkspacePrometheusEndpoint *string `field:"optional" json:"workspacePrometheusEndpoint" yaml:"workspacePrometheusEndpoint"`
}

Configuration for importing an existing APS workspace.

type WorkspaceLoggingOptions

type WorkspaceLoggingOptions struct {
	// Controls whether logging for the workspace should be enabled.
	// Default: true.
	//
	Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"`
	// The log group where events from the APS workspace will be written.
	//
	// If logging is enabled and no log group is provided a new log group will be
	// created.
	// See: [Workspace LoggingConfiguration.LogGroupArn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html#cfn-aps-workspace-loggingconfiguration-loggrouparn)
	//
	LogGroup awslogs.ILogGroup `field:"optional" json:"logGroup" yaml:"logGroup"`
	// The length of time that logs from the APS workspace should be kept when a new log group is created for the workspace.
	//
	// This property is ignored when a log group is passed as part of the logging
	// configuration.
	// See: [LogGroup RetentionInDays](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#cfn-logs-loggroup-retentionindays)
	//
	Retention awslogs.RetentionDays `field:"optional" json:"retention" yaml:"retention"`
}

Logging configuration to use when setting up the APS workspace.

type WorkspaceProps

type WorkspaceProps struct {
	// The AWS account ID this resource belongs to.
	// Default: - the resource is in the same account as the stack it belongs to.
	//
	Account *string `field:"optional" json:"account" yaml:"account"`
	// ARN to deduce region and account from.
	//
	// The ARN is parsed and the account and region are taken from the ARN.
	// This should be used for imported resources.
	//
	// Cannot be supplied together with either `account` or `region`.
	// Default: - take environment from `account`, `region` parameters, or use Stack environment.
	//
	EnvironmentFromArn *string `field:"optional" json:"environmentFromArn" yaml:"environmentFromArn"`
	// The value passed in by users to the physical name prop of the resource.
	//
	// - `undefined` implies that a physical name will be allocated by
	//   CloudFormation during deployment.
	// - a concrete value implies a specific physical name
	// - `PhysicalName.GENERATE_IF_NEEDED` is a marker that indicates that a physical will only be generated
	//   by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation.
	// Default: - The physical name will be allocated by CloudFormation at deployment time.
	//
	PhysicalName *string `field:"optional" json:"physicalName" yaml:"physicalName"`
	// The AWS region this resource belongs to.
	// Default: - the resource is in the same region as the stack it belongs to.
	//
	Region *string `field:"optional" json:"region" yaml:"region"`
	// The details used to configure alerting for the APS workspace.
	// See: [Workspace AlertManagerDefinition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-alertmanagerdefinition)
	//
	Alerting *WorkspaceAlertingOptions `field:"optional" json:"alerting" yaml:"alerting"`
	// An alias that you assign to this workspace to help you identify it. It does not need to be unique.
	//
	// The alias can be as many as 100 characters and can include any type of
	// characters.
	// See: [Workspace Alias](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-alias)
	//
	Alias *string `field:"optional" json:"alias" yaml:"alias"`
	// The details used for configuring logging for the APS workspace.
	// See: [Workspace LoggingConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-loggingconfiguration)
	//
	Logging *WorkspaceLoggingOptions `field:"optional" json:"logging" yaml:"logging"`
}

Configuration for the Workspace resource.

type YearRange

type YearRange struct {
	// The year where the range should start.
	Start *float64 `field:"required" json:"start" yaml:"start"`
	// The year where the range should end.
	//
	// If not specified, the range will end at the end of the year specified by
	// `start`.
	End *float64 `field:"optional" json:"end" yaml:"end"`
}

A numerical range of years.

Ranges to cover multiple years are accepted. For example, `start: 2020` and `end: 2022`.

Inclusive on both ends.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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