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
groupId
in 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_THRESHOLD
HOST_RESTARTED
HOST_UPGRADED
HOST_NOW_SECONDARY
HOST_NOW_PRIMARY
- Replica set
NO_PRIMARY
TOO_MANY_ELECTIONS
- Sharded cluster
CLUSTER_MONGOS_IS_MISSING
User
JOINED_GROUP
REMOVED_FROM_GROUP
USER_ROLES_CHANGED_AUDIT
- Project
USERS_AWAITING_APPROVAL
USERS_WITHOUT_MULTI_FACTOR_AUTH
GROUP_CREATED
- Team
JOINED_TEAM
REMOVED_FROM_TEAM
- Organization
INVITED_TO_ORG
JOINED_ORG
- Data Explorer
DATA_EXPLORER
DATA_EXPLORER_CRUD
- Billing
CREDIT_CARD_ABOUT_TO_EXPIRE
CHARGE_SUCCEEDED
INVOICE_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 |