mongodbatlas.EventTrigger
Explore with Pulumi AI
# 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:
- App
Id string - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- Project
Id string - The unique ID for the project to create the trigger.
- Type string
- The type of the trigger. Possible Values:
DATABASE
,AUTHENTICATION
,SCHEDULED
- Config
Collection 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. - Config
Database string - Required for
DATABASE
type. The name of the MongoDB database to watch. - Config
Full boolDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - Config
Full boolDocument Before - Config
Match 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. - Config
Operation stringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- Config
Operation List<string>Types - 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 string - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - Config
Providers 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. - Config
Schedule string - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - Config
Service stringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - Disabled bool
- Default:
false
Iftrue
, the trigger is disabled. - Event
Processors EventTrigger Event Processors - 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 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.
- App
Id string - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- Project
Id string - The unique ID for the project to create the trigger.
- Type string
- The type of the trigger. Possible Values:
DATABASE
,AUTHENTICATION
,SCHEDULED
- Config
Collection 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. - Config
Database string - Required for
DATABASE
type. The name of the MongoDB database to watch. - Config
Full boolDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - Config
Full boolDocument Before - Config
Match 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. - Config
Operation stringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- Config
Operation []stringTypes - 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 string - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - Config
Providers []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. - Config
Schedule string - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - Config
Service stringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - Disabled bool
- Default:
false
Iftrue
, the trigger is disabled. - Event
Processors EventTrigger Event Processors Args - 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 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.
- app
Id String - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- project
Id String - The unique ID for the project to create the trigger.
- type String
- The type of the trigger. Possible Values:
DATABASE
,AUTHENTICATION
,SCHEDULED
- config
Collection 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. - config
Database String - Required for
DATABASE
type. The name of the MongoDB database to watch. - config
Full BooleanDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config
Full BooleanDocument Before - config
Match 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. - config
Operation StringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config
Operation List<String>Types - 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 String - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - config
Providers 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. - config
Schedule String - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - config
Service StringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled Boolean
- Default:
false
Iftrue
, the trigger is disabled. - event
Processors EventTrigger Event Processors - 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 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 string - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- project
Id string - The unique ID for the project to create the trigger.
- type string
- The type of the trigger. Possible Values:
DATABASE
,AUTHENTICATION
,SCHEDULED
- config
Collection 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. - config
Database string - Required for
DATABASE
type. The name of the MongoDB database to watch. - config
Full booleanDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config
Full booleanDocument Before - config
Match 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. - config
Operation stringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config
Operation string[]Types - 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 string - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - config
Providers 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. - config
Schedule string - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - config
Service stringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled boolean
- Default:
false
Iftrue
, the trigger is disabled. - event
Processors EventTrigger Event Processors - 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 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
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- 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_ booldocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config_
full_ booldocument_ before - 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_ strtype - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config_
operation_ Sequence[str]types - 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_ strid - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled bool
- Default:
false
Iftrue
, the trigger is disabled. - event_
processors EventTrigger Event Processors Args - 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.
- app
Id String - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- project
Id String - The unique ID for the project to create the trigger.
- type String
- The type of the trigger. Possible Values:
DATABASE
,AUTHENTICATION
,SCHEDULED
- config
Collection 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. - config
Database String - Required for
DATABASE
type. The name of the MongoDB database to watch. - config
Full BooleanDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config
Full BooleanDocument Before - config
Match 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. - config
Operation StringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config
Operation List<String>Types - 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 String - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - config
Providers 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. - config
Schedule String - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - config
Service StringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled Boolean
- Default:
false
Iftrue
, the trigger is disabled. - event
Processors 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.
- function
Id 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:
- Config
Schedule stringType - Function
Name string - The name of the function associated with the trigger.
- Id string
- The provider-assigned unique ID for this managed resource.
- Trigger
Id string - The unique ID of the trigger.
- Config
Schedule stringType - Function
Name string - The name of the function associated with the trigger.
- Id string
- The provider-assigned unique ID for this managed resource.
- Trigger
Id string - The unique ID of the trigger.
- config
Schedule StringType - function
Name String - The name of the function associated with the trigger.
- id String
- The provider-assigned unique ID for this managed resource.
- trigger
Id String - The unique ID of the trigger.
- config
Schedule stringType - function
Name string - The name of the function associated with the trigger.
- id string
- The provider-assigned unique ID for this managed resource.
- trigger
Id string - The unique ID of the trigger.
- config_
schedule_ strtype - 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.
- config
Schedule StringType - function
Name String - The name of the function associated with the trigger.
- id String
- The provider-assigned unique ID for this managed resource.
- trigger
Id 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.
- App
Id string - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- Config
Collection 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. - Config
Database string - Required for
DATABASE
type. The name of the MongoDB database to watch. - Config
Full boolDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - Config
Full boolDocument Before - Config
Match 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. - Config
Operation stringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- Config
Operation List<string>Types - 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 string - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - Config
Providers 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. - Config
Schedule string - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - Config
Schedule stringType - Config
Service stringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - Disabled bool
- Default:
false
Iftrue
, the trigger is disabled. - Event
Processors EventTrigger Event Processors - 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 string - The ID of the function associated with the trigger.
- Function
Name string - The name of the function associated with the trigger.
- Name string
- The name of the trigger.
- Project
Id string - The unique ID for the project to create the trigger.
- Trigger
Id 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.
- App
Id string - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- Config
Collection 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. - Config
Database string - Required for
DATABASE
type. The name of the MongoDB database to watch. - Config
Full boolDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - Config
Full boolDocument Before - Config
Match 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. - Config
Operation stringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- Config
Operation []stringTypes - 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 string - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - Config
Providers []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. - Config
Schedule string - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - Config
Schedule stringType - Config
Service stringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - Disabled bool
- Default:
false
Iftrue
, the trigger is disabled. - Event
Processors EventTrigger Event Processors Args - 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 string - The ID of the function associated with the trigger.
- Function
Name string - The name of the function associated with the trigger.
- Name string
- The name of the trigger.
- Project
Id string - The unique ID for the project to create the trigger.
- Trigger
Id 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.
- app
Id String - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- config
Collection 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. - config
Database String - Required for
DATABASE
type. The name of the MongoDB database to watch. - config
Full BooleanDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config
Full BooleanDocument Before - config
Match 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. - config
Operation StringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config
Operation List<String>Types - 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 String - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - config
Providers 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. - config
Schedule String - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - config
Schedule StringType - config
Service StringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled Boolean
- Default:
false
Iftrue
, the trigger is disabled. - event
Processors EventTrigger Event Processors - 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 String - The ID of the function associated with the trigger.
- function
Name String - The name of the function associated with the trigger.
- name String
- The name of the trigger.
- project
Id String - The unique ID for the project to create the trigger.
- trigger
Id 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 string - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- config
Collection 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. - config
Database string - Required for
DATABASE
type. The name of the MongoDB database to watch. - config
Full booleanDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config
Full booleanDocument Before - config
Match 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. - config
Operation stringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config
Operation string[]Types - 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 string - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - config
Providers 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. - config
Schedule string - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - config
Schedule stringType - config
Service stringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled boolean
- Default:
false
Iftrue
, the trigger is disabled. - event
Processors EventTrigger Event Processors - 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 string - The ID of the function associated with the trigger.
- function
Name string - The name of the function associated with the trigger.
- name string
- The name of the trigger.
- project
Id string - The unique ID for the project to create the trigger.
- trigger
Id 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
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- 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_ booldocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config_
full_ booldocument_ before - 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_ strtype - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config_
operation_ Sequence[str]types - 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_ strtype - config_
service_ strid - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled bool
- Default:
false
Iftrue
, the trigger is disabled. - event_
processors EventTrigger Event Processors Args - 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.
- app
Id String - The ObjectID of your application.
- For more details on
project_id
andapp_id
see: https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#section/Project-and-Application-IDs
- For more details on
- config
Collection 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. - config
Database String - Required for
DATABASE
type. The name of the MongoDB database to watch. - config
Full BooleanDocument - Optional for
DATABASE
type. If true, indicates thatUPDATE
change events should include the most current majority-committed version of the modified document in the fullDocument field. - config
Full BooleanDocument Before - config
Match 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. - config
Operation StringType - Required for
AUTHENTICATION
type. The authentication operation type to listen for. Possible Values:LOGIN
,CREATE
,DELETE
- config
Operation List<String>Types - 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 String - Optional for
DATABASE
type. A $project expression document that Realm uses to filter the fields that appear in change event objects. - config
Providers 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. - config
Schedule String - Required for
SCHEDULED
type. A cron expression that defines the trigger schedule. - config
Schedule StringType - config
Service StringId - Required for
DATABASE
type. The ID of the MongoDB Service associated with the trigger. - disabled Boolean
- Default:
false
Iftrue
, the trigger is disabled. - event
Processors 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.
- function
Id String - The ID of the function associated with the trigger.
- function
Name String - The name of the function associated with the trigger.
- name String
- The name of the trigger.
- project
Id String - The unique ID for the project to create the trigger.
- trigger
Id 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
- Config
Account stringId - Config
Region string
- Config
Account stringId - Config
Region string
- config
Account StringId - config
Region String
- config
Account stringId - config
Region string
- config_
account_ strid - config_
region str
- config
Account StringId - config
Region String
Import
Event trigger can be imported using project ID, App ID and Trigger ID, in the format project_id
–app_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.