UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

222 lines (221 loc) 7.42 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * **Note:** This resource is available only with Grafana Enterprise 7.+. * * * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/create-reports/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developer-resources/api-reference/http-api/api-legacy/reporting/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.oss.Dashboard("test", { * configJson: `{ * \\"uid\\": \\"report-dashboard\\", * \\"title\\": \\"report-dashboard\\" * } * `, * message: "inital commit.", * }); * const testReport = new grafana.enterprise.Report("test", { * name: "my report", * recipients: ["some@email.com"], * dashboards: [{ * uid: test.uid, * }], * schedule: { * frequency: "hourly", * }, * }); * ``` * * ## Import * * ```sh * terraform import grafana_report.name "{{ id }}" * terraform import grafana_report.name "{{ orgID }}:{{ id }}" * ``` */ export declare class Report extends pulumi.CustomResource { /** * Get an existing Report 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?: ReportState, opts?: pulumi.CustomResourceOptions): Report; /** * Returns true if the given object is an instance of Report. 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 Report; /** * List of dashboards to render into the report */ readonly dashboards: pulumi.Output<outputs.enterprise.ReportDashboard[] | undefined>; /** * Specifies what kind of attachment to generate for the report. Allowed values: `pdf`, `csv`, `image`. */ readonly formats: pulumi.Output<string[] | undefined>; /** * Whether to include a link to the dashboard in the report. */ readonly includeDashboardLink: pulumi.Output<boolean>; /** * Whether to include a CSV file of table panel data. */ readonly includeTableCsv: pulumi.Output<boolean>; /** * Layout of the report. Allowed values: `simple`, `grid`. */ readonly layout: pulumi.Output<string>; /** * Message to be sent in the report. */ readonly message: pulumi.Output<string | undefined>; /** * Name of the report. */ readonly name: pulumi.Output<string>; /** * The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication. */ readonly orgId: pulumi.Output<string>; /** * Orientation of the report. Allowed values: `landscape`, `portrait`. */ readonly orientation: pulumi.Output<string>; /** * List of recipients of the report. */ readonly recipients: pulumi.Output<string[]>; /** * Reply-to email address of the report. */ readonly replyTo: pulumi.Output<string | undefined>; /** * (Required) Schedule of the report. */ readonly schedule: pulumi.Output<outputs.enterprise.ReportSchedule | undefined>; /** * Create a Report 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: ReportArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Report resources. */ export interface ReportState { /** * List of dashboards to render into the report */ dashboards?: pulumi.Input<pulumi.Input<inputs.enterprise.ReportDashboard>[]>; /** * Specifies what kind of attachment to generate for the report. Allowed values: `pdf`, `csv`, `image`. */ formats?: pulumi.Input<pulumi.Input<string>[]>; /** * Whether to include a link to the dashboard in the report. */ includeDashboardLink?: pulumi.Input<boolean>; /** * Whether to include a CSV file of table panel data. */ includeTableCsv?: pulumi.Input<boolean>; /** * Layout of the report. Allowed values: `simple`, `grid`. */ layout?: pulumi.Input<string>; /** * Message to be sent in the report. */ message?: pulumi.Input<string>; /** * Name of the report. */ name?: pulumi.Input<string>; /** * The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication. */ orgId?: pulumi.Input<string>; /** * Orientation of the report. Allowed values: `landscape`, `portrait`. */ orientation?: pulumi.Input<string>; /** * List of recipients of the report. */ recipients?: pulumi.Input<pulumi.Input<string>[]>; /** * Reply-to email address of the report. */ replyTo?: pulumi.Input<string>; /** * (Required) Schedule of the report. */ schedule?: pulumi.Input<inputs.enterprise.ReportSchedule>; } /** * The set of arguments for constructing a Report resource. */ export interface ReportArgs { /** * List of dashboards to render into the report */ dashboards?: pulumi.Input<pulumi.Input<inputs.enterprise.ReportDashboard>[]>; /** * Specifies what kind of attachment to generate for the report. Allowed values: `pdf`, `csv`, `image`. */ formats?: pulumi.Input<pulumi.Input<string>[]>; /** * Whether to include a link to the dashboard in the report. */ includeDashboardLink?: pulumi.Input<boolean>; /** * Whether to include a CSV file of table panel data. */ includeTableCsv?: pulumi.Input<boolean>; /** * Layout of the report. Allowed values: `simple`, `grid`. */ layout?: pulumi.Input<string>; /** * Message to be sent in the report. */ message?: pulumi.Input<string>; /** * Name of the report. */ name?: pulumi.Input<string>; /** * The Organization ID. If not set, the default organization is used for basic authentication, or the one that owns your service account for token authentication. */ orgId?: pulumi.Input<string>; /** * Orientation of the report. Allowed values: `landscape`, `portrait`. */ orientation?: pulumi.Input<string>; /** * List of recipients of the report. */ recipients: pulumi.Input<pulumi.Input<string>[]>; /** * Reply-to email address of the report. */ replyTo?: pulumi.Input<string>; /** * (Required) Schedule of the report. */ schedule?: pulumi.Input<inputs.enterprise.ReportSchedule>; }