@pulumiverse/grafana 0.2.1-alpha.1709570924
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +54 -0
- package/annotation.d.ts +151 -0
- package/annotation.js +79 -0
- package/annotation.js.map +1 -0
- package/apiKey.d.ts +77 -0
- package/apiKey.js +80 -0
- package/apiKey.js.map +1 -0
- package/cloudAccessPolicy.d.ts +156 -0
- package/cloudAccessPolicy.js +115 -0
- package/cloudAccessPolicy.js.map +1 -0
- package/cloudAccessPolicyToken.d.ts +151 -0
- package/cloudAccessPolicyToken.js +108 -0
- package/cloudAccessPolicyToken.js.map +1 -0
- package/cloudApiKey.d.ts +102 -0
- package/cloudApiKey.js +85 -0
- package/cloudApiKey.js.map +1 -0
- package/cloudPluginInstallation.d.ts +96 -0
- package/cloudPluginInstallation.js +86 -0
- package/cloudPluginInstallation.js.map +1 -0
- package/cloudStack.d.ts +291 -0
- package/cloudStack.js +142 -0
- package/cloudStack.js.map +1 -0
- package/cloudStackApiKey.d.ts +52 -0
- package/cloudStackApiKey.js +67 -0
- package/cloudStackApiKey.js.map +1 -0
- package/cloudStackServiceAccount.d.ts +97 -0
- package/cloudStackServiceAccount.js +80 -0
- package/cloudStackServiceAccount.js.map +1 -0
- package/cloudStackServiceAccountToken.d.ts +78 -0
- package/cloudStackServiceAccountToken.js +93 -0
- package/cloudStackServiceAccountToken.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +89 -0
- package/config/vars.js +131 -0
- package/config/vars.js.map +1 -0
- package/contactPoint.d.ts +310 -0
- package/contactPoint.js +119 -0
- package/contactPoint.js.map +1 -0
- package/dashboard.d.ts +154 -0
- package/dashboard.js +94 -0
- package/dashboard.js.map +1 -0
- package/dashboardPermission.d.ts +131 -0
- package/dashboardPermission.js +97 -0
- package/dashboardPermission.js.map +1 -0
- package/dataSource.d.ts +294 -0
- package/dataSource.js +164 -0
- package/dataSource.js.map +1 -0
- package/dataSourcePermission.d.ts +124 -0
- package/dataSourcePermission.js +109 -0
- package/dataSourcePermission.js.map +1 -0
- package/folder.d.ts +127 -0
- package/folder.js +95 -0
- package/folder.js.map +1 -0
- package/folderPermission.d.ts +106 -0
- package/folderPermission.js +91 -0
- package/folderPermission.js.map +1 -0
- package/getCloudIps.d.ts +56 -0
- package/getCloudIps.js +41 -0
- package/getCloudIps.js.map +1 -0
- package/getCloudOrganization.d.ts +37 -0
- package/getCloudOrganization.js +21 -0
- package/getCloudOrganization.js.map +1 -0
- package/getCloudStack.d.ts +130 -0
- package/getCloudStack.js +25 -0
- package/getCloudStack.js.map +1 -0
- package/getDashboard.d.ts +134 -0
- package/getDashboard.js +81 -0
- package/getDashboard.js.map +1 -0
- package/getDashboards.d.ts +74 -0
- package/getDashboards.js +36 -0
- package/getDashboards.js.map +1 -0
- package/getDataSource.d.ts +156 -0
- package/getDataSource.js +95 -0
- package/getDataSource.js.map +1 -0
- package/getFolder.d.ts +82 -0
- package/getFolder.js +59 -0
- package/getFolder.js.map +1 -0
- package/getFolders.d.ts +61 -0
- package/getFolders.js +61 -0
- package/getFolders.js.map +1 -0
- package/getLibraryPanel.d.ts +108 -0
- package/getLibraryPanel.js +28 -0
- package/getLibraryPanel.js.map +1 -0
- package/getOnCallSlackChannel.d.ts +66 -0
- package/getOnCallSlackChannel.js +47 -0
- package/getOnCallSlackChannel.js.map +1 -0
- package/getOncallAction.d.ts +46 -0
- package/getOncallAction.js +31 -0
- package/getOncallAction.js.map +1 -0
- package/getOncallEscalationChain.d.ts +62 -0
- package/getOncallEscalationChain.js +47 -0
- package/getOncallEscalationChain.js.map +1 -0
- package/getOncallOutgoingWebhook.d.ts +62 -0
- package/getOncallOutgoingWebhook.js +47 -0
- package/getOncallOutgoingWebhook.js.map +1 -0
- package/getOncallSchedule.d.ts +68 -0
- package/getOncallSchedule.js +49 -0
- package/getOncallSchedule.js.map +1 -0
- package/getOncallTeam.d.ts +60 -0
- package/getOncallTeam.js +43 -0
- package/getOncallTeam.js.map +1 -0
- package/getOncallUser.d.ts +70 -0
- package/getOncallUser.js +47 -0
- package/getOncallUser.js.map +1 -0
- package/getOncallUserGroup.d.ts +54 -0
- package/getOncallUserGroup.js +47 -0
- package/getOncallUserGroup.js.map +1 -0
- package/getOrganization.d.ts +94 -0
- package/getOrganization.js +67 -0
- package/getOrganization.js.map +1 -0
- package/getOrganizationPreferences.d.ts +62 -0
- package/getOrganizationPreferences.js +43 -0
- package/getOrganizationPreferences.js.map +1 -0
- package/getRole.d.ts +147 -0
- package/getRole.js +95 -0
- package/getRole.js.map +1 -0
- package/getSlos.d.ts +31 -0
- package/getSlos.js +31 -0
- package/getSlos.js.map +1 -0
- package/getSyntheticMonitoringProbe.d.ts +88 -0
- package/getSyntheticMonitoringProbe.js +47 -0
- package/getSyntheticMonitoringProbe.js.map +1 -0
- package/getSyntheticMonitoringProbes.d.ts +64 -0
- package/getSyntheticMonitoringProbes.js +44 -0
- package/getSyntheticMonitoringProbes.js.map +1 -0
- package/getTeam.d.ts +83 -0
- package/getTeam.js +67 -0
- package/getTeam.js.map +1 -0
- package/getUser.d.ts +128 -0
- package/getUser.js +84 -0
- package/getUser.js.map +1 -0
- package/getUsers.d.ts +61 -0
- package/getUsers.js +61 -0
- package/getUsers.js.map +1 -0
- package/index.d.ts +228 -0
- package/index.js +353 -0
- package/index.js.map +1 -0
- package/libraryPanel.d.ts +193 -0
- package/libraryPanel.js +103 -0
- package/libraryPanel.js.map +1 -0
- package/machineLearningHoliday.d.ts +103 -0
- package/machineLearningHoliday.js +62 -0
- package/machineLearningHoliday.js.map +1 -0
- package/machineLearningJob.d.ts +201 -0
- package/machineLearningJob.js +83 -0
- package/machineLearningJob.js.map +1 -0
- package/machineLearningOutlierDetector.d.ts +159 -0
- package/machineLearningOutlierDetector.js +84 -0
- package/machineLearningOutlierDetector.js.map +1 -0
- package/messageTemplate.d.ts +86 -0
- package/messageTemplate.js +80 -0
- package/messageTemplate.js.map +1 -0
- package/muteTiming.d.ts +106 -0
- package/muteTiming.js +95 -0
- package/muteTiming.js.map +1 -0
- package/notificationPolicy.d.ts +186 -0
- package/notificationPolicy.js +141 -0
- package/notificationPolicy.js.map +1 -0
- package/oncallEscalation.d.ts +227 -0
- package/oncallEscalation.js +124 -0
- package/oncallEscalation.js.map +1 -0
- package/oncallEscalationChain.d.ts +80 -0
- package/oncallEscalationChain.js +71 -0
- package/oncallEscalationChain.js.map +1 -0
- package/oncallIntegration.d.ts +116 -0
- package/oncallIntegration.js +75 -0
- package/oncallIntegration.js.map +1 -0
- package/oncallOnCallShift.d.ts +237 -0
- package/oncallOnCallShift.js +97 -0
- package/oncallOnCallShift.js.map +1 -0
- package/oncallOutgoingWebhook.d.ts +152 -0
- package/oncallOutgoingWebhook.js +88 -0
- package/oncallOutgoingWebhook.js.map +1 -0
- package/oncallRoute.d.ts +175 -0
- package/oncallRoute.js +116 -0
- package/oncallRoute.js.map +1 -0
- package/oncallSchedule.d.ts +187 -0
- package/oncallSchedule.js +109 -0
- package/oncallSchedule.js.map +1 -0
- package/organization.d.ts +193 -0
- package/organization.js +96 -0
- package/organization.js.map +1 -0
- package/organizationPreference.d.ts +125 -0
- package/organizationPreference.js +76 -0
- package/organizationPreference.js.map +1 -0
- package/package.json +30 -0
- package/package.json.bak +29 -0
- package/package.json.dev +29 -0
- package/playlist.d.ts +72 -0
- package/playlist.js +65 -0
- package/playlist.js.map +1 -0
- package/provider.d.ts +166 -0
- package/provider.js +64 -0
- package/provider.js.map +1 -0
- package/report.d.ts +241 -0
- package/report.js +110 -0
- package/report.js.map +1 -0
- package/role.d.ts +210 -0
- package/role.js +109 -0
- package/role.js.map +1 -0
- package/roleAssignment.d.ts +131 -0
- package/roleAssignment.js +95 -0
- package/roleAssignment.js.map +1 -0
- package/ruleGroup.d.ts +203 -0
- package/ruleGroup.js +174 -0
- package/ruleGroup.js.map +1 -0
- package/scripts/install-pulumi-plugin.js +21 -0
- package/serviceAccount.d.ts +102 -0
- package/serviceAccount.js +73 -0
- package/serviceAccount.js.map +1 -0
- package/serviceAccountPermission.d.ts +110 -0
- package/serviceAccountPermission.js +95 -0
- package/serviceAccountPermission.js.map +1 -0
- package/serviceAccountToken.d.ts +72 -0
- package/serviceAccountToken.js +85 -0
- package/serviceAccountToken.js.map +1 -0
- package/slo.d.ts +131 -0
- package/slo.js +77 -0
- package/slo.js.map +1 -0
- package/syntheticMonitoringCheck.d.ts +555 -0
- package/syntheticMonitoringCheck.js +464 -0
- package/syntheticMonitoringCheck.js.map +1 -0
- package/syntheticMonitoringInstallation.d.ts +112 -0
- package/syntheticMonitoringInstallation.js +95 -0
- package/syntheticMonitoringInstallation.js.map +1 -0
- package/syntheticMonitoringProbe.d.ts +164 -0
- package/syntheticMonitoringProbe.js +108 -0
- package/syntheticMonitoringProbe.js.map +1 -0
- package/team.d.ts +165 -0
- package/team.js +89 -0
- package/team.js.map +1 -0
- package/teamExternalGroup.d.ts +84 -0
- package/teamExternalGroup.js +81 -0
- package/teamExternalGroup.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +1914 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +2011 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/user.d.ts +132 -0
- package/user.js +95 -0
- package/user.js.map +1 -0
- package/utilities.d.ts +4 -0
- package/utilities.js +69 -0
- package/utilities.js.map +1 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/)
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as grafana from "@pulumi/grafana";
|
|
12
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
13
|
+
*
|
|
14
|
+
* const exampleSlackChannel = grafana.getOnCallSlackChannel({
|
|
15
|
+
* name: "example_slack_channel",
|
|
16
|
+
* });
|
|
17
|
+
* const exampleUserGroup = grafana.getOncallUserGroup({
|
|
18
|
+
* slackHandle: "example_slack_handle",
|
|
19
|
+
* });
|
|
20
|
+
* // ICal based schedule
|
|
21
|
+
* const exampleScheduleOncallSchedule = new grafana.OncallSchedule("exampleScheduleOncallSchedule", {
|
|
22
|
+
* type: "ical",
|
|
23
|
+
* icalUrlPrimary: "https://example.com/example_ical.ics",
|
|
24
|
+
* icalUrlOverrides: "https://example.com/example_overrides_ical.ics",
|
|
25
|
+
* slack: {
|
|
26
|
+
* channelId: exampleSlackChannel.then(exampleSlackChannel => exampleSlackChannel.slackId),
|
|
27
|
+
* userGroupId: exampleUserGroup.then(exampleUserGroup => exampleUserGroup.slackId),
|
|
28
|
+
* },
|
|
29
|
+
* });
|
|
30
|
+
* // Shift based schedule
|
|
31
|
+
* const exampleScheduleIndex_oncallScheduleOncallSchedule = new grafana.OncallSchedule("exampleScheduleIndex/oncallScheduleOncallSchedule", {
|
|
32
|
+
* type: "calendar",
|
|
33
|
+
* timeZone: "America/New_York",
|
|
34
|
+
* shifts: [],
|
|
35
|
+
* icalUrlOverrides: "https://example.com/example_overrides_ical.ics",
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* ## Import
|
|
40
|
+
*
|
|
41
|
+
* ```sh
|
|
42
|
+
* $ pulumi import grafana:index/oncallSchedule:OncallSchedule schedule_name {{schedule_id}}
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare class OncallSchedule extends pulumi.CustomResource {
|
|
46
|
+
/**
|
|
47
|
+
* Get an existing OncallSchedule resource's state with the given name, ID, and optional extra
|
|
48
|
+
* properties used to qualify the lookup.
|
|
49
|
+
*
|
|
50
|
+
* @param name The _unique_ name of the resulting resource.
|
|
51
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
52
|
+
* @param state Any extra arguments used during the lookup.
|
|
53
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
54
|
+
*/
|
|
55
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OncallScheduleState, opts?: pulumi.CustomResourceOptions): OncallSchedule;
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if the given object is an instance of OncallSchedule. This is designed to work even
|
|
58
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
59
|
+
*/
|
|
60
|
+
static isInstance(obj: any): obj is OncallSchedule;
|
|
61
|
+
/**
|
|
62
|
+
* Enable overrides via web UI (it will ignore ical*url*overrides).
|
|
63
|
+
*/
|
|
64
|
+
readonly enableWebOverrides: pulumi.Output<boolean | undefined>;
|
|
65
|
+
/**
|
|
66
|
+
* The URL of external iCal calendar which override primary events.
|
|
67
|
+
*/
|
|
68
|
+
readonly icalUrlOverrides: pulumi.Output<string | undefined>;
|
|
69
|
+
/**
|
|
70
|
+
* The URL of the external calendar iCal file.
|
|
71
|
+
*/
|
|
72
|
+
readonly icalUrlPrimary: pulumi.Output<string | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* The schedule's name.
|
|
75
|
+
*/
|
|
76
|
+
readonly name: pulumi.Output<string>;
|
|
77
|
+
/**
|
|
78
|
+
* The list of ID's of on-call shifts.
|
|
79
|
+
*/
|
|
80
|
+
readonly shifts: pulumi.Output<string[] | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* The Slack-specific settings for a schedule.
|
|
83
|
+
*/
|
|
84
|
+
readonly slack: pulumi.Output<outputs.OncallScheduleSlack | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.getOncallTeam` datasource.
|
|
87
|
+
*/
|
|
88
|
+
readonly teamId: pulumi.Output<string | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* The schedule's time zone.
|
|
91
|
+
*/
|
|
92
|
+
readonly timeZone: pulumi.Output<string | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* The schedule's type.
|
|
95
|
+
*/
|
|
96
|
+
readonly type: pulumi.Output<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Create a OncallSchedule resource with the given unique name, arguments, and options.
|
|
99
|
+
*
|
|
100
|
+
* @param name The _unique_ name of the resource.
|
|
101
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
102
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
103
|
+
*/
|
|
104
|
+
constructor(name: string, args: OncallScheduleArgs, opts?: pulumi.CustomResourceOptions);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Input properties used for looking up and filtering OncallSchedule resources.
|
|
108
|
+
*/
|
|
109
|
+
export interface OncallScheduleState {
|
|
110
|
+
/**
|
|
111
|
+
* Enable overrides via web UI (it will ignore ical*url*overrides).
|
|
112
|
+
*/
|
|
113
|
+
enableWebOverrides?: pulumi.Input<boolean>;
|
|
114
|
+
/**
|
|
115
|
+
* The URL of external iCal calendar which override primary events.
|
|
116
|
+
*/
|
|
117
|
+
icalUrlOverrides?: pulumi.Input<string>;
|
|
118
|
+
/**
|
|
119
|
+
* The URL of the external calendar iCal file.
|
|
120
|
+
*/
|
|
121
|
+
icalUrlPrimary?: pulumi.Input<string>;
|
|
122
|
+
/**
|
|
123
|
+
* The schedule's name.
|
|
124
|
+
*/
|
|
125
|
+
name?: pulumi.Input<string>;
|
|
126
|
+
/**
|
|
127
|
+
* The list of ID's of on-call shifts.
|
|
128
|
+
*/
|
|
129
|
+
shifts?: pulumi.Input<pulumi.Input<string>[]>;
|
|
130
|
+
/**
|
|
131
|
+
* The Slack-specific settings for a schedule.
|
|
132
|
+
*/
|
|
133
|
+
slack?: pulumi.Input<inputs.OncallScheduleSlack>;
|
|
134
|
+
/**
|
|
135
|
+
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.getOncallTeam` datasource.
|
|
136
|
+
*/
|
|
137
|
+
teamId?: pulumi.Input<string>;
|
|
138
|
+
/**
|
|
139
|
+
* The schedule's time zone.
|
|
140
|
+
*/
|
|
141
|
+
timeZone?: pulumi.Input<string>;
|
|
142
|
+
/**
|
|
143
|
+
* The schedule's type.
|
|
144
|
+
*/
|
|
145
|
+
type?: pulumi.Input<string>;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The set of arguments for constructing a OncallSchedule resource.
|
|
149
|
+
*/
|
|
150
|
+
export interface OncallScheduleArgs {
|
|
151
|
+
/**
|
|
152
|
+
* Enable overrides via web UI (it will ignore ical*url*overrides).
|
|
153
|
+
*/
|
|
154
|
+
enableWebOverrides?: pulumi.Input<boolean>;
|
|
155
|
+
/**
|
|
156
|
+
* The URL of external iCal calendar which override primary events.
|
|
157
|
+
*/
|
|
158
|
+
icalUrlOverrides?: pulumi.Input<string>;
|
|
159
|
+
/**
|
|
160
|
+
* The URL of the external calendar iCal file.
|
|
161
|
+
*/
|
|
162
|
+
icalUrlPrimary?: pulumi.Input<string>;
|
|
163
|
+
/**
|
|
164
|
+
* The schedule's name.
|
|
165
|
+
*/
|
|
166
|
+
name?: pulumi.Input<string>;
|
|
167
|
+
/**
|
|
168
|
+
* The list of ID's of on-call shifts.
|
|
169
|
+
*/
|
|
170
|
+
shifts?: pulumi.Input<pulumi.Input<string>[]>;
|
|
171
|
+
/**
|
|
172
|
+
* The Slack-specific settings for a schedule.
|
|
173
|
+
*/
|
|
174
|
+
slack?: pulumi.Input<inputs.OncallScheduleSlack>;
|
|
175
|
+
/**
|
|
176
|
+
* The ID of the OnCall team. To get one, create a team in Grafana, and navigate to the OnCall plugin (to sync the team with OnCall). You can then get the ID using the `grafana.getOncallTeam` datasource.
|
|
177
|
+
*/
|
|
178
|
+
teamId?: pulumi.Input<string>;
|
|
179
|
+
/**
|
|
180
|
+
* The schedule's time zone.
|
|
181
|
+
*/
|
|
182
|
+
timeZone?: pulumi.Input<string>;
|
|
183
|
+
/**
|
|
184
|
+
* The schedule's type.
|
|
185
|
+
*/
|
|
186
|
+
type: pulumi.Input<string>;
|
|
187
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.OncallSchedule = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/)
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as grafana from "@pulumi/grafana";
|
|
16
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
17
|
+
*
|
|
18
|
+
* const exampleSlackChannel = grafana.getOnCallSlackChannel({
|
|
19
|
+
* name: "example_slack_channel",
|
|
20
|
+
* });
|
|
21
|
+
* const exampleUserGroup = grafana.getOncallUserGroup({
|
|
22
|
+
* slackHandle: "example_slack_handle",
|
|
23
|
+
* });
|
|
24
|
+
* // ICal based schedule
|
|
25
|
+
* const exampleScheduleOncallSchedule = new grafana.OncallSchedule("exampleScheduleOncallSchedule", {
|
|
26
|
+
* type: "ical",
|
|
27
|
+
* icalUrlPrimary: "https://example.com/example_ical.ics",
|
|
28
|
+
* icalUrlOverrides: "https://example.com/example_overrides_ical.ics",
|
|
29
|
+
* slack: {
|
|
30
|
+
* channelId: exampleSlackChannel.then(exampleSlackChannel => exampleSlackChannel.slackId),
|
|
31
|
+
* userGroupId: exampleUserGroup.then(exampleUserGroup => exampleUserGroup.slackId),
|
|
32
|
+
* },
|
|
33
|
+
* });
|
|
34
|
+
* // Shift based schedule
|
|
35
|
+
* const exampleScheduleIndex_oncallScheduleOncallSchedule = new grafana.OncallSchedule("exampleScheduleIndex/oncallScheduleOncallSchedule", {
|
|
36
|
+
* type: "calendar",
|
|
37
|
+
* timeZone: "America/New_York",
|
|
38
|
+
* shifts: [],
|
|
39
|
+
* icalUrlOverrides: "https://example.com/example_overrides_ical.ics",
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* ## Import
|
|
44
|
+
*
|
|
45
|
+
* ```sh
|
|
46
|
+
* $ pulumi import grafana:index/oncallSchedule:OncallSchedule schedule_name {{schedule_id}}
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
class OncallSchedule extends pulumi.CustomResource {
|
|
50
|
+
/**
|
|
51
|
+
* Get an existing OncallSchedule resource's state with the given name, ID, and optional extra
|
|
52
|
+
* properties used to qualify the lookup.
|
|
53
|
+
*
|
|
54
|
+
* @param name The _unique_ name of the resulting resource.
|
|
55
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
56
|
+
* @param state Any extra arguments used during the lookup.
|
|
57
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
58
|
+
*/
|
|
59
|
+
static get(name, id, state, opts) {
|
|
60
|
+
return new OncallSchedule(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns true if the given object is an instance of OncallSchedule. This is designed to work even
|
|
64
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
65
|
+
*/
|
|
66
|
+
static isInstance(obj) {
|
|
67
|
+
if (obj === undefined || obj === null) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
return obj['__pulumiType'] === OncallSchedule.__pulumiType;
|
|
71
|
+
}
|
|
72
|
+
constructor(name, argsOrState, opts) {
|
|
73
|
+
let resourceInputs = {};
|
|
74
|
+
opts = opts || {};
|
|
75
|
+
if (opts.id) {
|
|
76
|
+
const state = argsOrState;
|
|
77
|
+
resourceInputs["enableWebOverrides"] = state ? state.enableWebOverrides : undefined;
|
|
78
|
+
resourceInputs["icalUrlOverrides"] = state ? state.icalUrlOverrides : undefined;
|
|
79
|
+
resourceInputs["icalUrlPrimary"] = state ? state.icalUrlPrimary : undefined;
|
|
80
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
81
|
+
resourceInputs["shifts"] = state ? state.shifts : undefined;
|
|
82
|
+
resourceInputs["slack"] = state ? state.slack : undefined;
|
|
83
|
+
resourceInputs["teamId"] = state ? state.teamId : undefined;
|
|
84
|
+
resourceInputs["timeZone"] = state ? state.timeZone : undefined;
|
|
85
|
+
resourceInputs["type"] = state ? state.type : undefined;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
const args = argsOrState;
|
|
89
|
+
if ((!args || args.type === undefined) && !opts.urn) {
|
|
90
|
+
throw new Error("Missing required property 'type'");
|
|
91
|
+
}
|
|
92
|
+
resourceInputs["enableWebOverrides"] = args ? args.enableWebOverrides : undefined;
|
|
93
|
+
resourceInputs["icalUrlOverrides"] = args ? args.icalUrlOverrides : undefined;
|
|
94
|
+
resourceInputs["icalUrlPrimary"] = args ? args.icalUrlPrimary : undefined;
|
|
95
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
96
|
+
resourceInputs["shifts"] = args ? args.shifts : undefined;
|
|
97
|
+
resourceInputs["slack"] = args ? args.slack : undefined;
|
|
98
|
+
resourceInputs["teamId"] = args ? args.teamId : undefined;
|
|
99
|
+
resourceInputs["timeZone"] = args ? args.timeZone : undefined;
|
|
100
|
+
resourceInputs["type"] = args ? args.type : undefined;
|
|
101
|
+
}
|
|
102
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
103
|
+
super(OncallSchedule.__pulumiType, name, resourceInputs, opts);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.OncallSchedule = OncallSchedule;
|
|
107
|
+
/** @internal */
|
|
108
|
+
OncallSchedule.__pulumiType = 'grafana:index/oncallSchedule:OncallSchedule';
|
|
109
|
+
//# sourceMappingURL=oncallSchedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oncallSchedule.js","sourceRoot":"","sources":["../oncallSchedule.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACrE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,cAAc,CAAC,YAAY,CAAC;IAC/D,CAAC;IA+CD,YAAY,IAAY,EAAE,WAAsD,EAAE,IAAmC;QACjH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA8C,CAAC;YAC7D,cAAc,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAA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Official documentation](https://grafana.com/docs/grafana/latest/administration/organization-management/)
|
|
4
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/org/)
|
|
5
|
+
*
|
|
6
|
+
* This resource represents an instance-scoped resource and uses Grafana's admin APIs.
|
|
7
|
+
* It does not work with API tokens or service accounts which are org-scoped.
|
|
8
|
+
* You must use basic auth.
|
|
9
|
+
*
|
|
10
|
+
* ## Example Usage
|
|
11
|
+
*
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
14
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
15
|
+
*
|
|
16
|
+
* const test = new grafana.Organization("test", {
|
|
17
|
+
* adminUser: "admin",
|
|
18
|
+
* admins: ["admin@example.com"],
|
|
19
|
+
* createUsers: true,
|
|
20
|
+
* editors: [
|
|
21
|
+
* "editor-01@example.com",
|
|
22
|
+
* "editor-02@example.com",
|
|
23
|
+
* ],
|
|
24
|
+
* viewers: [
|
|
25
|
+
* "viewer-01@example.com",
|
|
26
|
+
* "viewer-02@example.com",
|
|
27
|
+
* ],
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## Import
|
|
32
|
+
*
|
|
33
|
+
* ```sh
|
|
34
|
+
* $ pulumi import grafana:index/organization:Organization org_name {{org_id}}
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class Organization extends pulumi.CustomResource {
|
|
38
|
+
/**
|
|
39
|
+
* Get an existing Organization resource's state with the given name, ID, and optional extra
|
|
40
|
+
* properties used to qualify the lookup.
|
|
41
|
+
*
|
|
42
|
+
* @param name The _unique_ name of the resulting resource.
|
|
43
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
44
|
+
* @param state Any extra arguments used during the lookup.
|
|
45
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
46
|
+
*/
|
|
47
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OrganizationState, opts?: pulumi.CustomResourceOptions): Organization;
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given object is an instance of Organization. This is designed to work even
|
|
50
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
51
|
+
*/
|
|
52
|
+
static isInstance(obj: any): obj is Organization;
|
|
53
|
+
/**
|
|
54
|
+
* The login name of the configured default admin user for the Grafana installation. If unset, this value defaults to
|
|
55
|
+
* admin, the Grafana default. Grafana adds the default admin user to all organizations automatically upon creation, and
|
|
56
|
+
* this parameter keeps Terraform from removing it from organizations.
|
|
57
|
+
*/
|
|
58
|
+
readonly adminUser: pulumi.Output<string | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* A list of email addresses corresponding to users who should be given admin
|
|
61
|
+
* access to the organization. Note: users specified here must already exist in
|
|
62
|
+
* Grafana unless 'create_users' is set to true.
|
|
63
|
+
*/
|
|
64
|
+
readonly admins: pulumi.Output<string[] | undefined>;
|
|
65
|
+
/**
|
|
66
|
+
* Whether or not to create Grafana users specified in the organization's
|
|
67
|
+
* membership if they don't already exist in Grafana. If unspecified, this
|
|
68
|
+
* parameter defaults to true, creating placeholder users with the name, login,
|
|
69
|
+
* and email set to the email of the user, and a random password. Setting this
|
|
70
|
+
* option to false will cause an error to be thrown for any users that do not
|
|
71
|
+
* already exist in Grafana.
|
|
72
|
+
* Defaults to `true`.
|
|
73
|
+
*/
|
|
74
|
+
readonly createUsers: pulumi.Output<boolean | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* A list of email addresses corresponding to users who should be given editor
|
|
77
|
+
* access to the organization. Note: users specified here must already exist in
|
|
78
|
+
* Grafana unless 'create_users' is set to true.
|
|
79
|
+
*/
|
|
80
|
+
readonly editors: pulumi.Output<string[] | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* The display name for the Grafana organization created.
|
|
83
|
+
*/
|
|
84
|
+
readonly name: pulumi.Output<string>;
|
|
85
|
+
/**
|
|
86
|
+
* The organization id assigned to this organization by Grafana.
|
|
87
|
+
*/
|
|
88
|
+
readonly orgId: pulumi.Output<number>;
|
|
89
|
+
/**
|
|
90
|
+
* A list of email addresses corresponding to users who should be given viewer
|
|
91
|
+
* access to the organization. Note: users specified here must already exist in
|
|
92
|
+
* Grafana unless 'create_users' is set to true.
|
|
93
|
+
*/
|
|
94
|
+
readonly viewers: pulumi.Output<string[] | undefined>;
|
|
95
|
+
/**
|
|
96
|
+
* Create a Organization resource with the given unique name, arguments, and options.
|
|
97
|
+
*
|
|
98
|
+
* @param name The _unique_ name of the resource.
|
|
99
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
100
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
101
|
+
*/
|
|
102
|
+
constructor(name: string, args?: OrganizationArgs, opts?: pulumi.CustomResourceOptions);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Input properties used for looking up and filtering Organization resources.
|
|
106
|
+
*/
|
|
107
|
+
export interface OrganizationState {
|
|
108
|
+
/**
|
|
109
|
+
* The login name of the configured default admin user for the Grafana installation. If unset, this value defaults to
|
|
110
|
+
* admin, the Grafana default. Grafana adds the default admin user to all organizations automatically upon creation, and
|
|
111
|
+
* this parameter keeps Terraform from removing it from organizations.
|
|
112
|
+
*/
|
|
113
|
+
adminUser?: pulumi.Input<string>;
|
|
114
|
+
/**
|
|
115
|
+
* A list of email addresses corresponding to users who should be given admin
|
|
116
|
+
* access to the organization. Note: users specified here must already exist in
|
|
117
|
+
* Grafana unless 'create_users' is set to true.
|
|
118
|
+
*/
|
|
119
|
+
admins?: pulumi.Input<pulumi.Input<string>[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Whether or not to create Grafana users specified in the organization's
|
|
122
|
+
* membership if they don't already exist in Grafana. If unspecified, this
|
|
123
|
+
* parameter defaults to true, creating placeholder users with the name, login,
|
|
124
|
+
* and email set to the email of the user, and a random password. Setting this
|
|
125
|
+
* option to false will cause an error to be thrown for any users that do not
|
|
126
|
+
* already exist in Grafana.
|
|
127
|
+
* Defaults to `true`.
|
|
128
|
+
*/
|
|
129
|
+
createUsers?: pulumi.Input<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* A list of email addresses corresponding to users who should be given editor
|
|
132
|
+
* access to the organization. Note: users specified here must already exist in
|
|
133
|
+
* Grafana unless 'create_users' is set to true.
|
|
134
|
+
*/
|
|
135
|
+
editors?: pulumi.Input<pulumi.Input<string>[]>;
|
|
136
|
+
/**
|
|
137
|
+
* The display name for the Grafana organization created.
|
|
138
|
+
*/
|
|
139
|
+
name?: pulumi.Input<string>;
|
|
140
|
+
/**
|
|
141
|
+
* The organization id assigned to this organization by Grafana.
|
|
142
|
+
*/
|
|
143
|
+
orgId?: pulumi.Input<number>;
|
|
144
|
+
/**
|
|
145
|
+
* A list of email addresses corresponding to users who should be given viewer
|
|
146
|
+
* access to the organization. Note: users specified here must already exist in
|
|
147
|
+
* Grafana unless 'create_users' is set to true.
|
|
148
|
+
*/
|
|
149
|
+
viewers?: pulumi.Input<pulumi.Input<string>[]>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The set of arguments for constructing a Organization resource.
|
|
153
|
+
*/
|
|
154
|
+
export interface OrganizationArgs {
|
|
155
|
+
/**
|
|
156
|
+
* The login name of the configured default admin user for the Grafana installation. If unset, this value defaults to
|
|
157
|
+
* admin, the Grafana default. Grafana adds the default admin user to all organizations automatically upon creation, and
|
|
158
|
+
* this parameter keeps Terraform from removing it from organizations.
|
|
159
|
+
*/
|
|
160
|
+
adminUser?: pulumi.Input<string>;
|
|
161
|
+
/**
|
|
162
|
+
* A list of email addresses corresponding to users who should be given admin
|
|
163
|
+
* access to the organization. Note: users specified here must already exist in
|
|
164
|
+
* Grafana unless 'create_users' is set to true.
|
|
165
|
+
*/
|
|
166
|
+
admins?: pulumi.Input<pulumi.Input<string>[]>;
|
|
167
|
+
/**
|
|
168
|
+
* Whether or not to create Grafana users specified in the organization's
|
|
169
|
+
* membership if they don't already exist in Grafana. If unspecified, this
|
|
170
|
+
* parameter defaults to true, creating placeholder users with the name, login,
|
|
171
|
+
* and email set to the email of the user, and a random password. Setting this
|
|
172
|
+
* option to false will cause an error to be thrown for any users that do not
|
|
173
|
+
* already exist in Grafana.
|
|
174
|
+
* Defaults to `true`.
|
|
175
|
+
*/
|
|
176
|
+
createUsers?: pulumi.Input<boolean>;
|
|
177
|
+
/**
|
|
178
|
+
* A list of email addresses corresponding to users who should be given editor
|
|
179
|
+
* access to the organization. Note: users specified here must already exist in
|
|
180
|
+
* Grafana unless 'create_users' is set to true.
|
|
181
|
+
*/
|
|
182
|
+
editors?: pulumi.Input<pulumi.Input<string>[]>;
|
|
183
|
+
/**
|
|
184
|
+
* The display name for the Grafana organization created.
|
|
185
|
+
*/
|
|
186
|
+
name?: pulumi.Input<string>;
|
|
187
|
+
/**
|
|
188
|
+
* A list of email addresses corresponding to users who should be given viewer
|
|
189
|
+
* access to the organization. Note: users specified here must already exist in
|
|
190
|
+
* Grafana unless 'create_users' is set to true.
|
|
191
|
+
*/
|
|
192
|
+
viewers?: pulumi.Input<pulumi.Input<string>[]>;
|
|
193
|
+
}
|
package/organization.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Organization = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/organization-management/)
|
|
10
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/org/)
|
|
11
|
+
*
|
|
12
|
+
* This resource represents an instance-scoped resource and uses Grafana's admin APIs.
|
|
13
|
+
* It does not work with API tokens or service accounts which are org-scoped.
|
|
14
|
+
* You must use basic auth.
|
|
15
|
+
*
|
|
16
|
+
* ## Example Usage
|
|
17
|
+
*
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
20
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
21
|
+
*
|
|
22
|
+
* const test = new grafana.Organization("test", {
|
|
23
|
+
* adminUser: "admin",
|
|
24
|
+
* admins: ["admin@example.com"],
|
|
25
|
+
* createUsers: true,
|
|
26
|
+
* editors: [
|
|
27
|
+
* "editor-01@example.com",
|
|
28
|
+
* "editor-02@example.com",
|
|
29
|
+
* ],
|
|
30
|
+
* viewers: [
|
|
31
|
+
* "viewer-01@example.com",
|
|
32
|
+
* "viewer-02@example.com",
|
|
33
|
+
* ],
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ## Import
|
|
38
|
+
*
|
|
39
|
+
* ```sh
|
|
40
|
+
* $ pulumi import grafana:index/organization:Organization org_name {{org_id}}
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
class Organization extends pulumi.CustomResource {
|
|
44
|
+
/**
|
|
45
|
+
* Get an existing Organization resource's state with the given name, ID, and optional extra
|
|
46
|
+
* properties used to qualify the lookup.
|
|
47
|
+
*
|
|
48
|
+
* @param name The _unique_ name of the resulting resource.
|
|
49
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
50
|
+
* @param state Any extra arguments used during the lookup.
|
|
51
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
52
|
+
*/
|
|
53
|
+
static get(name, id, state, opts) {
|
|
54
|
+
return new Organization(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if the given object is an instance of Organization. This is designed to work even
|
|
58
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
59
|
+
*/
|
|
60
|
+
static isInstance(obj) {
|
|
61
|
+
if (obj === undefined || obj === null) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return obj['__pulumiType'] === Organization.__pulumiType;
|
|
65
|
+
}
|
|
66
|
+
constructor(name, argsOrState, opts) {
|
|
67
|
+
let resourceInputs = {};
|
|
68
|
+
opts = opts || {};
|
|
69
|
+
if (opts.id) {
|
|
70
|
+
const state = argsOrState;
|
|
71
|
+
resourceInputs["adminUser"] = state ? state.adminUser : undefined;
|
|
72
|
+
resourceInputs["admins"] = state ? state.admins : undefined;
|
|
73
|
+
resourceInputs["createUsers"] = state ? state.createUsers : undefined;
|
|
74
|
+
resourceInputs["editors"] = state ? state.editors : undefined;
|
|
75
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
76
|
+
resourceInputs["orgId"] = state ? state.orgId : undefined;
|
|
77
|
+
resourceInputs["viewers"] = state ? state.viewers : undefined;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const args = argsOrState;
|
|
81
|
+
resourceInputs["adminUser"] = args ? args.adminUser : undefined;
|
|
82
|
+
resourceInputs["admins"] = args ? args.admins : undefined;
|
|
83
|
+
resourceInputs["createUsers"] = args ? args.createUsers : undefined;
|
|
84
|
+
resourceInputs["editors"] = args ? args.editors : undefined;
|
|
85
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
86
|
+
resourceInputs["viewers"] = args ? args.viewers : undefined;
|
|
87
|
+
resourceInputs["orgId"] = undefined /*out*/;
|
|
88
|
+
}
|
|
89
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
90
|
+
super(Organization.__pulumiType, name, resourceInputs, opts);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Organization = Organization;
|
|
94
|
+
/** @internal */
|
|
95
|
+
Organization.__pulumiType = 'grafana:index/organization:Organization';
|
|
96
|
+
//# sourceMappingURL=organization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../organization.ts"],"names":[],"mappings":";AAAA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