-
Notifications
You must be signed in to change notification settings - Fork 10
/
events.json
196 lines (196 loc) · 5.5 KB
/
events.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://console.redhat.com/api/schemas/events/v1/events.json",
"title": "console.redhat.com CloudEvents Schema",
"description": "See https://raw.githubusercontent.com/cloudevents/spec/main/cloudevents/formats/cloudevents.json for base CloudEvents schema. NOTE: this schema inlines and further constrains some CloudEvents properties",
"type": "object",
"properties": {
"id": {
"description": "Identifies the event. Unique for this source.",
"type": "string",
"format": "uuid",
"examples": [
"afebabe-cafe-babe-cafe-babecafebabe"
]
},
"source": {
"description": "Describes the source (or app) that generated the event.",
"type": "string",
"pattern": "^urn:redhat:source:[a-z0-9][a-z0-9-_]+[a-z0-9](:[a-z0-9][a-z0-9-_]+[a-z0-9])*$",
"examples": [
"urn:redhat:source:insights:advisor",
"urn:redhat:source:rhosak",
"urn:redhat:source:crc:notifications"
]
},
"subject": {
"description": "Describes the subject of the event. URN in format urn:redhat:subject:$instance_type:$id. The urn may be longer to accommodate hierarchies",
"type": "string",
"pattern": "^urn:redhat:subject:([a-z0-9][a-z0-9-_]+[a-z0-9]:[a-z0-9A-Z-_]*)+$",
"examples": [
"urn:redhat:subject:rhel_system:2356aad8-de45-4ba0-80bd-4637763ad115",
"urn:redhat:subject:rhel_system:2356aad8-de45-4ba0-80bd-4637763ad115:mssql_instance:b24c269d-33d6-410e-8808-c71c9635e84f",
"urn:redhat:subject:ansible_cluster:2356aad8-de45-4ba0-80bd-4637763ad115",
"urn:redhat:subject:cve:CVE-2014-0160"
]
},
"specversion": {
"description": "Specifies the version of the CloudEvents spec targeted.",
"type": "string",
"enum": [
"1.0"
]
},
"type": {
"description": "The type of the event.",
"type": "string",
"pattern": "^com\\.[a-z0-9][a-z0-9-_]+[a-z0-9](\\.[a-z0-9][a-z0-9-_]+[a-z0-9])*$",
"examples": [
"com.redhat.console.advisor.new-recommendations",
"com.redhat.console.subscriptions.vdc-misconfiguration"
]
},
"dataschema": {
"description": "Identifies the schema that data adheres to.",
"type": "string",
"pattern": "https://console.redhat.com/api/schemas/.*"
},
"data": {
"type": "object"
},
"time": {
"description": "Timestamp of when the occurrence happened. Must adhere to RFC 3339.",
"$ref": "../../core/v1/common.json#/definitions/timedef",
"examples": [
"2018-04-05T17:31:00Z"
]
},
"redhataccount": {
"description": "Red Hat account number. Deprecated; redhatorgid should be used instead.",
"deprecated": true,
"$ref": "../../core/v1/common.json#/definitions/redhataccountdef",
"examples": [
"123456"
]
},
"redhatorgid": {
"description": "Red Hat Organization ID",
"$ref": "../../core/v1/common.json#/definitions/redhatorgiddef",
"examples": [
"123456"
]
}
},
"oneOf": [
{
"properties": {
"dataschema": {
"const": "https://console.redhat.com/api/schemas/apps/policies/v1/policy-triggered.json"
},
"data": {
"$ref": "../../apps/policies/v1/policy-triggered.json"
}
},
"required": [
"data"
]
},
{
"properties": {
"dataschema": {
"const": "https://console.redhat.com/api/schemas/apps/advisor/v1/advisor-recommendations.json"
},
"data": {
"$ref": "../../apps/advisor/v1/advisor-recommendations.json"
}
},
"required": [
"data"
]
},
{
"properties": {
"dataschema": {
"const":"https://console.redhat.com/api/schemas/core/v1/empty.json"
},
"data": {
"$ref": "../../core/v1/empty.json"
}
}
},
{
"properties": {
"dataschema": {
"const":"https://console.redhat.com/api/schemas/core/v1/error.json"
},
"data": {
"$ref": "../../core/v1/error.json"
}
},
"required": [
"data"
]
},
{
"properties": {
"dataschema": {
"const":"https://console.redhat.com/api/schemas/core/v1/notification.json"
},
"data": {
"$ref": "../../core/v1/notification.json"
}
},
"required": [
"data"
]
},
{
"properties": {
"dataschema": {
"const":"https://console.redhat.com/api/schemas/core/v1/rhel_system.json"
},
"data": {
"$ref": "../../core/v1/rhel_system.json"
}
},
"required": [
"data"
]
},
{
"properties": {
"dataschema": {
"const": "https://console.redhat.com/api/schemas/apps/repositories/v1/repository-events.json"
},
"data": {
"$ref": "../../apps/repositories/v1/repository-events.json"
}
},
"required": [
"data"
]
},
{
"properties": {
"dataschema": {
"const": "https://console.redhat.com/api/schemas/apps/export-service/v1/export-request.json"
},
"data": {
"$ref": "../../apps/export-service/v1/export-request.json"
}
},
"required": [
"data"
]
}
],
"required": [
"id",
"source",
"specversion",
"type",
"dataschema",
"time",
"redhatorgid"
]
}