mongodbatlas.AlertConfiguration
Explore with Pulumi AI
# Resource: mongodbatlas.AlertConfiguration
mongodbatlas.AlertConfiguration
provides an Alert Configuration resource to define the conditions that trigger an alert and the methods of notification within a MongoDB Atlas project.
NOTE: Groups and projects are synonymous terms. You may find
groupId
in the official documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = new mongodbatlas.AlertConfiguration("test", {
projectId: "<PROJECT-ID>",
eventType: "OUTSIDE_METRIC_THRESHOLD",
enabled: true,
notifications: [{
typeName: "GROUP",
intervalMin: 5,
delayMin: 0,
smsEnabled: false,
emailEnabled: true,
roles: ["GROUP_CLUSTER_MANAGER"],
}],
matchers: [{
fieldName: "HOSTNAME_AND_PORT",
operator: "EQUALS",
value: "SECONDARY",
}],
metricThresholdConfig: {
metricName: "ASSERT_REGULAR",
operator: "LESS_THAN",
threshold: 99,
units: "RAW",
mode: "AVERAGE",
},
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.AlertConfiguration("test",
project_id="<PROJECT-ID>",
event_type="OUTSIDE_METRIC_THRESHOLD",
enabled=True,
notifications=[{
"type_name": "GROUP",
"interval_min": 5,
"delay_min": 0,
"sms_enabled": False,
"email_enabled": True,
"roles": ["GROUP_CLUSTER_MANAGER"],
}],
matchers=[{
"field_name": "HOSTNAME_AND_PORT",
"operator": "EQUALS",
"value": "SECONDARY",
}],
metric_threshold_config={
"metric_name": "ASSERT_REGULAR",
"operator": "LESS_THAN",
"threshold": 99,
"units": "RAW",
"mode": "AVERAGE",
})
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mongodbatlas.NewAlertConfiguration(ctx, "test", &mongodbatlas.AlertConfigurationArgs{
ProjectId: pulumi.String("<PROJECT-ID>"),
EventType: pulumi.String("OUTSIDE_METRIC_THRESHOLD"),
Enabled: pulumi.Bool(true),
Notifications: mongodbatlas.AlertConfigurationNotificationArray{
&mongodbatlas.AlertConfigurationNotificationArgs{
TypeName: pulumi.String("GROUP"),
IntervalMin: pulumi.Int(5),
DelayMin: pulumi.Int(0),
SmsEnabled: pulumi.Bool(false),
EmailEnabled: pulumi.Bool(true),
Roles: pulumi.StringArray{
pulumi.String("GROUP_CLUSTER_MANAGER"),
},
},
},
Matchers: mongodbatlas.AlertConfigurationMatcherArray{
&mongodbatlas.AlertConfigurationMatcherArgs{
FieldName: pulumi.String("HOSTNAME_AND_PORT"),
Operator: pulumi.String("EQUALS"),
Value: pulumi.String("SECONDARY"),
},
},
MetricThresholdConfig: &mongodbatlas.AlertConfigurationMetricThresholdConfigArgs{
MetricName: pulumi.String("ASSERT_REGULAR"),
Operator: pulumi.String("LESS_THAN"),
Threshold: pulumi.Float64(99),
Units: pulumi.String("RAW"),
Mode: pulumi.String("AVERAGE"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = new Mongodbatlas.AlertConfiguration("test", new()
{
ProjectId = "<PROJECT-ID>",
EventType = "OUTSIDE_METRIC_THRESHOLD",
Enabled = true,
Notifications = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationNotificationArgs
{
TypeName = "GROUP",
IntervalMin = 5,
DelayMin = 0,
SmsEnabled = false,
EmailEnabled = true,
Roles = new[]
{
"GROUP_CLUSTER_MANAGER",
},
},
},
Matchers = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationMatcherArgs
{
FieldName = "HOSTNAME_AND_PORT",
Operator = "EQUALS",
Value = "SECONDARY",
},
},
MetricThresholdConfig = new Mongodbatlas.Inputs.AlertConfigurationMetricThresholdConfigArgs
{
MetricName = "ASSERT_REGULAR",
Operator = "LESS_THAN",
Threshold = 99,
Units = "RAW",
Mode = "AVERAGE",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.AlertConfiguration;
import com.pulumi.mongodbatlas.AlertConfigurationArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationNotificationArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationMatcherArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationMetricThresholdConfigArgs;
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) {
var test = new AlertConfiguration("test", AlertConfigurationArgs.builder()
.projectId("<PROJECT-ID>")
.eventType("OUTSIDE_METRIC_THRESHOLD")
.enabled(true)
.notifications(AlertConfigurationNotificationArgs.builder()
.typeName("GROUP")
.intervalMin(5)
.delayMin(0)
.smsEnabled(false)
.emailEnabled(true)
.roles("GROUP_CLUSTER_MANAGER")
.build())
.matchers(AlertConfigurationMatcherArgs.builder()
.fieldName("HOSTNAME_AND_PORT")
.operator("EQUALS")
.value("SECONDARY")
.build())
.metricThresholdConfig(AlertConfigurationMetricThresholdConfigArgs.builder()
.metricName("ASSERT_REGULAR")
.operator("LESS_THAN")
.threshold(99)
.units("RAW")
.mode("AVERAGE")
.build())
.build());
}
}
resources:
test:
type: mongodbatlas:AlertConfiguration
properties:
projectId: <PROJECT-ID>
eventType: OUTSIDE_METRIC_THRESHOLD
enabled: true
notifications:
- typeName: GROUP
intervalMin: 5
delayMin: 0
smsEnabled: false
emailEnabled: true
roles:
- GROUP_CLUSTER_MANAGER
matchers:
- fieldName: HOSTNAME_AND_PORT
operator: EQUALS
value: SECONDARY
metricThresholdConfig:
metricName: ASSERT_REGULAR
operator: LESS_THAN
threshold: 99
units: RAW
mode: AVERAGE
NOTE: In order to allow for a fast pace of change to alert variables some validations have been removed from this resource in order to unblock alert creation. Impacted areas have links to the MongoDB Atlas API documentation so always check it for the most current information: https://docs.atlas.mongodb.com/reference/api/alert-configurations-create-config/
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = new mongodbatlas.AlertConfiguration("test", {
projectId: "<PROJECT-ID>",
eventType: "REPLICATION_OPLOG_WINDOW_RUNNING_OUT",
enabled: true,
notifications: [{
typeName: "GROUP",
intervalMin: 5,
delayMin: 0,
smsEnabled: false,
emailEnabled: true,
roles: ["GROUP_CLUSTER_MANAGER"],
}],
matchers: [{
fieldName: "CLUSTER_NAME",
operator: "EQUALS",
value: "my-cluster",
}],
thresholdConfig: {
operator: "LESS_THAN",
threshold: 1,
units: "HOURS",
},
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.AlertConfiguration("test",
project_id="<PROJECT-ID>",
event_type="REPLICATION_OPLOG_WINDOW_RUNNING_OUT",
enabled=True,
notifications=[{
"type_name": "GROUP",
"interval_min": 5,
"delay_min": 0,
"sms_enabled": False,
"email_enabled": True,
"roles": ["GROUP_CLUSTER_MANAGER"],
}],
matchers=[{
"field_name": "CLUSTER_NAME",
"operator": "EQUALS",
"value": "my-cluster",
}],
threshold_config={
"operator": "LESS_THAN",
"threshold": 1,
"units": "HOURS",
})
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mongodbatlas.NewAlertConfiguration(ctx, "test", &mongodbatlas.AlertConfigurationArgs{
ProjectId: pulumi.String("<PROJECT-ID>"),
EventType: pulumi.String("REPLICATION_OPLOG_WINDOW_RUNNING_OUT"),
Enabled: pulumi.Bool(true),
Notifications: mongodbatlas.AlertConfigurationNotificationArray{
&mongodbatlas.AlertConfigurationNotificationArgs{
TypeName: pulumi.String("GROUP"),
IntervalMin: pulumi.Int(5),
DelayMin: pulumi.Int(0),
SmsEnabled: pulumi.Bool(false),
EmailEnabled: pulumi.Bool(true),
Roles: pulumi.StringArray{
pulumi.String("GROUP_CLUSTER_MANAGER"),
},
},
},
Matchers: mongodbatlas.AlertConfigurationMatcherArray{
&mongodbatlas.AlertConfigurationMatcherArgs{
FieldName: pulumi.String("CLUSTER_NAME"),
Operator: pulumi.String("EQUALS"),
Value: pulumi.String("my-cluster"),
},
},
ThresholdConfig: &mongodbatlas.AlertConfigurationThresholdConfigArgs{
Operator: pulumi.String("LESS_THAN"),
Threshold: pulumi.Float64(1),
Units: pulumi.String("HOURS"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = new Mongodbatlas.AlertConfiguration("test", new()
{
ProjectId = "<PROJECT-ID>",
EventType = "REPLICATION_OPLOG_WINDOW_RUNNING_OUT",
Enabled = true,
Notifications = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationNotificationArgs
{
TypeName = "GROUP",
IntervalMin = 5,
DelayMin = 0,
SmsEnabled = false,
EmailEnabled = true,
Roles = new[]
{
"GROUP_CLUSTER_MANAGER",
},
},
},
Matchers = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationMatcherArgs
{
FieldName = "CLUSTER_NAME",
Operator = "EQUALS",
Value = "my-cluster",
},
},
ThresholdConfig = new Mongodbatlas.Inputs.AlertConfigurationThresholdConfigArgs
{
Operator = "LESS_THAN",
Threshold = 1,
Units = "HOURS",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.AlertConfiguration;
import com.pulumi.mongodbatlas.AlertConfigurationArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationNotificationArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationMatcherArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationThresholdConfigArgs;
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) {
var test = new AlertConfiguration("test", AlertConfigurationArgs.builder()
.projectId("<PROJECT-ID>")
.eventType("REPLICATION_OPLOG_WINDOW_RUNNING_OUT")
.enabled(true)
.notifications(AlertConfigurationNotificationArgs.builder()
.typeName("GROUP")
.intervalMin(5)
.delayMin(0)
.smsEnabled(false)
.emailEnabled(true)
.roles("GROUP_CLUSTER_MANAGER")
.build())
.matchers(AlertConfigurationMatcherArgs.builder()
.fieldName("CLUSTER_NAME")
.operator("EQUALS")
.value("my-cluster")
.build())
.thresholdConfig(AlertConfigurationThresholdConfigArgs.builder()
.operator("LESS_THAN")
.threshold(1)
.units("HOURS")
.build())
.build());
}
}
resources:
test:
type: mongodbatlas:AlertConfiguration
properties:
projectId: <PROJECT-ID>
eventType: REPLICATION_OPLOG_WINDOW_RUNNING_OUT
enabled: true
notifications:
- typeName: GROUP
intervalMin: 5
delayMin: 0
smsEnabled: false
emailEnabled: true
roles:
- GROUP_CLUSTER_MANAGER
matchers:
- fieldName: CLUSTER_NAME
operator: EQUALS
value: my-cluster
thresholdConfig:
operator: LESS_THAN
threshold: 1
units: HOURS
Create an alert with two notifications using Email and SMS
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = new mongodbatlas.AlertConfiguration("test", {
projectId: "PROJECT ID",
eventType: "OUTSIDE_METRIC_THRESHOLD",
enabled: true,
notifications: [
{
typeName: "GROUP",
intervalMin: 5,
delayMin: 0,
smsEnabled: false,
emailEnabled: true,
roles: [
"GROUP_DATA_ACCESS_READ_ONLY",
"GROUP_CLUSTER_MANAGER",
"GROUP_DATA_ACCESS_ADMIN",
],
},
{
typeName: "ORG",
intervalMin: 5,
delayMin: 0,
smsEnabled: true,
emailEnabled: false,
},
],
matchers: [{
fieldName: "HOSTNAME_AND_PORT",
operator: "EQUALS",
value: "SECONDARY",
}],
metricThresholdConfig: {
metricName: "ASSERT_REGULAR",
operator: "LESS_THAN",
threshold: 99,
units: "RAW",
mode: "AVERAGE",
},
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.AlertConfiguration("test",
project_id="PROJECT ID",
event_type="OUTSIDE_METRIC_THRESHOLD",
enabled=True,
notifications=[
{
"type_name": "GROUP",
"interval_min": 5,
"delay_min": 0,
"sms_enabled": False,
"email_enabled": True,
"roles": [
"GROUP_DATA_ACCESS_READ_ONLY",
"GROUP_CLUSTER_MANAGER",
"GROUP_DATA_ACCESS_ADMIN",
],
},
{
"type_name": "ORG",
"interval_min": 5,
"delay_min": 0,
"sms_enabled": True,
"email_enabled": False,
},
],
matchers=[{
"field_name": "HOSTNAME_AND_PORT",
"operator": "EQUALS",
"value": "SECONDARY",
}],
metric_threshold_config={
"metric_name": "ASSERT_REGULAR",
"operator": "LESS_THAN",
"threshold": 99,
"units": "RAW",
"mode": "AVERAGE",
})
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := mongodbatlas.NewAlertConfiguration(ctx, "test", &mongodbatlas.AlertConfigurationArgs{
ProjectId: pulumi.String("PROJECT ID"),
EventType: pulumi.String("OUTSIDE_METRIC_THRESHOLD"),
Enabled: pulumi.Bool(true),
Notifications: mongodbatlas.AlertConfigurationNotificationArray{
&mongodbatlas.AlertConfigurationNotificationArgs{
TypeName: pulumi.String("GROUP"),
IntervalMin: pulumi.Int(5),
DelayMin: pulumi.Int(0),
SmsEnabled: pulumi.Bool(false),
EmailEnabled: pulumi.Bool(true),
Roles: pulumi.StringArray{
pulumi.String("GROUP_DATA_ACCESS_READ_ONLY"),
pulumi.String("GROUP_CLUSTER_MANAGER"),
pulumi.String("GROUP_DATA_ACCESS_ADMIN"),
},
},
&mongodbatlas.AlertConfigurationNotificationArgs{
TypeName: pulumi.String("ORG"),
IntervalMin: pulumi.Int(5),
DelayMin: pulumi.Int(0),
SmsEnabled: pulumi.Bool(true),
EmailEnabled: pulumi.Bool(false),
},
},
Matchers: mongodbatlas.AlertConfigurationMatcherArray{
&mongodbatlas.AlertConfigurationMatcherArgs{
FieldName: pulumi.String("HOSTNAME_AND_PORT"),
Operator: pulumi.String("EQUALS"),
Value: pulumi.String("SECONDARY"),
},
},
MetricThresholdConfig: &mongodbatlas.AlertConfigurationMetricThresholdConfigArgs{
MetricName: pulumi.String("ASSERT_REGULAR"),
Operator: pulumi.String("LESS_THAN"),
Threshold: pulumi.Float64(99),
Units: pulumi.String("RAW"),
Mode: pulumi.String("AVERAGE"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = new Mongodbatlas.AlertConfiguration("test", new()
{
ProjectId = "PROJECT ID",
EventType = "OUTSIDE_METRIC_THRESHOLD",
Enabled = true,
Notifications = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationNotificationArgs
{
TypeName = "GROUP",
IntervalMin = 5,
DelayMin = 0,
SmsEnabled = false,
EmailEnabled = true,
Roles = new[]
{
"GROUP_DATA_ACCESS_READ_ONLY",
"GROUP_CLUSTER_MANAGER",
"GROUP_DATA_ACCESS_ADMIN",
},
},
new Mongodbatlas.Inputs.AlertConfigurationNotificationArgs
{
TypeName = "ORG",
IntervalMin = 5,
DelayMin = 0,
SmsEnabled = true,
EmailEnabled = false,
},
},
Matchers = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationMatcherArgs
{
FieldName = "HOSTNAME_AND_PORT",
Operator = "EQUALS",
Value = "SECONDARY",
},
},
MetricThresholdConfig = new Mongodbatlas.Inputs.AlertConfigurationMetricThresholdConfigArgs
{
MetricName = "ASSERT_REGULAR",
Operator = "LESS_THAN",
Threshold = 99,
Units = "RAW",
Mode = "AVERAGE",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.AlertConfiguration;
import com.pulumi.mongodbatlas.AlertConfigurationArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationNotificationArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationMatcherArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationMetricThresholdConfigArgs;
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) {
var test = new AlertConfiguration("test", AlertConfigurationArgs.builder()
.projectId("PROJECT ID")
.eventType("OUTSIDE_METRIC_THRESHOLD")
.enabled(true)
.notifications(
AlertConfigurationNotificationArgs.builder()
.typeName("GROUP")
.intervalMin(5)
.delayMin(0)
.smsEnabled(false)
.emailEnabled(true)
.roles(
"GROUP_DATA_ACCESS_READ_ONLY",
"GROUP_CLUSTER_MANAGER",
"GROUP_DATA_ACCESS_ADMIN")
.build(),
AlertConfigurationNotificationArgs.builder()
.typeName("ORG")
.intervalMin(5)
.delayMin(0)
.smsEnabled(true)
.emailEnabled(false)
.build())
.matchers(AlertConfigurationMatcherArgs.builder()
.fieldName("HOSTNAME_AND_PORT")
.operator("EQUALS")
.value("SECONDARY")
.build())
.metricThresholdConfig(AlertConfigurationMetricThresholdConfigArgs.builder()
.metricName("ASSERT_REGULAR")
.operator("LESS_THAN")
.threshold(99)
.units("RAW")
.mode("AVERAGE")
.build())
.build());
}
}
resources:
test:
type: mongodbatlas:AlertConfiguration
properties:
projectId: PROJECT ID
eventType: OUTSIDE_METRIC_THRESHOLD
enabled: true
notifications:
- typeName: GROUP
intervalMin: 5
delayMin: 0
smsEnabled: false
emailEnabled: true
roles:
- GROUP_DATA_ACCESS_READ_ONLY
- GROUP_CLUSTER_MANAGER
- GROUP_DATA_ACCESS_ADMIN
- typeName: ORG
intervalMin: 5
delayMin: 0
smsEnabled: true
emailEnabled: false
matchers:
- fieldName: HOSTNAME_AND_PORT
operator: EQUALS
value: SECONDARY
metricThresholdConfig:
metricName: ASSERT_REGULAR
operator: LESS_THAN
threshold: 99
units: RAW
mode: AVERAGE
Create third party notification using credentials from existing third party integration
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = mongodbatlas.getThirdPartyIntegration({
projectId: "PROJECT ID",
type: "PAGER_DUTY",
});
const testAlertConfiguration = new mongodbatlas.AlertConfiguration("test", {
projectId: "PROJECT ID",
enabled: true,
eventType: "USERS_WITHOUT_MULTI_FACTOR_AUTH",
notifications: [{
typeName: "PAGER_DUTY",
integrationId: test.then(test => test.id),
}],
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.get_third_party_integration(project_id="PROJECT ID",
type="PAGER_DUTY")
test_alert_configuration = mongodbatlas.AlertConfiguration("test",
project_id="PROJECT ID",
enabled=True,
event_type="USERS_WITHOUT_MULTI_FACTOR_AUTH",
notifications=[{
"type_name": "PAGER_DUTY",
"integration_id": test.id,
}])
package main
import (
"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
test, err := mongodbatlas.LookupThirdPartyIntegration(ctx, &mongodbatlas.LookupThirdPartyIntegrationArgs{
ProjectId: "PROJECT ID",
Type: "PAGER_DUTY",
}, nil)
if err != nil {
return err
}
_, err = mongodbatlas.NewAlertConfiguration(ctx, "test", &mongodbatlas.AlertConfigurationArgs{
ProjectId: pulumi.String("PROJECT ID"),
Enabled: pulumi.Bool(true),
EventType: pulumi.String("USERS_WITHOUT_MULTI_FACTOR_AUTH"),
Notifications: mongodbatlas.AlertConfigurationNotificationArray{
&mongodbatlas.AlertConfigurationNotificationArgs{
TypeName: pulumi.String("PAGER_DUTY"),
IntegrationId: pulumi.String(test.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = Mongodbatlas.GetThirdPartyIntegration.Invoke(new()
{
ProjectId = "PROJECT ID",
Type = "PAGER_DUTY",
});
var testAlertConfiguration = new Mongodbatlas.AlertConfiguration("test", new()
{
ProjectId = "PROJECT ID",
Enabled = true,
EventType = "USERS_WITHOUT_MULTI_FACTOR_AUTH",
Notifications = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationNotificationArgs
{
TypeName = "PAGER_DUTY",
IntegrationId = test.Apply(getThirdPartyIntegrationResult => getThirdPartyIntegrationResult.Id),
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetThirdPartyIntegrationArgs;
import com.pulumi.mongodbatlas.AlertConfiguration;
import com.pulumi.mongodbatlas.AlertConfigurationArgs;
import com.pulumi.mongodbatlas.inputs.AlertConfigurationNotificationArgs;
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) {
final var test = MongodbatlasFunctions.getThirdPartyIntegration(GetThirdPartyIntegrationArgs.builder()
.projectId("PROJECT ID")
.type("PAGER_DUTY")
.build());
var testAlertConfiguration = new AlertConfiguration("testAlertConfiguration", AlertConfigurationArgs.builder()
.projectId("PROJECT ID")
.enabled(true)
.eventType("USERS_WITHOUT_MULTI_FACTOR_AUTH")
.notifications(AlertConfigurationNotificationArgs.builder()
.typeName("PAGER_DUTY")
.integrationId(test.applyValue(getThirdPartyIntegrationResult -> getThirdPartyIntegrationResult.id()))
.build())
.build());
}
}
resources:
testAlertConfiguration:
type: mongodbatlas:AlertConfiguration
name: test
properties:
projectId: PROJECT ID
enabled: true
eventType: USERS_WITHOUT_MULTI_FACTOR_AUTH
notifications:
- typeName: PAGER_DUTY
integrationId: ${test.id}
variables:
test:
fn::invoke:
Function: mongodbatlas:getThirdPartyIntegration
Arguments:
projectId: PROJECT ID
type: PAGER_DUTY
Create AlertConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlertConfiguration(name: string, args: AlertConfigurationArgs, opts?: CustomResourceOptions);
@overload
def AlertConfiguration(resource_name: str,
args: AlertConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlertConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
event_type: Optional[str] = None,
project_id: Optional[str] = None,
enabled: Optional[bool] = None,
matchers: Optional[Sequence[AlertConfigurationMatcherArgs]] = None,
metric_threshold_config: Optional[AlertConfigurationMetricThresholdConfigArgs] = None,
notifications: Optional[Sequence[AlertConfigurationNotificationArgs]] = None,
threshold_config: Optional[AlertConfigurationThresholdConfigArgs] = None)
func NewAlertConfiguration(ctx *Context, name string, args AlertConfigurationArgs, opts ...ResourceOption) (*AlertConfiguration, error)
public AlertConfiguration(string name, AlertConfigurationArgs args, CustomResourceOptions? opts = null)
public AlertConfiguration(String name, AlertConfigurationArgs args)
public AlertConfiguration(String name, AlertConfigurationArgs args, CustomResourceOptions options)
type: mongodbatlas:AlertConfiguration
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 AlertConfigurationArgs
- 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 AlertConfigurationArgs
- 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 AlertConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertConfigurationArgs
- 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 alertConfigurationResource = new Mongodbatlas.AlertConfiguration("alertConfigurationResource", new()
{
EventType = "string",
ProjectId = "string",
Enabled = false,
Matchers = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationMatcherArgs
{
FieldName = "string",
Operator = "string",
Value = "string",
},
},
MetricThresholdConfig = new Mongodbatlas.Inputs.AlertConfigurationMetricThresholdConfigArgs
{
MetricName = "string",
Mode = "string",
Operator = "string",
Threshold = 0,
Units = "string",
},
Notifications = new[]
{
new Mongodbatlas.Inputs.AlertConfigurationNotificationArgs
{
TypeName = "string",
OpsGenieApiKey = "string",
VictorOpsRoutingKey = "string",
DatadogRegion = "string",
DelayMin = 0,
EmailAddress = "string",
EmailEnabled = false,
IntegrationId = "string",
IntervalMin = 0,
MicrosoftTeamsWebhookUrl = "string",
MobileNumber = "string",
WebhookUrl = "string",
DatadogApiKey = "string",
ServiceKey = "string",
Roles = new[]
{
"string",
},
OpsGenieRegion = "string",
SmsEnabled = false,
TeamId = "string",
TeamName = "string",
ChannelName = "string",
Username = "string",
VictorOpsApiKey = "string",
ApiToken = "string",
WebhookSecret = "string",
NotifierId = "string",
},
},
ThresholdConfig = new Mongodbatlas.Inputs.AlertConfigurationThresholdConfigArgs
{
Operator = "string",
Threshold = 0,
Units = "string",
},
});
example, err := mongodbatlas.NewAlertConfiguration(ctx, "alertConfigurationResource", &mongodbatlas.AlertConfigurationArgs{
EventType: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Matchers: mongodbatlas.AlertConfigurationMatcherArray{
&mongodbatlas.AlertConfigurationMatcherArgs{
FieldName: pulumi.String("string"),
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
MetricThresholdConfig: &mongodbatlas.AlertConfigurationMetricThresholdConfigArgs{
MetricName: pulumi.String("string"),
Mode: pulumi.String("string"),
Operator: pulumi.String("string"),
Threshold: pulumi.Float64(0),
Units: pulumi.String("string"),
},
Notifications: mongodbatlas.AlertConfigurationNotificationArray{
&mongodbatlas.AlertConfigurationNotificationArgs{
TypeName: pulumi.String("string"),
OpsGenieApiKey: pulumi.String("string"),
VictorOpsRoutingKey: pulumi.String("string"),
DatadogRegion: pulumi.String("string"),
DelayMin: pulumi.Int(0),
EmailAddress: pulumi.String("string"),
EmailEnabled: pulumi.Bool(false),
IntegrationId: pulumi.String("string"),
IntervalMin: pulumi.Int(0),
MicrosoftTeamsWebhookUrl: pulumi.String("string"),
MobileNumber: pulumi.String("string"),
WebhookUrl: pulumi.String("string"),
DatadogApiKey: pulumi.String("string"),
ServiceKey: pulumi.String("string"),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
OpsGenieRegion: pulumi.String("string"),
SmsEnabled: pulumi.Bool(false),
TeamId: pulumi.String("string"),
TeamName: pulumi.String("string"),
ChannelName: pulumi.String("string"),
Username: pulumi.String("string"),
VictorOpsApiKey: pulumi.String("string"),
ApiToken: pulumi.String("string"),
WebhookSecret: pulumi.String("string"),
NotifierId: pulumi.String("string"),
},
},
ThresholdConfig: &mongodbatlas.AlertConfigurationThresholdConfigArgs{
Operator: pulumi.String("string"),
Threshold: pulumi.Float64(0),
Units: pulumi.String("string"),
},
})
var alertConfigurationResource = new AlertConfiguration("alertConfigurationResource", AlertConfigurationArgs.builder()
.eventType("string")
.projectId("string")
.enabled(false)
.matchers(AlertConfigurationMatcherArgs.builder()
.fieldName("string")
.operator("string")
.value("string")
.build())
.metricThresholdConfig(AlertConfigurationMetricThresholdConfigArgs.builder()
.metricName("string")
.mode("string")
.operator("string")
.threshold(0)
.units("string")
.build())
.notifications(AlertConfigurationNotificationArgs.builder()
.typeName("string")
.opsGenieApiKey("string")
.victorOpsRoutingKey("string")
.datadogRegion("string")
.delayMin(0)
.emailAddress("string")
.emailEnabled(false)
.integrationId("string")
.intervalMin(0)
.microsoftTeamsWebhookUrl("string")
.mobileNumber("string")
.webhookUrl("string")
.datadogApiKey("string")
.serviceKey("string")
.roles("string")
.opsGenieRegion("string")
.smsEnabled(false)
.teamId("string")
.teamName("string")
.channelName("string")
.username("string")
.victorOpsApiKey("string")
.apiToken("string")
.webhookSecret("string")
.notifierId("string")
.build())
.thresholdConfig(AlertConfigurationThresholdConfigArgs.builder()
.operator("string")
.threshold(0)
.units("string")
.build())
.build());
alert_configuration_resource = mongodbatlas.AlertConfiguration("alertConfigurationResource",
event_type="string",
project_id="string",
enabled=False,
matchers=[{
"field_name": "string",
"operator": "string",
"value": "string",
}],
metric_threshold_config={
"metric_name": "string",
"mode": "string",
"operator": "string",
"threshold": 0,
"units": "string",
},
notifications=[{
"type_name": "string",
"ops_genie_api_key": "string",
"victor_ops_routing_key": "string",
"datadog_region": "string",
"delay_min": 0,
"email_address": "string",
"email_enabled": False,
"integration_id": "string",
"interval_min": 0,
"microsoft_teams_webhook_url": "string",
"mobile_number": "string",
"webhook_url": "string",
"datadog_api_key": "string",
"service_key": "string",
"roles": ["string"],
"ops_genie_region": "string",
"sms_enabled": False,
"team_id": "string",
"team_name": "string",
"channel_name": "string",
"username": "string",
"victor_ops_api_key": "string",
"api_token": "string",
"webhook_secret": "string",
"notifier_id": "string",
}],
threshold_config={
"operator": "string",
"threshold": 0,
"units": "string",
})
const alertConfigurationResource = new mongodbatlas.AlertConfiguration("alertConfigurationResource", {
eventType: "string",
projectId: "string",
enabled: false,
matchers: [{
fieldName: "string",
operator: "string",
value: "string",
}],
metricThresholdConfig: {
metricName: "string",
mode: "string",
operator: "string",
threshold: 0,
units: "string",
},
notifications: [{
typeName: "string",
opsGenieApiKey: "string",
victorOpsRoutingKey: "string",
datadogRegion: "string",
delayMin: 0,
emailAddress: "string",
emailEnabled: false,
integrationId: "string",
intervalMin: 0,
microsoftTeamsWebhookUrl: "string",
mobileNumber: "string",
webhookUrl: "string",
datadogApiKey: "string",
serviceKey: "string",
roles: ["string"],
opsGenieRegion: "string",
smsEnabled: false,
teamId: "string",
teamName: "string",
channelName: "string",
username: "string",
victorOpsApiKey: "string",
apiToken: "string",
webhookSecret: "string",
notifierId: "string",
}],
thresholdConfig: {
operator: "string",
threshold: 0,
units: "string",
},
});
type: mongodbatlas:AlertConfiguration
properties:
enabled: false
eventType: string
matchers:
- fieldName: string
operator: string
value: string
metricThresholdConfig:
metricName: string
mode: string
operator: string
threshold: 0
units: string
notifications:
- apiToken: string
channelName: string
datadogApiKey: string
datadogRegion: string
delayMin: 0
emailAddress: string
emailEnabled: false
integrationId: string
intervalMin: 0
microsoftTeamsWebhookUrl: string
mobileNumber: string
notifierId: string
opsGenieApiKey: string
opsGenieRegion: string
roles:
- string
serviceKey: string
smsEnabled: false
teamId: string
teamName: string
typeName: string
username: string
victorOpsApiKey: string
victorOpsRoutingKey: string
webhookSecret: string
webhookUrl: string
projectId: string
thresholdConfig:
operator: string
threshold: 0
units: string
AlertConfiguration 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 AlertConfiguration resource accepts the following input properties:
- Event
Type string The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- Project
Id string - The ID of the project where the alert configuration will create.
- Enabled bool
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- Matchers
List<Alert
Configuration Matcher> - Metric
Threshold AlertConfig Configuration Metric Threshold Config - Notifications
List<Alert
Configuration Notification> - Threshold
Config AlertConfiguration Threshold Config
- Event
Type string The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- Project
Id string - The ID of the project where the alert configuration will create.
- Enabled bool
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- Matchers
[]Alert
Configuration Matcher Args - Metric
Threshold AlertConfig Configuration Metric Threshold Config Args - Notifications
[]Alert
Configuration Notification Args - Threshold
Config AlertConfiguration Threshold Config Args
- event
Type String The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- project
Id String - The ID of the project where the alert configuration will create.
- enabled Boolean
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- matchers
List<Alert
Configuration Matcher> - metric
Threshold AlertConfig Configuration Metric Threshold Config - notifications
List<Alert
Configuration Notification> - threshold
Config AlertConfiguration Threshold Config
- event
Type string The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- project
Id string - The ID of the project where the alert configuration will create.
- enabled boolean
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- matchers
Alert
Configuration Matcher[] - metric
Threshold AlertConfig Configuration Metric Threshold Config - notifications
Alert
Configuration Notification[] - threshold
Config AlertConfiguration Threshold Config
- event_
type str The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- project_
id str - The ID of the project where the alert configuration will create.
- enabled bool
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- matchers
Sequence[Alert
Configuration Matcher Args] - metric_
threshold_ Alertconfig Configuration Metric Threshold Config Args - notifications
Sequence[Alert
Configuration Notification Args] - threshold_
config AlertConfiguration Threshold Config Args
- event
Type String The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- project
Id String - The ID of the project where the alert configuration will create.
- enabled Boolean
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- matchers List<Property Map>
- metric
Threshold Property MapConfig - notifications List<Property Map>
- threshold
Config Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertConfiguration resource produces the following output properties:
- Alert
Configuration stringId - Unique identifier for the alert configuration.
- Created string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- Alert
Configuration stringId - Unique identifier for the alert configuration.
- Created string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Updated string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert
Configuration StringId - Unique identifier for the alert configuration.
- created String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- id String
- The provider-assigned unique ID for this managed resource.
- updated String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert
Configuration stringId - Unique identifier for the alert configuration.
- created string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- id string
- The provider-assigned unique ID for this managed resource.
- updated string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert_
configuration_ strid - Unique identifier for the alert configuration.
- created str
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- id str
- The provider-assigned unique ID for this managed resource.
- updated str
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert
Configuration StringId - Unique identifier for the alert configuration.
- created String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- id String
- The provider-assigned unique ID for this managed resource.
- updated String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
Look up Existing AlertConfiguration Resource
Get an existing AlertConfiguration 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?: AlertConfigurationState, opts?: CustomResourceOptions): AlertConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_configuration_id: Optional[str] = None,
created: Optional[str] = None,
enabled: Optional[bool] = None,
event_type: Optional[str] = None,
matchers: Optional[Sequence[AlertConfigurationMatcherArgs]] = None,
metric_threshold_config: Optional[AlertConfigurationMetricThresholdConfigArgs] = None,
notifications: Optional[Sequence[AlertConfigurationNotificationArgs]] = None,
project_id: Optional[str] = None,
threshold_config: Optional[AlertConfigurationThresholdConfigArgs] = None,
updated: Optional[str] = None) -> AlertConfiguration
func GetAlertConfiguration(ctx *Context, name string, id IDInput, state *AlertConfigurationState, opts ...ResourceOption) (*AlertConfiguration, error)
public static AlertConfiguration Get(string name, Input<string> id, AlertConfigurationState? state, CustomResourceOptions? opts = null)
public static AlertConfiguration get(String name, Output<String> id, AlertConfigurationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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
Configuration stringId - Unique identifier for the alert configuration.
- Created string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- Enabled bool
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- Event
Type string The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- Matchers
List<Alert
Configuration Matcher> - Metric
Threshold AlertConfig Configuration Metric Threshold Config - Notifications
List<Alert
Configuration Notification> - Project
Id string - The ID of the project where the alert configuration will create.
- Threshold
Config AlertConfiguration Threshold Config - Updated string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- Alert
Configuration stringId - Unique identifier for the alert configuration.
- Created string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- Enabled bool
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- Event
Type string The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- Matchers
[]Alert
Configuration Matcher Args - Metric
Threshold AlertConfig Configuration Metric Threshold Config Args - Notifications
[]Alert
Configuration Notification Args - Project
Id string - The ID of the project where the alert configuration will create.
- Threshold
Config AlertConfiguration Threshold Config Args - Updated string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert
Configuration StringId - Unique identifier for the alert configuration.
- created String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- enabled Boolean
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- event
Type String The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- matchers
List<Alert
Configuration Matcher> - metric
Threshold AlertConfig Configuration Metric Threshold Config - notifications
List<Alert
Configuration Notification> - project
Id String - The ID of the project where the alert configuration will create.
- threshold
Config AlertConfiguration Threshold Config - updated String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert
Configuration stringId - Unique identifier for the alert configuration.
- created string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- enabled boolean
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- event
Type string The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- matchers
Alert
Configuration Matcher[] - metric
Threshold AlertConfig Configuration Metric Threshold Config - notifications
Alert
Configuration Notification[] - project
Id string - The ID of the project where the alert configuration will create.
- threshold
Config AlertConfiguration Threshold Config - updated string
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert_
configuration_ strid - Unique identifier for the alert configuration.
- created str
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- enabled bool
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- event_
type str The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- matchers
Sequence[Alert
Configuration Matcher Args] - metric_
threshold_ Alertconfig Configuration Metric Threshold Config Args - notifications
Sequence[Alert
Configuration Notification Args] - project_
id str - The ID of the project where the alert configuration will create.
- threshold_
config AlertConfiguration Threshold Config Args - updated str
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
- alert
Configuration StringId - Unique identifier for the alert configuration.
- created String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
- enabled Boolean
- It is not required, but If the attribute is omitted, by default will be false, and the configuration would be disabled. You must set true to enable the configuration.
- event
Type String The type of event that will trigger an alert.
IMPORTANT: Event Type has many possible values. Details for both conditional and metric based alerts can be found by selecting the tabs on the alert config page and checking the latest eventTypeName options.
NOTE: If
event_type
is set toOUTSIDE_METRIC_THRESHOLD
orOUTSIDE_SERVERLESS_METRIC_THRESHOLD
, themetric_threshold_config
field must also be configured.- matchers List<Property Map>
- metric
Threshold Property MapConfig - notifications List<Property Map>
- project
Id String - The ID of the project where the alert configuration will create.
- threshold
Config Property Map - updated String
- Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
Supporting Types
AlertConfigurationMatcher, AlertConfigurationMatcherArgs
- Field
Name string Name of the field in the target object to match on.
| Host alerts | Replica set alerts | Sharded cluster alerts | |:---------- |:------------- |:------ | |
TYPE_NAME
|REPLICA_SET_NAME
|CLUSTER_NAME
| |HOSTNAME
|SHARD_NAME
|SHARD_NAME
| |PORT
|CLUSTER_NAME
| | |HOSTNAME_AND_PORT
| | | |REPLICA_SET_NAME
| | |All other types of alerts do not support matchers.
- Operator string
- Value string
- Value to test with the specified operator. If
field_name
is set to TYPE_NAME, you can match on the following values:PRIMARY
SECONDARY
STANDALONE
CONFIG
MONGOS
- Field
Name string Name of the field in the target object to match on.
| Host alerts | Replica set alerts | Sharded cluster alerts | |:---------- |:------------- |:------ | |
TYPE_NAME
|REPLICA_SET_NAME
|CLUSTER_NAME
| |HOSTNAME
|SHARD_NAME
|SHARD_NAME
| |PORT
|CLUSTER_NAME
| | |HOSTNAME_AND_PORT
| | | |REPLICA_SET_NAME
| | |All other types of alerts do not support matchers.
- Operator string
- Value string
- Value to test with the specified operator. If
field_name
is set to TYPE_NAME, you can match on the following values:PRIMARY
SECONDARY
STANDALONE
CONFIG
MONGOS
- field
Name String Name of the field in the target object to match on.
| Host alerts | Replica set alerts | Sharded cluster alerts | |:---------- |:------------- |:------ | |
TYPE_NAME
|REPLICA_SET_NAME
|CLUSTER_NAME
| |HOSTNAME
|SHARD_NAME
|SHARD_NAME
| |PORT
|CLUSTER_NAME
| | |HOSTNAME_AND_PORT
| | | |REPLICA_SET_NAME
| | |All other types of alerts do not support matchers.
- operator String
- value String
- Value to test with the specified operator. If
field_name
is set to TYPE_NAME, you can match on the following values:PRIMARY
SECONDARY
STANDALONE
CONFIG
MONGOS
- field
Name string Name of the field in the target object to match on.
| Host alerts | Replica set alerts | Sharded cluster alerts | |:---------- |:------------- |:------ | |
TYPE_NAME
|REPLICA_SET_NAME
|CLUSTER_NAME
| |HOSTNAME
|SHARD_NAME
|SHARD_NAME
| |PORT
|CLUSTER_NAME
| | |HOSTNAME_AND_PORT
| | | |REPLICA_SET_NAME
| | |All other types of alerts do not support matchers.
- operator string
- value string
- Value to test with the specified operator. If
field_name
is set to TYPE_NAME, you can match on the following values:PRIMARY
SECONDARY
STANDALONE
CONFIG
MONGOS
- field_
name str Name of the field in the target object to match on.
| Host alerts | Replica set alerts | Sharded cluster alerts | |:---------- |:------------- |:------ | |
TYPE_NAME
|REPLICA_SET_NAME
|CLUSTER_NAME
| |HOSTNAME
|SHARD_NAME
|SHARD_NAME
| |PORT
|CLUSTER_NAME
| | |HOSTNAME_AND_PORT
| | | |REPLICA_SET_NAME
| | |All other types of alerts do not support matchers.
- operator str
- value str
- Value to test with the specified operator. If
field_name
is set to TYPE_NAME, you can match on the following values:PRIMARY
SECONDARY
STANDALONE
CONFIG
MONGOS
- field
Name String Name of the field in the target object to match on.
| Host alerts | Replica set alerts | Sharded cluster alerts | |:---------- |:------------- |:------ | |
TYPE_NAME
|REPLICA_SET_NAME
|CLUSTER_NAME
| |HOSTNAME
|SHARD_NAME
|SHARD_NAME
| |PORT
|CLUSTER_NAME
| | |HOSTNAME_AND_PORT
| | | |REPLICA_SET_NAME
| | |All other types of alerts do not support matchers.
- operator String
- value String
- Value to test with the specified operator. If
field_name
is set to TYPE_NAME, you can match on the following values:PRIMARY
SECONDARY
STANDALONE
CONFIG
MONGOS
AlertConfigurationMetricThresholdConfig, AlertConfigurationMetricThresholdConfigArgs
- Metric
Name string - Name of the metric to check. The full list being quite large, please refer to atlas docs here for general metrics and here for serverless metrics
- Mode string
- This must be set to AVERAGE. Atlas computes the current metric value as an average.
- Operator string
- Threshold double
- Units string
- Metric
Name string - Name of the metric to check. The full list being quite large, please refer to atlas docs here for general metrics and here for serverless metrics
- Mode string
- This must be set to AVERAGE. Atlas computes the current metric value as an average.
- Operator string
- Threshold float64
- Units string
- metric
Name String - Name of the metric to check. The full list being quite large, please refer to atlas docs here for general metrics and here for serverless metrics
- mode String
- This must be set to AVERAGE. Atlas computes the current metric value as an average.
- operator String
- threshold Double
- units String
- metric
Name string - Name of the metric to check. The full list being quite large, please refer to atlas docs here for general metrics and here for serverless metrics
- mode string
- This must be set to AVERAGE. Atlas computes the current metric value as an average.
- operator string
- threshold number
- units string
- metric_
name str - Name of the metric to check. The full list being quite large, please refer to atlas docs here for general metrics and here for serverless metrics
- mode str
- This must be set to AVERAGE. Atlas computes the current metric value as an average.
- operator str
- threshold float
- units str
- metric
Name String - Name of the metric to check. The full list being quite large, please refer to atlas docs here for general metrics and here for serverless metrics
- mode String
- This must be set to AVERAGE. Atlas computes the current metric value as an average.
- operator String
- threshold Number
- units String
AlertConfigurationNotification, AlertConfigurationNotificationArgs
- Type
Name string - Type of alert notification.
Accepted values are:
DATADOG
EMAIL
GROUP
(Project)OPS_GENIE
ORG
PAGER_DUTY
SLACK
SMS
TEAM
USER
VICTOR_OPS
WEBHOOK
MICROSOFT_TEAMS
- Api
Token string - Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.
- Channel
Name string - Slack channel name. Required for the SLACK notifications type.
- Datadog
Api stringKey - Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.
- Datadog
Region string - Region that indicates which API URL to use. See the
datadogRegion
field in thenotifications
request parameter of MongoDB API Alert Configuration documentation for more details. The default Datadog region is US. - Delay
Min int - Number of minutes to wait after an alert condition is detected before sending out the first notification.
- Email
Address string - Email address to which alert notifications are sent. Required for the EMAIL notifications type.
- Email
Enabled bool - Flag indicating email notifications should be sent. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - Integration
Id string - The ID of the associated integration, the credentials of which to use for requests.
- Interval
Min int - Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5. NOTE
PAGER_DUTY
,VICTOR_OPS
, andOPS_GENIE
notifications do not return this value. The notification interval must be configured and managed within each external service. - Microsoft
Teams stringWebhook Url - Microsoft Teams Webhook Uniform Resource Locator (URL) that MongoDB Cloud needs to send this notification via Microsoft Teams. Required if
type_name
isMICROSOFT_TEAMS
. If the URL later becomes invalid, MongoDB Cloud sends an email to the project owners. If the key remains invalid, MongoDB Cloud removes it. - Mobile
Number string - Mobile number to which alert notifications are sent. Required for the SMS notifications type.
- Notifier
Id string - The notifier ID is a system-generated unique identifier assigned to each notification method. This is needed when updating third-party notifications without requiring explicit authentication credentials.
- Ops
Genie stringApi Key - Opsgenie API Key. Required for the
OPS_GENIE
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. - Ops
Genie stringRegion - Region that indicates which API URL to use. Accepted regions are:
US
,EU
. The default Opsgenie region is US. - Roles List<string>
Optional. One or more roles that receive the configured alert. If you include this field, Atlas sends alerts only to users assigned the roles you specify in the array. If you omit this field, Atlas sends alerts to users assigned any role. This parameter is only valid if
type_name
is set toORG
,GROUP
, orUSER
. Accepted values are:| Project roles | Organization roles | |:---------- |:----------- | |
GROUP_CLUSTER_MANAGER
|ORG_OWNER
| |GROUP_DATA_ACCESS_ADMIN
|ORG_MEMBER
| |GROUP_DATA_ACCESS_READ_ONLY
|ORG_GROUP_CREATOR
| |GROUP_DATA_ACCESS_READ_WRITE
|ORG_BILLING_ADMIN
| |GROUP_OWNER
|ORG_READ_ONLY
| |GROUP_READ_ONLY
| |- Service
Key string - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
- Sms
Enabled bool - Flag indicating if text message notifications should be sent to this user's mobile phone. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - Team
Id string - Unique identifier of a team.
- Team
Name string - Label for the team that receives this notification.
- Username string
- Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the
USER
notifications type. - Victor
Ops stringApi Key - VictorOps API key. Required for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - Victor
Ops stringRouting Key - VictorOps routing key. Optional for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - Webhook
Secret string - Optional authentication secret for the
WEBHOOK
notifications type. - Webhook
Url string - Target URL for the
WEBHOOK
notifications type.
- Type
Name string - Type of alert notification.
Accepted values are:
DATADOG
EMAIL
GROUP
(Project)OPS_GENIE
ORG
PAGER_DUTY
SLACK
SMS
TEAM
USER
VICTOR_OPS
WEBHOOK
MICROSOFT_TEAMS
- Api
Token string - Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.
- Channel
Name string - Slack channel name. Required for the SLACK notifications type.
- Datadog
Api stringKey - Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.
- Datadog
Region string - Region that indicates which API URL to use. See the
datadogRegion
field in thenotifications
request parameter of MongoDB API Alert Configuration documentation for more details. The default Datadog region is US. - Delay
Min int - Number of minutes to wait after an alert condition is detected before sending out the first notification.
- Email
Address string - Email address to which alert notifications are sent. Required for the EMAIL notifications type.
- Email
Enabled bool - Flag indicating email notifications should be sent. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - Integration
Id string - The ID of the associated integration, the credentials of which to use for requests.
- Interval
Min int - Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5. NOTE
PAGER_DUTY
,VICTOR_OPS
, andOPS_GENIE
notifications do not return this value. The notification interval must be configured and managed within each external service. - Microsoft
Teams stringWebhook Url - Microsoft Teams Webhook Uniform Resource Locator (URL) that MongoDB Cloud needs to send this notification via Microsoft Teams. Required if
type_name
isMICROSOFT_TEAMS
. If the URL later becomes invalid, MongoDB Cloud sends an email to the project owners. If the key remains invalid, MongoDB Cloud removes it. - Mobile
Number string - Mobile number to which alert notifications are sent. Required for the SMS notifications type.
- Notifier
Id string - The notifier ID is a system-generated unique identifier assigned to each notification method. This is needed when updating third-party notifications without requiring explicit authentication credentials.
- Ops
Genie stringApi Key - Opsgenie API Key. Required for the
OPS_GENIE
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. - Ops
Genie stringRegion - Region that indicates which API URL to use. Accepted regions are:
US
,EU
. The default Opsgenie region is US. - Roles []string
Optional. One or more roles that receive the configured alert. If you include this field, Atlas sends alerts only to users assigned the roles you specify in the array. If you omit this field, Atlas sends alerts to users assigned any role. This parameter is only valid if
type_name
is set toORG
,GROUP
, orUSER
. Accepted values are:| Project roles | Organization roles | |:---------- |:----------- | |
GROUP_CLUSTER_MANAGER
|ORG_OWNER
| |GROUP_DATA_ACCESS_ADMIN
|ORG_MEMBER
| |GROUP_DATA_ACCESS_READ_ONLY
|ORG_GROUP_CREATOR
| |GROUP_DATA_ACCESS_READ_WRITE
|ORG_BILLING_ADMIN
| |GROUP_OWNER
|ORG_READ_ONLY
| |GROUP_READ_ONLY
| |- Service
Key string - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
- Sms
Enabled bool - Flag indicating if text message notifications should be sent to this user's mobile phone. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - Team
Id string - Unique identifier of a team.
- Team
Name string - Label for the team that receives this notification.
- Username string
- Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the
USER
notifications type. - Victor
Ops stringApi Key - VictorOps API key. Required for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - Victor
Ops stringRouting Key - VictorOps routing key. Optional for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - Webhook
Secret string - Optional authentication secret for the
WEBHOOK
notifications type. - Webhook
Url string - Target URL for the
WEBHOOK
notifications type.
- type
Name String - Type of alert notification.
Accepted values are:
DATADOG
EMAIL
GROUP
(Project)OPS_GENIE
ORG
PAGER_DUTY
SLACK
SMS
TEAM
USER
VICTOR_OPS
WEBHOOK
MICROSOFT_TEAMS
- api
Token String - Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.
- channel
Name String - Slack channel name. Required for the SLACK notifications type.
- datadog
Api StringKey - Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.
- datadog
Region String - Region that indicates which API URL to use. See the
datadogRegion
field in thenotifications
request parameter of MongoDB API Alert Configuration documentation for more details. The default Datadog region is US. - delay
Min Integer - Number of minutes to wait after an alert condition is detected before sending out the first notification.
- email
Address String - Email address to which alert notifications are sent. Required for the EMAIL notifications type.
- email
Enabled Boolean - Flag indicating email notifications should be sent. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - integration
Id String - The ID of the associated integration, the credentials of which to use for requests.
- interval
Min Integer - Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5. NOTE
PAGER_DUTY
,VICTOR_OPS
, andOPS_GENIE
notifications do not return this value. The notification interval must be configured and managed within each external service. - microsoft
Teams StringWebhook Url - Microsoft Teams Webhook Uniform Resource Locator (URL) that MongoDB Cloud needs to send this notification via Microsoft Teams. Required if
type_name
isMICROSOFT_TEAMS
. If the URL later becomes invalid, MongoDB Cloud sends an email to the project owners. If the key remains invalid, MongoDB Cloud removes it. - mobile
Number String - Mobile number to which alert notifications are sent. Required for the SMS notifications type.
- notifier
Id String - The notifier ID is a system-generated unique identifier assigned to each notification method. This is needed when updating third-party notifications without requiring explicit authentication credentials.
- ops
Genie StringApi Key - Opsgenie API Key. Required for the
OPS_GENIE
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. - ops
Genie StringRegion - Region that indicates which API URL to use. Accepted regions are:
US
,EU
. The default Opsgenie region is US. - roles List<String>
Optional. One or more roles that receive the configured alert. If you include this field, Atlas sends alerts only to users assigned the roles you specify in the array. If you omit this field, Atlas sends alerts to users assigned any role. This parameter is only valid if
type_name
is set toORG
,GROUP
, orUSER
. Accepted values are:| Project roles | Organization roles | |:---------- |:----------- | |
GROUP_CLUSTER_MANAGER
|ORG_OWNER
| |GROUP_DATA_ACCESS_ADMIN
|ORG_MEMBER
| |GROUP_DATA_ACCESS_READ_ONLY
|ORG_GROUP_CREATOR
| |GROUP_DATA_ACCESS_READ_WRITE
|ORG_BILLING_ADMIN
| |GROUP_OWNER
|ORG_READ_ONLY
| |GROUP_READ_ONLY
| |- service
Key String - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
- sms
Enabled Boolean - Flag indicating if text message notifications should be sent to this user's mobile phone. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - team
Id String - Unique identifier of a team.
- team
Name String - Label for the team that receives this notification.
- username String
- Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the
USER
notifications type. - victor
Ops StringApi Key - VictorOps API key. Required for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - victor
Ops StringRouting Key - VictorOps routing key. Optional for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - webhook
Secret String - Optional authentication secret for the
WEBHOOK
notifications type. - webhook
Url String - Target URL for the
WEBHOOK
notifications type.
- type
Name string - Type of alert notification.
Accepted values are:
DATADOG
EMAIL
GROUP
(Project)OPS_GENIE
ORG
PAGER_DUTY
SLACK
SMS
TEAM
USER
VICTOR_OPS
WEBHOOK
MICROSOFT_TEAMS
- api
Token string - Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.
- channel
Name string - Slack channel name. Required for the SLACK notifications type.
- datadog
Api stringKey - Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.
- datadog
Region string - Region that indicates which API URL to use. See the
datadogRegion
field in thenotifications
request parameter of MongoDB API Alert Configuration documentation for more details. The default Datadog region is US. - delay
Min number - Number of minutes to wait after an alert condition is detected before sending out the first notification.
- email
Address string - Email address to which alert notifications are sent. Required for the EMAIL notifications type.
- email
Enabled boolean - Flag indicating email notifications should be sent. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - integration
Id string - The ID of the associated integration, the credentials of which to use for requests.
- interval
Min number - Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5. NOTE
PAGER_DUTY
,VICTOR_OPS
, andOPS_GENIE
notifications do not return this value. The notification interval must be configured and managed within each external service. - microsoft
Teams stringWebhook Url - Microsoft Teams Webhook Uniform Resource Locator (URL) that MongoDB Cloud needs to send this notification via Microsoft Teams. Required if
type_name
isMICROSOFT_TEAMS
. If the URL later becomes invalid, MongoDB Cloud sends an email to the project owners. If the key remains invalid, MongoDB Cloud removes it. - mobile
Number string - Mobile number to which alert notifications are sent. Required for the SMS notifications type.
- notifier
Id string - The notifier ID is a system-generated unique identifier assigned to each notification method. This is needed when updating third-party notifications without requiring explicit authentication credentials.
- ops
Genie stringApi Key - Opsgenie API Key. Required for the
OPS_GENIE
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. - ops
Genie stringRegion - Region that indicates which API URL to use. Accepted regions are:
US
,EU
. The default Opsgenie region is US. - roles string[]
Optional. One or more roles that receive the configured alert. If you include this field, Atlas sends alerts only to users assigned the roles you specify in the array. If you omit this field, Atlas sends alerts to users assigned any role. This parameter is only valid if
type_name
is set toORG
,GROUP
, orUSER
. Accepted values are:| Project roles | Organization roles | |:---------- |:----------- | |
GROUP_CLUSTER_MANAGER
|ORG_OWNER
| |GROUP_DATA_ACCESS_ADMIN
|ORG_MEMBER
| |GROUP_DATA_ACCESS_READ_ONLY
|ORG_GROUP_CREATOR
| |GROUP_DATA_ACCESS_READ_WRITE
|ORG_BILLING_ADMIN
| |GROUP_OWNER
|ORG_READ_ONLY
| |GROUP_READ_ONLY
| |- service
Key string - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
- sms
Enabled boolean - Flag indicating if text message notifications should be sent to this user's mobile phone. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - team
Id string - Unique identifier of a team.
- team
Name string - Label for the team that receives this notification.
- username string
- Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the
USER
notifications type. - victor
Ops stringApi Key - VictorOps API key. Required for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - victor
Ops stringRouting Key - VictorOps routing key. Optional for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - webhook
Secret string - Optional authentication secret for the
WEBHOOK
notifications type. - webhook
Url string - Target URL for the
WEBHOOK
notifications type.
- type_
name str - Type of alert notification.
Accepted values are:
DATADOG
EMAIL
GROUP
(Project)OPS_GENIE
ORG
PAGER_DUTY
SLACK
SMS
TEAM
USER
VICTOR_OPS
WEBHOOK
MICROSOFT_TEAMS
- api_
token str - Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.
- channel_
name str - Slack channel name. Required for the SLACK notifications type.
- datadog_
api_ strkey - Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.
- datadog_
region str - Region that indicates which API URL to use. See the
datadogRegion
field in thenotifications
request parameter of MongoDB API Alert Configuration documentation for more details. The default Datadog region is US. - delay_
min int - Number of minutes to wait after an alert condition is detected before sending out the first notification.
- email_
address str - Email address to which alert notifications are sent. Required for the EMAIL notifications type.
- email_
enabled bool - Flag indicating email notifications should be sent. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - integration_
id str - The ID of the associated integration, the credentials of which to use for requests.
- interval_
min int - Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5. NOTE
PAGER_DUTY
,VICTOR_OPS
, andOPS_GENIE
notifications do not return this value. The notification interval must be configured and managed within each external service. - microsoft_
teams_ strwebhook_ url - Microsoft Teams Webhook Uniform Resource Locator (URL) that MongoDB Cloud needs to send this notification via Microsoft Teams. Required if
type_name
isMICROSOFT_TEAMS
. If the URL later becomes invalid, MongoDB Cloud sends an email to the project owners. If the key remains invalid, MongoDB Cloud removes it. - mobile_
number str - Mobile number to which alert notifications are sent. Required for the SMS notifications type.
- notifier_
id str - The notifier ID is a system-generated unique identifier assigned to each notification method. This is needed when updating third-party notifications without requiring explicit authentication credentials.
- ops_
genie_ strapi_ key - Opsgenie API Key. Required for the
OPS_GENIE
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. - ops_
genie_ strregion - Region that indicates which API URL to use. Accepted regions are:
US
,EU
. The default Opsgenie region is US. - roles Sequence[str]
Optional. One or more roles that receive the configured alert. If you include this field, Atlas sends alerts only to users assigned the roles you specify in the array. If you omit this field, Atlas sends alerts to users assigned any role. This parameter is only valid if
type_name
is set toORG
,GROUP
, orUSER
. Accepted values are:| Project roles | Organization roles | |:---------- |:----------- | |
GROUP_CLUSTER_MANAGER
|ORG_OWNER
| |GROUP_DATA_ACCESS_ADMIN
|ORG_MEMBER
| |GROUP_DATA_ACCESS_READ_ONLY
|ORG_GROUP_CREATOR
| |GROUP_DATA_ACCESS_READ_WRITE
|ORG_BILLING_ADMIN
| |GROUP_OWNER
|ORG_READ_ONLY
| |GROUP_READ_ONLY
| |- service_
key str - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
- sms_
enabled bool - Flag indicating if text message notifications should be sent to this user's mobile phone. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - team_
id str - Unique identifier of a team.
- team_
name str - Label for the team that receives this notification.
- username str
- Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the
USER
notifications type. - victor_
ops_ strapi_ key - VictorOps API key. Required for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - victor_
ops_ strrouting_ key - VictorOps routing key. Optional for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - webhook_
secret str - Optional authentication secret for the
WEBHOOK
notifications type. - webhook_
url str - Target URL for the
WEBHOOK
notifications type.
- type
Name String - Type of alert notification.
Accepted values are:
DATADOG
EMAIL
GROUP
(Project)OPS_GENIE
ORG
PAGER_DUTY
SLACK
SMS
TEAM
USER
VICTOR_OPS
WEBHOOK
MICROSOFT_TEAMS
- api
Token String - Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.
- channel
Name String - Slack channel name. Required for the SLACK notifications type.
- datadog
Api StringKey - Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.
- datadog
Region String - Region that indicates which API URL to use. See the
datadogRegion
field in thenotifications
request parameter of MongoDB API Alert Configuration documentation for more details. The default Datadog region is US. - delay
Min Number - Number of minutes to wait after an alert condition is detected before sending out the first notification.
- email
Address String - Email address to which alert notifications are sent. Required for the EMAIL notifications type.
- email
Enabled Boolean - Flag indicating email notifications should be sent. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - integration
Id String - The ID of the associated integration, the credentials of which to use for requests.
- interval
Min Number - Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5. NOTE
PAGER_DUTY
,VICTOR_OPS
, andOPS_GENIE
notifications do not return this value. The notification interval must be configured and managed within each external service. - microsoft
Teams StringWebhook Url - Microsoft Teams Webhook Uniform Resource Locator (URL) that MongoDB Cloud needs to send this notification via Microsoft Teams. Required if
type_name
isMICROSOFT_TEAMS
. If the URL later becomes invalid, MongoDB Cloud sends an email to the project owners. If the key remains invalid, MongoDB Cloud removes it. - mobile
Number String - Mobile number to which alert notifications are sent. Required for the SMS notifications type.
- notifier
Id String - The notifier ID is a system-generated unique identifier assigned to each notification method. This is needed when updating third-party notifications without requiring explicit authentication credentials.
- ops
Genie StringApi Key - Opsgenie API Key. Required for the
OPS_GENIE
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token. - ops
Genie StringRegion - Region that indicates which API URL to use. Accepted regions are:
US
,EU
. The default Opsgenie region is US. - roles List<String>
Optional. One or more roles that receive the configured alert. If you include this field, Atlas sends alerts only to users assigned the roles you specify in the array. If you omit this field, Atlas sends alerts to users assigned any role. This parameter is only valid if
type_name
is set toORG
,GROUP
, orUSER
. Accepted values are:| Project roles | Organization roles | |:---------- |:----------- | |
GROUP_CLUSTER_MANAGER
|ORG_OWNER
| |GROUP_DATA_ACCESS_ADMIN
|ORG_MEMBER
| |GROUP_DATA_ACCESS_READ_ONLY
|ORG_GROUP_CREATOR
| |GROUP_DATA_ACCESS_READ_WRITE
|ORG_BILLING_ADMIN
| |GROUP_OWNER
|ORG_READ_ONLY
| |GROUP_READ_ONLY
| |- service
Key String - PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.
- sms
Enabled Boolean - Flag indicating if text message notifications should be sent to this user's mobile phone. This flag is only valid if
type_name
is set toORG
,GROUP
, orUSER
. - team
Id String - Unique identifier of a team.
- team
Name String - Label for the team that receives this notification.
- username String
- Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the
USER
notifications type. - victor
Ops StringApi Key - VictorOps API key. Required for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - victor
Ops StringRouting Key - VictorOps routing key. Optional for the
VICTOR_OPS
notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key. - webhook
Secret String - Optional authentication secret for the
WEBHOOK
notifications type. - webhook
Url String - Target URL for the
WEBHOOK
notifications type.
AlertConfigurationThresholdConfig, AlertConfigurationThresholdConfigArgs
Import
Alert Configuration can be imported using the project_id-alert_configuration_id
, e.g.
$ pulumi import mongodbatlas:index/alertConfiguration:AlertConfiguration test 5d0f1f74cf09a29120e123cd-5d0f1f74cf09a29120e1fscg
NOTE: Third-party notifications will not contain their respective credentials as these are sensitive attributes. If you wish to perform updates on these notifications without providing the original credentials, the corresponding notifier_id
attribute must be provided instead.
For more information see: MongoDB Atlas API Reference.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlas
Terraform Provider.