|
1 | 1 | resources:
|
2 |
| -- kind: team |
3 |
| - mappings: |
4 |
| - id: .id |
5 |
| - title: .name |
6 |
| - blueprintId: '"opsgenie.v1.team"' |
7 |
| - description: .description |
8 |
| - properties: |
9 |
| - webUrl: .links.web |
10 |
| - apiUrl: .links.api |
11 |
| - onCallSchedules: '[.schedules[] | select(.enabled == true) | .name]' |
| 2 | + - kind: team |
| 3 | + mappings: |
| 4 | + id: .id |
| 5 | + title: .name |
| 6 | + blueprintId: '"opsgenie.v1.team"' |
| 7 | + description: .description |
| 8 | + properties: |
| 9 | + webUrl: .links.web |
| 10 | + apiUrl: .links.api |
| 11 | + onCallSchedules: "[.schedules[] | select(.enabled == true) | .name]" |
12 | 12 |
|
13 |
| -- kind: service |
14 |
| - mappings: |
15 |
| - id: .id |
16 |
| - title: .name |
17 |
| - blueprintId: '"opsgenie.v1.service"' |
18 |
| - description: .description |
19 |
| - properties: |
20 |
| - webUrl: '.context.baseUrl + "/service/" + .id' |
21 |
| - isExternal: .isExternal |
22 |
| - relations: |
23 |
| - team: |
24 |
| - value: .teamId |
| 13 | + - kind: service |
| 14 | + mappings: |
| 15 | + id: .id |
| 16 | + title: .name |
| 17 | + blueprintId: '"opsgenie.v1.service"' |
| 18 | + description: .description |
| 19 | + properties: |
| 20 | + webUrl: '.context.baseUrl + "/service/" + .id' |
| 21 | + isExternal: .isExternal |
| 22 | + relations: |
| 23 | + team: |
| 24 | + value: .teamId |
25 | 25 |
|
26 |
| -- kind: user |
27 |
| - mappings: |
28 |
| - id: .id |
29 |
| - title: .fullName |
30 |
| - blueprintId: '"opsgenie.v1.user"' |
31 |
| - description: '""' |
32 |
| - properties: |
33 |
| - username: .username |
34 |
| - role: .role.name |
35 |
| - timeZone: .timeZone |
36 |
| - locale: .locale |
37 |
| - blocked: .blocked |
38 |
| - verified: .verified |
39 |
| - createdAt: .createdAt |
40 |
| - webUrl: '.context.baseUrl + "/settings/users/" + .id + "/detail"' |
41 |
| - onCallDashboard: '.context.baseUrl + "/settings/users/" + .id + "/onCallSchedule"' |
42 |
| - currentlyOnCall: '(.teamsOnCall | length > 0)' |
43 |
| - nextOnCallStart: .nextOnCallShift.startDate |
44 |
| - nextOnCallEnd: .nextOnCallShift.endDate |
45 |
| - relations: |
46 |
| - teams: |
47 |
| - value: '[.teams[].id]' |
48 |
| - currentlyOnCallFor: |
49 |
| - value: .teamsOnCall |
50 |
| - nextOnCallFor: |
51 |
| - value: .nextOnCallShift.teamId |
| 26 | + - kind: user |
| 27 | + mappings: |
| 28 | + id: .id |
| 29 | + title: .fullName |
| 30 | + blueprintId: '"opsgenie.v1.user"' |
| 31 | + description: '""' |
| 32 | + properties: |
| 33 | + username: .username |
| 34 | + role: .role.name |
| 35 | + timeZone: .timeZone |
| 36 | + locale: .locale |
| 37 | + blocked: .blocked |
| 38 | + verified: .verified |
| 39 | + createdAt: .createdAt |
| 40 | + webUrl: '.context.baseUrl + "/settings/users/" + .id + "/detail"' |
| 41 | + onCallDashboard: '.context.baseUrl + "/settings/users/" + .id + "/onCallSchedule"' |
| 42 | + currentlyOnCall: "(.teamsOnCall | length > 0)" |
| 43 | + nextOnCallStart: .nextOnCallShift.startDate |
| 44 | + nextOnCallEnd: .nextOnCallShift.endDate |
| 45 | + relations: |
| 46 | + teams: |
| 47 | + value: "[.teams[].id]" |
| 48 | + currentlyOnCallFor: |
| 49 | + value: .teamsOnCall |
| 50 | + nextOnCallFor: |
| 51 | + value: .nextOnCallShift.teamId |
52 | 52 |
|
53 |
| -- kind: escalation |
54 |
| - mappings: |
55 |
| - id: .id |
56 |
| - title: .name |
57 |
| - blueprintId: '"opsgenie.v1.escalation"' |
58 |
| - description: .description |
59 |
| - properties: |
60 |
| - rules: .rules | tostring |
61 |
| - repeat: select(.repeat != null) | tostring // null |
62 |
| - relations: |
63 |
| - team: |
64 |
| - value: .ownerTeam.id |
| 53 | + - kind: escalation |
| 54 | + mappings: |
| 55 | + id: .id |
| 56 | + title: .name |
| 57 | + blueprintId: '"opsgenie.v1.escalation"' |
| 58 | + description: .description |
| 59 | + properties: |
| 60 | + rules: .rules | tostring |
| 61 | + repeat: if .repeat == null then null else .repeat | tostring end |
| 62 | + relations: |
| 63 | + team: |
| 64 | + value: .ownerTeam.id |
65 | 65 |
|
66 |
| -- kind: incident |
67 |
| - mappings: |
68 |
| - id: .id |
69 |
| - title: .message |
70 |
| - blueprintId: '"opsgenie.v1.incident"' |
71 |
| - description: .description |
72 |
| - properties: |
73 |
| - tinyId: .tinyId |
74 |
| - status: .status |
75 |
| - createdAt: .createdAt |
76 |
| - updatedAt: .updatedAt |
77 |
| - closedAt: .impactEndDate |
78 |
| - priority: .priority |
79 |
| - webUrl: '.context.baseUrl + "/incident/detail/" + .id' |
80 |
| - relations: |
81 |
| - impactedServices: |
82 |
| - value: .impactedServices |
83 |
| - responders: |
84 |
| - value: '[.responders[] | select(.type == "team") | .id]' |
| 66 | + - kind: incident |
| 67 | + mappings: |
| 68 | + id: .id |
| 69 | + title: .message |
| 70 | + blueprintId: '"opsgenie.v1.incident"' |
| 71 | + description: .description |
| 72 | + properties: |
| 73 | + tinyId: .tinyId |
| 74 | + status: .status |
| 75 | + createdAt: .createdAt |
| 76 | + updatedAt: .updatedAt |
| 77 | + closedAt: .impactEndDate |
| 78 | + priority: .priority |
| 79 | + webUrl: '.context.baseUrl + "/incident/detail/" + .id' |
| 80 | + relations: |
| 81 | + impactedServices: |
| 82 | + value: .impactedServices |
| 83 | + responders: |
| 84 | + value: '[.responders[] | select(.type == "team") | .id]' |
0 commit comments