@lbrlabs/pulumi-grafana
Version:
A Pulumi package for creating and managing grafana.
242 lines (241 loc) • 8.01 kB
TypeScript
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/developers/http_api/reporting/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@lbrlabs/pulumi-grafana";
*
* const testDashboard = new grafana.Dashboard("testDashboard", {
* configJson: `{
* "title": "Dashboard for report",
* "uid": "report"
* }
* `,
* message: "inital commit.",
* });
* const testReport = new grafana.Report("testReport", {
* dashboardUid: testDashboard.uid,
* recipients: ["some@email.com"],
* schedule: {
* frequency: "hourly",
* },
* });
* ```
*/
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;
/**
* Dashboard to be sent in the report. This field is deprecated, use `dashboardUid` instead.
*
* @deprecated Use dashboard_uid instead
*/
readonly dashboardId: pulumi.Output<number>;
/**
* Dashboard to be sent in the report.
*/
readonly dashboardUid: pulumi.Output<string>;
/**
* 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. Defaults to `true`.
*/
readonly includeDashboardLink: pulumi.Output<boolean | undefined>;
/**
* Whether to include a CSV file of table panel data. Defaults to `false`.
*/
readonly includeTableCsv: pulumi.Output<boolean | undefined>;
/**
* Layout of the report. Allowed values: `simple`, `grid`. Defaults to `grid`.
*/
readonly layout: pulumi.Output<string | undefined>;
/**
* 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 Org ID defined in the provider block will be used.
*/
readonly orgId: pulumi.Output<string | undefined>;
/**
* Orientation of the report. Allowed values: `landscape`, `portrait`. Defaults to `landscape`.
*/
readonly orientation: pulumi.Output<string | undefined>;
/**
* List of recipients of the report.
*/
readonly recipients: pulumi.Output<string[]>;
/**
* Reply-to email address of the report.
*/
readonly replyTo: pulumi.Output<string | undefined>;
/**
* Schedule of the report.
*/
readonly schedule: pulumi.Output<outputs.ReportSchedule>;
/**
* Time range of the report.
*/
readonly timeRange: pulumi.Output<outputs.ReportTimeRange | 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 {
/**
* Dashboard to be sent in the report. This field is deprecated, use `dashboardUid` instead.
*
* @deprecated Use dashboard_uid instead
*/
dashboardId?: pulumi.Input<number>;
/**
* Dashboard to be sent in the report.
*/
dashboardUid?: pulumi.Input<string>;
/**
* 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. Defaults to `true`.
*/
includeDashboardLink?: pulumi.Input<boolean>;
/**
* Whether to include a CSV file of table panel data. Defaults to `false`.
*/
includeTableCsv?: pulumi.Input<boolean>;
/**
* Layout of the report. Allowed values: `simple`, `grid`. Defaults to `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 Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* Orientation of the report. Allowed values: `landscape`, `portrait`. Defaults to `landscape`.
*/
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>;
/**
* Schedule of the report.
*/
schedule?: pulumi.Input<inputs.ReportSchedule>;
/**
* Time range of the report.
*/
timeRange?: pulumi.Input<inputs.ReportTimeRange>;
}
/**
* The set of arguments for constructing a Report resource.
*/
export interface ReportArgs {
/**
* Dashboard to be sent in the report. This field is deprecated, use `dashboardUid` instead.
*
* @deprecated Use dashboard_uid instead
*/
dashboardId?: pulumi.Input<number>;
/**
* Dashboard to be sent in the report.
*/
dashboardUid?: pulumi.Input<string>;
/**
* 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. Defaults to `true`.
*/
includeDashboardLink?: pulumi.Input<boolean>;
/**
* Whether to include a CSV file of table panel data. Defaults to `false`.
*/
includeTableCsv?: pulumi.Input<boolean>;
/**
* Layout of the report. Allowed values: `simple`, `grid`. Defaults to `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 Org ID defined in the provider block will be used.
*/
orgId?: pulumi.Input<string>;
/**
* Orientation of the report. Allowed values: `landscape`, `portrait`. Defaults to `landscape`.
*/
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>;
/**
* Schedule of the report.
*/
schedule: pulumi.Input<inputs.ReportSchedule>;
/**
* Time range of the report.
*/
timeRange?: pulumi.Input<inputs.ReportTimeRange>;
}