-
Notifications
You must be signed in to change notification settings - Fork 2
/
catalog.json
150 lines (150 loc) · 4.92 KB
/
catalog.json
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{
"id": "examples-<<<TENANT_ID>>>",
"technicalName": "examples",
"name": "Automation Pilot Examples",
"description": "Source: https://github.com/SAP-samples/automation-pilot-examples",
"owner": "<<<TENANT_ID>>>",
"inputs": [],
"commands": [
{
"configuration": {
"values": [],
"output": {},
"executors": [
{
"execute": "sql-sapcp:ExecuteHanaCloudSqlStatement:1",
"input": {
"password": "$(.execution.input.password)",
"resultTransformer": "toArray[0][0][0]",
"statement": "SELECT MAX(ENTRY_ID)\nFROM SYS.M_BACKUP_CATALOG\nWHERE ENTRY_TYPE_NAME = 'complete data backup' AND STATE_NAME = 'successful'",
"connectionUrl": "$(.execution.input.connectionUrl)",
"user": "$(.execution.input.user)"
},
"alias": "CheckBackup",
"progressMessage": null,
"initialDelay": null,
"pause": null,
"when": null,
"validate": {
"semantic": "OR",
"conditions": [
{
"semantic": "OR",
"cases": [
{
"expression": "$(nowMillis - (.CheckBackup.output.result | toNumber) < (.execution.input.ageThreshold * 24 * 60 * 60 * 1000))",
"operator": "EQUALS",
"semantic": "OR",
"values": [
"true"
]
}
]
}
]
},
"autoRetry": null,
"repeat": null,
"errorMessages": [
{
"message": "No database backup in $(.execution.input.ageThreshold) day(s). Last backup was on $(.CheckBackup.output.result | toNumber | toDate(\"yyyy-MM-dd HH:mm:ss\"))",
"when": {
"semantic": "OR",
"conditions": [
{
"semantic": "OR",
"cases": [
{
"expression": "$(.CheckBackup.output.errorCode == null)",
"operator": "EQUALS",
"semantic": "OR",
"values": [
"true"
]
}
]
}
]
}
}
]
}
],
"listeners": []
},
"id": "examples-<<<TENANT_ID>>>:CheckHanaCloudBackup:1",
"name": "CheckHanaCloudBackup",
"description": "Checks whether there was a recent backup of the database",
"catalog": "examples-<<<TENANT_ID>>>",
"version": 1,
"inputKeys": {
"password": {
"type": "string",
"sensitive": true,
"required": true,
"minSize": null,
"maxSize": null,
"minValue": null,
"maxValue": null,
"allowedValues": null,
"allowedValuesFromInputKeys": null,
"suggestedValues": null,
"suggestedValuesFromInputKeys": null,
"defaultValue": null,
"defaultValueFromInput": null,
"description": "Password for the specified database user."
},
"connectionUrl": {
"type": "string",
"sensitive": false,
"required": true,
"minSize": null,
"maxSize": null,
"minValue": null,
"maxValue": null,
"allowedValues": null,
"allowedValuesFromInputKeys": null,
"suggestedValues": null,
"suggestedValuesFromInputKeys": null,
"defaultValue": null,
"defaultValueFromInput": null,
"description": "JDBC connection URL for the database"
},
"ageThreshold": {
"type": "number",
"sensitive": false,
"required": false,
"minSize": null,
"maxSize": null,
"minValue": null,
"maxValue": null,
"allowedValues": null,
"allowedValuesFromInputKeys": null,
"suggestedValues": null,
"suggestedValuesFromInputKeys": null,
"defaultValue": "3",
"defaultValueFromInput": null,
"description": "Backup age threshold in days"
},
"user": {
"type": "string",
"sensitive": false,
"required": true,
"minSize": null,
"maxSize": null,
"minValue": null,
"maxValue": null,
"allowedValues": null,
"allowedValuesFromInputKeys": null,
"suggestedValues": null,
"suggestedValuesFromInputKeys": null,
"defaultValue": null,
"defaultValueFromInput": null,
"description": "Name of a database user."
}
},
"outputKeys": {},
"tags": {}
}
]
}