@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/ruleGroup.js
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
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.RuleGroup = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages Grafana Alerting rule groups.
|
|
10
|
+
*
|
|
11
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/)
|
|
12
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/#alert-rules)
|
|
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 ruleFolder = new grafana.Folder("ruleFolder", {title: "My Alert Rule Folder"});
|
|
23
|
+
* const myAlertRule = new grafana.RuleGroup("myAlertRule", {
|
|
24
|
+
* folderUid: ruleFolder.uid,
|
|
25
|
+
* intervalSeconds: 240,
|
|
26
|
+
* orgId: "1",
|
|
27
|
+
* rules: [{
|
|
28
|
+
* name: "My Alert Rule 1",
|
|
29
|
+
* "for": "2m",
|
|
30
|
+
* condition: "B",
|
|
31
|
+
* noDataState: "NoData",
|
|
32
|
+
* execErrState: "Alerting",
|
|
33
|
+
* annotations: {
|
|
34
|
+
* a: "b",
|
|
35
|
+
* c: "d",
|
|
36
|
+
* },
|
|
37
|
+
* labels: {
|
|
38
|
+
* e: "f",
|
|
39
|
+
* g: "h",
|
|
40
|
+
* },
|
|
41
|
+
* isPaused: false,
|
|
42
|
+
* datas: [
|
|
43
|
+
* {
|
|
44
|
+
* refId: "A",
|
|
45
|
+
* queryType: "",
|
|
46
|
+
* relativeTimeRange: {
|
|
47
|
+
* from: 600,
|
|
48
|
+
* to: 0,
|
|
49
|
+
* },
|
|
50
|
+
* datasourceUid: "PD8C576611E62080A",
|
|
51
|
+
* model: JSON.stringify({
|
|
52
|
+
* hide: false,
|
|
53
|
+
* intervalMs: 1000,
|
|
54
|
+
* maxDataPoints: 43200,
|
|
55
|
+
* refId: "A",
|
|
56
|
+
* }),
|
|
57
|
+
* },
|
|
58
|
+
* {
|
|
59
|
+
* refId: "B",
|
|
60
|
+
* queryType: "",
|
|
61
|
+
* relativeTimeRange: {
|
|
62
|
+
* from: 0,
|
|
63
|
+
* to: 0,
|
|
64
|
+
* },
|
|
65
|
+
* datasourceUid: "-100",
|
|
66
|
+
* model: `{
|
|
67
|
+
* "conditions": [
|
|
68
|
+
* {
|
|
69
|
+
* "evaluator": {
|
|
70
|
+
* "params": [
|
|
71
|
+
* 3
|
|
72
|
+
* ],
|
|
73
|
+
* "type": "gt"
|
|
74
|
+
* },
|
|
75
|
+
* "operator": {
|
|
76
|
+
* "type": "and"
|
|
77
|
+
* },
|
|
78
|
+
* "query": {
|
|
79
|
+
* "params": [
|
|
80
|
+
* "A"
|
|
81
|
+
* ]
|
|
82
|
+
* },
|
|
83
|
+
* "reducer": {
|
|
84
|
+
* "params": [],
|
|
85
|
+
* "type": "last"
|
|
86
|
+
* },
|
|
87
|
+
* "type": "query"
|
|
88
|
+
* }
|
|
89
|
+
* ],
|
|
90
|
+
* "datasource": {
|
|
91
|
+
* "type": "__expr__",
|
|
92
|
+
* "uid": "-100"
|
|
93
|
+
* },
|
|
94
|
+
* "hide": false,
|
|
95
|
+
* "intervalMs": 1000,
|
|
96
|
+
* "maxDataPoints": 43200,
|
|
97
|
+
* "refId": "B",
|
|
98
|
+
* "type": "classic_conditions"
|
|
99
|
+
* }
|
|
100
|
+
* `,
|
|
101
|
+
* },
|
|
102
|
+
* ],
|
|
103
|
+
* }],
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* ## Import
|
|
108
|
+
*
|
|
109
|
+
* ```sh
|
|
110
|
+
* $ pulumi import grafana:index/ruleGroup:RuleGroup rule_group_name {{folder_uid}};{{rule_group_name}}
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
class RuleGroup extends pulumi.CustomResource {
|
|
114
|
+
/**
|
|
115
|
+
* Get an existing RuleGroup resource's state with the given name, ID, and optional extra
|
|
116
|
+
* properties used to qualify the lookup.
|
|
117
|
+
*
|
|
118
|
+
* @param name The _unique_ name of the resulting resource.
|
|
119
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
120
|
+
* @param state Any extra arguments used during the lookup.
|
|
121
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
122
|
+
*/
|
|
123
|
+
static get(name, id, state, opts) {
|
|
124
|
+
return new RuleGroup(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Returns true if the given object is an instance of RuleGroup. This is designed to work even
|
|
128
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
129
|
+
*/
|
|
130
|
+
static isInstance(obj) {
|
|
131
|
+
if (obj === undefined || obj === null) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
return obj['__pulumiType'] === RuleGroup.__pulumiType;
|
|
135
|
+
}
|
|
136
|
+
constructor(name, argsOrState, opts) {
|
|
137
|
+
let resourceInputs = {};
|
|
138
|
+
opts = opts || {};
|
|
139
|
+
if (opts.id) {
|
|
140
|
+
const state = argsOrState;
|
|
141
|
+
resourceInputs["folderUid"] = state ? state.folderUid : undefined;
|
|
142
|
+
resourceInputs["intervalSeconds"] = state ? state.intervalSeconds : undefined;
|
|
143
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
144
|
+
resourceInputs["orgId"] = state ? state.orgId : undefined;
|
|
145
|
+
resourceInputs["rules"] = state ? state.rules : undefined;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
const args = argsOrState;
|
|
149
|
+
if ((!args || args.folderUid === undefined) && !opts.urn) {
|
|
150
|
+
throw new Error("Missing required property 'folderUid'");
|
|
151
|
+
}
|
|
152
|
+
if ((!args || args.intervalSeconds === undefined) && !opts.urn) {
|
|
153
|
+
throw new Error("Missing required property 'intervalSeconds'");
|
|
154
|
+
}
|
|
155
|
+
if ((!args || args.orgId === undefined) && !opts.urn) {
|
|
156
|
+
throw new Error("Missing required property 'orgId'");
|
|
157
|
+
}
|
|
158
|
+
if ((!args || args.rules === undefined) && !opts.urn) {
|
|
159
|
+
throw new Error("Missing required property 'rules'");
|
|
160
|
+
}
|
|
161
|
+
resourceInputs["folderUid"] = args ? args.folderUid : undefined;
|
|
162
|
+
resourceInputs["intervalSeconds"] = args ? args.intervalSeconds : undefined;
|
|
163
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
164
|
+
resourceInputs["orgId"] = args ? args.orgId : undefined;
|
|
165
|
+
resourceInputs["rules"] = args ? args.rules : undefined;
|
|
166
|
+
}
|
|
167
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
168
|
+
super(RuleGroup.__pulumiType, name, resourceInputs, opts);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.RuleGroup = RuleGroup;
|
|
172
|
+
/** @internal */
|
|
173
|
+
RuleGroup.__pulumiType = 'grafana:index/ruleGroup:RuleGroup';
|
|
174
|
+
//# sourceMappingURL=ruleGroup.js.map
|
package/ruleGroup.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleGroup.js","sourceRoot":"","sources":["../ruleGroup.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AACH,MAAa,SAAU,SAAQ,MAAM,CAAC,cAAc;IAChD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAsB,EAAE,IAAmC;QACpH,OAAO,IAAI,SAAS,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EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;;AAzFL,8BA0FC;AA5EG,gBAAgB;AACO,sBAAY,GAAG,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var childProcess = require("child_process");
|
|
3
|
+
|
|
4
|
+
var args = process.argv.slice(2);
|
|
5
|
+
var res = childProcess.spawnSync("pulumi", ["plugin", "install"].concat(args), {
|
|
6
|
+
stdio: ["ignore", "inherit", "inherit"]
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
if (res.error && res.error.code === "ENOENT") {
|
|
10
|
+
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
11
|
+
"It looks like `pulumi` is not installed on your system. " +
|
|
12
|
+
"Please visit https://pulumi.com/ to install the Pulumi CLI.\n" +
|
|
13
|
+
"You may try manually installing the plugin by running " +
|
|
14
|
+
"`pulumi plugin install " + args.join(" ") + "`");
|
|
15
|
+
} else if (res.error || res.status !== 0) {
|
|
16
|
+
console.error("\nThere was an error installing the resource provider plugin. " +
|
|
17
|
+
"You may try to manually installing the plugin by running " +
|
|
18
|
+
"`pulumi plugin install " + args.join(" ") + "`");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
process.exit(0);
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* **Note:** This resource is available only with Grafana 9.1+.
|
|
4
|
+
*
|
|
5
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/)
|
|
6
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api)
|
|
7
|
+
*
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
13
|
+
*
|
|
14
|
+
* const admin = new grafana.ServiceAccount("admin", {
|
|
15
|
+
* isDisabled: false,
|
|
16
|
+
* role: "Admin",
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class ServiceAccount extends pulumi.CustomResource {
|
|
21
|
+
/**
|
|
22
|
+
* Get an existing ServiceAccount resource's state with the given name, ID, and optional extra
|
|
23
|
+
* properties used to qualify the lookup.
|
|
24
|
+
*
|
|
25
|
+
* @param name The _unique_ name of the resulting resource.
|
|
26
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
27
|
+
* @param state Any extra arguments used during the lookup.
|
|
28
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
29
|
+
*/
|
|
30
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceAccountState, opts?: pulumi.CustomResourceOptions): ServiceAccount;
|
|
31
|
+
/**
|
|
32
|
+
* Returns true if the given object is an instance of ServiceAccount. This is designed to work even
|
|
33
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
34
|
+
*/
|
|
35
|
+
static isInstance(obj: any): obj is ServiceAccount;
|
|
36
|
+
/**
|
|
37
|
+
* The disabled status for the service account. Defaults to `false`.
|
|
38
|
+
*/
|
|
39
|
+
readonly isDisabled: pulumi.Output<boolean | undefined>;
|
|
40
|
+
/**
|
|
41
|
+
* The name of the service account.
|
|
42
|
+
*/
|
|
43
|
+
readonly name: pulumi.Output<string>;
|
|
44
|
+
/**
|
|
45
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
46
|
+
*/
|
|
47
|
+
readonly orgId: pulumi.Output<string | undefined>;
|
|
48
|
+
/**
|
|
49
|
+
* The basic role of the service account in the organization.
|
|
50
|
+
*/
|
|
51
|
+
readonly role: pulumi.Output<string | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a ServiceAccount resource with the given unique name, arguments, and options.
|
|
54
|
+
*
|
|
55
|
+
* @param name The _unique_ name of the resource.
|
|
56
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
57
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
58
|
+
*/
|
|
59
|
+
constructor(name: string, args?: ServiceAccountArgs, opts?: pulumi.CustomResourceOptions);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Input properties used for looking up and filtering ServiceAccount resources.
|
|
63
|
+
*/
|
|
64
|
+
export interface ServiceAccountState {
|
|
65
|
+
/**
|
|
66
|
+
* The disabled status for the service account. Defaults to `false`.
|
|
67
|
+
*/
|
|
68
|
+
isDisabled?: pulumi.Input<boolean>;
|
|
69
|
+
/**
|
|
70
|
+
* The name of the service account.
|
|
71
|
+
*/
|
|
72
|
+
name?: pulumi.Input<string>;
|
|
73
|
+
/**
|
|
74
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
75
|
+
*/
|
|
76
|
+
orgId?: pulumi.Input<string>;
|
|
77
|
+
/**
|
|
78
|
+
* The basic role of the service account in the organization.
|
|
79
|
+
*/
|
|
80
|
+
role?: pulumi.Input<string>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The set of arguments for constructing a ServiceAccount resource.
|
|
84
|
+
*/
|
|
85
|
+
export interface ServiceAccountArgs {
|
|
86
|
+
/**
|
|
87
|
+
* The disabled status for the service account. Defaults to `false`.
|
|
88
|
+
*/
|
|
89
|
+
isDisabled?: pulumi.Input<boolean>;
|
|
90
|
+
/**
|
|
91
|
+
* The name of the service account.
|
|
92
|
+
*/
|
|
93
|
+
name?: pulumi.Input<string>;
|
|
94
|
+
/**
|
|
95
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
96
|
+
*/
|
|
97
|
+
orgId?: pulumi.Input<string>;
|
|
98
|
+
/**
|
|
99
|
+
* The basic role of the service account in the organization.
|
|
100
|
+
*/
|
|
101
|
+
role?: pulumi.Input<string>;
|
|
102
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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.ServiceAccount = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* **Note:** This resource is available only with Grafana 9.1+.
|
|
10
|
+
*
|
|
11
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/)
|
|
12
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api)
|
|
13
|
+
*
|
|
14
|
+
* ## Example Usage
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
19
|
+
*
|
|
20
|
+
* const admin = new grafana.ServiceAccount("admin", {
|
|
21
|
+
* isDisabled: false,
|
|
22
|
+
* role: "Admin",
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
class ServiceAccount extends pulumi.CustomResource {
|
|
27
|
+
/**
|
|
28
|
+
* Get an existing ServiceAccount resource's state with the given name, ID, and optional extra
|
|
29
|
+
* properties used to qualify the lookup.
|
|
30
|
+
*
|
|
31
|
+
* @param name The _unique_ name of the resulting resource.
|
|
32
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
33
|
+
* @param state Any extra arguments used during the lookup.
|
|
34
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
35
|
+
*/
|
|
36
|
+
static get(name, id, state, opts) {
|
|
37
|
+
return new ServiceAccount(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns true if the given object is an instance of ServiceAccount. 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) {
|
|
44
|
+
if (obj === undefined || obj === null) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return obj['__pulumiType'] === ServiceAccount.__pulumiType;
|
|
48
|
+
}
|
|
49
|
+
constructor(name, argsOrState, opts) {
|
|
50
|
+
let resourceInputs = {};
|
|
51
|
+
opts = opts || {};
|
|
52
|
+
if (opts.id) {
|
|
53
|
+
const state = argsOrState;
|
|
54
|
+
resourceInputs["isDisabled"] = state ? state.isDisabled : undefined;
|
|
55
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
56
|
+
resourceInputs["orgId"] = state ? state.orgId : undefined;
|
|
57
|
+
resourceInputs["role"] = state ? state.role : undefined;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const args = argsOrState;
|
|
61
|
+
resourceInputs["isDisabled"] = args ? args.isDisabled : undefined;
|
|
62
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
63
|
+
resourceInputs["orgId"] = args ? args.orgId : undefined;
|
|
64
|
+
resourceInputs["role"] = args ? args.role : undefined;
|
|
65
|
+
}
|
|
66
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
67
|
+
super(ServiceAccount.__pulumiType, name, resourceInputs, opts);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.ServiceAccount = ServiceAccount;
|
|
71
|
+
/** @internal */
|
|
72
|
+
ServiceAccount.__pulumiType = 'grafana:index/serviceAccount:ServiceAccount';
|
|
73
|
+
//# sourceMappingURL=serviceAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serviceAccount.js","sourceRoot":"","sources":["../serviceAccount.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,cAAe,SAAQ,MAAM,C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,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;SACzD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;;AAvEL,wCAwEC;AA1DG,gBAAgB;AACO,2BAAY,GAAG,6CAA6C,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* **Note:** This resource is available from Grafana 9.2.4 onwards.
|
|
6
|
+
*
|
|
7
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/#manage-users-and-teams-permissions-for-a-service-account-in-grafana)
|
|
8
|
+
*
|
|
9
|
+
* ## Example Usage
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
14
|
+
*
|
|
15
|
+
* const test = new grafana.ServiceAccount("test", {
|
|
16
|
+
* role: "Editor",
|
|
17
|
+
* isDisabled: false,
|
|
18
|
+
* });
|
|
19
|
+
* const testTeam = new grafana.Team("testTeam", {});
|
|
20
|
+
* const testUser = new grafana.User("testUser", {
|
|
21
|
+
* email: "tf_user@test.com",
|
|
22
|
+
* login: "tf_user@test.com",
|
|
23
|
+
* password: "password",
|
|
24
|
+
* });
|
|
25
|
+
* const testPermissions = new grafana.ServiceAccountPermission("testPermissions", {
|
|
26
|
+
* serviceAccountId: test.id,
|
|
27
|
+
* permissions: [
|
|
28
|
+
* {
|
|
29
|
+
* userId: testUser.id,
|
|
30
|
+
* permission: "Edit",
|
|
31
|
+
* },
|
|
32
|
+
* {
|
|
33
|
+
* teamId: testTeam.id,
|
|
34
|
+
* permission: "Admin",
|
|
35
|
+
* },
|
|
36
|
+
* ],
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class ServiceAccountPermission extends pulumi.CustomResource {
|
|
41
|
+
/**
|
|
42
|
+
* Get an existing ServiceAccountPermission 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: string, id: pulumi.Input<pulumi.ID>, state?: ServiceAccountPermissionState, opts?: pulumi.CustomResourceOptions): ServiceAccountPermission;
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if the given object is an instance of ServiceAccountPermission. This is designed to work even
|
|
53
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
54
|
+
*/
|
|
55
|
+
static isInstance(obj: any): obj is ServiceAccountPermission;
|
|
56
|
+
/**
|
|
57
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
58
|
+
*/
|
|
59
|
+
readonly orgId: pulumi.Output<string | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* The permission items to add/update. Items that are omitted from the list will be removed.
|
|
62
|
+
*/
|
|
63
|
+
readonly permissions: pulumi.Output<outputs.ServiceAccountPermissionPermission[]>;
|
|
64
|
+
/**
|
|
65
|
+
* The id of the service account.
|
|
66
|
+
*/
|
|
67
|
+
readonly serviceAccountId: pulumi.Output<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Create a ServiceAccountPermission resource with the given unique name, arguments, and options.
|
|
70
|
+
*
|
|
71
|
+
* @param name The _unique_ name of the resource.
|
|
72
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
73
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
74
|
+
*/
|
|
75
|
+
constructor(name: string, args: ServiceAccountPermissionArgs, opts?: pulumi.CustomResourceOptions);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Input properties used for looking up and filtering ServiceAccountPermission resources.
|
|
79
|
+
*/
|
|
80
|
+
export interface ServiceAccountPermissionState {
|
|
81
|
+
/**
|
|
82
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
83
|
+
*/
|
|
84
|
+
orgId?: pulumi.Input<string>;
|
|
85
|
+
/**
|
|
86
|
+
* The permission items to add/update. Items that are omitted from the list will be removed.
|
|
87
|
+
*/
|
|
88
|
+
permissions?: pulumi.Input<pulumi.Input<inputs.ServiceAccountPermissionPermission>[]>;
|
|
89
|
+
/**
|
|
90
|
+
* The id of the service account.
|
|
91
|
+
*/
|
|
92
|
+
serviceAccountId?: pulumi.Input<string>;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The set of arguments for constructing a ServiceAccountPermission resource.
|
|
96
|
+
*/
|
|
97
|
+
export interface ServiceAccountPermissionArgs {
|
|
98
|
+
/**
|
|
99
|
+
* The Organization ID. If not set, the Org ID defined in the provider block will be used.
|
|
100
|
+
*/
|
|
101
|
+
orgId?: pulumi.Input<string>;
|
|
102
|
+
/**
|
|
103
|
+
* The permission items to add/update. Items that are omitted from the list will be removed.
|
|
104
|
+
*/
|
|
105
|
+
permissions: pulumi.Input<pulumi.Input<inputs.ServiceAccountPermissionPermission>[]>;
|
|
106
|
+
/**
|
|
107
|
+
* The id of the service account.
|
|
108
|
+
*/
|
|
109
|
+
serviceAccountId: pulumi.Input<string>;
|
|
110
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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.ServiceAccountPermission = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* **Note:** This resource is available from Grafana 9.2.4 onwards.
|
|
10
|
+
*
|
|
11
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/#manage-users-and-teams-permissions-for-a-service-account-in-grafana)
|
|
12
|
+
*
|
|
13
|
+
* ## Example Usage
|
|
14
|
+
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
18
|
+
*
|
|
19
|
+
* const test = new grafana.ServiceAccount("test", {
|
|
20
|
+
* role: "Editor",
|
|
21
|
+
* isDisabled: false,
|
|
22
|
+
* });
|
|
23
|
+
* const testTeam = new grafana.Team("testTeam", {});
|
|
24
|
+
* const testUser = new grafana.User("testUser", {
|
|
25
|
+
* email: "tf_user@test.com",
|
|
26
|
+
* login: "tf_user@test.com",
|
|
27
|
+
* password: "password",
|
|
28
|
+
* });
|
|
29
|
+
* const testPermissions = new grafana.ServiceAccountPermission("testPermissions", {
|
|
30
|
+
* serviceAccountId: test.id,
|
|
31
|
+
* permissions: [
|
|
32
|
+
* {
|
|
33
|
+
* userId: testUser.id,
|
|
34
|
+
* permission: "Edit",
|
|
35
|
+
* },
|
|
36
|
+
* {
|
|
37
|
+
* teamId: testTeam.id,
|
|
38
|
+
* permission: "Admin",
|
|
39
|
+
* },
|
|
40
|
+
* ],
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
class ServiceAccountPermission extends pulumi.CustomResource {
|
|
45
|
+
/**
|
|
46
|
+
* Get an existing ServiceAccountPermission resource's state with the given name, ID, and optional extra
|
|
47
|
+
* properties used to qualify the lookup.
|
|
48
|
+
*
|
|
49
|
+
* @param name The _unique_ name of the resulting resource.
|
|
50
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
51
|
+
* @param state Any extra arguments used during the lookup.
|
|
52
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
53
|
+
*/
|
|
54
|
+
static get(name, id, state, opts) {
|
|
55
|
+
return new ServiceAccountPermission(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the given object is an instance of ServiceAccountPermission. This is designed to work even
|
|
59
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
60
|
+
*/
|
|
61
|
+
static isInstance(obj) {
|
|
62
|
+
if (obj === undefined || obj === null) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return obj['__pulumiType'] === ServiceAccountPermission.__pulumiType;
|
|
66
|
+
}
|
|
67
|
+
constructor(name, argsOrState, opts) {
|
|
68
|
+
let resourceInputs = {};
|
|
69
|
+
opts = opts || {};
|
|
70
|
+
if (opts.id) {
|
|
71
|
+
const state = argsOrState;
|
|
72
|
+
resourceInputs["orgId"] = state ? state.orgId : undefined;
|
|
73
|
+
resourceInputs["permissions"] = state ? state.permissions : undefined;
|
|
74
|
+
resourceInputs["serviceAccountId"] = state ? state.serviceAccountId : undefined;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const args = argsOrState;
|
|
78
|
+
if ((!args || args.permissions === undefined) && !opts.urn) {
|
|
79
|
+
throw new Error("Missing required property 'permissions'");
|
|
80
|
+
}
|
|
81
|
+
if ((!args || args.serviceAccountId === undefined) && !opts.urn) {
|
|
82
|
+
throw new Error("Missing required property 'serviceAccountId'");
|
|
83
|
+
}
|
|
84
|
+
resourceInputs["orgId"] = args ? args.orgId : undefined;
|
|
85
|
+
resourceInputs["permissions"] = args ? args.permissions : undefined;
|
|
86
|
+
resourceInputs["serviceAccountId"] = args ? args.serviceAccountId : undefined;
|
|
87
|
+
}
|
|
88
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
89
|
+
super(ServiceAccountPermission.__pulumiType, name, resourceInputs, opts);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.ServiceAccountPermission = ServiceAccountPermission;
|
|
93
|
+
/** @internal */
|
|
94
|
+
ServiceAccountPermission.__pulumiType = 'grafana:index/serviceAccountPermission:ServiceAccountPermission';
|
|
95
|
+
//# sourceMappingURL=serviceAccountPermission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serviceAccountPermission.js","sourceRoot":"","sources":["../serviceAccountPermission.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAa,wBAAyB,SAAQ,MAAM,CAAC,cAAc;IAC/D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAqC,EAAE,IAAmC;QACnI,OAAO,IAAI,wBAAwB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC/E,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,wBAAwB,CAAC,YAAY,CA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CAAC,CAAC,SAAS,CAAC;SACjF;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,wBAAwB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7E,CAAC;;AAvEL,4DAwEC;AA1DG,gBAAgB;AACO,qCAAY,GAAG,iEAAiE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* **Note:** This resource is available only with Grafana 9.1+.
|
|
4
|
+
*
|
|
5
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/administration/service-accounts/)
|
|
6
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/#service-account-api)
|
|
7
|
+
*
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
12
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
13
|
+
*
|
|
14
|
+
* const foo = new grafana.ServiceAccountToken("foo", {serviceAccountId: "1"});
|
|
15
|
+
* const bar = new grafana.ServiceAccountToken("bar", {
|
|
16
|
+
* serviceAccountId: "1",
|
|
17
|
+
* secondsToLive: 30,
|
|
18
|
+
* });
|
|
19
|
+
* export const serviceAccountTokenFooKeyOnly = foo.key;
|
|
20
|
+
* export const serviceAccountTokenBar = bar;
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class ServiceAccountToken extends pulumi.CustomResource {
|
|
24
|
+
/**
|
|
25
|
+
* Get an existing ServiceAccountToken resource's state with the given name, ID, and optional extra
|
|
26
|
+
* properties used to qualify the lookup.
|
|
27
|
+
*
|
|
28
|
+
* @param name The _unique_ name of the resulting resource.
|
|
29
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
30
|
+
* @param state Any extra arguments used during the lookup.
|
|
31
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
32
|
+
*/
|
|
33
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceAccountTokenState, opts?: pulumi.CustomResourceOptions): ServiceAccountToken;
|
|
34
|
+
/**
|
|
35
|
+
* Returns true if the given object is an instance of ServiceAccountToken. This is designed to work even
|
|
36
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
37
|
+
*/
|
|
38
|
+
static isInstance(obj: any): obj is ServiceAccountToken;
|
|
39
|
+
readonly expiration: pulumi.Output<string>;
|
|
40
|
+
readonly hasExpired: pulumi.Output<boolean>;
|
|
41
|
+
readonly key: pulumi.Output<string>;
|
|
42
|
+
readonly name: pulumi.Output<string>;
|
|
43
|
+
readonly secondsToLive: pulumi.Output<number | undefined>;
|
|
44
|
+
readonly serviceAccountId: pulumi.Output<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Create a ServiceAccountToken resource with the given unique name, arguments, and options.
|
|
47
|
+
*
|
|
48
|
+
* @param name The _unique_ name of the resource.
|
|
49
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
50
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
51
|
+
*/
|
|
52
|
+
constructor(name: string, args: ServiceAccountTokenArgs, opts?: pulumi.CustomResourceOptions);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Input properties used for looking up and filtering ServiceAccountToken resources.
|
|
56
|
+
*/
|
|
57
|
+
export interface ServiceAccountTokenState {
|
|
58
|
+
expiration?: pulumi.Input<string>;
|
|
59
|
+
hasExpired?: pulumi.Input<boolean>;
|
|
60
|
+
key?: pulumi.Input<string>;
|
|
61
|
+
name?: pulumi.Input<string>;
|
|
62
|
+
secondsToLive?: pulumi.Input<number>;
|
|
63
|
+
serviceAccountId?: pulumi.Input<string>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The set of arguments for constructing a ServiceAccountToken resource.
|
|
67
|
+
*/
|
|
68
|
+
export interface ServiceAccountTokenArgs {
|
|
69
|
+
name?: pulumi.Input<string>;
|
|
70
|
+
secondsToLive?: pulumi.Input<number>;
|
|
71
|
+
serviceAccountId: pulumi.Input<string>;
|
|
72
|
+
}
|