@pulumiverse/grafana 2.31.0-alpha.1779974598 → 2.31.0

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.
@@ -0,0 +1,12 @@
1
+ export { McpServerArgs, McpServerState } from "./mcpServer";
2
+ export type McpServer = import("./mcpServer").McpServer;
3
+ export declare const McpServer: typeof import("./mcpServer").McpServer;
4
+ export { QuickstartArgs, QuickstartState } from "./quickstart";
5
+ export type Quickstart = import("./quickstart").Quickstart;
6
+ export declare const Quickstart: typeof import("./quickstart").Quickstart;
7
+ export { RuleArgs, RuleState } from "./rule";
8
+ export type Rule = import("./rule").Rule;
9
+ export declare const Rule: typeof import("./rule").Rule;
10
+ export { SkillArgs, SkillState } from "./skill";
11
+ export type Skill = import("./skill").Skill;
12
+ export declare const Skill: typeof import("./skill").Skill;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
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.Skill = exports.Rule = exports.Quickstart = exports.McpServer = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ exports.McpServer = null;
9
+ utilities.lazyLoad(exports, ["McpServer"], () => require("./mcpServer"));
10
+ exports.Quickstart = null;
11
+ utilities.lazyLoad(exports, ["Quickstart"], () => require("./quickstart"));
12
+ exports.Rule = null;
13
+ utilities.lazyLoad(exports, ["Rule"], () => require("./rule"));
14
+ exports.Skill = null;
15
+ utilities.lazyLoad(exports, ["Skill"], () => require("./skill"));
16
+ const _module = {
17
+ version: utilities.getVersion(),
18
+ construct: (name, type, urn) => {
19
+ switch (type) {
20
+ case "grafana:assistant/mcpServer:McpServer":
21
+ return new exports.McpServer(name, undefined, { urn });
22
+ case "grafana:assistant/quickstart:Quickstart":
23
+ return new exports.Quickstart(name, undefined, { urn });
24
+ case "grafana:assistant/rule:Rule":
25
+ return new exports.Rule(name, undefined, { urn });
26
+ case "grafana:assistant/skill:Skill":
27
+ return new exports.Skill(name, undefined, { urn });
28
+ default:
29
+ throw new Error(`unknown resource type ${type}`);
30
+ }
31
+ },
32
+ };
33
+ pulumi.runtime.registerResourceModule("grafana", "assistant/mcpServer", _module);
34
+ pulumi.runtime.registerResourceModule("grafana", "assistant/quickstart", _module);
35
+ pulumi.runtime.registerResourceModule("grafana", "assistant/rule", _module);
36
+ pulumi.runtime.registerResourceModule("grafana", "assistant/skill", _module);
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../assistant/index.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAK7B,QAAA,SAAS,GAA2C,IAAW,CAAC;AAC7E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;AAI5D,QAAA,UAAU,GAA6C,IAAW,CAAC;AAChF,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;AAI9D,QAAA,IAAI,GAAiC,IAAW,CAAC;AAC9D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAIlD,QAAA,KAAK,GAAmC,IAAW,CAAC;AACjE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AAGjE,MAAM,OAAO,GAAG;IACZ,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE;IAC/B,SAAS,EAAE,CAAC,IAAY,EAAE,IAAY,EAAE,GAAW,EAAmB,EAAE;QACpE,QAAQ,IAAI,EAAE;YACV,KAAK,uCAAuC;gBACxC,OAAO,IAAI,iBAAS,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACvD,KAAK,yCAAyC;gBAC1C,OAAO,IAAI,kBAAU,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACxD,KAAK,6BAA6B;gBAC9B,OAAO,IAAI,YAAI,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YAClD,KAAK,+BAA+B;gBAChC,OAAO,IAAI,aAAK,CAAC,IAAI,EAAO,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;YACnD;gBACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,EAAE,CAAC,CAAC;SACxD;IACL,CAAC;CACJ,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAA;AAChF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,sBAAsB,EAAE,OAAO,CAAC,CAAA;AACjF,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAA;AAC3E,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,SAAS,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAA"}
@@ -0,0 +1,158 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ /**
5
+ * Manages a Grafana Assistant MCP server integration.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as grafana from "@pulumiverse/grafana";
12
+ *
13
+ * const config = new pulumi.Config();
14
+ * const mcpToken = config.require("mcpToken");
15
+ * const example = new grafana.assistant.McpServer("example", {
16
+ * name: "Example MCP server",
17
+ * scope: "tenant",
18
+ * applications: ["assistant"],
19
+ * configuration: {
20
+ * url: "https://example.com/mcp/",
21
+ * },
22
+ * customHeaders: {
23
+ * Authorization: `Bearer ${mcpToken}`,
24
+ * },
25
+ * });
26
+ * ```
27
+ *
28
+ * ## Import
29
+ *
30
+ * ```sh
31
+ * terraform import grafana_assistant_mcp_server.name "{{ id }}"
32
+ * ```
33
+ */
34
+ export declare class McpServer extends pulumi.CustomResource {
35
+ /**
36
+ * Get an existing McpServer 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: string, id: pulumi.Input<pulumi.ID>, state?: McpServerState, opts?: pulumi.CustomResourceOptions): McpServer;
45
+ /**
46
+ * Returns true if the given object is an instance of McpServer. This is designed to work even
47
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
48
+ */
49
+ static isInstance(obj: any): obj is McpServer;
50
+ /**
51
+ * Applications where this resource applies. Valid values: `assistant`, `loop`, `all`. Defaults to all applications when unset.
52
+ */
53
+ readonly applications: pulumi.Output<string[]>;
54
+ /**
55
+ * MCP server configuration.
56
+ */
57
+ readonly configuration: pulumi.Output<outputs.assistant.McpServerConfiguration | undefined>;
58
+ /**
59
+ * Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
60
+ */
61
+ readonly customHeaders: pulumi.Output<{
62
+ [key: string]: string;
63
+ } | undefined>;
64
+ /**
65
+ * Optional description.
66
+ */
67
+ readonly description: pulumi.Output<string | undefined>;
68
+ /**
69
+ * Whether the resource is enabled.
70
+ */
71
+ readonly enabled: pulumi.Output<boolean>;
72
+ /**
73
+ * The MCP server integration name.
74
+ */
75
+ readonly name: pulumi.Output<string>;
76
+ /**
77
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
78
+ */
79
+ readonly scope: pulumi.Output<string>;
80
+ /**
81
+ * Create a McpServer 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: McpServerArgs, opts?: pulumi.CustomResourceOptions);
88
+ }
89
+ /**
90
+ * Input properties used for looking up and filtering McpServer resources.
91
+ */
92
+ export interface McpServerState {
93
+ /**
94
+ * Applications where this resource applies. Valid values: `assistant`, `loop`, `all`. Defaults to all applications when unset.
95
+ */
96
+ applications?: pulumi.Input<pulumi.Input<string>[]>;
97
+ /**
98
+ * MCP server configuration.
99
+ */
100
+ configuration?: pulumi.Input<inputs.assistant.McpServerConfiguration>;
101
+ /**
102
+ * Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
103
+ */
104
+ customHeaders?: pulumi.Input<{
105
+ [key: string]: pulumi.Input<string>;
106
+ }>;
107
+ /**
108
+ * Optional description.
109
+ */
110
+ description?: pulumi.Input<string>;
111
+ /**
112
+ * Whether the resource is enabled.
113
+ */
114
+ enabled?: pulumi.Input<boolean>;
115
+ /**
116
+ * The MCP server integration name.
117
+ */
118
+ name?: pulumi.Input<string>;
119
+ /**
120
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
121
+ */
122
+ scope?: pulumi.Input<string>;
123
+ }
124
+ /**
125
+ * The set of arguments for constructing a McpServer resource.
126
+ */
127
+ export interface McpServerArgs {
128
+ /**
129
+ * Applications where this resource applies. Valid values: `assistant`, `loop`, `all`. Defaults to all applications when unset.
130
+ */
131
+ applications?: pulumi.Input<pulumi.Input<string>[]>;
132
+ /**
133
+ * MCP server configuration.
134
+ */
135
+ configuration?: pulumi.Input<inputs.assistant.McpServerConfiguration>;
136
+ /**
137
+ * Custom HTTP headers sent to the MCP server. Values are write-only and not returned by the API.
138
+ */
139
+ customHeaders?: pulumi.Input<{
140
+ [key: string]: pulumi.Input<string>;
141
+ }>;
142
+ /**
143
+ * Optional description.
144
+ */
145
+ description?: pulumi.Input<string>;
146
+ /**
147
+ * Whether the resource is enabled.
148
+ */
149
+ enabled?: pulumi.Input<boolean>;
150
+ /**
151
+ * The MCP server integration name.
152
+ */
153
+ name?: pulumi.Input<string>;
154
+ /**
155
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
156
+ */
157
+ scope: pulumi.Input<string>;
158
+ }
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
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.McpServer = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * Manages a Grafana Assistant MCP server integration.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as grafana from "@pulumiverse/grafana";
16
+ *
17
+ * const config = new pulumi.Config();
18
+ * const mcpToken = config.require("mcpToken");
19
+ * const example = new grafana.assistant.McpServer("example", {
20
+ * name: "Example MCP server",
21
+ * scope: "tenant",
22
+ * applications: ["assistant"],
23
+ * configuration: {
24
+ * url: "https://example.com/mcp/",
25
+ * },
26
+ * customHeaders: {
27
+ * Authorization: `Bearer ${mcpToken}`,
28
+ * },
29
+ * });
30
+ * ```
31
+ *
32
+ * ## Import
33
+ *
34
+ * ```sh
35
+ * terraform import grafana_assistant_mcp_server.name "{{ id }}"
36
+ * ```
37
+ */
38
+ class McpServer extends pulumi.CustomResource {
39
+ /**
40
+ * Get an existing McpServer resource's state with the given name, ID, and optional extra
41
+ * properties used to qualify the lookup.
42
+ *
43
+ * @param name The _unique_ name of the resulting resource.
44
+ * @param id The _unique_ provider ID of the resource to lookup.
45
+ * @param state Any extra arguments used during the lookup.
46
+ * @param opts Optional settings to control the behavior of the CustomResource.
47
+ */
48
+ static get(name, id, state, opts) {
49
+ return new McpServer(name, state, { ...opts, id: id });
50
+ }
51
+ /**
52
+ * Returns true if the given object is an instance of McpServer. 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) {
56
+ if (obj === undefined || obj === null) {
57
+ return false;
58
+ }
59
+ return obj['__pulumiType'] === McpServer.__pulumiType;
60
+ }
61
+ constructor(name, argsOrState, opts) {
62
+ let resourceInputs = {};
63
+ opts = opts || {};
64
+ if (opts.id) {
65
+ const state = argsOrState;
66
+ resourceInputs["applications"] = state?.applications;
67
+ resourceInputs["configuration"] = state?.configuration;
68
+ resourceInputs["customHeaders"] = state?.customHeaders;
69
+ resourceInputs["description"] = state?.description;
70
+ resourceInputs["enabled"] = state?.enabled;
71
+ resourceInputs["name"] = state?.name;
72
+ resourceInputs["scope"] = state?.scope;
73
+ }
74
+ else {
75
+ const args = argsOrState;
76
+ if (args?.scope === undefined && !opts.urn) {
77
+ throw new Error("Missing required property 'scope'");
78
+ }
79
+ resourceInputs["applications"] = args?.applications;
80
+ resourceInputs["configuration"] = args?.configuration;
81
+ resourceInputs["customHeaders"] = args?.customHeaders ? pulumi.secret(args.customHeaders) : undefined;
82
+ resourceInputs["description"] = args?.description;
83
+ resourceInputs["enabled"] = args?.enabled;
84
+ resourceInputs["name"] = args?.name;
85
+ resourceInputs["scope"] = args?.scope;
86
+ }
87
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
88
+ const secretOpts = { additionalSecretOutputs: ["customHeaders"] };
89
+ opts = pulumi.mergeOptions(opts, secretOpts);
90
+ super(McpServer.__pulumiType, name, resourceInputs, opts);
91
+ }
92
+ }
93
+ exports.McpServer = McpServer;
94
+ /** @internal */
95
+ McpServer.__pulumiType = 'grafana:assistant/mcpServer:McpServer';
96
+ //# sourceMappingURL=mcpServer.js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
2
+ /**
3
+ * Manages a Grafana Assistant quickstart prompt shown to users.
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as grafana from "@pulumiverse/grafana";
10
+ *
11
+ * const example = new grafana.assistant.Quickstart("example", {
12
+ * scope: "tenant",
13
+ * title: "SLO health",
14
+ * prompt: "How healthy are my SLOs right now?",
15
+ * });
16
+ * ```
17
+ *
18
+ * ## Import
19
+ *
20
+ * ```sh
21
+ * terraform import grafana_assistant_quickstart.name "{{ id }}"
22
+ * ```
23
+ */
24
+ export declare class Quickstart extends pulumi.CustomResource {
25
+ /**
26
+ * Get an existing Quickstart 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?: QuickstartState, opts?: pulumi.CustomResourceOptions): Quickstart;
35
+ /**
36
+ * Returns true if the given object is an instance of Quickstart. 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 Quickstart;
40
+ /**
41
+ * Optional JSON array of context items for the quickstart.
42
+ */
43
+ readonly contextItems: pulumi.Output<string | undefined>;
44
+ /**
45
+ * Whether the resource is enabled.
46
+ */
47
+ readonly enabled: pulumi.Output<boolean>;
48
+ /**
49
+ * The quickstart question text.
50
+ */
51
+ readonly prompt: pulumi.Output<string>;
52
+ /**
53
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
54
+ */
55
+ readonly scope: pulumi.Output<string>;
56
+ /**
57
+ * Optional title for the quickstart.
58
+ */
59
+ readonly title: pulumi.Output<string | undefined>;
60
+ /**
61
+ * Create a Quickstart resource with the given unique name, arguments, and options.
62
+ *
63
+ * @param name The _unique_ name of the resource.
64
+ * @param args The arguments to use to populate this resource's properties.
65
+ * @param opts A bag of options that control this resource's behavior.
66
+ */
67
+ constructor(name: string, args: QuickstartArgs, opts?: pulumi.CustomResourceOptions);
68
+ }
69
+ /**
70
+ * Input properties used for looking up and filtering Quickstart resources.
71
+ */
72
+ export interface QuickstartState {
73
+ /**
74
+ * Optional JSON array of context items for the quickstart.
75
+ */
76
+ contextItems?: pulumi.Input<string>;
77
+ /**
78
+ * Whether the resource is enabled.
79
+ */
80
+ enabled?: pulumi.Input<boolean>;
81
+ /**
82
+ * The quickstart question text.
83
+ */
84
+ prompt?: pulumi.Input<string>;
85
+ /**
86
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
87
+ */
88
+ scope?: pulumi.Input<string>;
89
+ /**
90
+ * Optional title for the quickstart.
91
+ */
92
+ title?: pulumi.Input<string>;
93
+ }
94
+ /**
95
+ * The set of arguments for constructing a Quickstart resource.
96
+ */
97
+ export interface QuickstartArgs {
98
+ /**
99
+ * Optional JSON array of context items for the quickstart.
100
+ */
101
+ contextItems?: pulumi.Input<string>;
102
+ /**
103
+ * Whether the resource is enabled.
104
+ */
105
+ enabled?: pulumi.Input<boolean>;
106
+ /**
107
+ * The quickstart question text.
108
+ */
109
+ prompt: pulumi.Input<string>;
110
+ /**
111
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
112
+ */
113
+ scope: pulumi.Input<string>;
114
+ /**
115
+ * Optional title for the quickstart.
116
+ */
117
+ title?: pulumi.Input<string>;
118
+ }
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
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.Quickstart = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * Manages a Grafana Assistant quickstart prompt shown to users.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as grafana from "@pulumiverse/grafana";
16
+ *
17
+ * const example = new grafana.assistant.Quickstart("example", {
18
+ * scope: "tenant",
19
+ * title: "SLO health",
20
+ * prompt: "How healthy are my SLOs right now?",
21
+ * });
22
+ * ```
23
+ *
24
+ * ## Import
25
+ *
26
+ * ```sh
27
+ * terraform import grafana_assistant_quickstart.name "{{ id }}"
28
+ * ```
29
+ */
30
+ class Quickstart extends pulumi.CustomResource {
31
+ /**
32
+ * Get an existing Quickstart resource's state with the given name, ID, and optional extra
33
+ * properties used to qualify the lookup.
34
+ *
35
+ * @param name The _unique_ name of the resulting resource.
36
+ * @param id The _unique_ provider ID of the resource to lookup.
37
+ * @param state Any extra arguments used during the lookup.
38
+ * @param opts Optional settings to control the behavior of the CustomResource.
39
+ */
40
+ static get(name, id, state, opts) {
41
+ return new Quickstart(name, state, { ...opts, id: id });
42
+ }
43
+ /**
44
+ * Returns true if the given object is an instance of Quickstart. This is designed to work even
45
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
46
+ */
47
+ static isInstance(obj) {
48
+ if (obj === undefined || obj === null) {
49
+ return false;
50
+ }
51
+ return obj['__pulumiType'] === Quickstart.__pulumiType;
52
+ }
53
+ constructor(name, argsOrState, opts) {
54
+ let resourceInputs = {};
55
+ opts = opts || {};
56
+ if (opts.id) {
57
+ const state = argsOrState;
58
+ resourceInputs["contextItems"] = state?.contextItems;
59
+ resourceInputs["enabled"] = state?.enabled;
60
+ resourceInputs["prompt"] = state?.prompt;
61
+ resourceInputs["scope"] = state?.scope;
62
+ resourceInputs["title"] = state?.title;
63
+ }
64
+ else {
65
+ const args = argsOrState;
66
+ if (args?.prompt === undefined && !opts.urn) {
67
+ throw new Error("Missing required property 'prompt'");
68
+ }
69
+ if (args?.scope === undefined && !opts.urn) {
70
+ throw new Error("Missing required property 'scope'");
71
+ }
72
+ resourceInputs["contextItems"] = args?.contextItems;
73
+ resourceInputs["enabled"] = args?.enabled;
74
+ resourceInputs["prompt"] = args?.prompt;
75
+ resourceInputs["scope"] = args?.scope;
76
+ resourceInputs["title"] = args?.title;
77
+ }
78
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
79
+ super(Quickstart.__pulumiType, name, resourceInputs, opts);
80
+ }
81
+ }
82
+ exports.Quickstart = Quickstart;
83
+ /** @internal */
84
+ Quickstart.__pulumiType = 'grafana:assistant/quickstart:Quickstart';
85
+ //# sourceMappingURL=quickstart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quickstart.js","sourceRoot":"","sources":["../../assistant/quickstart.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IACjD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAuB,EAAE,IAAmC;QACrH,OAAO,IAAI,UAAU,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACjE,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,UAAU,CAAC,YAAY,CAAC;IAC3D,CAAC;IA+BD,YAAY,IAAY,EAAE,WAA8C,EAAE,IAAmC;QACzG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA0C,CAAC;YACzD,cAAc,CAAC,cAAc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a Grafana Assistant rule that is injected into the assistant system prompt.
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as grafana from "@pulumiverse/grafana";
10
+ *
11
+ * const example = new grafana.assistant.Rule("example", {
12
+ * name: "Prefer RED metrics",
13
+ * ruleContent: "When summarizing service health, prefer RED metrics.",
14
+ * scope: "tenant",
15
+ * priority: 10,
16
+ * applications: ["assistant"],
17
+ * });
18
+ * ```
19
+ *
20
+ * ## Import
21
+ *
22
+ * ```sh
23
+ * terraform import grafana_assistant_rule.name "{{ id }}"
24
+ * ```
25
+ */
26
+ export declare class Rule extends pulumi.CustomResource {
27
+ /**
28
+ * Get an existing Rule 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: string, id: pulumi.Input<pulumi.ID>, state?: RuleState, opts?: pulumi.CustomResourceOptions): Rule;
37
+ /**
38
+ * Returns true if the given object is an instance of Rule. This is designed to work even
39
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
40
+ */
41
+ static isInstance(obj: any): obj is Rule;
42
+ /**
43
+ * Applications where this resource applies. Valid values: `assistant`, `loop`, `infrastructureMemory` (rules only), `all`. Defaults to all applications when unset.
44
+ */
45
+ readonly applications: pulumi.Output<string[]>;
46
+ /**
47
+ * Optional description of the rule.
48
+ */
49
+ readonly description: pulumi.Output<string | undefined>;
50
+ /**
51
+ * Whether the resource is enabled.
52
+ */
53
+ readonly enabled: pulumi.Output<boolean>;
54
+ /**
55
+ * The rule name.
56
+ */
57
+ readonly name: pulumi.Output<string>;
58
+ /**
59
+ * Rule priority (lower values apply first).
60
+ */
61
+ readonly priority: pulumi.Output<number>;
62
+ /**
63
+ * The rule text included in the assistant system prompt.
64
+ */
65
+ readonly ruleContent: pulumi.Output<string>;
66
+ /**
67
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
68
+ */
69
+ readonly scope: pulumi.Output<string>;
70
+ /**
71
+ * Create a Rule resource with the given unique name, arguments, and options.
72
+ *
73
+ * @param name The _unique_ name of the resource.
74
+ * @param args The arguments to use to populate this resource's properties.
75
+ * @param opts A bag of options that control this resource's behavior.
76
+ */
77
+ constructor(name: string, args: RuleArgs, opts?: pulumi.CustomResourceOptions);
78
+ }
79
+ /**
80
+ * Input properties used for looking up and filtering Rule resources.
81
+ */
82
+ export interface RuleState {
83
+ /**
84
+ * Applications where this resource applies. Valid values: `assistant`, `loop`, `infrastructureMemory` (rules only), `all`. Defaults to all applications when unset.
85
+ */
86
+ applications?: pulumi.Input<pulumi.Input<string>[]>;
87
+ /**
88
+ * Optional description of the rule.
89
+ */
90
+ description?: pulumi.Input<string>;
91
+ /**
92
+ * Whether the resource is enabled.
93
+ */
94
+ enabled?: pulumi.Input<boolean>;
95
+ /**
96
+ * The rule name.
97
+ */
98
+ name?: pulumi.Input<string>;
99
+ /**
100
+ * Rule priority (lower values apply first).
101
+ */
102
+ priority?: pulumi.Input<number>;
103
+ /**
104
+ * The rule text included in the assistant system prompt.
105
+ */
106
+ ruleContent?: pulumi.Input<string>;
107
+ /**
108
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
109
+ */
110
+ scope?: pulumi.Input<string>;
111
+ }
112
+ /**
113
+ * The set of arguments for constructing a Rule resource.
114
+ */
115
+ export interface RuleArgs {
116
+ /**
117
+ * Applications where this resource applies. Valid values: `assistant`, `loop`, `infrastructureMemory` (rules only), `all`. Defaults to all applications when unset.
118
+ */
119
+ applications?: pulumi.Input<pulumi.Input<string>[]>;
120
+ /**
121
+ * Optional description of the rule.
122
+ */
123
+ description?: pulumi.Input<string>;
124
+ /**
125
+ * Whether the resource is enabled.
126
+ */
127
+ enabled?: pulumi.Input<boolean>;
128
+ /**
129
+ * The rule name.
130
+ */
131
+ name?: pulumi.Input<string>;
132
+ /**
133
+ * Rule priority (lower values apply first).
134
+ */
135
+ priority?: pulumi.Input<number>;
136
+ /**
137
+ * The rule text included in the assistant system prompt.
138
+ */
139
+ ruleContent: pulumi.Input<string>;
140
+ /**
141
+ * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`).
142
+ */
143
+ scope: pulumi.Input<string>;
144
+ }