UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

117 lines (116 loc) 4 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages Knowledge Graph Custom Model Rules through the Grafana API. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.assert.CustomModelRules("test", { * name: "test-anything", * rules: { * entities: [{ * type: "Service", * name: "workload | service | job", * scope: { * namespace: "namespace", * env: "asserts_env", * site: "asserts_site", * }, * lookup: { * workload: "workload | deployment | statefulset | daemonset | replicaset", * service: "service", * job: "job", * proxy_job: "job", * }, * definedBies: [ * { * query: "up{job!=''}", * disabled: false, * labelValues: { * service: "service", * job: "job", * }, * literals: { * _source: "up_query", * }, * }, * { * query: "up{job='disabled'}", * disabled: true, * }, * ], * }], * }, * }); * ``` * * ## Import * * ```sh * terraform import grafana_asserts_custom_model_rules.name "{{ name }}" * ``` */ export declare class CustomModelRules extends pulumi.CustomResource { /** * Get an existing CustomModelRules 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?: CustomModelRulesState, opts?: pulumi.CustomResourceOptions): CustomModelRules; /** * Returns true if the given object is an instance of CustomModelRules. 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 CustomModelRules; /** * The name of the custom model rules. */ readonly name: pulumi.Output<string>; /** * The rules configuration for the custom model rules. */ readonly rules: pulumi.Output<outputs.assert.CustomModelRulesRules>; /** * Create a CustomModelRules 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: CustomModelRulesArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CustomModelRules resources. */ export interface CustomModelRulesState { /** * The name of the custom model rules. */ name?: pulumi.Input<string>; /** * The rules configuration for the custom model rules. */ rules?: pulumi.Input<inputs.assert.CustomModelRulesRules>; } /** * The set of arguments for constructing a CustomModelRules resource. */ export interface CustomModelRulesArgs { /** * The name of the custom model rules. */ name?: pulumi.Input<string>; /** * The rules configuration for the custom model rules. */ rules: pulumi.Input<inputs.assert.CustomModelRulesRules>; }