grafana.assert.NotificationAlertsConfig
Manages Asserts Alert Configurations through Grafana API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
// Basic alert configuration with silencing
const prometheusRemoteStorageFailures = new grafana.assert.NotificationAlertsConfig("prometheus_remote_storage_failures", {
name: "PrometheusRemoteStorageFailures",
matchLabels: {
alertname: "PrometheusRemoteStorageFailures",
alertgroup: "prometheus.alerts",
asserts_env: "prod",
},
silenced: true,
});
// High severity alert with specific job and context matching
const errorBuildupNotify = new grafana.assert.NotificationAlertsConfig("error_buildup_notify", {
name: "ErrorBuildupNotify",
matchLabels: {
alertname: "ErrorBuildup",
job: "acai",
asserts_request_type: "inbound",
asserts_request_context: "/auth",
},
silenced: false,
});
// Alert with additional labels and custom duration
const paymentTestAlert = new grafana.assert.NotificationAlertsConfig("payment_test_alert", {
name: "PaymentTestAlert",
matchLabels: {
alertname: "PaymentTestAlert",
additional_labels: "asserts_severity=~\"critical\"",
alertgroup: "alex-k8s-integration-test.alerts",
},
alertLabels: {
testing: "onetwothree",
},
duration: "5m",
silenced: false,
});
// Latency alert for shipping service
const highShippingLatency = new grafana.assert.NotificationAlertsConfig("high_shipping_latency", {
name: "high shipping latency",
matchLabels: {
alertname: "LatencyP99ErrorBuildup",
job: "shipping",
asserts_request_type: "inbound",
},
silenced: false,
});
// CPU throttling alert with warning severity
const cpuThrottlingSustained = new grafana.assert.NotificationAlertsConfig("cpu_throttling_sustained", {
name: "CPUThrottlingSustained",
matchLabels: {
alertname: "CPUThrottlingSustained",
additional_labels: "asserts_severity=~\"warning\"",
},
silenced: true,
});
// Ingress error rate alert
const ingressError = new grafana.assert.NotificationAlertsConfig("ingress_error", {
name: "ingress error",
matchLabels: {
alertname: "ErrorRatioBreach",
job: "ingress-nginx-controller-metrics",
asserts_request_type: "inbound",
},
silenced: false,
});
// MySQL Galera cluster alert
const mysqlGaleraNotReady = new grafana.assert.NotificationAlertsConfig("mysql_galera_not_ready", {
name: "MySQLGaleraNotReady",
matchLabels: {
alertname: "MySQLGaleraNotReady",
},
silenced: false,
});
import pulumi
import pulumiverse_grafana as grafana
# Basic alert configuration with silencing
prometheus_remote_storage_failures = grafana.assert_.NotificationAlertsConfig("prometheus_remote_storage_failures",
name="PrometheusRemoteStorageFailures",
match_labels={
"alertname": "PrometheusRemoteStorageFailures",
"alertgroup": "prometheus.alerts",
"asserts_env": "prod",
},
silenced=True)
# High severity alert with specific job and context matching
error_buildup_notify = grafana.assert_.NotificationAlertsConfig("error_buildup_notify",
name="ErrorBuildupNotify",
match_labels={
"alertname": "ErrorBuildup",
"job": "acai",
"asserts_request_type": "inbound",
"asserts_request_context": "/auth",
},
silenced=False)
# Alert with additional labels and custom duration
payment_test_alert = grafana.assert_.NotificationAlertsConfig("payment_test_alert",
name="PaymentTestAlert",
match_labels={
"alertname": "PaymentTestAlert",
"additional_labels": "asserts_severity=~\"critical\"",
"alertgroup": "alex-k8s-integration-test.alerts",
},
alert_labels={
"testing": "onetwothree",
},
duration="5m",
silenced=False)
# Latency alert for shipping service
high_shipping_latency = grafana.assert_.NotificationAlertsConfig("high_shipping_latency",
name="high shipping latency",
match_labels={
"alertname": "LatencyP99ErrorBuildup",
"job": "shipping",
"asserts_request_type": "inbound",
},
silenced=False)
# CPU throttling alert with warning severity
cpu_throttling_sustained = grafana.assert_.NotificationAlertsConfig("cpu_throttling_sustained",
name="CPUThrottlingSustained",
match_labels={
"alertname": "CPUThrottlingSustained",
"additional_labels": "asserts_severity=~\"warning\"",
},
silenced=True)
# Ingress error rate alert
ingress_error = grafana.assert_.NotificationAlertsConfig("ingress_error",
name="ingress error",
match_labels={
"alertname": "ErrorRatioBreach",
"job": "ingress-nginx-controller-metrics",
"asserts_request_type": "inbound",
},
silenced=False)
# MySQL Galera cluster alert
mysql_galera_not_ready = grafana.assert_.NotificationAlertsConfig("mysql_galera_not_ready",
name="MySQLGaleraNotReady",
match_labels={
"alertname": "MySQLGaleraNotReady",
},
silenced=False)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/assert"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Basic alert configuration with silencing
_, err := assert.NewNotificationAlertsConfig(ctx, "prometheus_remote_storage_failures", &assert.NotificationAlertsConfigArgs{
Name: pulumi.String("PrometheusRemoteStorageFailures"),
MatchLabels: pulumi.StringMap{
"alertname": pulumi.String("PrometheusRemoteStorageFailures"),
"alertgroup": pulumi.String("prometheus.alerts"),
"asserts_env": pulumi.String("prod"),
},
Silenced: pulumi.Bool(true),
})
if err != nil {
return err
}
// High severity alert with specific job and context matching
_, err = assert.NewNotificationAlertsConfig(ctx, "error_buildup_notify", &assert.NotificationAlertsConfigArgs{
Name: pulumi.String("ErrorBuildupNotify"),
MatchLabels: pulumi.StringMap{
"alertname": pulumi.String("ErrorBuildup"),
"job": pulumi.String("acai"),
"asserts_request_type": pulumi.String("inbound"),
"asserts_request_context": pulumi.String("/auth"),
},
Silenced: pulumi.Bool(false),
})
if err != nil {
return err
}
// Alert with additional labels and custom duration
_, err = assert.NewNotificationAlertsConfig(ctx, "payment_test_alert", &assert.NotificationAlertsConfigArgs{
Name: pulumi.String("PaymentTestAlert"),
MatchLabels: pulumi.StringMap{
"alertname": pulumi.String("PaymentTestAlert"),
"additional_labels": pulumi.String("asserts_severity=~\"critical\""),
"alertgroup": pulumi.String("alex-k8s-integration-test.alerts"),
},
AlertLabels: pulumi.StringMap{
"testing": pulumi.String("onetwothree"),
},
Duration: pulumi.String("5m"),
Silenced: pulumi.Bool(false),
})
if err != nil {
return err
}
// Latency alert for shipping service
_, err = assert.NewNotificationAlertsConfig(ctx, "high_shipping_latency", &assert.NotificationAlertsConfigArgs{
Name: pulumi.String("high shipping latency"),
MatchLabels: pulumi.StringMap{
"alertname": pulumi.String("LatencyP99ErrorBuildup"),
"job": pulumi.String("shipping"),
"asserts_request_type": pulumi.String("inbound"),
},
Silenced: pulumi.Bool(false),
})
if err != nil {
return err
}
// CPU throttling alert with warning severity
_, err = assert.NewNotificationAlertsConfig(ctx, "cpu_throttling_sustained", &assert.NotificationAlertsConfigArgs{
Name: pulumi.String("CPUThrottlingSustained"),
MatchLabels: pulumi.StringMap{
"alertname": pulumi.String("CPUThrottlingSustained"),
"additional_labels": pulumi.String("asserts_severity=~\"warning\""),
},
Silenced: pulumi.Bool(true),
})
if err != nil {
return err
}
// Ingress error rate alert
_, err = assert.NewNotificationAlertsConfig(ctx, "ingress_error", &assert.NotificationAlertsConfigArgs{
Name: pulumi.String("ingress error"),
MatchLabels: pulumi.StringMap{
"alertname": pulumi.String("ErrorRatioBreach"),
"job": pulumi.String("ingress-nginx-controller-metrics"),
"asserts_request_type": pulumi.String("inbound"),
},
Silenced: pulumi.Bool(false),
})
if err != nil {
return err
}
// MySQL Galera cluster alert
_, err = assert.NewNotificationAlertsConfig(ctx, "mysql_galera_not_ready", &assert.NotificationAlertsConfigArgs{
Name: pulumi.String("MySQLGaleraNotReady"),
MatchLabels: pulumi.StringMap{
"alertname": pulumi.String("MySQLGaleraNotReady"),
},
Silenced: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumiverse.Grafana;
return await Deployment.RunAsync(() =>
{
// Basic alert configuration with silencing
var prometheusRemoteStorageFailures = new Grafana.Assert.NotificationAlertsConfig("prometheus_remote_storage_failures", new()
{
Name = "PrometheusRemoteStorageFailures",
MatchLabels =
{
{ "alertname", "PrometheusRemoteStorageFailures" },
{ "alertgroup", "prometheus.alerts" },
{ "asserts_env", "prod" },
},
Silenced = true,
});
// High severity alert with specific job and context matching
var errorBuildupNotify = new Grafana.Assert.NotificationAlertsConfig("error_buildup_notify", new()
{
Name = "ErrorBuildupNotify",
MatchLabels =
{
{ "alertname", "ErrorBuildup" },
{ "job", "acai" },
{ "asserts_request_type", "inbound" },
{ "asserts_request_context", "/auth" },
},
Silenced = false,
});
// Alert with additional labels and custom duration
var paymentTestAlert = new Grafana.Assert.NotificationAlertsConfig("payment_test_alert", new()
{
Name = "PaymentTestAlert",
MatchLabels =
{
{ "alertname", "PaymentTestAlert" },
{ "additional_labels", "asserts_severity=~\"critical\"" },
{ "alertgroup", "alex-k8s-integration-test.alerts" },
},
AlertLabels =
{
{ "testing", "onetwothree" },
},
Duration = "5m",
Silenced = false,
});
// Latency alert for shipping service
var highShippingLatency = new Grafana.Assert.NotificationAlertsConfig("high_shipping_latency", new()
{
Name = "high shipping latency",
MatchLabels =
{
{ "alertname", "LatencyP99ErrorBuildup" },
{ "job", "shipping" },
{ "asserts_request_type", "inbound" },
},
Silenced = false,
});
// CPU throttling alert with warning severity
var cpuThrottlingSustained = new Grafana.Assert.NotificationAlertsConfig("cpu_throttling_sustained", new()
{
Name = "CPUThrottlingSustained",
MatchLabels =
{
{ "alertname", "CPUThrottlingSustained" },
{ "additional_labels", "asserts_severity=~\"warning\"" },
},
Silenced = true,
});
// Ingress error rate alert
var ingressError = new Grafana.Assert.NotificationAlertsConfig("ingress_error", new()
{
Name = "ingress error",
MatchLabels =
{
{ "alertname", "ErrorRatioBreach" },
{ "job", "ingress-nginx-controller-metrics" },
{ "asserts_request_type", "inbound" },
},
Silenced = false,
});
// MySQL Galera cluster alert
var mysqlGaleraNotReady = new Grafana.Assert.NotificationAlertsConfig("mysql_galera_not_ready", new()
{
Name = "MySQLGaleraNotReady",
MatchLabels =
{
{ "alertname", "MySQLGaleraNotReady" },
},
Silenced = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.assert.NotificationAlertsConfig;
import com.pulumi.grafana.assert.NotificationAlertsConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Basic alert configuration with silencing
var prometheusRemoteStorageFailures = new NotificationAlertsConfig("prometheusRemoteStorageFailures", NotificationAlertsConfigArgs.builder()
.name("PrometheusRemoteStorageFailures")
.matchLabels(Map.ofEntries(
Map.entry("alertname", "PrometheusRemoteStorageFailures"),
Map.entry("alertgroup", "prometheus.alerts"),
Map.entry("asserts_env", "prod")
))
.silenced(true)
.build());
// High severity alert with specific job and context matching
var errorBuildupNotify = new NotificationAlertsConfig("errorBuildupNotify", NotificationAlertsConfigArgs.builder()
.name("ErrorBuildupNotify")
.matchLabels(Map.ofEntries(
Map.entry("alertname", "ErrorBuildup"),
Map.entry("job", "acai"),
Map.entry("asserts_request_type", "inbound"),
Map.entry("asserts_request_context", "/auth")
))
.silenced(false)
.build());
// Alert with additional labels and custom duration
var paymentTestAlert = new NotificationAlertsConfig("paymentTestAlert", NotificationAlertsConfigArgs.builder()
.name("PaymentTestAlert")
.matchLabels(Map.ofEntries(
Map.entry("alertname", "PaymentTestAlert"),
Map.entry("additional_labels", "asserts_severity=~\"critical\""),
Map.entry("alertgroup", "alex-k8s-integration-test.alerts")
))
.alertLabels(Map.of("testing", "onetwothree"))
.duration("5m")
.silenced(false)
.build());
// Latency alert for shipping service
var highShippingLatency = new NotificationAlertsConfig("highShippingLatency", NotificationAlertsConfigArgs.builder()
.name("high shipping latency")
.matchLabels(Map.ofEntries(
Map.entry("alertname", "LatencyP99ErrorBuildup"),
Map.entry("job", "shipping"),
Map.entry("asserts_request_type", "inbound")
))
.silenced(false)
.build());
// CPU throttling alert with warning severity
var cpuThrottlingSustained = new NotificationAlertsConfig("cpuThrottlingSustained", NotificationAlertsConfigArgs.builder()
.name("CPUThrottlingSustained")
.matchLabels(Map.ofEntries(
Map.entry("alertname", "CPUThrottlingSustained"),
Map.entry("additional_labels", "asserts_severity=~\"warning\"")
))
.silenced(true)
.build());
// Ingress error rate alert
var ingressError = new NotificationAlertsConfig("ingressError", NotificationAlertsConfigArgs.builder()
.name("ingress error")
.matchLabels(Map.ofEntries(
Map.entry("alertname", "ErrorRatioBreach"),
Map.entry("job", "ingress-nginx-controller-metrics"),
Map.entry("asserts_request_type", "inbound")
))
.silenced(false)
.build());
// MySQL Galera cluster alert
var mysqlGaleraNotReady = new NotificationAlertsConfig("mysqlGaleraNotReady", NotificationAlertsConfigArgs.builder()
.name("MySQLGaleraNotReady")
.matchLabels(Map.of("alertname", "MySQLGaleraNotReady"))
.silenced(false)
.build());
}
}
resources:
# Basic alert configuration with silencing
prometheusRemoteStorageFailures:
type: grafana:assert:NotificationAlertsConfig
name: prometheus_remote_storage_failures
properties:
name: PrometheusRemoteStorageFailures
matchLabels:
alertname: PrometheusRemoteStorageFailures
alertgroup: prometheus.alerts
asserts_env: prod
silenced: true
# High severity alert with specific job and context matching
errorBuildupNotify:
type: grafana:assert:NotificationAlertsConfig
name: error_buildup_notify
properties:
name: ErrorBuildupNotify
matchLabels:
alertname: ErrorBuildup
job: acai
asserts_request_type: inbound
asserts_request_context: /auth
silenced: false
# Alert with additional labels and custom duration
paymentTestAlert:
type: grafana:assert:NotificationAlertsConfig
name: payment_test_alert
properties:
name: PaymentTestAlert
matchLabels:
alertname: PaymentTestAlert
additional_labels: asserts_severity=~"critical"
alertgroup: alex-k8s-integration-test.alerts
alertLabels:
testing: onetwothree
duration: 5m
silenced: false
# Latency alert for shipping service
highShippingLatency:
type: grafana:assert:NotificationAlertsConfig
name: high_shipping_latency
properties:
name: high shipping latency
matchLabels:
alertname: LatencyP99ErrorBuildup
job: shipping
asserts_request_type: inbound
silenced: false
# CPU throttling alert with warning severity
cpuThrottlingSustained:
type: grafana:assert:NotificationAlertsConfig
name: cpu_throttling_sustained
properties:
name: CPUThrottlingSustained
matchLabels:
alertname: CPUThrottlingSustained
additional_labels: asserts_severity=~"warning"
silenced: true
# Ingress error rate alert
ingressError:
type: grafana:assert:NotificationAlertsConfig
name: ingress_error
properties:
name: ingress error
matchLabels:
alertname: ErrorRatioBreach
job: ingress-nginx-controller-metrics
asserts_request_type: inbound
silenced: false
# MySQL Galera cluster alert
mysqlGaleraNotReady:
type: grafana:assert:NotificationAlertsConfig
name: mysql_galera_not_ready
properties:
name: MySQLGaleraNotReady
matchLabels:
alertname: MySQLGaleraNotReady
silenced: false
Create NotificationAlertsConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationAlertsConfig(name: string, args?: NotificationAlertsConfigArgs, opts?: CustomResourceOptions);@overload
def NotificationAlertsConfig(resource_name: str,
args: Optional[NotificationAlertsConfigArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationAlertsConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
alert_labels: Optional[Mapping[str, str]] = None,
duration: Optional[str] = None,
match_labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
silenced: Optional[bool] = None)func NewNotificationAlertsConfig(ctx *Context, name string, args *NotificationAlertsConfigArgs, opts ...ResourceOption) (*NotificationAlertsConfig, error)public NotificationAlertsConfig(string name, NotificationAlertsConfigArgs? args = null, CustomResourceOptions? opts = null)
public NotificationAlertsConfig(String name, NotificationAlertsConfigArgs args)
public NotificationAlertsConfig(String name, NotificationAlertsConfigArgs args, CustomResourceOptions options)
type: grafana:assert:NotificationAlertsConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NotificationAlertsConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NotificationAlertsConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotificationAlertsConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationAlertsConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationAlertsConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var notificationAlertsConfigResource = new Grafana.Assert.NotificationAlertsConfig("notificationAlertsConfigResource", new()
{
AlertLabels =
{
{ "string", "string" },
},
Duration = "string",
MatchLabels =
{
{ "string", "string" },
},
Name = "string",
Silenced = false,
});
example, err := assert.NewNotificationAlertsConfig(ctx, "notificationAlertsConfigResource", &assert.NotificationAlertsConfigArgs{
AlertLabels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Duration: pulumi.String("string"),
MatchLabels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Silenced: pulumi.Bool(false),
})
var notificationAlertsConfigResource = new NotificationAlertsConfig("notificationAlertsConfigResource", NotificationAlertsConfigArgs.builder()
.alertLabels(Map.of("string", "string"))
.duration("string")
.matchLabels(Map.of("string", "string"))
.name("string")
.silenced(false)
.build());
notification_alerts_config_resource = grafana.assert_.NotificationAlertsConfig("notificationAlertsConfigResource",
alert_labels={
"string": "string",
},
duration="string",
match_labels={
"string": "string",
},
name="string",
silenced=False)
const notificationAlertsConfigResource = new grafana.assert.NotificationAlertsConfig("notificationAlertsConfigResource", {
alertLabels: {
string: "string",
},
duration: "string",
matchLabels: {
string: "string",
},
name: "string",
silenced: false,
});
type: grafana:assert:NotificationAlertsConfig
properties:
alertLabels:
string: string
duration: string
matchLabels:
string: string
name: string
silenced: false
NotificationAlertsConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NotificationAlertsConfig resource accepts the following input properties:
- Alert
Labels Dictionary<string, string> - Labels to add to alerts generated by this configuration.
- Duration string
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- Match
Labels Dictionary<string, string> - Labels to match for this alert configuration.
- Name string
- The name of the alert configuration.
- Silenced bool
- Whether this alert configuration is silenced. Defaults to
false.
- Alert
Labels map[string]string - Labels to add to alerts generated by this configuration.
- Duration string
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- Match
Labels map[string]string - Labels to match for this alert configuration.
- Name string
- The name of the alert configuration.
- Silenced bool
- Whether this alert configuration is silenced. Defaults to
false.
- alert
Labels Map<String,String> - Labels to add to alerts generated by this configuration.
- duration String
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match
Labels Map<String,String> - Labels to match for this alert configuration.
- name String
- The name of the alert configuration.
- silenced Boolean
- Whether this alert configuration is silenced. Defaults to
false.
- alert
Labels {[key: string]: string} - Labels to add to alerts generated by this configuration.
- duration string
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match
Labels {[key: string]: string} - Labels to match for this alert configuration.
- name string
- The name of the alert configuration.
- silenced boolean
- Whether this alert configuration is silenced. Defaults to
false.
- alert_
labels Mapping[str, str] - Labels to add to alerts generated by this configuration.
- duration str
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match_
labels Mapping[str, str] - Labels to match for this alert configuration.
- name str
- The name of the alert configuration.
- silenced bool
- Whether this alert configuration is silenced. Defaults to
false.
- alert
Labels Map<String> - Labels to add to alerts generated by this configuration.
- duration String
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match
Labels Map<String> - Labels to match for this alert configuration.
- name String
- The name of the alert configuration.
- silenced Boolean
- Whether this alert configuration is silenced. Defaults to
false.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationAlertsConfig resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NotificationAlertsConfig Resource
Get an existing NotificationAlertsConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NotificationAlertsConfigState, opts?: CustomResourceOptions): NotificationAlertsConfig@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_labels: Optional[Mapping[str, str]] = None,
duration: Optional[str] = None,
match_labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
silenced: Optional[bool] = None) -> NotificationAlertsConfigfunc GetNotificationAlertsConfig(ctx *Context, name string, id IDInput, state *NotificationAlertsConfigState, opts ...ResourceOption) (*NotificationAlertsConfig, error)public static NotificationAlertsConfig Get(string name, Input<string> id, NotificationAlertsConfigState? state, CustomResourceOptions? opts = null)public static NotificationAlertsConfig get(String name, Output<String> id, NotificationAlertsConfigState state, CustomResourceOptions options)resources: _: type: grafana:assert:NotificationAlertsConfig get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alert
Labels Dictionary<string, string> - Labels to add to alerts generated by this configuration.
- Duration string
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- Match
Labels Dictionary<string, string> - Labels to match for this alert configuration.
- Name string
- The name of the alert configuration.
- Silenced bool
- Whether this alert configuration is silenced. Defaults to
false.
- Alert
Labels map[string]string - Labels to add to alerts generated by this configuration.
- Duration string
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- Match
Labels map[string]string - Labels to match for this alert configuration.
- Name string
- The name of the alert configuration.
- Silenced bool
- Whether this alert configuration is silenced. Defaults to
false.
- alert
Labels Map<String,String> - Labels to add to alerts generated by this configuration.
- duration String
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match
Labels Map<String,String> - Labels to match for this alert configuration.
- name String
- The name of the alert configuration.
- silenced Boolean
- Whether this alert configuration is silenced. Defaults to
false.
- alert
Labels {[key: string]: string} - Labels to add to alerts generated by this configuration.
- duration string
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match
Labels {[key: string]: string} - Labels to match for this alert configuration.
- name string
- The name of the alert configuration.
- silenced boolean
- Whether this alert configuration is silenced. Defaults to
false.
- alert_
labels Mapping[str, str] - Labels to add to alerts generated by this configuration.
- duration str
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match_
labels Mapping[str, str] - Labels to match for this alert configuration.
- name str
- The name of the alert configuration.
- silenced bool
- Whether this alert configuration is silenced. Defaults to
false.
- alert
Labels Map<String> - Labels to add to alerts generated by this configuration.
- duration String
- Duration for which the condition must be true before firing (e.g., '5m', '30s'). Maps to 'for' in Asserts API.
- match
Labels Map<String> - Labels to match for this alert configuration.
- name String
- The name of the alert configuration.
- silenced Boolean
- Whether this alert configuration is silenced. Defaults to
false.
Import
$ pulumi import grafana:assert/notificationAlertsConfig:NotificationAlertsConfig name "{{ name }}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafanaTerraform Provider.
