@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
package/contactPoint.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
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.ContactPoint = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages Grafana Alerting contact points.
|
|
10
|
+
*
|
|
11
|
+
* * [Official documentation](https://grafana.com/docs/grafana/next/alerting/fundamentals/contact-points/)
|
|
12
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#contact-points)
|
|
13
|
+
*
|
|
14
|
+
* This resource requires Grafana 9.1.0 or later.
|
|
15
|
+
*
|
|
16
|
+
* ## Example Usage
|
|
17
|
+
*
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
20
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
21
|
+
*
|
|
22
|
+
* const myContactPoint = new grafana.ContactPoint("myContactPoint", {emails: [{
|
|
23
|
+
* addresses: [
|
|
24
|
+
* "one@company.org",
|
|
25
|
+
* "two@company.org",
|
|
26
|
+
* ],
|
|
27
|
+
* disableResolveMessage: false,
|
|
28
|
+
* message: "{{ len .Alerts.Firing }} firing.",
|
|
29
|
+
* singleEmail: true,
|
|
30
|
+
* subject: "{{ template \"default.title\" .}}",
|
|
31
|
+
* }]});
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* ## Import
|
|
35
|
+
*
|
|
36
|
+
* ```sh
|
|
37
|
+
* $ pulumi import grafana:index/contactPoint:ContactPoint contact_point_name {{contact_point_name}}
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
class ContactPoint extends pulumi.CustomResource {
|
|
41
|
+
/**
|
|
42
|
+
* Get an existing ContactPoint resource's state with the given name, ID, and optional extra
|
|
43
|
+
* properties used to qualify the lookup.
|
|
44
|
+
*
|
|
45
|
+
* @param name The _unique_ name of the resulting resource.
|
|
46
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
47
|
+
* @param state Any extra arguments used during the lookup.
|
|
48
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
49
|
+
*/
|
|
50
|
+
static get(name, id, state, opts) {
|
|
51
|
+
return new ContactPoint(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Returns true if the given object is an instance of ContactPoint. This is designed to work even
|
|
55
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
56
|
+
*/
|
|
57
|
+
static isInstance(obj) {
|
|
58
|
+
if (obj === undefined || obj === null) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return obj['__pulumiType'] === ContactPoint.__pulumiType;
|
|
62
|
+
}
|
|
63
|
+
constructor(name, argsOrState, opts) {
|
|
64
|
+
let resourceInputs = {};
|
|
65
|
+
opts = opts || {};
|
|
66
|
+
if (opts.id) {
|
|
67
|
+
const state = argsOrState;
|
|
68
|
+
resourceInputs["alertmanagers"] = state ? state.alertmanagers : undefined;
|
|
69
|
+
resourceInputs["dingdings"] = state ? state.dingdings : undefined;
|
|
70
|
+
resourceInputs["discords"] = state ? state.discords : undefined;
|
|
71
|
+
resourceInputs["emails"] = state ? state.emails : undefined;
|
|
72
|
+
resourceInputs["googlechats"] = state ? state.googlechats : undefined;
|
|
73
|
+
resourceInputs["kafkas"] = state ? state.kafkas : undefined;
|
|
74
|
+
resourceInputs["lines"] = state ? state.lines : undefined;
|
|
75
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
76
|
+
resourceInputs["opsgenies"] = state ? state.opsgenies : undefined;
|
|
77
|
+
resourceInputs["pagerduties"] = state ? state.pagerduties : undefined;
|
|
78
|
+
resourceInputs["pushovers"] = state ? state.pushovers : undefined;
|
|
79
|
+
resourceInputs["sensugos"] = state ? state.sensugos : undefined;
|
|
80
|
+
resourceInputs["slacks"] = state ? state.slacks : undefined;
|
|
81
|
+
resourceInputs["teams"] = state ? state.teams : undefined;
|
|
82
|
+
resourceInputs["telegrams"] = state ? state.telegrams : undefined;
|
|
83
|
+
resourceInputs["threemas"] = state ? state.threemas : undefined;
|
|
84
|
+
resourceInputs["victorops"] = state ? state.victorops : undefined;
|
|
85
|
+
resourceInputs["webexes"] = state ? state.webexes : undefined;
|
|
86
|
+
resourceInputs["webhooks"] = state ? state.webhooks : undefined;
|
|
87
|
+
resourceInputs["wecoms"] = state ? state.wecoms : undefined;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const args = argsOrState;
|
|
91
|
+
resourceInputs["alertmanagers"] = args ? args.alertmanagers : undefined;
|
|
92
|
+
resourceInputs["dingdings"] = args ? args.dingdings : undefined;
|
|
93
|
+
resourceInputs["discords"] = args ? args.discords : undefined;
|
|
94
|
+
resourceInputs["emails"] = args ? args.emails : undefined;
|
|
95
|
+
resourceInputs["googlechats"] = args ? args.googlechats : undefined;
|
|
96
|
+
resourceInputs["kafkas"] = args ? args.kafkas : undefined;
|
|
97
|
+
resourceInputs["lines"] = args ? args.lines : undefined;
|
|
98
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
99
|
+
resourceInputs["opsgenies"] = args ? args.opsgenies : undefined;
|
|
100
|
+
resourceInputs["pagerduties"] = args ? args.pagerduties : undefined;
|
|
101
|
+
resourceInputs["pushovers"] = args ? args.pushovers : undefined;
|
|
102
|
+
resourceInputs["sensugos"] = args ? args.sensugos : undefined;
|
|
103
|
+
resourceInputs["slacks"] = args ? args.slacks : undefined;
|
|
104
|
+
resourceInputs["teams"] = args ? args.teams : undefined;
|
|
105
|
+
resourceInputs["telegrams"] = args ? args.telegrams : undefined;
|
|
106
|
+
resourceInputs["threemas"] = args ? args.threemas : undefined;
|
|
107
|
+
resourceInputs["victorops"] = args ? args.victorops : undefined;
|
|
108
|
+
resourceInputs["webexes"] = args ? args.webexes : undefined;
|
|
109
|
+
resourceInputs["webhooks"] = args ? args.webhooks : undefined;
|
|
110
|
+
resourceInputs["wecoms"] = args ? args.wecoms : undefined;
|
|
111
|
+
}
|
|
112
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
113
|
+
super(ContactPoint.__pulumiType, name, resourceInputs, opts);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
exports.ContactPoint = ContactPoint;
|
|
117
|
+
/** @internal */
|
|
118
|
+
ContactPoint.__pulumiType = 'grafana:index/contactPoint:ContactPoint';
|
|
119
|
+
//# sourceMappingURL=contactPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactPoint.js","sourceRoot":"","sources":["../contactPoint.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,YAAa,SAAQ,MAAM,CAAC,cAAc;IACnD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAyB,EAAE,IAAmC;QACvH,OAAO,IAAI,YAAY,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACnE,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,YAAY,CAAC,YAAY,CAAC;IAC7D,CAAC;IA2FD,YAAY,IAAY,EAAE,WAAkD,EAAE,IAAmC;QAC7G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA4C,CAAC;YAC3D,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1E,cAAc,CAAC,WAAW,CAAC,GAAG,KAAK,CAA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CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SAC7D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;;AAvKL,oCAwKC;AA1JG,gBAAgB;AACO,yBAAY,GAAG,yCAAyC,CAAC"}
|
package/dashboard.d.ts
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Manages Grafana dashboards.
|
|
4
|
+
*
|
|
5
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/)
|
|
6
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/)
|
|
7
|
+
*
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
+
* import * as fs from "fs";
|
|
13
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
14
|
+
*
|
|
15
|
+
* const metrics = new grafana.Dashboard("metrics", {configJson: fs.readFileSync("grafana-dashboard.json")});
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* ## Import
|
|
19
|
+
*
|
|
20
|
+
* ```sh
|
|
21
|
+
* $ pulumi import grafana:index/dashboard:Dashboard dashboard_name {{dashboard_uid}} # To use the default provider org
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ```sh
|
|
25
|
+
* $ pulumi import grafana:index/dashboard:Dashboard dashboard_name {{org_id}}:{{dashboard_uid}} # When "org_id" is set on the resource
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class Dashboard extends pulumi.CustomResource {
|
|
29
|
+
/**
|
|
30
|
+
* Get an existing Dashboard resource's state with the given name, ID, and optional extra
|
|
31
|
+
* properties used to qualify the lookup.
|
|
32
|
+
*
|
|
33
|
+
* @param name The _unique_ name of the resulting resource.
|
|
34
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
35
|
+
* @param state Any extra arguments used during the lookup.
|
|
36
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
37
|
+
*/
|
|
38
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DashboardState, opts?: pulumi.CustomResourceOptions): Dashboard;
|
|
39
|
+
/**
|
|
40
|
+
* Returns true if the given object is an instance of Dashboard. This is designed to work even
|
|
41
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
42
|
+
*/
|
|
43
|
+
static isInstance(obj: any): obj is Dashboard;
|
|
44
|
+
/**
|
|
45
|
+
* The complete dashboard model JSON.
|
|
46
|
+
*/
|
|
47
|
+
readonly configJson: pulumi.Output<string>;
|
|
48
|
+
/**
|
|
49
|
+
* The numeric ID of the dashboard computed by Grafana.
|
|
50
|
+
*/
|
|
51
|
+
readonly dashboardId: pulumi.Output<number>;
|
|
52
|
+
/**
|
|
53
|
+
* The id or UID of the folder to save the dashboard in.
|
|
54
|
+
*/
|
|
55
|
+
readonly folder: pulumi.Output<string | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Set a commit message for the version history.
|
|
58
|
+
*/
|
|
59
|
+
readonly message: pulumi.Output<string | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
62
|
+
*/
|
|
63
|
+
readonly orgId: pulumi.Output<string | undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
|
|
66
|
+
*/
|
|
67
|
+
readonly overwrite: pulumi.Output<boolean | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
|
|
70
|
+
*/
|
|
71
|
+
readonly uid: pulumi.Output<string>;
|
|
72
|
+
/**
|
|
73
|
+
* The full URL of the dashboard.
|
|
74
|
+
*/
|
|
75
|
+
readonly url: pulumi.Output<string>;
|
|
76
|
+
/**
|
|
77
|
+
* Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
|
|
78
|
+
*/
|
|
79
|
+
readonly version: pulumi.Output<number>;
|
|
80
|
+
/**
|
|
81
|
+
* Create a Dashboard resource with the given unique name, arguments, and options.
|
|
82
|
+
*
|
|
83
|
+
* @param name The _unique_ name of the resource.
|
|
84
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
85
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
86
|
+
*/
|
|
87
|
+
constructor(name: string, args: DashboardArgs, opts?: pulumi.CustomResourceOptions);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Input properties used for looking up and filtering Dashboard resources.
|
|
91
|
+
*/
|
|
92
|
+
export interface DashboardState {
|
|
93
|
+
/**
|
|
94
|
+
* The complete dashboard model JSON.
|
|
95
|
+
*/
|
|
96
|
+
configJson?: pulumi.Input<string>;
|
|
97
|
+
/**
|
|
98
|
+
* The numeric ID of the dashboard computed by Grafana.
|
|
99
|
+
*/
|
|
100
|
+
dashboardId?: pulumi.Input<number>;
|
|
101
|
+
/**
|
|
102
|
+
* The id or UID of the folder to save the dashboard in.
|
|
103
|
+
*/
|
|
104
|
+
folder?: pulumi.Input<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Set a commit message for the version history.
|
|
107
|
+
*/
|
|
108
|
+
message?: pulumi.Input<string>;
|
|
109
|
+
/**
|
|
110
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
111
|
+
*/
|
|
112
|
+
orgId?: pulumi.Input<string>;
|
|
113
|
+
/**
|
|
114
|
+
* Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
|
|
115
|
+
*/
|
|
116
|
+
overwrite?: pulumi.Input<boolean>;
|
|
117
|
+
/**
|
|
118
|
+
* The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
|
|
119
|
+
*/
|
|
120
|
+
uid?: pulumi.Input<string>;
|
|
121
|
+
/**
|
|
122
|
+
* The full URL of the dashboard.
|
|
123
|
+
*/
|
|
124
|
+
url?: pulumi.Input<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
|
|
127
|
+
*/
|
|
128
|
+
version?: pulumi.Input<number>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The set of arguments for constructing a Dashboard resource.
|
|
132
|
+
*/
|
|
133
|
+
export interface DashboardArgs {
|
|
134
|
+
/**
|
|
135
|
+
* The complete dashboard model JSON.
|
|
136
|
+
*/
|
|
137
|
+
configJson: pulumi.Input<string>;
|
|
138
|
+
/**
|
|
139
|
+
* The id or UID of the folder to save the dashboard in.
|
|
140
|
+
*/
|
|
141
|
+
folder?: pulumi.Input<string>;
|
|
142
|
+
/**
|
|
143
|
+
* Set a commit message for the version history.
|
|
144
|
+
*/
|
|
145
|
+
message?: pulumi.Input<string>;
|
|
146
|
+
/**
|
|
147
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
148
|
+
*/
|
|
149
|
+
orgId?: pulumi.Input<string>;
|
|
150
|
+
/**
|
|
151
|
+
* Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
|
|
152
|
+
*/
|
|
153
|
+
overwrite?: pulumi.Input<boolean>;
|
|
154
|
+
}
|
package/dashboard.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
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.Dashboard = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages Grafana dashboards.
|
|
10
|
+
*
|
|
11
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/)
|
|
12
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/)
|
|
13
|
+
*
|
|
14
|
+
* ## Example Usage
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
+
* import * as fs from "fs";
|
|
19
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
20
|
+
*
|
|
21
|
+
* const metrics = new grafana.Dashboard("metrics", {configJson: fs.readFileSync("grafana-dashboard.json")});
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ## Import
|
|
25
|
+
*
|
|
26
|
+
* ```sh
|
|
27
|
+
* $ pulumi import grafana:index/dashboard:Dashboard dashboard_name {{dashboard_uid}} # To use the default provider org
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ```sh
|
|
31
|
+
* $ pulumi import grafana:index/dashboard:Dashboard dashboard_name {{org_id}}:{{dashboard_uid}} # When "org_id" is set on the resource
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
class Dashboard extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing Dashboard resource's state with the given name, ID, and optional extra
|
|
37
|
+
* properties used to qualify the lookup.
|
|
38
|
+
*
|
|
39
|
+
* @param name The _unique_ name of the resulting resource.
|
|
40
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
41
|
+
* @param state Any extra arguments used during the lookup.
|
|
42
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
43
|
+
*/
|
|
44
|
+
static get(name, id, state, opts) {
|
|
45
|
+
return new Dashboard(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns true if the given object is an instance of Dashboard. This is designed to work even
|
|
49
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
50
|
+
*/
|
|
51
|
+
static isInstance(obj) {
|
|
52
|
+
if (obj === undefined || obj === null) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return obj['__pulumiType'] === Dashboard.__pulumiType;
|
|
56
|
+
}
|
|
57
|
+
constructor(name, argsOrState, opts) {
|
|
58
|
+
let resourceInputs = {};
|
|
59
|
+
opts = opts || {};
|
|
60
|
+
if (opts.id) {
|
|
61
|
+
const state = argsOrState;
|
|
62
|
+
resourceInputs["configJson"] = state ? state.configJson : undefined;
|
|
63
|
+
resourceInputs["dashboardId"] = state ? state.dashboardId : undefined;
|
|
64
|
+
resourceInputs["folder"] = state ? state.folder : undefined;
|
|
65
|
+
resourceInputs["message"] = state ? state.message : undefined;
|
|
66
|
+
resourceInputs["orgId"] = state ? state.orgId : undefined;
|
|
67
|
+
resourceInputs["overwrite"] = state ? state.overwrite : undefined;
|
|
68
|
+
resourceInputs["uid"] = state ? state.uid : undefined;
|
|
69
|
+
resourceInputs["url"] = state ? state.url : undefined;
|
|
70
|
+
resourceInputs["version"] = state ? state.version : undefined;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
const args = argsOrState;
|
|
74
|
+
if ((!args || args.configJson === undefined) && !opts.urn) {
|
|
75
|
+
throw new Error("Missing required property 'configJson'");
|
|
76
|
+
}
|
|
77
|
+
resourceInputs["configJson"] = args ? args.configJson : undefined;
|
|
78
|
+
resourceInputs["folder"] = args ? args.folder : undefined;
|
|
79
|
+
resourceInputs["message"] = args ? args.message : undefined;
|
|
80
|
+
resourceInputs["orgId"] = args ? args.orgId : undefined;
|
|
81
|
+
resourceInputs["overwrite"] = args ? args.overwrite : undefined;
|
|
82
|
+
resourceInputs["dashboardId"] = undefined /*out*/;
|
|
83
|
+
resourceInputs["uid"] = undefined /*out*/;
|
|
84
|
+
resourceInputs["url"] = undefined /*out*/;
|
|
85
|
+
resourceInputs["version"] = undefined /*out*/;
|
|
86
|
+
}
|
|
87
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
88
|
+
super(Dashboard.__pulumiType, name, resourceInputs, opts);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.Dashboard = Dashboard;
|
|
92
|
+
/** @internal */
|
|
93
|
+
Dashboard.__pulumiType = 'grafana:index/dashboard:Dashboard';
|
|
94
|
+
//# sourceMappingURL=dashboard.js.map
|
package/dashboard.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../dashboard.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,SAAU,SAAQ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,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC1C,cAAc,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC1C,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACjD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;;AAxGL,8BAyGC;AA3FG,gBAAgB;AACO,sBAAY,GAAG,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/)
|
|
6
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_permissions/)
|
|
7
|
+
*
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
+
* import * as fs from "fs";
|
|
13
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
14
|
+
*
|
|
15
|
+
* const team = new grafana.Team("team", {});
|
|
16
|
+
* const user = new grafana.User("user", {email: "user.name@example.com"});
|
|
17
|
+
* const metrics = new grafana.Dashboard("metrics", {configJson: fs.readFileSync("grafana-dashboard.json")});
|
|
18
|
+
* const collectionPermission = new grafana.DashboardPermission("collectionPermission", {
|
|
19
|
+
* dashboardUid: metrics.uid,
|
|
20
|
+
* permissions: [
|
|
21
|
+
* {
|
|
22
|
+
* role: "Editor",
|
|
23
|
+
* permission: "Edit",
|
|
24
|
+
* },
|
|
25
|
+
* {
|
|
26
|
+
* teamId: team.id,
|
|
27
|
+
* permission: "View",
|
|
28
|
+
* },
|
|
29
|
+
* {
|
|
30
|
+
* userId: user.id,
|
|
31
|
+
* permission: "Admin",
|
|
32
|
+
* },
|
|
33
|
+
* ],
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ## Import
|
|
38
|
+
*
|
|
39
|
+
* ```sh
|
|
40
|
+
* $ pulumi import grafana:index/dashboardPermission:DashboardPermission dashboard_name {{dashboard_uid}}
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare class DashboardPermission extends pulumi.CustomResource {
|
|
44
|
+
/**
|
|
45
|
+
* Get an existing DashboardPermission 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: string, id: pulumi.Input<pulumi.ID>, state?: DashboardPermissionState, opts?: pulumi.CustomResourceOptions): DashboardPermission;
|
|
54
|
+
/**
|
|
55
|
+
* Returns true if the given object is an instance of DashboardPermission. This is designed to work even
|
|
56
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
57
|
+
*/
|
|
58
|
+
static isInstance(obj: any): obj is DashboardPermission;
|
|
59
|
+
/**
|
|
60
|
+
* ID of the dashboard to apply permissions to. Deprecated: use `dashboardUid` instead.
|
|
61
|
+
*
|
|
62
|
+
* @deprecated use `dashboard_uid` instead
|
|
63
|
+
*/
|
|
64
|
+
readonly dashboardId: pulumi.Output<number>;
|
|
65
|
+
/**
|
|
66
|
+
* UID of the dashboard to apply permissions to.
|
|
67
|
+
*/
|
|
68
|
+
readonly dashboardUid: pulumi.Output<string>;
|
|
69
|
+
/**
|
|
70
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
71
|
+
*/
|
|
72
|
+
readonly orgId: pulumi.Output<string | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* The permission items to add/update. Items that are omitted from the list will be removed.
|
|
75
|
+
*/
|
|
76
|
+
readonly permissions: pulumi.Output<outputs.DashboardPermissionPermission[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Create a DashboardPermission resource with the given unique name, arguments, and options.
|
|
79
|
+
*
|
|
80
|
+
* @param name The _unique_ name of the resource.
|
|
81
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
82
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
83
|
+
*/
|
|
84
|
+
constructor(name: string, args: DashboardPermissionArgs, opts?: pulumi.CustomResourceOptions);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Input properties used for looking up and filtering DashboardPermission resources.
|
|
88
|
+
*/
|
|
89
|
+
export interface DashboardPermissionState {
|
|
90
|
+
/**
|
|
91
|
+
* ID of the dashboard to apply permissions to. Deprecated: use `dashboardUid` instead.
|
|
92
|
+
*
|
|
93
|
+
* @deprecated use `dashboard_uid` instead
|
|
94
|
+
*/
|
|
95
|
+
dashboardId?: pulumi.Input<number>;
|
|
96
|
+
/**
|
|
97
|
+
* UID of the dashboard to apply permissions to.
|
|
98
|
+
*/
|
|
99
|
+
dashboardUid?: pulumi.Input<string>;
|
|
100
|
+
/**
|
|
101
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
102
|
+
*/
|
|
103
|
+
orgId?: pulumi.Input<string>;
|
|
104
|
+
/**
|
|
105
|
+
* The permission items to add/update. Items that are omitted from the list will be removed.
|
|
106
|
+
*/
|
|
107
|
+
permissions?: pulumi.Input<pulumi.Input<inputs.DashboardPermissionPermission>[]>;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The set of arguments for constructing a DashboardPermission resource.
|
|
111
|
+
*/
|
|
112
|
+
export interface DashboardPermissionArgs {
|
|
113
|
+
/**
|
|
114
|
+
* ID of the dashboard to apply permissions to. Deprecated: use `dashboardUid` instead.
|
|
115
|
+
*
|
|
116
|
+
* @deprecated use `dashboard_uid` instead
|
|
117
|
+
*/
|
|
118
|
+
dashboardId?: pulumi.Input<number>;
|
|
119
|
+
/**
|
|
120
|
+
* UID of the dashboard to apply permissions to.
|
|
121
|
+
*/
|
|
122
|
+
dashboardUid?: pulumi.Input<string>;
|
|
123
|
+
/**
|
|
124
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
125
|
+
*/
|
|
126
|
+
orgId?: pulumi.Input<string>;
|
|
127
|
+
/**
|
|
128
|
+
* The permission items to add/update. Items that are omitted from the list will be removed.
|
|
129
|
+
*/
|
|
130
|
+
permissions: pulumi.Input<pulumi.Input<inputs.DashboardPermissionPermission>[]>;
|
|
131
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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.DashboardPermission = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/)
|
|
10
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_permissions/)
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as fs from "fs";
|
|
17
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
18
|
+
*
|
|
19
|
+
* const team = new grafana.Team("team", {});
|
|
20
|
+
* const user = new grafana.User("user", {email: "user.name@example.com"});
|
|
21
|
+
* const metrics = new grafana.Dashboard("metrics", {configJson: fs.readFileSync("grafana-dashboard.json")});
|
|
22
|
+
* const collectionPermission = new grafana.DashboardPermission("collectionPermission", {
|
|
23
|
+
* dashboardUid: metrics.uid,
|
|
24
|
+
* permissions: [
|
|
25
|
+
* {
|
|
26
|
+
* role: "Editor",
|
|
27
|
+
* permission: "Edit",
|
|
28
|
+
* },
|
|
29
|
+
* {
|
|
30
|
+
* teamId: team.id,
|
|
31
|
+
* permission: "View",
|
|
32
|
+
* },
|
|
33
|
+
* {
|
|
34
|
+
* userId: user.id,
|
|
35
|
+
* permission: "Admin",
|
|
36
|
+
* },
|
|
37
|
+
* ],
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* ## Import
|
|
42
|
+
*
|
|
43
|
+
* ```sh
|
|
44
|
+
* $ pulumi import grafana:index/dashboardPermission:DashboardPermission dashboard_name {{dashboard_uid}}
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
class DashboardPermission extends pulumi.CustomResource {
|
|
48
|
+
/**
|
|
49
|
+
* Get an existing DashboardPermission resource's state with the given name, ID, and optional extra
|
|
50
|
+
* properties used to qualify the lookup.
|
|
51
|
+
*
|
|
52
|
+
* @param name The _unique_ name of the resulting resource.
|
|
53
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
54
|
+
* @param state Any extra arguments used during the lookup.
|
|
55
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
56
|
+
*/
|
|
57
|
+
static get(name, id, state, opts) {
|
|
58
|
+
return new DashboardPermission(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns true if the given object is an instance of DashboardPermission. This is designed to work even
|
|
62
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
63
|
+
*/
|
|
64
|
+
static isInstance(obj) {
|
|
65
|
+
if (obj === undefined || obj === null) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
return obj['__pulumiType'] === DashboardPermission.__pulumiType;
|
|
69
|
+
}
|
|
70
|
+
constructor(name, argsOrState, opts) {
|
|
71
|
+
let resourceInputs = {};
|
|
72
|
+
opts = opts || {};
|
|
73
|
+
if (opts.id) {
|
|
74
|
+
const state = argsOrState;
|
|
75
|
+
resourceInputs["dashboardId"] = state ? state.dashboardId : undefined;
|
|
76
|
+
resourceInputs["dashboardUid"] = state ? state.dashboardUid : undefined;
|
|
77
|
+
resourceInputs["orgId"] = state ? state.orgId : undefined;
|
|
78
|
+
resourceInputs["permissions"] = state ? state.permissions : undefined;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const args = argsOrState;
|
|
82
|
+
if ((!args || args.permissions === undefined) && !opts.urn) {
|
|
83
|
+
throw new Error("Missing required property 'permissions'");
|
|
84
|
+
}
|
|
85
|
+
resourceInputs["dashboardId"] = args ? args.dashboardId : undefined;
|
|
86
|
+
resourceInputs["dashboardUid"] = args ? args.dashboardUid : undefined;
|
|
87
|
+
resourceInputs["orgId"] = args ? args.orgId : undefined;
|
|
88
|
+
resourceInputs["permissions"] = args ? args.permissions : undefined;
|
|
89
|
+
}
|
|
90
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
91
|
+
super(DashboardPermission.__pulumiType, name, resourceInputs, opts);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.DashboardPermission = DashboardPermission;
|
|
95
|
+
/** @internal */
|
|
96
|
+
DashboardPermission.__pulumiType = 'grafana:index/dashboardPermission:DashboardPermission';
|
|
97
|
+
//# sourceMappingURL=dashboardPermission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboardPermission.js","sourceRoot":"","sources":["../dashboardPermission.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;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