alertconfiguration

package
v1.21.4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncodedIDKeyAlertID   = "id"
	EncodedIDKeyProjectID = "project_id"
)

Variables

This section is empty.

Functions

func DataSource

func DataSource() datasource.DataSource

func NewMatcherList

func NewMatcherList(list []TfMatcherModel) *[]admin.StreamsMatcher

func NewMetricThreshold

func NewMetricThreshold(tfMetricThresholdConfigSlice []TfMetricThresholdConfigModel) *admin.ServerlessMetricThreshold

func NewThreshold

func NewThreshold(tfThresholdConfigSlice []TfThresholdConfigModel) *admin.GreaterThanRawThreshold

func PluralDataSource

func PluralDataSource() datasource.DataSource

func Resource

func Resource() resource.Resource

Types

type AlertConfigurationsDS

type AlertConfigurationsDS struct {
	config.DSCommon
}

func (*AlertConfigurationsDS) Read

func (*AlertConfigurationsDS) Schema

type TFAlertConfigurationDSModel

type TFAlertConfigurationDSModel struct {
	ID                    types.String                      `tfsdk:"id"`
	ProjectID             types.String                      `tfsdk:"project_id"`
	AlertConfigurationID  types.String                      `tfsdk:"alert_configuration_id"`
	EventType             types.String                      `tfsdk:"event_type"`
	Created               types.String                      `tfsdk:"created"`
	Updated               types.String                      `tfsdk:"updated"`
	Matcher               []TfMatcherModel                  `tfsdk:"matcher"`
	MetricThresholdConfig []TfMetricThresholdConfigModel    `tfsdk:"metric_threshold_config"`
	ThresholdConfig       []TfThresholdConfigModel          `tfsdk:"threshold_config"`
	Notification          []TfNotificationModel             `tfsdk:"notification"`
	Output                []TfAlertConfigurationOutputModel `tfsdk:"output"`
	Enabled               types.Bool                        `tfsdk:"enabled"`
}

func NewTFAlertConfigurationDSModelList

func NewTFAlertConfigurationDSModelList(alerts []admin.GroupAlertsConfig, projectID string, definedOutputs []string) []TFAlertConfigurationDSModel

func NewTfAlertConfigurationDSModel

func NewTfAlertConfigurationDSModel(apiRespConfig *admin.GroupAlertsConfig, projectID string) TFAlertConfigurationDSModel

type TfAlertConfigurationOutputModel

type TfAlertConfigurationOutputModel struct {
	Type  types.String `tfsdk:"type"`
	Label types.String `tfsdk:"label"`
	Value types.String `tfsdk:"value"`
}

type TfAlertConfigurationRSModel

type TfAlertConfigurationRSModel struct {
	ID                    types.String                   `tfsdk:"id"`
	ProjectID             types.String                   `tfsdk:"project_id"`
	AlertConfigurationID  types.String                   `tfsdk:"alert_configuration_id"`
	EventType             types.String                   `tfsdk:"event_type"`
	Created               types.String                   `tfsdk:"created"`
	Updated               types.String                   `tfsdk:"updated"`
	Matcher               []TfMatcherModel               `tfsdk:"matcher"`
	MetricThresholdConfig []TfMetricThresholdConfigModel `tfsdk:"metric_threshold_config"`
	ThresholdConfig       []TfThresholdConfigModel       `tfsdk:"threshold_config"`
	Notification          []TfNotificationModel          `tfsdk:"notification"`
	Enabled               types.Bool                     `tfsdk:"enabled"`
}

func NewTFAlertConfigurationModel

func NewTFAlertConfigurationModel(apiRespConfig *admin.GroupAlertsConfig, currState *TfAlertConfigurationRSModel) TfAlertConfigurationRSModel

type TfMatcherModel

type TfMatcherModel struct {
	FieldName types.String `tfsdk:"field_name"`
	Operator  types.String `tfsdk:"operator"`
	Value     types.String `tfsdk:"value"`
}

func NewTFMatcherModelList

func NewTFMatcherModelList(m []admin.StreamsMatcher, currStateSlice []TfMatcherModel) []TfMatcherModel

type TfMetricThresholdConfigModel

type TfMetricThresholdConfigModel struct {
	Threshold  types.Float64 `tfsdk:"threshold"`
	MetricName types.String  `tfsdk:"metric_name"`
	Operator   types.String  `tfsdk:"operator"`
	Units      types.String  `tfsdk:"units"`
	Mode       types.String  `tfsdk:"mode"`
}

type TfNotificationModel

type TfNotificationModel struct {
	OpsGenieRegion           types.String `tfsdk:"ops_genie_region"`
	Username                 types.String `tfsdk:"username"`
	APIToken                 types.String `tfsdk:"api_token"`
	DatadogRegion            types.String `tfsdk:"datadog_region"`
	ServiceKey               types.String `tfsdk:"service_key"`
	EmailAddress             types.String `tfsdk:"email_address"`
	WebhookSecret            types.String `tfsdk:"webhook_secret"`
	MicrosoftTeamsWebhookURL types.String `tfsdk:"microsoft_teams_webhook_url"`
	MobileNumber             types.String `tfsdk:"mobile_number"`
	VictorOpsRoutingKey      types.String `tfsdk:"victor_ops_routing_key"`
	DatadogAPIKey            types.String `tfsdk:"datadog_api_key"`
	WebhookURL               types.String `tfsdk:"webhook_url"`
	OpsGenieAPIKey           types.String `tfsdk:"ops_genie_api_key"`
	TeamID                   types.String `tfsdk:"team_id"`
	TeamName                 types.String `tfsdk:"team_name"`
	NotifierID               types.String `tfsdk:"notifier_id"`
	IntegrationID            types.String `tfsdk:"integration_id"`
	TypeName                 types.String `tfsdk:"type_name"`
	ChannelName              types.String `tfsdk:"channel_name"`
	VictorOpsAPIKey          types.String `tfsdk:"victor_ops_api_key"`
	Roles                    []string     `tfsdk:"roles"`
	IntervalMin              types.Int64  `tfsdk:"interval_min"`
	DelayMin                 types.Int64  `tfsdk:"delay_min"`
	SMSEnabled               types.Bool   `tfsdk:"sms_enabled"`
	EmailEnabled             types.Bool   `tfsdk:"email_enabled"`
}

func NewTFNotificationModelList

func NewTFNotificationModelList(n []admin.AlertsNotificationRootForGroup, currStateNotifications []TfNotificationModel) []TfNotificationModel

type TfThresholdConfigModel

type TfThresholdConfigModel struct {
	Threshold types.Float64 `tfsdk:"threshold"`
	Operator  types.String  `tfsdk:"operator"`
	Units     types.String  `tfsdk:"units"`
}

func NewTFThresholdConfigModel

func NewTFThresholdConfigModel(t *admin.GreaterThanRawThreshold, currStateSlice []TfThresholdConfigModel) []TfThresholdConfigModel

Jump to

Keyboard shortcuts

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