-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathtrigger.json
More file actions
97 lines (97 loc) · 2.68 KB
/
trigger.json
File metadata and controls
97 lines (97 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This template creates a Trigger on the MongoDB Cluster, this will be billed to your Atlas account, For more information check https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/#tag/triggers/operation/adminListTriggers",
"Mappings": {},
"Parameters": {
"TriggerName": {
"Type": "String",
"Description": "The trigger's name."
},
"FunctionName": {
"Type": "String",
"Description": "Name to use for your Atlas Cluster"
},
"FunctionId": {
"Type": "String",
"Description": "The name of the function that the trigger calls when it fires, i.e. the function described by function_id"
},
"AppId": {
"Type": "String",
"Description": "The ObjectID of your application."
},
"ProjectId": {
"Type": "String",
"Description": "Unique 24-hexadecimal digit string that identifies your project"
},
"ServiceId": {
"Type": "String",
"Description": "The _id value of a linked MongoDB data source."
}
},
"Resources": {
"EventTrigger": {
"Type": "MongoDB::Atlas::Trigger",
"Properties": {
"Name":{
"Ref": "TriggerName"
},
"Type": "DATABASE",
"Profile": "default",
"DatabaseTrigger": {
"OperationTypes": [
"INSERT"
],
"Database": "store",
"Collection": "sales",
"ServiceId": {
"Ref": "ServiceId"
},
"FullDocument": "true",
"FullDocumentBeforeChange": "false",
"Unordered": "false",
"SkipCatchupEvents": "false",
"Match" : "{\"$and\":[{\"fullDocument.availability.value\":\"AVAILABLE\"},{\"$ne\":[\"fullDocument.retailPrice\",\"fullDocumentBeforeChange.retailPrice\"]}]}"
},
"Disabled": "false",
"EventProcessors": {
"FUNCTION": {
"FuncConfig": {
"FunctionName": {
"Ref": "FunctionName"
},
"FunctionId": {
"Ref": "FunctionId"
}
}
},
"AWSEVENTBRIDGE": {
"AWSConfig": {}
}
},
"AppId": {
"Ref": "AppId"
},
"ProjectId": {
"Ref": "ProjectId"
}
}
}
},
"Outputs": {
"CloudFormationID": {
"Description": "CloudFormation Resource ID of the trigger",
"Value": {
"Ref": "EventTrigger"
}
},
"TriggerID": {
"Description": "CloudFormation Resource ID of the trigger",
"Value": {
"Fn::GetAtt": [
"EventTrigger",
"Id"
]
}
}
}
}