1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. EventTrigger
MongoDB Atlas v3.14.2 published on Monday, Mar 18, 2024 by Pulumi

mongodbatlas.EventTrigger

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.14.2 published on Monday, Mar 18, 2024 by Pulumi

    mongodbatlas.EventTrigger provides a Event Trigger resource.

    Note: If the app_id changes in the mongodbatlas.EventTrigger resource, it will force a replacement and delete itself from the old Atlas App Services app if it still exists then create itself in the new Atlas App Services app. See Atlas Triggers to learn more.

    Example Usage

    S

    Example Usage: Database Trigger with Function

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.EventTrigger("test", {
        projectId: "PROJECT ID",
        appId: "APPLICATION ID",
        type: "DATABASE",
        functionId: "FUNCTION ID",
        disabled: false,
        configOperationTypes: [
            "INSERT",
            "UPDATE",
        ],
        configDatabase: "DATABASE NAME",
        configCollection: "COLLECTION NAME",
        configServiceId: "SERVICE ID",
        configMatch: `{
      "updateDescription.updatedFields": {
        "status": "blocked"
      }
    }
    `,
        configProject: "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        configFullDocument: false,
        configFullDocumentBefore: false,
        eventProcessors: {
            awsEventbridge: {
                configAccountId: "AWS ACCOUNT ID",
                configRegion: "AWS REGIOn",
            },
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.EventTrigger("test",
        project_id="PROJECT ID",
        app_id="APPLICATION ID",
        type="DATABASE",
        function_id="FUNCTION ID",
        disabled=False,
        config_operation_types=[
            "INSERT",
            "UPDATE",
        ],
        config_database="DATABASE NAME",
        config_collection="COLLECTION NAME",
        config_service_id="SERVICE ID",
        config_match="""{
      "updateDescription.updatedFields": {
        "status": "blocked"
      }
    }
    """,
        config_project="{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        config_full_document=False,
        config_full_document_before=False,
        event_processors=mongodbatlas.EventTriggerEventProcessorsArgs(
            aws_eventbridge=mongodbatlas.EventTriggerEventProcessorsAwsEventbridgeArgs(
                config_account_id="AWS ACCOUNT ID",
                config_region="AWS REGIOn",
            ),
        ))
    
    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.NewEventTrigger(ctx, "test", &mongodbatlas.EventTriggerArgs{
    			ProjectId:  pulumi.String("PROJECT ID"),
    			AppId:      pulumi.String("APPLICATION ID"),
    			Type:       pulumi.String("DATABASE"),
    			FunctionId: pulumi.String("FUNCTION ID"),
    			Disabled:   pulumi.Bool(false),
    			ConfigOperationTypes: pulumi.StringArray{
    				pulumi.String("INSERT"),
    				pulumi.String("UPDATE"),
    			},
    			ConfigDatabase:   pulumi.String("DATABASE NAME"),
    			ConfigCollection: pulumi.String("COLLECTION NAME"),
    			ConfigServiceId:  pulumi.String("SERVICE ID"),
    			ConfigMatch: pulumi.String(`{
      "updateDescription.updatedFields": {
        "status": "blocked"
      }
    }
    `),
    			ConfigProject:            pulumi.String("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}"),
    			ConfigFullDocument:       pulumi.Bool(false),
    			ConfigFullDocumentBefore: pulumi.Bool(false),
    			EventProcessors: &mongodbatlas.EventTriggerEventProcessorsArgs{
    				AwsEventbridge: &mongodbatlas.EventTriggerEventProcessorsAwsEventbridgeArgs{
    					ConfigAccountId: pulumi.String("AWS ACCOUNT ID"),
    					ConfigRegion:    pulumi.String("AWS REGIOn"),
    				},
    			},
    		})
    		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.EventTrigger("test", new()
        {
            ProjectId = "PROJECT ID",
            AppId = "APPLICATION ID",
            Type = "DATABASE",
            FunctionId = "FUNCTION ID",
            Disabled = false,
            ConfigOperationTypes = new[]
            {
                "INSERT",
                "UPDATE",
            },
            ConfigDatabase = "DATABASE NAME",
            ConfigCollection = "COLLECTION NAME",
            ConfigServiceId = "SERVICE ID",
            ConfigMatch = @"{
      ""updateDescription.updatedFields"": {
        ""status"": ""blocked""
      }
    }
    ",
            ConfigProject = "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
            ConfigFullDocument = false,
            ConfigFullDocumentBefore = false,
            EventProcessors = new Mongodbatlas.Inputs.EventTriggerEventProcessorsArgs
            {
                AwsEventbridge = new Mongodbatlas.Inputs.EventTriggerEventProcessorsAwsEventbridgeArgs
                {
                    ConfigAccountId = "AWS ACCOUNT ID",
                    ConfigRegion = "AWS REGIOn",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.EventTrigger;
    import com.pulumi.mongodbatlas.EventTriggerArgs;
    import com.pulumi.mongodbatlas.inputs.EventTriggerEventProcessorsArgs;
    import com.pulumi.mongodbatlas.inputs.EventTriggerEventProcessorsAwsEventbridgeArgs;
    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 EventTrigger("test", EventTriggerArgs.builder()        
                .projectId("PROJECT ID")
                .appId("APPLICATION ID")
                .type("DATABASE")
                .functionId("FUNCTION ID")
                .disabled(false)
                .configOperationTypes(            
                    "INSERT",
                    "UPDATE")
                .configDatabase("DATABASE NAME")
                .configCollection("COLLECTION NAME")
                .configServiceId("SERVICE ID")
                .configMatch("""
    {
      "updateDescription.updatedFields": {
        "status": "blocked"
      }
    }
                """)
                .configProject("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}")
                .configFullDocument(false)
                .configFullDocumentBefore(false)
                .eventProcessors(EventTriggerEventProcessorsArgs.builder()
                    .awsEventbridge(EventTriggerEventProcessorsAwsEventbridgeArgs.builder()
                        .configAccountId("AWS ACCOUNT ID")
                        .configRegion("AWS REGIOn")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:EventTrigger
        properties:
          projectId: PROJECT ID
          appId: APPLICATION ID
          type: DATABASE
          functionId: FUNCTION ID
          disabled: false
          configOperationTypes:
            - INSERT
            - UPDATE
          configDatabase: DATABASE NAME
          configCollection: COLLECTION NAME
          configServiceId: SERVICE ID
          configMatch: |
            {
              "updateDescription.updatedFields": {
                "status": "blocked"
              }
            }        
          configProject: '{"updateDescription.updatedFields":{"status":"blocked"}}'
          configFullDocument: false
          configFullDocumentBefore: false
          eventProcessors:
            awsEventbridge:
              configAccountId: AWS ACCOUNT ID
              configRegion: AWS REGIOn
    

    Example Usage: Database Trigger with EventBridge

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.EventTrigger("test", {
        appId: "APPLICATION ID",
        configCollection: "COLLECTION NAME",
        configDatabase: "DATABASE NAME",
        configFullDocument: false,
        configFullDocumentBefore: false,
        configMatch: "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        configOperationType: "LOGIN",
        configOperationTypes: [
            "INSERT",
            "UPDATE",
        ],
        configProject: "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        configProviders: ["anon-user"],
        configSchedule: "*",
        configServiceId: "1",
        disabled: false,
        eventProcessors: {
            awsEventbridge: {
                configAccountId: "AWS ACCOUNT ID",
                configRegion: "AWS REGIOn",
            },
        },
        projectId: "PROJECT ID",
        type: "DATABASE",
        unordered: false,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.EventTrigger("test",
        app_id="APPLICATION ID",
        config_collection="COLLECTION NAME",
        config_database="DATABASE NAME",
        config_full_document=False,
        config_full_document_before=False,
        config_match="{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        config_operation_type="LOGIN",
        config_operation_types=[
            "INSERT",
            "UPDATE",
        ],
        config_project="{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        config_providers=["anon-user"],
        config_schedule="*",
        config_service_id="1",
        disabled=False,
        event_processors=mongodbatlas.EventTriggerEventProcessorsArgs(
            aws_eventbridge=mongodbatlas.EventTriggerEventProcessorsAwsEventbridgeArgs(
                config_account_id="AWS ACCOUNT ID",
                config_region="AWS REGIOn",
            ),
        ),
        project_id="PROJECT ID",
        type="DATABASE",
        unordered=False)
    
    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.NewEventTrigger(ctx, "test", &mongodbatlas.EventTriggerArgs{
    			AppId:                    pulumi.String("APPLICATION ID"),
    			ConfigCollection:         pulumi.String("COLLECTION NAME"),
    			ConfigDatabase:           pulumi.String("DATABASE NAME"),
    			ConfigFullDocument:       pulumi.Bool(false),
    			ConfigFullDocumentBefore: pulumi.Bool(false),
    			ConfigMatch:              pulumi.String("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}"),
    			ConfigOperationType:      pulumi.String("LOGIN"),
    			ConfigOperationTypes: pulumi.StringArray{
    				pulumi.String("INSERT"),
    				pulumi.String("UPDATE"),
    			},
    			ConfigProject: pulumi.String("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}"),
    			ConfigProviders: pulumi.StringArray{
    				pulumi.String("anon-user"),
    			},
    			ConfigSchedule:  pulumi.String("*"),
    			ConfigServiceId: pulumi.String("1"),
    			Disabled:        pulumi.Bool(false),
    			EventProcessors: &mongodbatlas.EventTriggerEventProcessorsArgs{
    				AwsEventbridge: &mongodbatlas.EventTriggerEventProcessorsAwsEventbridgeArgs{
    					ConfigAccountId: pulumi.String("AWS ACCOUNT ID"),
    					ConfigRegion:    pulumi.String("AWS REGIOn"),
    				},
    			},
    			ProjectId: pulumi.String("PROJECT ID"),
    			Type:      pulumi.String("DATABASE"),
    			Unordered: pulumi.Bool(false),
    		})
    		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.EventTrigger("test", new()
        {
            AppId = "APPLICATION ID",
            ConfigCollection = "COLLECTION NAME",
            ConfigDatabase = "DATABASE NAME",
            ConfigFullDocument = false,
            ConfigFullDocumentBefore = false,
            ConfigMatch = "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
            ConfigOperationType = "LOGIN",
            ConfigOperationTypes = new[]
            {
                "INSERT",
                "UPDATE",
            },
            ConfigProject = "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
            ConfigProviders = new[]
            {
                "anon-user",
            },
            ConfigSchedule = "*",
            ConfigServiceId = "1",
            Disabled = false,
            EventProcessors = new Mongodbatlas.Inputs.EventTriggerEventProcessorsArgs
            {
                AwsEventbridge = new Mongodbatlas.Inputs.EventTriggerEventProcessorsAwsEventbridgeArgs
                {
                    ConfigAccountId = "AWS ACCOUNT ID",
                    ConfigRegion = "AWS REGIOn",
                },
            },
            ProjectId = "PROJECT ID",
            Type = "DATABASE",
            Unordered = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.EventTrigger;
    import com.pulumi.mongodbatlas.EventTriggerArgs;
    import com.pulumi.mongodbatlas.inputs.EventTriggerEventProcessorsArgs;
    import com.pulumi.mongodbatlas.inputs.EventTriggerEventProcessorsAwsEventbridgeArgs;
    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 EventTrigger("test", EventTriggerArgs.builder()        
                .appId("APPLICATION ID")
                .configCollection("COLLECTION NAME")
                .configDatabase("DATABASE NAME")
                .configFullDocument(false)
                .configFullDocumentBefore(false)
                .configMatch("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}")
                .configOperationType("LOGIN")
                .configOperationTypes(            
                    "INSERT",
                    "UPDATE")
                .configProject("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}")
                .configProviders("anon-user")
                .configSchedule("*")
                .configServiceId("1")
                .disabled(false)
                .eventProcessors(EventTriggerEventProcessorsArgs.builder()
                    .awsEventbridge(EventTriggerEventProcessorsAwsEventbridgeArgs.builder()
                        .configAccountId("AWS ACCOUNT ID")
                        .configRegion("AWS REGIOn")
                        .build())
                    .build())
                .projectId("PROJECT ID")
                .type("DATABASE")
                .unordered(false)
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:EventTrigger
        properties:
          appId: APPLICATION ID
          configCollection: COLLECTION NAME
          configDatabase: DATABASE NAME
          configFullDocument: false
          configFullDocumentBefore: false
          configMatch: '{"updateDescription.updatedFields":{"status":"blocked"}}'
          configOperationType: LOGIN
          configOperationTypes:
            - INSERT
            - UPDATE
          configProject: '{"updateDescription.updatedFields":{"status":"blocked"}}'
          configProviders:
            - anon-user
          configSchedule: '*'
          configServiceId: '1'
          disabled: false
          eventProcessors:
            awsEventbridge:
              configAccountId: AWS ACCOUNT ID
              configRegion: AWS REGIOn
          projectId: PROJECT ID
          type: DATABASE
          unordered: false
    

    Example Usage: Authentication Trigger

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.EventTrigger("test", {
        appId: "APPLICATION ID",
        configOperationType: "LOGIN",
        configProviders: ["anon-user"],
        disabled: false,
        functionId: "1",
        projectId: "PROJECT ID",
        type: "AUTHENTICATION",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.EventTrigger("test",
        app_id="APPLICATION ID",
        config_operation_type="LOGIN",
        config_providers=["anon-user"],
        disabled=False,
        function_id="1",
        project_id="PROJECT ID",
        type="AUTHENTICATION")
    
    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.NewEventTrigger(ctx, "test", &mongodbatlas.EventTriggerArgs{
    			AppId:               pulumi.String("APPLICATION ID"),
    			ConfigOperationType: pulumi.String("LOGIN"),
    			ConfigProviders: pulumi.StringArray{
    				pulumi.String("anon-user"),
    			},
    			Disabled:   pulumi.Bool(false),
    			FunctionId: pulumi.String("1"),
    			ProjectId:  pulumi.String("PROJECT ID"),
    			Type:       pulumi.String("AUTHENTICATION"),
    		})
    		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.EventTrigger("test", new()
        {
            AppId = "APPLICATION ID",
            ConfigOperationType = "LOGIN",
            ConfigProviders = new[]
            {
                "anon-user",
            },
            Disabled = false,
            FunctionId = "1",
            ProjectId = "PROJECT ID",
            Type = "AUTHENTICATION",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.EventTrigger;
    import com.pulumi.mongodbatlas.EventTriggerArgs;
    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 EventTrigger("test", EventTriggerArgs.builder()        
                .appId("APPLICATION ID")
                .configOperationType("LOGIN")
                .configProviders("anon-user")
                .disabled(false)
                .functionId("1")
                .projectId("PROJECT ID")
                .type("AUTHENTICATION")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:EventTrigger
        properties:
          appId: APPLICATION ID
          configOperationType: LOGIN
          configProviders:
            - anon-user
          disabled: false
          functionId: '1'
          projectId: PROJECT ID
          type: AUTHENTICATION
    

    Example Usage: Scheduled Trigger

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.EventTrigger("test", {
        appId: "APPLICATION ID",
        configSchedule: "*",
        disabled: false,
        functionId: "1",
        projectId: "PROJECT ID",
        type: "SCHEDULED",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.EventTrigger("test",
        app_id="APPLICATION ID",
        config_schedule="*",
        disabled=False,
        function_id="1",
        project_id="PROJECT ID",
        type="SCHEDULED")
    
    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.NewEventTrigger(ctx, "test", &mongodbatlas.EventTriggerArgs{
    			AppId:          pulumi.String("APPLICATION ID"),
    			ConfigSchedule: pulumi.String("*"),
    			Disabled:       pulumi.Bool(false),
    			FunctionId:     pulumi.String("1"),
    			ProjectId:      pulumi.String("PROJECT ID"),
    			Type:           pulumi.String("SCHEDULED"),
    		})
    		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.EventTrigger("test", new()
        {
            AppId = "APPLICATION ID",
            ConfigSchedule = "*",
            Disabled = false,
            FunctionId = "1",
            ProjectId = "PROJECT ID",
            Type = "SCHEDULED",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.EventTrigger;
    import com.pulumi.mongodbatlas.EventTriggerArgs;
    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 EventTrigger("test", EventTriggerArgs.builder()        
                .appId("APPLICATION ID")
                .configSchedule("*")
                .disabled(false)
                .functionId("1")
                .projectId("PROJECT ID")
                .type("SCHEDULED")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:EventTrigger
        properties:
          appId: APPLICATION ID
          configSchedule: '*'
          disabled: false
          functionId: '1'
          projectId: PROJECT ID
          type: SCHEDULED
    

    Create EventTrigger Resource

    new EventTrigger(name: string, args: EventTriggerArgs, opts?: CustomResourceOptions);
    @overload
    def EventTrigger(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     app_id: Optional[str] = None,
                     config_collection: Optional[str] = None,
                     config_database: Optional[str] = None,
                     config_full_document: Optional[bool] = None,
                     config_full_document_before: Optional[bool] = None,
                     config_match: Optional[str] = None,
                     config_operation_type: Optional[str] = None,
                     config_operation_types: Optional[Sequence[str]] = None,
                     config_project: Optional[str] = None,
                     config_providers: Optional[Sequence[str]] = None,
                     config_schedule: Optional[str] = None,
                     config_service_id: Optional[str] = None,
                     disabled: Optional[bool] = None,
                     event_processors: Optional[EventTriggerEventProcessorsArgs] = None,
                     function_id: Optional[str] = None,
                     name: Optional[str] = None,
                     project_id: Optional[str] = None,
                     type: Optional[str] = None,
                     unordered: Optional[bool] = None)
    @overload
    def EventTrigger(resource_name: str,
                     args: EventTriggerArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewEventTrigger(ctx *Context, name string, args EventTriggerArgs, opts ...ResourceOption) (*EventTrigger, error)
    public EventTrigger(string name, EventTriggerArgs args, CustomResourceOptions? opts = null)
    public EventTrigger(String name, EventTriggerArgs args)
    public EventTrigger(String name, EventTriggerArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:EventTrigger
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args EventTriggerArgs
    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 EventTriggerArgs
    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 EventTriggerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EventTriggerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EventTriggerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    EventTrigger Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EventTrigger resource accepts the following input properties:

    AppId string
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    ProjectId string
    The unique ID for the project to create the trigger.
    Type string
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    ConfigCollection string
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    ConfigDatabase string
    Required for DATABASE type. The name of the MongoDB database to watch.
    ConfigFullDocument bool
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    ConfigFullDocumentBefore bool
    ConfigMatch string
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    ConfigOperationType string
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    ConfigOperationTypes List<string>
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    ConfigProject string
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    ConfigProviders List<string>
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    ConfigSchedule string
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    ConfigServiceId string
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    Disabled bool
    Default: false If true, the trigger is disabled.
    EventProcessors EventTriggerEventProcessors
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    FunctionId string
    The ID of the function associated with the trigger.
    Name string
    The name of the trigger.
    Unordered bool
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    AppId string
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    ProjectId string
    The unique ID for the project to create the trigger.
    Type string
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    ConfigCollection string
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    ConfigDatabase string
    Required for DATABASE type. The name of the MongoDB database to watch.
    ConfigFullDocument bool
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    ConfigFullDocumentBefore bool
    ConfigMatch string
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    ConfigOperationType string
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    ConfigOperationTypes []string
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    ConfigProject string
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    ConfigProviders []string
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    ConfigSchedule string
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    ConfigServiceId string
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    Disabled bool
    Default: false If true, the trigger is disabled.
    EventProcessors EventTriggerEventProcessorsArgs
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    FunctionId string
    The ID of the function associated with the trigger.
    Name string
    The name of the trigger.
    Unordered bool
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    appId String
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    projectId String
    The unique ID for the project to create the trigger.
    type String
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    configCollection String
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    configDatabase String
    Required for DATABASE type. The name of the MongoDB database to watch.
    configFullDocument Boolean
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    configFullDocumentBefore Boolean
    configMatch String
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    configOperationType String
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    configOperationTypes List<String>
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    configProject String
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    configProviders List<String>
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    configSchedule String
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    configServiceId String
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled Boolean
    Default: false If true, the trigger is disabled.
    eventProcessors EventTriggerEventProcessors
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    functionId String
    The ID of the function associated with the trigger.
    name String
    The name of the trigger.
    unordered Boolean
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    appId string
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    projectId string
    The unique ID for the project to create the trigger.
    type string
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    configCollection string
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    configDatabase string
    Required for DATABASE type. The name of the MongoDB database to watch.
    configFullDocument boolean
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    configFullDocumentBefore boolean
    configMatch string
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    configOperationType string
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    configOperationTypes string[]
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    configProject string
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    configProviders string[]
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    configSchedule string
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    configServiceId string
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled boolean
    Default: false If true, the trigger is disabled.
    eventProcessors EventTriggerEventProcessors
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    functionId string
    The ID of the function associated with the trigger.
    name string
    The name of the trigger.
    unordered boolean
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    app_id str
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    project_id str
    The unique ID for the project to create the trigger.
    type str
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    config_collection str
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    config_database str
    Required for DATABASE type. The name of the MongoDB database to watch.
    config_full_document bool
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    config_full_document_before bool
    config_match str
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    config_operation_type str
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    config_operation_types Sequence[str]
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    config_project str
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    config_providers Sequence[str]
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    config_schedule str
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    config_service_id str
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled bool
    Default: false If true, the trigger is disabled.
    event_processors EventTriggerEventProcessorsArgs
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    function_id str
    The ID of the function associated with the trigger.
    name str
    The name of the trigger.
    unordered bool
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    appId String
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    projectId String
    The unique ID for the project to create the trigger.
    type String
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    configCollection String
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    configDatabase String
    Required for DATABASE type. The name of the MongoDB database to watch.
    configFullDocument Boolean
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    configFullDocumentBefore Boolean
    configMatch String
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    configOperationType String
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    configOperationTypes List<String>
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    configProject String
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    configProviders List<String>
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    configSchedule String
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    configServiceId String
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled Boolean
    Default: false If true, the trigger is disabled.
    eventProcessors Property Map
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    functionId String
    The ID of the function associated with the trigger.
    name String
    The name of the trigger.
    unordered Boolean
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EventTrigger resource produces the following output properties:

    ConfigScheduleType string
    FunctionName string
    The name of the function associated with the trigger.
    Id string
    The provider-assigned unique ID for this managed resource.
    TriggerId string
    The unique ID of the trigger.
    ConfigScheduleType string
    FunctionName string
    The name of the function associated with the trigger.
    Id string
    The provider-assigned unique ID for this managed resource.
    TriggerId string
    The unique ID of the trigger.
    configScheduleType String
    functionName String
    The name of the function associated with the trigger.
    id String
    The provider-assigned unique ID for this managed resource.
    triggerId String
    The unique ID of the trigger.
    configScheduleType string
    functionName string
    The name of the function associated with the trigger.
    id string
    The provider-assigned unique ID for this managed resource.
    triggerId string
    The unique ID of the trigger.
    config_schedule_type str
    function_name str
    The name of the function associated with the trigger.
    id str
    The provider-assigned unique ID for this managed resource.
    trigger_id str
    The unique ID of the trigger.
    configScheduleType String
    functionName String
    The name of the function associated with the trigger.
    id String
    The provider-assigned unique ID for this managed resource.
    triggerId String
    The unique ID of the trigger.

    Look up Existing EventTrigger Resource

    Get an existing EventTrigger 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?: EventTriggerState, opts?: CustomResourceOptions): EventTrigger
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            config_collection: Optional[str] = None,
            config_database: Optional[str] = None,
            config_full_document: Optional[bool] = None,
            config_full_document_before: Optional[bool] = None,
            config_match: Optional[str] = None,
            config_operation_type: Optional[str] = None,
            config_operation_types: Optional[Sequence[str]] = None,
            config_project: Optional[str] = None,
            config_providers: Optional[Sequence[str]] = None,
            config_schedule: Optional[str] = None,
            config_schedule_type: Optional[str] = None,
            config_service_id: Optional[str] = None,
            disabled: Optional[bool] = None,
            event_processors: Optional[EventTriggerEventProcessorsArgs] = None,
            function_id: Optional[str] = None,
            function_name: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            trigger_id: Optional[str] = None,
            type: Optional[str] = None,
            unordered: Optional[bool] = None) -> EventTrigger
    func GetEventTrigger(ctx *Context, name string, id IDInput, state *EventTriggerState, opts ...ResourceOption) (*EventTrigger, error)
    public static EventTrigger Get(string name, Input<string> id, EventTriggerState? state, CustomResourceOptions? opts = null)
    public static EventTrigger get(String name, Output<String> id, EventTriggerState 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.
    The following state arguments are supported:
    AppId string
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    ConfigCollection string
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    ConfigDatabase string
    Required for DATABASE type. The name of the MongoDB database to watch.
    ConfigFullDocument bool
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    ConfigFullDocumentBefore bool
    ConfigMatch string
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    ConfigOperationType string
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    ConfigOperationTypes List<string>
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    ConfigProject string
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    ConfigProviders List<string>
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    ConfigSchedule string
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    ConfigScheduleType string
    ConfigServiceId string
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    Disabled bool
    Default: false If true, the trigger is disabled.
    EventProcessors EventTriggerEventProcessors
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    FunctionId string
    The ID of the function associated with the trigger.
    FunctionName string
    The name of the function associated with the trigger.
    Name string
    The name of the trigger.
    ProjectId string
    The unique ID for the project to create the trigger.
    TriggerId string
    The unique ID of the trigger.
    Type string
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    Unordered bool
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    AppId string
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    ConfigCollection string
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    ConfigDatabase string
    Required for DATABASE type. The name of the MongoDB database to watch.
    ConfigFullDocument bool
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    ConfigFullDocumentBefore bool
    ConfigMatch string
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    ConfigOperationType string
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    ConfigOperationTypes []string
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    ConfigProject string
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    ConfigProviders []string
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    ConfigSchedule string
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    ConfigScheduleType string
    ConfigServiceId string
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    Disabled bool
    Default: false If true, the trigger is disabled.
    EventProcessors EventTriggerEventProcessorsArgs
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    FunctionId string
    The ID of the function associated with the trigger.
    FunctionName string
    The name of the function associated with the trigger.
    Name string
    The name of the trigger.
    ProjectId string
    The unique ID for the project to create the trigger.
    TriggerId string
    The unique ID of the trigger.
    Type string
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    Unordered bool
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    appId String
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    configCollection String
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    configDatabase String
    Required for DATABASE type. The name of the MongoDB database to watch.
    configFullDocument Boolean
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    configFullDocumentBefore Boolean
    configMatch String
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    configOperationType String
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    configOperationTypes List<String>
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    configProject String
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    configProviders List<String>
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    configSchedule String
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    configScheduleType String
    configServiceId String
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled Boolean
    Default: false If true, the trigger is disabled.
    eventProcessors EventTriggerEventProcessors
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    functionId String
    The ID of the function associated with the trigger.
    functionName String
    The name of the function associated with the trigger.
    name String
    The name of the trigger.
    projectId String
    The unique ID for the project to create the trigger.
    triggerId String
    The unique ID of the trigger.
    type String
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    unordered Boolean
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    appId string
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    configCollection string
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    configDatabase string
    Required for DATABASE type. The name of the MongoDB database to watch.
    configFullDocument boolean
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    configFullDocumentBefore boolean
    configMatch string
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    configOperationType string
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    configOperationTypes string[]
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    configProject string
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    configProviders string[]
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    configSchedule string
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    configScheduleType string
    configServiceId string
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled boolean
    Default: false If true, the trigger is disabled.
    eventProcessors EventTriggerEventProcessors
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    functionId string
    The ID of the function associated with the trigger.
    functionName string
    The name of the function associated with the trigger.
    name string
    The name of the trigger.
    projectId string
    The unique ID for the project to create the trigger.
    triggerId string
    The unique ID of the trigger.
    type string
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    unordered boolean
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    app_id str
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    config_collection str
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    config_database str
    Required for DATABASE type. The name of the MongoDB database to watch.
    config_full_document bool
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    config_full_document_before bool
    config_match str
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    config_operation_type str
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    config_operation_types Sequence[str]
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    config_project str
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    config_providers Sequence[str]
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    config_schedule str
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    config_schedule_type str
    config_service_id str
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled bool
    Default: false If true, the trigger is disabled.
    event_processors EventTriggerEventProcessorsArgs
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    function_id str
    The ID of the function associated with the trigger.
    function_name str
    The name of the function associated with the trigger.
    name str
    The name of the trigger.
    project_id str
    The unique ID for the project to create the trigger.
    trigger_id str
    The unique ID of the trigger.
    type str
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    unordered bool
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.
    appId String
    The ObjectID of your application.

    • For more details on project_id and app_id see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
    configCollection String
    Optional for DATABASE type. The name of the MongoDB collection that the trigger watches for change events. The collection must be part of the specified database.
    configDatabase String
    Required for DATABASE type. The name of the MongoDB database to watch.
    configFullDocument Boolean
    Optional for DATABASE type. If true, indicates that UPDATE change events should include the most current majority-committed version of the modified document in the fullDocument field.
    configFullDocumentBefore Boolean
    configMatch String
    Optional for DATABASE type. A $match expression document that MongoDB Realm includes in the underlying change stream pipeline for the trigger. This is useful when you want to filter change events beyond their operation type. The trigger will only fire if the expression evaluates to true for a given change event.
    configOperationType String
    Required for AUTHENTICATION type. The authentication operation type to listen for. Possible Values: LOGIN, CREATE, DELETE
    configOperationTypes List<String>
    Required for DATABASE type. The database event operation types to listen for. This must contain at least one value. Possible Values: INSERT, UPDATE, REPLACE, DELETE
    configProject String
    Optional for DATABASE type. A $project expression document that Realm uses to filter the fields that appear in change event objects.
    configProviders List<String>
    Required for AUTHENTICATION type. A list of one or more authentication provider id values. The trigger will only listen for authentication events produced by these providers.
    configSchedule String
    Required for SCHEDULED type. A cron expression that defines the trigger schedule.
    configScheduleType String
    configServiceId String
    Required for DATABASE type. The ID of the MongoDB Service associated with the trigger.
    disabled Boolean
    Default: false If true, the trigger is disabled.
    eventProcessors Property Map
    An object where each field name is an event processor ID and each value is an object that configures its corresponding event processor. The following event processors are supported: AWS_EVENTBRIDGE For an example configuration object, see Send Trigger Events to AWS EventBridge.

    • event_processors.0.aws_eventbridge.config_account_id - (Optional) AWS Account ID.
    • event_processors.0.aws_eventbridge.config_region - (Optional) Region of AWS Account.
    functionId String
    The ID of the function associated with the trigger.
    functionName String
    The name of the function associated with the trigger.
    name String
    The name of the trigger.
    projectId String
    The unique ID for the project to create the trigger.
    triggerId String
    The unique ID of the trigger.
    type String
    The type of the trigger. Possible Values: DATABASE, AUTHENTICATION,SCHEDULED
    unordered Boolean
    Only Available for Database Triggers. If true, event ordering is disabled and this trigger can process events in parallel. If false, event ordering is enabled and the trigger executes serially.

    Supporting Types

    EventTriggerEventProcessors, EventTriggerEventProcessorsArgs

    EventTriggerEventProcessorsAwsEventbridge, EventTriggerEventProcessorsAwsEventbridgeArgs

    Import

    Event trigger can be imported using project ID, App ID and Trigger ID, in the format project_idapp_id-trigger_id, e.g.

    $ pulumi import mongodbatlas:index/eventTrigger:EventTrigger test 1112222b3bf99403840e8934--testing-example--1112222b3bf99403840e8934
    

    For more details on this resource see Triggers resource in Atlas App Services Documentation.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.14.2 published on Monday, Mar 18, 2024 by Pulumi