1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. EventTrigger
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

mongodbatlas.EventTrigger

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi

    # Resource: mongodbatlas.EventTrigger

    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",
        name: "NAME OF THE TRIGGER",
        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",
        name="NAME OF THE TRIGGER",
        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={
            "aws_eventbridge": {
                "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"),
    			Name:       pulumi.String("NAME OF THE TRIGGER"),
    			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",
            Name = "NAME OF THE TRIGGER",
            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")
                .name("NAME OF THE TRIGGER")
                .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
          name: NAME OF THE TRIGGER
          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", {
        projectId: "PROJECT ID",
        appId: "APPLICATION ID",
        name: "NAME OF THE TRIGGER",
        type: "DATABASE",
        disabled: false,
        unordered: false,
        configOperationTypes: [
            "INSERT",
            "UPDATE",
        ],
        configOperationType: "LOGIN",
        configProviders: ["anon-user"],
        configDatabase: "DATABASE NAME",
        configCollection: "COLLECTION NAME",
        configServiceId: "1",
        configMatch: "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        configProject: "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        configFullDocument: false,
        configFullDocumentBefore: false,
        configSchedule: "*",
        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",
        name="NAME OF THE TRIGGER",
        type="DATABASE",
        disabled=False,
        unordered=False,
        config_operation_types=[
            "INSERT",
            "UPDATE",
        ],
        config_operation_type="LOGIN",
        config_providers=["anon-user"],
        config_database="DATABASE NAME",
        config_collection="COLLECTION NAME",
        config_service_id="1",
        config_match="{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        config_project="{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
        config_full_document=False,
        config_full_document_before=False,
        config_schedule="*",
        event_processors={
            "aws_eventbridge": {
                "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"),
    			Name:      pulumi.String("NAME OF THE TRIGGER"),
    			Type:      pulumi.String("DATABASE"),
    			Disabled:  pulumi.Bool(false),
    			Unordered: pulumi.Bool(false),
    			ConfigOperationTypes: pulumi.StringArray{
    				pulumi.String("INSERT"),
    				pulumi.String("UPDATE"),
    			},
    			ConfigOperationType: pulumi.String("LOGIN"),
    			ConfigProviders: pulumi.StringArray{
    				pulumi.String("anon-user"),
    			},
    			ConfigDatabase:           pulumi.String("DATABASE NAME"),
    			ConfigCollection:         pulumi.String("COLLECTION NAME"),
    			ConfigServiceId:          pulumi.String("1"),
    			ConfigMatch:              pulumi.String("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}"),
    			ConfigProject:            pulumi.String("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}"),
    			ConfigFullDocument:       pulumi.Bool(false),
    			ConfigFullDocumentBefore: pulumi.Bool(false),
    			ConfigSchedule:           pulumi.String("*"),
    			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",
            Name = "NAME OF THE TRIGGER",
            Type = "DATABASE",
            Disabled = false,
            Unordered = false,
            ConfigOperationTypes = new[]
            {
                "INSERT",
                "UPDATE",
            },
            ConfigOperationType = "LOGIN",
            ConfigProviders = new[]
            {
                "anon-user",
            },
            ConfigDatabase = "DATABASE NAME",
            ConfigCollection = "COLLECTION NAME",
            ConfigServiceId = "1",
            ConfigMatch = "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
            ConfigProject = "{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}",
            ConfigFullDocument = false,
            ConfigFullDocumentBefore = false,
            ConfigSchedule = "*",
            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")
                .name("NAME OF THE TRIGGER")
                .type("DATABASE")
                .disabled(false)
                .unordered(false)
                .configOperationTypes(            
                    "INSERT",
                    "UPDATE")
                .configOperationType("LOGIN")
                .configProviders("anon-user")
                .configDatabase("DATABASE NAME")
                .configCollection("COLLECTION NAME")
                .configServiceId("1")
                .configMatch("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}")
                .configProject("{\"updateDescription.updatedFields\":{\"status\":\"blocked\"}}")
                .configFullDocument(false)
                .configFullDocumentBefore(false)
                .configSchedule("*")
                .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
          name: NAME OF THE TRIGGER
          type: DATABASE
          disabled: false
          unordered: false
          configOperationTypes:
            - INSERT
            - UPDATE
          configOperationType: LOGIN
          configProviders:
            - anon-user
          configDatabase: DATABASE NAME
          configCollection: COLLECTION NAME
          configServiceId: '1'
          configMatch: '{"updateDescription.updatedFields":{"status":"blocked"}}'
          configProject: '{"updateDescription.updatedFields":{"status":"blocked"}}'
          configFullDocument: false
          configFullDocumentBefore: false
          configSchedule: '*'
          eventProcessors:
            awsEventbridge:
              configAccountId: AWS ACCOUNT ID
              configRegion: AWS REGIOn
    

    Example Usage: Authentication Trigger

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.EventTrigger("test", {
        projectId: "PROJECT ID",
        appId: "APPLICATION ID",
        name: "NAME OF THE TRIGGER",
        type: "AUTHENTICATION",
        functionId: "1",
        disabled: false,
        configOperationType: "LOGIN",
        configProviders: ["anon-user"],
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.EventTrigger("test",
        project_id="PROJECT ID",
        app_id="APPLICATION ID",
        name="NAME OF THE TRIGGER",
        type="AUTHENTICATION",
        function_id="1",
        disabled=False,
        config_operation_type="LOGIN",
        config_providers=["anon-user"])
    
    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"),
    			Name:                pulumi.String("NAME OF THE TRIGGER"),
    			Type:                pulumi.String("AUTHENTICATION"),
    			FunctionId:          pulumi.String("1"),
    			Disabled:            pulumi.Bool(false),
    			ConfigOperationType: pulumi.String("LOGIN"),
    			ConfigProviders: pulumi.StringArray{
    				pulumi.String("anon-user"),
    			},
    		})
    		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",
            Name = "NAME OF THE TRIGGER",
            Type = "AUTHENTICATION",
            FunctionId = "1",
            Disabled = false,
            ConfigOperationType = "LOGIN",
            ConfigProviders = new[]
            {
                "anon-user",
            },
        });
    
    });
    
    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()
                .projectId("PROJECT ID")
                .appId("APPLICATION ID")
                .name("NAME OF THE TRIGGER")
                .type("AUTHENTICATION")
                .functionId("1")
                .disabled(false)
                .configOperationType("LOGIN")
                .configProviders("anon-user")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:EventTrigger
        properties:
          projectId: PROJECT ID
          appId: APPLICATION ID
          name: NAME OF THE TRIGGER
          type: AUTHENTICATION
          functionId: '1'
          disabled: false
          configOperationType: LOGIN
          configProviders:
            - anon-user
    

    Example Usage: Scheduled Trigger

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.EventTrigger("test", {
        projectId: "PROJECT ID",
        appId: "APPLICATION ID",
        name: "NAME OF THE TRIGGER",
        type: "SCHEDULED",
        functionId: "1",
        disabled: false,
        configSchedule: "*",
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.EventTrigger("test",
        project_id="PROJECT ID",
        app_id="APPLICATION ID",
        name="NAME OF THE TRIGGER",
        type="SCHEDULED",
        function_id="1",
        disabled=False,
        config_schedule="*")
    
    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"),
    			Name:           pulumi.String("NAME OF THE TRIGGER"),
    			Type:           pulumi.String("SCHEDULED"),
    			FunctionId:     pulumi.String("1"),
    			Disabled:       pulumi.Bool(false),
    			ConfigSchedule: pulumi.String("*"),
    		})
    		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",
            Name = "NAME OF THE TRIGGER",
            Type = "SCHEDULED",
            FunctionId = "1",
            Disabled = false,
            ConfigSchedule = "*",
        });
    
    });
    
    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()
                .projectId("PROJECT ID")
                .appId("APPLICATION ID")
                .name("NAME OF THE TRIGGER")
                .type("SCHEDULED")
                .functionId("1")
                .disabled(false)
                .configSchedule("*")
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:EventTrigger
        properties:
          projectId: PROJECT ID
          appId: APPLICATION ID
          name: NAME OF THE TRIGGER
          type: SCHEDULED
          functionId: '1'
          disabled: false
          configSchedule: '*'
    

    Create EventTrigger Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EventTrigger(name: string, args: EventTriggerArgs, opts?: CustomResourceOptions);
    @overload
    def EventTrigger(resource_name: str,
                     args: EventTriggerArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def EventTrigger(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     app_id: Optional[str] = None,
                     type: Optional[str] = None,
                     project_id: Optional[str] = None,
                     config_project: Optional[str] = None,
                     config_schedule: Optional[str] = None,
                     config_match: Optional[str] = None,
                     config_operation_type: Optional[str] = None,
                     config_operation_types: Optional[Sequence[str]] = None,
                     config_full_document: Optional[bool] = None,
                     config_providers: Optional[Sequence[str]] = None,
                     config_full_document_before: Optional[bool] = 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,
                     config_database: Optional[str] = None,
                     config_collection: Optional[str] = None,
                     unordered: Optional[bool] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var eventTriggerResource = new Mongodbatlas.EventTrigger("eventTriggerResource", new()
    {
        AppId = "string",
        Type = "string",
        ProjectId = "string",
        ConfigProject = "string",
        ConfigSchedule = "string",
        ConfigMatch = "string",
        ConfigOperationType = "string",
        ConfigOperationTypes = new[]
        {
            "string",
        },
        ConfigFullDocument = false,
        ConfigProviders = new[]
        {
            "string",
        },
        ConfigFullDocumentBefore = false,
        ConfigServiceId = "string",
        Disabled = false,
        EventProcessors = new Mongodbatlas.Inputs.EventTriggerEventProcessorsArgs
        {
            AwsEventbridge = new Mongodbatlas.Inputs.EventTriggerEventProcessorsAwsEventbridgeArgs
            {
                ConfigAccountId = "string",
                ConfigRegion = "string",
            },
        },
        FunctionId = "string",
        Name = "string",
        ConfigDatabase = "string",
        ConfigCollection = "string",
        Unordered = false,
    });
    
    example, err := mongodbatlas.NewEventTrigger(ctx, "eventTriggerResource", &mongodbatlas.EventTriggerArgs{
    	AppId:               pulumi.String("string"),
    	Type:                pulumi.String("string"),
    	ProjectId:           pulumi.String("string"),
    	ConfigProject:       pulumi.String("string"),
    	ConfigSchedule:      pulumi.String("string"),
    	ConfigMatch:         pulumi.String("string"),
    	ConfigOperationType: pulumi.String("string"),
    	ConfigOperationTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ConfigFullDocument: pulumi.Bool(false),
    	ConfigProviders: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ConfigFullDocumentBefore: pulumi.Bool(false),
    	ConfigServiceId:          pulumi.String("string"),
    	Disabled:                 pulumi.Bool(false),
    	EventProcessors: &mongodbatlas.EventTriggerEventProcessorsArgs{
    		AwsEventbridge: &mongodbatlas.EventTriggerEventProcessorsAwsEventbridgeArgs{
    			ConfigAccountId: pulumi.String("string"),
    			ConfigRegion:    pulumi.String("string"),
    		},
    	},
    	FunctionId:       pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	ConfigDatabase:   pulumi.String("string"),
    	ConfigCollection: pulumi.String("string"),
    	Unordered:        pulumi.Bool(false),
    })
    
    var eventTriggerResource = new EventTrigger("eventTriggerResource", EventTriggerArgs.builder()
        .appId("string")
        .type("string")
        .projectId("string")
        .configProject("string")
        .configSchedule("string")
        .configMatch("string")
        .configOperationType("string")
        .configOperationTypes("string")
        .configFullDocument(false)
        .configProviders("string")
        .configFullDocumentBefore(false)
        .configServiceId("string")
        .disabled(false)
        .eventProcessors(EventTriggerEventProcessorsArgs.builder()
            .awsEventbridge(EventTriggerEventProcessorsAwsEventbridgeArgs.builder()
                .configAccountId("string")
                .configRegion("string")
                .build())
            .build())
        .functionId("string")
        .name("string")
        .configDatabase("string")
        .configCollection("string")
        .unordered(false)
        .build());
    
    event_trigger_resource = mongodbatlas.EventTrigger("eventTriggerResource",
        app_id="string",
        type="string",
        project_id="string",
        config_project="string",
        config_schedule="string",
        config_match="string",
        config_operation_type="string",
        config_operation_types=["string"],
        config_full_document=False,
        config_providers=["string"],
        config_full_document_before=False,
        config_service_id="string",
        disabled=False,
        event_processors=mongodbatlas.EventTriggerEventProcessorsArgs(
            aws_eventbridge=mongodbatlas.EventTriggerEventProcessorsAwsEventbridgeArgs(
                config_account_id="string",
                config_region="string",
            ),
        ),
        function_id="string",
        name="string",
        config_database="string",
        config_collection="string",
        unordered=False)
    
    const eventTriggerResource = new mongodbatlas.EventTrigger("eventTriggerResource", {
        appId: "string",
        type: "string",
        projectId: "string",
        configProject: "string",
        configSchedule: "string",
        configMatch: "string",
        configOperationType: "string",
        configOperationTypes: ["string"],
        configFullDocument: false,
        configProviders: ["string"],
        configFullDocumentBefore: false,
        configServiceId: "string",
        disabled: false,
        eventProcessors: {
            awsEventbridge: {
                configAccountId: "string",
                configRegion: "string",
            },
        },
        functionId: "string",
        name: "string",
        configDatabase: "string",
        configCollection: "string",
        unordered: false,
    });
    
    type: mongodbatlas:EventTrigger
    properties:
        appId: string
        configCollection: string
        configDatabase: string
        configFullDocument: false
        configFullDocumentBefore: false
        configMatch: string
        configOperationType: string
        configOperationTypes:
            - string
        configProject: string
        configProviders:
            - string
        configSchedule: string
        configServiceId: string
        disabled: false
        eventProcessors:
            awsEventbridge:
                configAccountId: string
                configRegion: string
        functionId: string
        name: string
        projectId: string
        type: string
        unordered: false
    

    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.

    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.
    mongodbatlas logo
    MongoDB Atlas v3.18.0 published on Thursday, Sep 12, 2024 by Pulumi