Class 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
groupIdin the official documentation.
Example Usage
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var test = new Mongodbatlas.AlertConfiguration("test", new Mongodbatlas.AlertConfigurationArgs
{
Enabled = true,
EventType = "OUTSIDE_METRIC_THRESHOLD",
Matchers =
{
new Mongodbatlas.Inputs.AlertConfigurationMatcherArgs
{
FieldName = "HOSTNAME_AND_PORT",
Operator = "EQUALS",
Value = "SECONDARY",
},
},
MetricThreshold = new Mongodbatlas.Inputs.AlertConfigurationMetricThresholdArgs
{
Metric_name = "ASSERT_REGULAR",
Mode = "AVERAGE",
Operator = "LESS_THAN",
Threshold = 99,
Units = "RAW",
},
Notifications =
{
new Mongodbatlas.Inputs.AlertConfigurationNotificationArgs
{
DelayMin = 0,
EmailEnabled = true,
IntervalMin = 5,
Roles =
{
"GROUP_CHARTS_ADMIN",
"GROUP_CLUSTER_MANAGER",
},
SmsEnabled = false,
TypeName = "GROUP",
},
},
ProjectId = "<PROJECT-ID>",
});
}
}
Inherited Members
Namespace: Pulumi.Mongodbatlas
Assembly: Pulumi.Mongodbatlas.dll
Syntax
public class AlertConfiguration : CustomResource
Constructors
View SourceAlertConfiguration(String, AlertConfigurationArgs, CustomResourceOptions)
Create a AlertConfiguration resource with the given unique name, arguments, and options.
Declaration
public AlertConfiguration(string name, AlertConfigurationArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AlertConfigurationArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAlertConfigurationId
Unique identifier for the alert configuration.
Declaration
public Output<string> AlertConfigurationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Created
Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.
Declaration
public Output<string> Created { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
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.
Declaration
public Output<bool> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
EventType
The type of event that will trigger an alert. Alert type Possible values:
- Host
OUTSIDE_METRIC_THRESHOLDHOST_RESTARTEDHOST_UPGRADEDHOST_NOW_SECONDARYHOST_NOW_PRIMARY
- Replica set
NO_PRIMARYTOO_MANY_ELECTIONS
- Sharded cluster
CLUSTER_MONGOS_IS_MISSINGUserJOINED_GROUPREMOVED_FROM_GROUPUSER_ROLES_CHANGED_AUDIT
- Project
USERS_AWAITING_APPROVALUSERS_WITHOUT_MULTI_FACTOR_AUTHGROUP_CREATED
- Team
JOINED_TEAMREMOVED_FROM_TEAM
- Organization
INVITED_TO_ORGJOINED_ORG
- Data Explorer
DATA_EXPLORERDATA_EXPLORER_CRUD
- Billing
CREDIT_CARD_ABOUT_TO_EXPIRECHARGE_SUCCEEDEDINVOICE_CLOSED
Declaration
public Output<string> EventType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Matchers
Declaration
public Output<ImmutableArray<AlertConfigurationMatcher>> Matchers { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<AlertConfigurationMatcher>> |
MetricThreshold
Declaration
public Output<AlertConfigurationMetricThreshold> MetricThreshold { get; }
Property Value
| Type | Description |
|---|---|
| Output<AlertConfigurationMetricThreshold> |
Notifications
Declaration
public Output<ImmutableArray<AlertConfigurationNotification>> Notifications { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<AlertConfigurationNotification>> |
ProjectId
The ID of the project where the alert configuration will create.
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Updated
Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.
Declaration
public Output<string> Updated { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AlertConfigurationState, CustomResourceOptions)
Get an existing AlertConfiguration resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AlertConfiguration Get(string name, Input<string> id, AlertConfigurationState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AlertConfigurationState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AlertConfiguration |