UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

145 lines (144 loc) 4.8 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a Grafana Assistant rule that is injected into the assistant system prompt. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const example = new grafana.assistant.Rule("example", { * name: "Prefer RED metrics", * ruleContent: "When summarizing service health, prefer RED metrics.", * scope: "tenant", * priority: 10, * applications: ["assistant"], * }); * ``` * * ## Import * * ```sh * terraform import grafana_assistant_rule.name "{{ id }}" * ``` */ export declare class Rule extends pulumi.CustomResource { /** * Get an existing Rule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RuleState, opts?: pulumi.CustomResourceOptions): Rule; /** * Returns true if the given object is an instance of Rule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Rule; /** * Applications where this resource applies. Valid values: `assistant`, `loop`, `infrastructureMemory` (rules only), `all`. Defaults to all applications when unset. */ readonly applications: pulumi.Output<string[]>; /** * Optional description of the rule. */ readonly description: pulumi.Output<string | undefined>; /** * Whether the resource is enabled. */ readonly enabled: pulumi.Output<boolean>; /** * The rule name. */ readonly name: pulumi.Output<string>; /** * Rule priority (lower values apply first). */ readonly priority: pulumi.Output<number>; /** * The rule text included in the assistant system prompt. */ readonly ruleContent: pulumi.Output<string>; /** * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`). */ readonly scope: pulumi.Output<string>; /** * Create a Rule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Rule resources. */ export interface RuleState { /** * Applications where this resource applies. Valid values: `assistant`, `loop`, `infrastructureMemory` (rules only), `all`. Defaults to all applications when unset. */ applications?: pulumi.Input<pulumi.Input<string>[]>; /** * Optional description of the rule. */ description?: pulumi.Input<string>; /** * Whether the resource is enabled. */ enabled?: pulumi.Input<boolean>; /** * The rule name. */ name?: pulumi.Input<string>; /** * Rule priority (lower values apply first). */ priority?: pulumi.Input<number>; /** * The rule text included in the assistant system prompt. */ ruleContent?: pulumi.Input<string>; /** * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`). */ scope?: pulumi.Input<string>; } /** * The set of arguments for constructing a Rule resource. */ export interface RuleArgs { /** * Applications where this resource applies. Valid values: `assistant`, `loop`, `infrastructureMemory` (rules only), `all`. Defaults to all applications when unset. */ applications?: pulumi.Input<pulumi.Input<string>[]>; /** * Optional description of the rule. */ description?: pulumi.Input<string>; /** * Whether the resource is enabled. */ enabled?: pulumi.Input<boolean>; /** * The rule name. */ name?: pulumi.Input<string>; /** * Rule priority (lower values apply first). */ priority?: pulumi.Input<number>; /** * The rule text included in the assistant system prompt. */ ruleContent: pulumi.Input<string>; /** * Whether the resource is visible to the whole tenant (`tenant`) or only the creating user (`user`). */ scope: pulumi.Input<string>; }