@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.
Files changed (252) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +54 -0
  3. package/annotation.d.ts +151 -0
  4. package/annotation.js +79 -0
  5. package/annotation.js.map +1 -0
  6. package/apiKey.d.ts +77 -0
  7. package/apiKey.js +80 -0
  8. package/apiKey.js.map +1 -0
  9. package/cloudAccessPolicy.d.ts +156 -0
  10. package/cloudAccessPolicy.js +115 -0
  11. package/cloudAccessPolicy.js.map +1 -0
  12. package/cloudAccessPolicyToken.d.ts +151 -0
  13. package/cloudAccessPolicyToken.js +108 -0
  14. package/cloudAccessPolicyToken.js.map +1 -0
  15. package/cloudApiKey.d.ts +102 -0
  16. package/cloudApiKey.js +85 -0
  17. package/cloudApiKey.js.map +1 -0
  18. package/cloudPluginInstallation.d.ts +96 -0
  19. package/cloudPluginInstallation.js +86 -0
  20. package/cloudPluginInstallation.js.map +1 -0
  21. package/cloudStack.d.ts +291 -0
  22. package/cloudStack.js +142 -0
  23. package/cloudStack.js.map +1 -0
  24. package/cloudStackApiKey.d.ts +52 -0
  25. package/cloudStackApiKey.js +67 -0
  26. package/cloudStackApiKey.js.map +1 -0
  27. package/cloudStackServiceAccount.d.ts +97 -0
  28. package/cloudStackServiceAccount.js +80 -0
  29. package/cloudStackServiceAccount.js.map +1 -0
  30. package/cloudStackServiceAccountToken.d.ts +78 -0
  31. package/cloudStackServiceAccountToken.js +93 -0
  32. package/cloudStackServiceAccountToken.js.map +1 -0
  33. package/config/index.d.ts +1 -0
  34. package/config/index.js +21 -0
  35. package/config/index.js.map +1 -0
  36. package/config/vars.d.ts +89 -0
  37. package/config/vars.js +131 -0
  38. package/config/vars.js.map +1 -0
  39. package/contactPoint.d.ts +310 -0
  40. package/contactPoint.js +119 -0
  41. package/contactPoint.js.map +1 -0
  42. package/dashboard.d.ts +154 -0
  43. package/dashboard.js +94 -0
  44. package/dashboard.js.map +1 -0
  45. package/dashboardPermission.d.ts +131 -0
  46. package/dashboardPermission.js +97 -0
  47. package/dashboardPermission.js.map +1 -0
  48. package/dataSource.d.ts +294 -0
  49. package/dataSource.js +164 -0
  50. package/dataSource.js.map +1 -0
  51. package/dataSourcePermission.d.ts +124 -0
  52. package/dataSourcePermission.js +109 -0
  53. package/dataSourcePermission.js.map +1 -0
  54. package/folder.d.ts +127 -0
  55. package/folder.js +95 -0
  56. package/folder.js.map +1 -0
  57. package/folderPermission.d.ts +106 -0
  58. package/folderPermission.js +91 -0
  59. package/folderPermission.js.map +1 -0
  60. package/getCloudIps.d.ts +56 -0
  61. package/getCloudIps.js +41 -0
  62. package/getCloudIps.js.map +1 -0
  63. package/getCloudOrganization.d.ts +37 -0
  64. package/getCloudOrganization.js +21 -0
  65. package/getCloudOrganization.js.map +1 -0
  66. package/getCloudStack.d.ts +130 -0
  67. package/getCloudStack.js +25 -0
  68. package/getCloudStack.js.map +1 -0
  69. package/getDashboard.d.ts +134 -0
  70. package/getDashboard.js +81 -0
  71. package/getDashboard.js.map +1 -0
  72. package/getDashboards.d.ts +74 -0
  73. package/getDashboards.js +36 -0
  74. package/getDashboards.js.map +1 -0
  75. package/getDataSource.d.ts +156 -0
  76. package/getDataSource.js +95 -0
  77. package/getDataSource.js.map +1 -0
  78. package/getFolder.d.ts +82 -0
  79. package/getFolder.js +59 -0
  80. package/getFolder.js.map +1 -0
  81. package/getFolders.d.ts +61 -0
  82. package/getFolders.js +61 -0
  83. package/getFolders.js.map +1 -0
  84. package/getLibraryPanel.d.ts +108 -0
  85. package/getLibraryPanel.js +28 -0
  86. package/getLibraryPanel.js.map +1 -0
  87. package/getOnCallSlackChannel.d.ts +66 -0
  88. package/getOnCallSlackChannel.js +47 -0
  89. package/getOnCallSlackChannel.js.map +1 -0
  90. package/getOncallAction.d.ts +46 -0
  91. package/getOncallAction.js +31 -0
  92. package/getOncallAction.js.map +1 -0
  93. package/getOncallEscalationChain.d.ts +62 -0
  94. package/getOncallEscalationChain.js +47 -0
  95. package/getOncallEscalationChain.js.map +1 -0
  96. package/getOncallOutgoingWebhook.d.ts +62 -0
  97. package/getOncallOutgoingWebhook.js +47 -0
  98. package/getOncallOutgoingWebhook.js.map +1 -0
  99. package/getOncallSchedule.d.ts +68 -0
  100. package/getOncallSchedule.js +49 -0
  101. package/getOncallSchedule.js.map +1 -0
  102. package/getOncallTeam.d.ts +60 -0
  103. package/getOncallTeam.js +43 -0
  104. package/getOncallTeam.js.map +1 -0
  105. package/getOncallUser.d.ts +70 -0
  106. package/getOncallUser.js +47 -0
  107. package/getOncallUser.js.map +1 -0
  108. package/getOncallUserGroup.d.ts +54 -0
  109. package/getOncallUserGroup.js +47 -0
  110. package/getOncallUserGroup.js.map +1 -0
  111. package/getOrganization.d.ts +94 -0
  112. package/getOrganization.js +67 -0
  113. package/getOrganization.js.map +1 -0
  114. package/getOrganizationPreferences.d.ts +62 -0
  115. package/getOrganizationPreferences.js +43 -0
  116. package/getOrganizationPreferences.js.map +1 -0
  117. package/getRole.d.ts +147 -0
  118. package/getRole.js +95 -0
  119. package/getRole.js.map +1 -0
  120. package/getSlos.d.ts +31 -0
  121. package/getSlos.js +31 -0
  122. package/getSlos.js.map +1 -0
  123. package/getSyntheticMonitoringProbe.d.ts +88 -0
  124. package/getSyntheticMonitoringProbe.js +47 -0
  125. package/getSyntheticMonitoringProbe.js.map +1 -0
  126. package/getSyntheticMonitoringProbes.d.ts +64 -0
  127. package/getSyntheticMonitoringProbes.js +44 -0
  128. package/getSyntheticMonitoringProbes.js.map +1 -0
  129. package/getTeam.d.ts +83 -0
  130. package/getTeam.js +67 -0
  131. package/getTeam.js.map +1 -0
  132. package/getUser.d.ts +128 -0
  133. package/getUser.js +84 -0
  134. package/getUser.js.map +1 -0
  135. package/getUsers.d.ts +61 -0
  136. package/getUsers.js +61 -0
  137. package/getUsers.js.map +1 -0
  138. package/index.d.ts +228 -0
  139. package/index.js +353 -0
  140. package/index.js.map +1 -0
  141. package/libraryPanel.d.ts +193 -0
  142. package/libraryPanel.js +103 -0
  143. package/libraryPanel.js.map +1 -0
  144. package/machineLearningHoliday.d.ts +103 -0
  145. package/machineLearningHoliday.js +62 -0
  146. package/machineLearningHoliday.js.map +1 -0
  147. package/machineLearningJob.d.ts +201 -0
  148. package/machineLearningJob.js +83 -0
  149. package/machineLearningJob.js.map +1 -0
  150. package/machineLearningOutlierDetector.d.ts +159 -0
  151. package/machineLearningOutlierDetector.js +84 -0
  152. package/machineLearningOutlierDetector.js.map +1 -0
  153. package/messageTemplate.d.ts +86 -0
  154. package/messageTemplate.js +80 -0
  155. package/messageTemplate.js.map +1 -0
  156. package/muteTiming.d.ts +106 -0
  157. package/muteTiming.js +95 -0
  158. package/muteTiming.js.map +1 -0
  159. package/notificationPolicy.d.ts +186 -0
  160. package/notificationPolicy.js +141 -0
  161. package/notificationPolicy.js.map +1 -0
  162. package/oncallEscalation.d.ts +227 -0
  163. package/oncallEscalation.js +124 -0
  164. package/oncallEscalation.js.map +1 -0
  165. package/oncallEscalationChain.d.ts +80 -0
  166. package/oncallEscalationChain.js +71 -0
  167. package/oncallEscalationChain.js.map +1 -0
  168. package/oncallIntegration.d.ts +116 -0
  169. package/oncallIntegration.js +75 -0
  170. package/oncallIntegration.js.map +1 -0
  171. package/oncallOnCallShift.d.ts +237 -0
  172. package/oncallOnCallShift.js +97 -0
  173. package/oncallOnCallShift.js.map +1 -0
  174. package/oncallOutgoingWebhook.d.ts +152 -0
  175. package/oncallOutgoingWebhook.js +88 -0
  176. package/oncallOutgoingWebhook.js.map +1 -0
  177. package/oncallRoute.d.ts +175 -0
  178. package/oncallRoute.js +116 -0
  179. package/oncallRoute.js.map +1 -0
  180. package/oncallSchedule.d.ts +187 -0
  181. package/oncallSchedule.js +109 -0
  182. package/oncallSchedule.js.map +1 -0
  183. package/organization.d.ts +193 -0
  184. package/organization.js +96 -0
  185. package/organization.js.map +1 -0
  186. package/organizationPreference.d.ts +125 -0
  187. package/organizationPreference.js +76 -0
  188. package/organizationPreference.js.map +1 -0
  189. package/package.json +30 -0
  190. package/package.json.bak +29 -0
  191. package/package.json.dev +29 -0
  192. package/playlist.d.ts +72 -0
  193. package/playlist.js +65 -0
  194. package/playlist.js.map +1 -0
  195. package/provider.d.ts +166 -0
  196. package/provider.js +64 -0
  197. package/provider.js.map +1 -0
  198. package/report.d.ts +241 -0
  199. package/report.js +110 -0
  200. package/report.js.map +1 -0
  201. package/role.d.ts +210 -0
  202. package/role.js +109 -0
  203. package/role.js.map +1 -0
  204. package/roleAssignment.d.ts +131 -0
  205. package/roleAssignment.js +95 -0
  206. package/roleAssignment.js.map +1 -0
  207. package/ruleGroup.d.ts +203 -0
  208. package/ruleGroup.js +174 -0
  209. package/ruleGroup.js.map +1 -0
  210. package/scripts/install-pulumi-plugin.js +21 -0
  211. package/serviceAccount.d.ts +102 -0
  212. package/serviceAccount.js +73 -0
  213. package/serviceAccount.js.map +1 -0
  214. package/serviceAccountPermission.d.ts +110 -0
  215. package/serviceAccountPermission.js +95 -0
  216. package/serviceAccountPermission.js.map +1 -0
  217. package/serviceAccountToken.d.ts +72 -0
  218. package/serviceAccountToken.js +85 -0
  219. package/serviceAccountToken.js.map +1 -0
  220. package/slo.d.ts +131 -0
  221. package/slo.js +77 -0
  222. package/slo.js.map +1 -0
  223. package/syntheticMonitoringCheck.d.ts +555 -0
  224. package/syntheticMonitoringCheck.js +464 -0
  225. package/syntheticMonitoringCheck.js.map +1 -0
  226. package/syntheticMonitoringInstallation.d.ts +112 -0
  227. package/syntheticMonitoringInstallation.js +95 -0
  228. package/syntheticMonitoringInstallation.js.map +1 -0
  229. package/syntheticMonitoringProbe.d.ts +164 -0
  230. package/syntheticMonitoringProbe.js +108 -0
  231. package/syntheticMonitoringProbe.js.map +1 -0
  232. package/team.d.ts +165 -0
  233. package/team.js +89 -0
  234. package/team.js.map +1 -0
  235. package/teamExternalGroup.d.ts +84 -0
  236. package/teamExternalGroup.js +81 -0
  237. package/teamExternalGroup.js.map +1 -0
  238. package/types/index.d.ts +3 -0
  239. package/types/index.js +11 -0
  240. package/types/index.js.map +1 -0
  241. package/types/input.d.ts +1914 -0
  242. package/types/input.js +5 -0
  243. package/types/input.js.map +1 -0
  244. package/types/output.d.ts +2011 -0
  245. package/types/output.js +5 -0
  246. package/types/output.js.map +1 -0
  247. package/user.d.ts +132 -0
  248. package/user.js +95 -0
  249. package/user.js.map +1 -0
  250. package/utilities.d.ts +4 -0
  251. package/utilities.js +69 -0
  252. package/utilities.js.map +1 -0
@@ -0,0 +1,156 @@
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-cloud/account-management/authentication-and-permissions/access-policies/)
6
+ * * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#create-an-access-policy)
7
+ *
8
+ * ## Example Usage
9
+ *
10
+ * ```typescript
11
+ * import * as pulumi from "@pulumi/pulumi";
12
+ * import * as grafana from "@pulumi/grafana";
13
+ * import * as grafana from "@pulumiverse/grafana";
14
+ *
15
+ * const current = grafana.getCloudOrganization({
16
+ * slug: "<your org slug>",
17
+ * });
18
+ * const testCloudAccessPolicy = new grafana.CloudAccessPolicy("testCloudAccessPolicy", {
19
+ * region: "us",
20
+ * displayName: "My Policy",
21
+ * scopes: [
22
+ * "metrics:read",
23
+ * "logs:read",
24
+ * ],
25
+ * realms: [{
26
+ * type: "org",
27
+ * identifier: current.then(current => current.id),
28
+ * labelPolicies: [{
29
+ * selector: "{namespace=\"default\"}",
30
+ * }],
31
+ * }],
32
+ * });
33
+ * const testCloudAccessPolicyToken = new grafana.CloudAccessPolicyToken("testCloudAccessPolicyToken", {
34
+ * region: "us",
35
+ * accessPolicyId: testCloudAccessPolicy.policyId,
36
+ * displayName: "My Policy Token",
37
+ * expiresAt: "2023-01-01T00:00:00Z",
38
+ * });
39
+ * ```
40
+ *
41
+ * ## Import
42
+ *
43
+ * ```sh
44
+ * $ pulumi import grafana:index/cloudAccessPolicy:CloudAccessPolicy policyname {{region}}/{{policy_id}}
45
+ * ```
46
+ */
47
+ export declare class CloudAccessPolicy extends pulumi.CustomResource {
48
+ /**
49
+ * Get an existing CloudAccessPolicy 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: string, id: pulumi.Input<pulumi.ID>, state?: CloudAccessPolicyState, opts?: pulumi.CustomResourceOptions): CloudAccessPolicy;
58
+ /**
59
+ * Returns true if the given object is an instance of CloudAccessPolicy. This is designed to work even
60
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
61
+ */
62
+ static isInstance(obj: any): obj is CloudAccessPolicy;
63
+ /**
64
+ * Creation date of the access policy.
65
+ */
66
+ readonly createdAt: pulumi.Output<string>;
67
+ /**
68
+ * Display name of the access policy. Defaults to the name.
69
+ */
70
+ readonly displayName: pulumi.Output<string | undefined>;
71
+ /**
72
+ * Name of the access policy.
73
+ */
74
+ readonly name: pulumi.Output<string>;
75
+ /**
76
+ * ID of the access policy.
77
+ */
78
+ readonly policyId: pulumi.Output<string>;
79
+ readonly realms: pulumi.Output<outputs.CloudAccessPolicyRealm[]>;
80
+ /**
81
+ * Region where the API is deployed. Generally where the stack is deployed. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
82
+ */
83
+ readonly region: pulumi.Output<string>;
84
+ /**
85
+ * Scopes of the access policy. See https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/#scopes for possible values.
86
+ */
87
+ readonly scopes: pulumi.Output<string[]>;
88
+ /**
89
+ * Last update date of the access policy.
90
+ */
91
+ readonly updatedAt: pulumi.Output<string>;
92
+ /**
93
+ * Create a CloudAccessPolicy resource with the given unique name, arguments, and options.
94
+ *
95
+ * @param name The _unique_ name of the resource.
96
+ * @param args The arguments to use to populate this resource's properties.
97
+ * @param opts A bag of options that control this resource's behavior.
98
+ */
99
+ constructor(name: string, args: CloudAccessPolicyArgs, opts?: pulumi.CustomResourceOptions);
100
+ }
101
+ /**
102
+ * Input properties used for looking up and filtering CloudAccessPolicy resources.
103
+ */
104
+ export interface CloudAccessPolicyState {
105
+ /**
106
+ * Creation date of the access policy.
107
+ */
108
+ createdAt?: pulumi.Input<string>;
109
+ /**
110
+ * Display name of the access policy. Defaults to the name.
111
+ */
112
+ displayName?: pulumi.Input<string>;
113
+ /**
114
+ * Name of the access policy.
115
+ */
116
+ name?: pulumi.Input<string>;
117
+ /**
118
+ * ID of the access policy.
119
+ */
120
+ policyId?: pulumi.Input<string>;
121
+ realms?: pulumi.Input<pulumi.Input<inputs.CloudAccessPolicyRealm>[]>;
122
+ /**
123
+ * Region where the API is deployed. Generally where the stack is deployed. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
124
+ */
125
+ region?: pulumi.Input<string>;
126
+ /**
127
+ * Scopes of the access policy. See https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/#scopes for possible values.
128
+ */
129
+ scopes?: pulumi.Input<pulumi.Input<string>[]>;
130
+ /**
131
+ * Last update date of the access policy.
132
+ */
133
+ updatedAt?: pulumi.Input<string>;
134
+ }
135
+ /**
136
+ * The set of arguments for constructing a CloudAccessPolicy resource.
137
+ */
138
+ export interface CloudAccessPolicyArgs {
139
+ /**
140
+ * Display name of the access policy. Defaults to the name.
141
+ */
142
+ displayName?: pulumi.Input<string>;
143
+ /**
144
+ * Name of the access policy.
145
+ */
146
+ name?: pulumi.Input<string>;
147
+ realms: pulumi.Input<pulumi.Input<inputs.CloudAccessPolicyRealm>[]>;
148
+ /**
149
+ * Region where the API is deployed. Generally where the stack is deployed. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
150
+ */
151
+ region: pulumi.Input<string>;
152
+ /**
153
+ * Scopes of the access policy. See https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/#scopes for possible values.
154
+ */
155
+ scopes: pulumi.Input<pulumi.Input<string>[]>;
156
+ }
@@ -0,0 +1,115 @@
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.CloudAccessPolicy = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * * [Official documentation](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/)
10
+ * * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#create-an-access-policy)
11
+ *
12
+ * ## Example Usage
13
+ *
14
+ * ```typescript
15
+ * import * as pulumi from "@pulumi/pulumi";
16
+ * import * as grafana from "@pulumi/grafana";
17
+ * import * as grafana from "@pulumiverse/grafana";
18
+ *
19
+ * const current = grafana.getCloudOrganization({
20
+ * slug: "<your org slug>",
21
+ * });
22
+ * const testCloudAccessPolicy = new grafana.CloudAccessPolicy("testCloudAccessPolicy", {
23
+ * region: "us",
24
+ * displayName: "My Policy",
25
+ * scopes: [
26
+ * "metrics:read",
27
+ * "logs:read",
28
+ * ],
29
+ * realms: [{
30
+ * type: "org",
31
+ * identifier: current.then(current => current.id),
32
+ * labelPolicies: [{
33
+ * selector: "{namespace=\"default\"}",
34
+ * }],
35
+ * }],
36
+ * });
37
+ * const testCloudAccessPolicyToken = new grafana.CloudAccessPolicyToken("testCloudAccessPolicyToken", {
38
+ * region: "us",
39
+ * accessPolicyId: testCloudAccessPolicy.policyId,
40
+ * displayName: "My Policy Token",
41
+ * expiresAt: "2023-01-01T00:00:00Z",
42
+ * });
43
+ * ```
44
+ *
45
+ * ## Import
46
+ *
47
+ * ```sh
48
+ * $ pulumi import grafana:index/cloudAccessPolicy:CloudAccessPolicy policyname {{region}}/{{policy_id}}
49
+ * ```
50
+ */
51
+ class CloudAccessPolicy extends pulumi.CustomResource {
52
+ /**
53
+ * Get an existing CloudAccessPolicy resource's state with the given name, ID, and optional extra
54
+ * properties used to qualify the lookup.
55
+ *
56
+ * @param name The _unique_ name of the resulting resource.
57
+ * @param id The _unique_ provider ID of the resource to lookup.
58
+ * @param state Any extra arguments used during the lookup.
59
+ * @param opts Optional settings to control the behavior of the CustomResource.
60
+ */
61
+ static get(name, id, state, opts) {
62
+ return new CloudAccessPolicy(name, state, Object.assign(Object.assign({}, opts), { id: id }));
63
+ }
64
+ /**
65
+ * Returns true if the given object is an instance of CloudAccessPolicy. This is designed to work even
66
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
67
+ */
68
+ static isInstance(obj) {
69
+ if (obj === undefined || obj === null) {
70
+ return false;
71
+ }
72
+ return obj['__pulumiType'] === CloudAccessPolicy.__pulumiType;
73
+ }
74
+ constructor(name, argsOrState, opts) {
75
+ let resourceInputs = {};
76
+ opts = opts || {};
77
+ if (opts.id) {
78
+ const state = argsOrState;
79
+ resourceInputs["createdAt"] = state ? state.createdAt : undefined;
80
+ resourceInputs["displayName"] = state ? state.displayName : undefined;
81
+ resourceInputs["name"] = state ? state.name : undefined;
82
+ resourceInputs["policyId"] = state ? state.policyId : undefined;
83
+ resourceInputs["realms"] = state ? state.realms : undefined;
84
+ resourceInputs["region"] = state ? state.region : undefined;
85
+ resourceInputs["scopes"] = state ? state.scopes : undefined;
86
+ resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
87
+ }
88
+ else {
89
+ const args = argsOrState;
90
+ if ((!args || args.realms === undefined) && !opts.urn) {
91
+ throw new Error("Missing required property 'realms'");
92
+ }
93
+ if ((!args || args.region === undefined) && !opts.urn) {
94
+ throw new Error("Missing required property 'region'");
95
+ }
96
+ if ((!args || args.scopes === undefined) && !opts.urn) {
97
+ throw new Error("Missing required property 'scopes'");
98
+ }
99
+ resourceInputs["displayName"] = args ? args.displayName : undefined;
100
+ resourceInputs["name"] = args ? args.name : undefined;
101
+ resourceInputs["realms"] = args ? args.realms : undefined;
102
+ resourceInputs["region"] = args ? args.region : undefined;
103
+ resourceInputs["scopes"] = args ? args.scopes : undefined;
104
+ resourceInputs["createdAt"] = undefined /*out*/;
105
+ resourceInputs["policyId"] = undefined /*out*/;
106
+ resourceInputs["updatedAt"] = undefined /*out*/;
107
+ }
108
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
109
+ super(CloudAccessPolicy.__pulumiType, name, resourceInputs, opts);
110
+ }
111
+ }
112
+ exports.CloudAccessPolicy = CloudAccessPolicy;
113
+ /** @internal */
114
+ CloudAccessPolicy.__pulumiType = 'grafana:index/cloudAccessPolicy:CloudAccessPolicy';
115
+ //# sourceMappingURL=cloudAccessPolicy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudAccessPolicy.js","sourceRoot":"","sources":["../cloudAccessPolicy.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAa,iBAAkB,SAAQ,MAAM,CAAC,cAAc;IACxD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA8B,EAAE,IAAmC;QAC5H,OAAO,IAAI,iBAAiB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACxE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC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AI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;;AArGL,8CAsGC;AAxFG,gBAAgB;AACO,8BAAY,GAAG,mDAAmD,CAAC"}
@@ -0,0 +1,151 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * * [Official documentation](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/)
4
+ * * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#create-a-token)
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * ```typescript
9
+ * import * as pulumi from "@pulumi/pulumi";
10
+ * import * as grafana from "@pulumi/grafana";
11
+ * import * as grafana from "@pulumiverse/grafana";
12
+ *
13
+ * const current = grafana.getCloudOrganization({
14
+ * slug: "<your org slug>",
15
+ * });
16
+ * const testCloudAccessPolicy = new grafana.CloudAccessPolicy("testCloudAccessPolicy", {
17
+ * region: "us",
18
+ * displayName: "My Policy",
19
+ * scopes: [
20
+ * "metrics:read",
21
+ * "logs:read",
22
+ * ],
23
+ * realms: [{
24
+ * type: "org",
25
+ * identifier: current.then(current => current.id),
26
+ * labelPolicies: [{
27
+ * selector: "{namespace=\"default\"}",
28
+ * }],
29
+ * }],
30
+ * });
31
+ * const testCloudAccessPolicyToken = new grafana.CloudAccessPolicyToken("testCloudAccessPolicyToken", {
32
+ * region: "us",
33
+ * accessPolicyId: testCloudAccessPolicy.policyId,
34
+ * displayName: "My Policy Token",
35
+ * expiresAt: "2023-01-01T00:00:00Z",
36
+ * });
37
+ * ```
38
+ */
39
+ export declare class CloudAccessPolicyToken extends pulumi.CustomResource {
40
+ /**
41
+ * Get an existing CloudAccessPolicyToken resource's state with the given name, ID, and optional extra
42
+ * properties used to qualify the lookup.
43
+ *
44
+ * @param name The _unique_ name of the resulting resource.
45
+ * @param id The _unique_ provider ID of the resource to lookup.
46
+ * @param state Any extra arguments used during the lookup.
47
+ * @param opts Optional settings to control the behavior of the CustomResource.
48
+ */
49
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CloudAccessPolicyTokenState, opts?: pulumi.CustomResourceOptions): CloudAccessPolicyToken;
50
+ /**
51
+ * Returns true if the given object is an instance of CloudAccessPolicyToken. This is designed to work even
52
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
53
+ */
54
+ static isInstance(obj: any): obj is CloudAccessPolicyToken;
55
+ /**
56
+ * ID of the access policy for which to create a token.
57
+ */
58
+ readonly accessPolicyId: pulumi.Output<string>;
59
+ /**
60
+ * Creation date of the access policy token.
61
+ */
62
+ readonly createdAt: pulumi.Output<string>;
63
+ /**
64
+ * Display name of the access policy token. Defaults to the name.
65
+ */
66
+ readonly displayName: pulumi.Output<string | undefined>;
67
+ /**
68
+ * Expiration date of the access policy token. Does not expire by default.
69
+ */
70
+ readonly expiresAt: pulumi.Output<string | undefined>;
71
+ /**
72
+ * Name of the access policy token.
73
+ */
74
+ readonly name: pulumi.Output<string>;
75
+ /**
76
+ * Region of the access policy. Should be set to the same region as the access policy. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
77
+ */
78
+ readonly region: pulumi.Output<string>;
79
+ readonly token: pulumi.Output<string>;
80
+ /**
81
+ * Last update date of the access policy token.
82
+ */
83
+ readonly updatedAt: pulumi.Output<string>;
84
+ /**
85
+ * Create a CloudAccessPolicyToken resource with the given unique name, arguments, and options.
86
+ *
87
+ * @param name The _unique_ name of the resource.
88
+ * @param args The arguments to use to populate this resource's properties.
89
+ * @param opts A bag of options that control this resource's behavior.
90
+ */
91
+ constructor(name: string, args: CloudAccessPolicyTokenArgs, opts?: pulumi.CustomResourceOptions);
92
+ }
93
+ /**
94
+ * Input properties used for looking up and filtering CloudAccessPolicyToken resources.
95
+ */
96
+ export interface CloudAccessPolicyTokenState {
97
+ /**
98
+ * ID of the access policy for which to create a token.
99
+ */
100
+ accessPolicyId?: pulumi.Input<string>;
101
+ /**
102
+ * Creation date of the access policy token.
103
+ */
104
+ createdAt?: pulumi.Input<string>;
105
+ /**
106
+ * Display name of the access policy token. Defaults to the name.
107
+ */
108
+ displayName?: pulumi.Input<string>;
109
+ /**
110
+ * Expiration date of the access policy token. Does not expire by default.
111
+ */
112
+ expiresAt?: pulumi.Input<string>;
113
+ /**
114
+ * Name of the access policy token.
115
+ */
116
+ name?: pulumi.Input<string>;
117
+ /**
118
+ * Region of the access policy. Should be set to the same region as the access policy. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
119
+ */
120
+ region?: pulumi.Input<string>;
121
+ token?: pulumi.Input<string>;
122
+ /**
123
+ * Last update date of the access policy token.
124
+ */
125
+ updatedAt?: pulumi.Input<string>;
126
+ }
127
+ /**
128
+ * The set of arguments for constructing a CloudAccessPolicyToken resource.
129
+ */
130
+ export interface CloudAccessPolicyTokenArgs {
131
+ /**
132
+ * ID of the access policy for which to create a token.
133
+ */
134
+ accessPolicyId: pulumi.Input<string>;
135
+ /**
136
+ * Display name of the access policy token. Defaults to the name.
137
+ */
138
+ displayName?: pulumi.Input<string>;
139
+ /**
140
+ * Expiration date of the access policy token. Does not expire by default.
141
+ */
142
+ expiresAt?: pulumi.Input<string>;
143
+ /**
144
+ * Name of the access policy token.
145
+ */
146
+ name?: pulumi.Input<string>;
147
+ /**
148
+ * Region of the access policy. Should be set to the same region as the access policy. Use the region list API to get the list of available regions: https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-regions.
149
+ */
150
+ region: pulumi.Input<string>;
151
+ }
@@ -0,0 +1,108 @@
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.CloudAccessPolicyToken = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * * [Official documentation](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/)
10
+ * * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#create-a-token)
11
+ *
12
+ * ## Example Usage
13
+ *
14
+ * ```typescript
15
+ * import * as pulumi from "@pulumi/pulumi";
16
+ * import * as grafana from "@pulumi/grafana";
17
+ * import * as grafana from "@pulumiverse/grafana";
18
+ *
19
+ * const current = grafana.getCloudOrganization({
20
+ * slug: "<your org slug>",
21
+ * });
22
+ * const testCloudAccessPolicy = new grafana.CloudAccessPolicy("testCloudAccessPolicy", {
23
+ * region: "us",
24
+ * displayName: "My Policy",
25
+ * scopes: [
26
+ * "metrics:read",
27
+ * "logs:read",
28
+ * ],
29
+ * realms: [{
30
+ * type: "org",
31
+ * identifier: current.then(current => current.id),
32
+ * labelPolicies: [{
33
+ * selector: "{namespace=\"default\"}",
34
+ * }],
35
+ * }],
36
+ * });
37
+ * const testCloudAccessPolicyToken = new grafana.CloudAccessPolicyToken("testCloudAccessPolicyToken", {
38
+ * region: "us",
39
+ * accessPolicyId: testCloudAccessPolicy.policyId,
40
+ * displayName: "My Policy Token",
41
+ * expiresAt: "2023-01-01T00:00:00Z",
42
+ * });
43
+ * ```
44
+ */
45
+ class CloudAccessPolicyToken extends pulumi.CustomResource {
46
+ /**
47
+ * Get an existing CloudAccessPolicyToken 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, id, state, opts) {
56
+ return new CloudAccessPolicyToken(name, state, Object.assign(Object.assign({}, opts), { id: id }));
57
+ }
58
+ /**
59
+ * Returns true if the given object is an instance of CloudAccessPolicyToken. This is designed to work even
60
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
61
+ */
62
+ static isInstance(obj) {
63
+ if (obj === undefined || obj === null) {
64
+ return false;
65
+ }
66
+ return obj['__pulumiType'] === CloudAccessPolicyToken.__pulumiType;
67
+ }
68
+ constructor(name, argsOrState, opts) {
69
+ let resourceInputs = {};
70
+ opts = opts || {};
71
+ if (opts.id) {
72
+ const state = argsOrState;
73
+ resourceInputs["accessPolicyId"] = state ? state.accessPolicyId : undefined;
74
+ resourceInputs["createdAt"] = state ? state.createdAt : undefined;
75
+ resourceInputs["displayName"] = state ? state.displayName : undefined;
76
+ resourceInputs["expiresAt"] = state ? state.expiresAt : undefined;
77
+ resourceInputs["name"] = state ? state.name : undefined;
78
+ resourceInputs["region"] = state ? state.region : undefined;
79
+ resourceInputs["token"] = state ? state.token : undefined;
80
+ resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
81
+ }
82
+ else {
83
+ const args = argsOrState;
84
+ if ((!args || args.accessPolicyId === undefined) && !opts.urn) {
85
+ throw new Error("Missing required property 'accessPolicyId'");
86
+ }
87
+ if ((!args || args.region === undefined) && !opts.urn) {
88
+ throw new Error("Missing required property 'region'");
89
+ }
90
+ resourceInputs["accessPolicyId"] = args ? args.accessPolicyId : undefined;
91
+ resourceInputs["displayName"] = args ? args.displayName : undefined;
92
+ resourceInputs["expiresAt"] = args ? args.expiresAt : undefined;
93
+ resourceInputs["name"] = args ? args.name : undefined;
94
+ resourceInputs["region"] = args ? args.region : undefined;
95
+ resourceInputs["createdAt"] = undefined /*out*/;
96
+ resourceInputs["token"] = undefined /*out*/;
97
+ resourceInputs["updatedAt"] = undefined /*out*/;
98
+ }
99
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
100
+ const secretOpts = { additionalSecretOutputs: ["token"] };
101
+ opts = pulumi.mergeOptions(opts, secretOpts);
102
+ super(CloudAccessPolicyToken.__pulumiType, name, resourceInputs, opts);
103
+ }
104
+ }
105
+ exports.CloudAccessPolicyToken = CloudAccessPolicyToken;
106
+ /** @internal */
107
+ CloudAccessPolicyToken.__pulumiType = 'grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken';
108
+ //# sourceMappingURL=cloudAccessPolicyToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudAccessPolicyToken.js","sourceRoot":"","sources":["../cloudAccessPolicyToken.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,sBAAuB,SAAQ,MAAM,CAAC,cAAc;IAC7D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAmC,EAAE,IAAmC;QACjI,OAAO,IAAI,sBAAsB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC7E,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,sBAAsB,CAAC,YAAY,CAAC;IACvE,CAAC;IAwCD,YAAY,IAAY,EAAE,WAAsE,EAAE,IAAmC;QACjI,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAsD,CAAC;YACrE,cAAc,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5E,cAAc,CAAC,WAAW,CAA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AAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAC5C,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACnD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;;AApGL,wDAqGC;AAvFG,gBAAgB;AACO,mCAAY,GAAG,6DAA6D,CAAC"}
@@ -0,0 +1,102 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Manages a single API key on the Grafana Cloud portal (on the organization level)
4
+ * * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#api-keys)
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * ```typescript
9
+ * import * as pulumi from "@pulumi/pulumi";
10
+ * import * as grafana from "@pulumiverse/grafana";
11
+ *
12
+ * const test = new grafana.CloudApiKey("test", {
13
+ * cloudOrgSlug: "myorg",
14
+ * role: "Admin",
15
+ * });
16
+ * ```
17
+ *
18
+ * ## Import
19
+ *
20
+ * ```sh
21
+ * $ pulumi import grafana:index/cloudApiKey:CloudApiKey resource_name "{{org-name}}-{{api_key_name}}"
22
+ * ```
23
+ */
24
+ export declare class CloudApiKey extends pulumi.CustomResource {
25
+ /**
26
+ * Get an existing CloudApiKey resource's state with the given name, ID, and optional extra
27
+ * properties used to qualify the lookup.
28
+ *
29
+ * @param name The _unique_ name of the resulting resource.
30
+ * @param id The _unique_ provider ID of the resource to lookup.
31
+ * @param state Any extra arguments used during the lookup.
32
+ * @param opts Optional settings to control the behavior of the CustomResource.
33
+ */
34
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CloudApiKeyState, opts?: pulumi.CustomResourceOptions): CloudApiKey;
35
+ /**
36
+ * Returns true if the given object is an instance of CloudApiKey. This is designed to work even
37
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
38
+ */
39
+ static isInstance(obj: any): obj is CloudApiKey;
40
+ /**
41
+ * The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
42
+ */
43
+ readonly cloudOrgSlug: pulumi.Output<string>;
44
+ /**
45
+ * The generated API key.
46
+ */
47
+ readonly key: pulumi.Output<string>;
48
+ /**
49
+ * Name of the API key.
50
+ */
51
+ readonly name: pulumi.Output<string>;
52
+ /**
53
+ * Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
54
+ */
55
+ readonly role: pulumi.Output<string>;
56
+ /**
57
+ * Create a CloudApiKey resource with the given unique name, arguments, and options.
58
+ *
59
+ * @param name The _unique_ name of the resource.
60
+ * @param args The arguments to use to populate this resource's properties.
61
+ * @param opts A bag of options that control this resource's behavior.
62
+ */
63
+ constructor(name: string, args: CloudApiKeyArgs, opts?: pulumi.CustomResourceOptions);
64
+ }
65
+ /**
66
+ * Input properties used for looking up and filtering CloudApiKey resources.
67
+ */
68
+ export interface CloudApiKeyState {
69
+ /**
70
+ * The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
71
+ */
72
+ cloudOrgSlug?: pulumi.Input<string>;
73
+ /**
74
+ * The generated API key.
75
+ */
76
+ key?: pulumi.Input<string>;
77
+ /**
78
+ * Name of the API key.
79
+ */
80
+ name?: pulumi.Input<string>;
81
+ /**
82
+ * Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
83
+ */
84
+ role?: pulumi.Input<string>;
85
+ }
86
+ /**
87
+ * The set of arguments for constructing a CloudApiKey resource.
88
+ */
89
+ export interface CloudApiKeyArgs {
90
+ /**
91
+ * The slug of the organization to create the API key in. This is the same slug as the organization name in the URL.
92
+ */
93
+ cloudOrgSlug: pulumi.Input<string>;
94
+ /**
95
+ * Name of the API key.
96
+ */
97
+ name?: pulumi.Input<string>;
98
+ /**
99
+ * Role of the API key. Should be one of [Viewer Editor Admin MetricsPublisher PluginPublisher]. See https://grafana.com/docs/grafana-cloud/api/#create-api-key for details.
100
+ */
101
+ role: pulumi.Input<string>;
102
+ }