generated from NASA-AMMOS/slim-starterkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routers_schema.yaml
85 lines (72 loc) · 3.14 KB
/
routers_schema.yaml
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
# This is a Yamale schema (see https://github.com/23andMe/Yamale) for
# validating router config files for a Unity initiator.
initiator_config:
# An arbitrary name for this config to potentially identify it from other initiators.
name: str()
# The payload type configuration. Currently only supports one payload type:
# 1. url
# In the future this can be expanded to define other payload types:
# - JSON
# - XML
# - SQL query result
payload_type:
# url payload type supports triggers use-cases:
# - S3 event (s3://)
# - file system event (HECC or on-prem) (file://)
# - CMR based (https:// or s3://)
url: list(include("regex_config"), required=True, min=1)
---
# Configuration for matching payload (e.g. url) against a set of compiled regular expressions
# and mapping any matches to a set of evaluators.
regex_config:
regexes: list(str, required=True, min=1)
evaluators: list(include("evaluator_config"), required=True, min=1)
# Configuration of actions that submit to evaluators.
evaluator_config:
name: str()
actions: list(include("action_config"), required=True, min=1)
# Currently only 2 types of actions are supported:
# 1. submit payload to an SNS topic
# 2. submit payload to an airflow DAG
action_config: any(include("submit_dag_by_id_action"), include("submit_to_sns_topic_action"), include("submit_ogc_process_execution_action"), include("submit_hysds_job_action"))
# Configuration for submitting a payload to an airflow DAG.
submit_dag_by_id_action:
name: str(equals="submit_dag_by_id")
params:
dag_id: str()
airflow_base_api_endpoint: str(required=False)
airflow_username: str(required=False)
airflow_password: str(required=False)
on_success: include("on_success_actions", required=False)
# Configuration for submitting a payload to an SNS topic.
submit_to_sns_topic_action:
name: str(equals="submit_to_sns_topic")
params:
# topic_arn is optional to allow specific routing to an SNS topic;
# if this was null, empty or absent, then the assumption is a SNS
# topic in the local AWS account using the evaluator name as the SNS topic
topic_arn: str(required=False)
on_success: include("on_success_actions", required=False)
# Configuration for submitting a OGC process execution.
submit_ogc_process_execution_action:
name: str(equals="submit_ogc_process_execution")
params:
process_id: str()
ogc_processes_base_api_endpoint: str(required=False)
execution_inputs: map(required=False)
execution_outputs: map(required=False)
execution_subscriber: map(required=False)
on_success: include("on_success_actions", required=False)
# Configuration for submitting a HySDS job
submit_hysds_job_action:
name: str(equals="submit_hysds_job")
params:
mozart_base_api_endpoint: str(required=True)
job_spec: str(required=True)
queue: str(required=True)
priority: int(min=0, max=10, required=False)
tags: list(str(), required=False)
on_success: include("on_success_actions", required=False)
# Configuration to pass onto the evaluator to use when evaluation is a success.
on_success_actions:
actions: list(include("action_config"), required=True, min=1, max=1)