@pulumi/signalfx
Version:
A Pulumi package for creating and managing SignalFx resources.
435 lines • 21 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* A dashboard is a curated collection of specific charts and supports dimensional [filters](https://docs.splunk.com/observability/en/data-visualization/dashboards/dashboard-create-customize.html#customize-dashboard-filters), [dashboard variables](https://docs.splunk.com/observability/en/data-visualization/dashboards/dashboard-create-customize.html#customize-dashboard-variables) and [time range](https://docs.splunk.com/observability/en/data-visualization/use-time-range-selector.html) options. These options are applied to all charts in the dashboard, providing a consistent view of the data displayed in that dashboard. This also means that when you open a chart to drill down for more details, you are viewing the same data that is visible in the dashboard view.
*
* Since every dashboard is included in a dashboard group, which is a collection of dashboards, you need to create that first and reference it as shown in the example.
*
* > **NOTE** When you want to change or remove write permissions for a user other than yourself regarding dashboards, use a session token of an administrator to authenticate the Splunk Observability Cloud provider. See [Operations that require a session token for an administrator](https://dev.splunk.com/observability/docs/administration/authtokens#Operations-that-require-a-session-token-for-an-administrator).
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* const mydashboard0 = new signalfx.Dashboard("mydashboard0", {
* name: "My Dashboard",
* dashboardGroup: mydashboardgroup0.id,
* timeRange: "-30m",
* filters: [{
* property: "collector",
* values: [
* "cpu",
* "Diamond",
* ],
* }],
* variables: [{
* property: "region",
* alias: "region",
* values: ["uswest-1-"],
* }],
* charts: [
* {
* chartId: mychart0.id,
* width: 12,
* height: 1,
* },
* {
* chartId: mychart1.id,
* width: 5,
* height: 2,
* },
* ],
* });
* ```
*
* ## Example with inheriting permissions
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* const mydashboardInheritingpermissions = new signalfx.Dashboard("mydashboard_inheritingpermissions", {
* name: "My Dashboard",
* dashboardGroup: mydashboardgroup0.id,
* permissions: {
* parent: mydashboardgroup0.id,
* },
* });
* ```
*
* ## Example with custom permissions
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* const mydashboardCustompermissions = new signalfx.Dashboard("mydashboard_custompermissions", {
* name: "My Dashboard",
* dashboardGroup: mydashboardgroup0.id,
* permissions: {
* acls: [
* {
* principalId: "abc123",
* principalType: "ORG",
* actions: ["READ"],
* },
* {
* principalId: "abc456",
* principalType: "USER",
* actions: [
* "READ",
* "WRITE",
* ],
* },
* ],
* },
* });
* ```
*
* ## Dashboard layout information
*
* Every Splunk Observability Cloud dashboard is shown as a grid of 12 columns and potentially infinite number of rows. The dimension of the single column depends on the screen resolution.
*
* When you define a dashboard resource, you need to specify which charts, by `chartId`, you want to show in the dashboard, along with layout information determining where on the dashboard you want to show the charts. Assign to every chart a width in terms of number of columns to cover up, from 1 to 12, and a height in terms of number of rows, more or equal than 1.
*
* You can also assign a position in the dashboard grid where you like the graph to stay. To do that, assign a row that represents the topmost row of the chart and a column that represents the leftmost column of the chart. If, by mistake, you wrote a configuration where there are not enough columns to accommodate your charts in a specific row, they are split in different rows. In case a row is specified with a value higher than 1, if all the rows above are not filled by other charts, the chart is placed in the first empty row.
*
* The are several use cases where this layout makes things too verbose and hard to work with loops. For those cases, you can now use one of these layouts: grids or columns.
*
* > **WARNING** Grids and column layouts are not supported by the Splunk Observability Cloud API and are Terraform-side constructs. As such, the provider cannot import them and cannot properly reconcile API-side changes. In other words, if someone changes the charts in the UI they are not reconciled at the next apply. Also, you can only use one of `chart`, `column`, or `grid` when laying out dashboards. You can, however, use multiple instances of each, for example multiple `grid`s, for fancier layouts.
*
* ### Grid
*
* The dashboard is split into equal-sized charts, defined by `width` and `height`. If a chart doesn't fit in the same row because the total width is greater than the maximum allowed by the dashboard, this chart and the next ones are placed in the next rows.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
* import * as std from "@pulumi/std";
*
* const gridExample = new signalfx.Dashboard("grid_example", {
* name: "Grid",
* dashboardGroup: example.id,
* timeRange: "-15m",
* grids: [{
* chartIds: [std.concat({
* input: [
* rps.map(__item => __item.id),
* p50ths.map(__item => __item.id),
* p99ths.map(__item => __item.id),
* idleWorkers.map(__item => __item.id),
* cpuIdle.map(__item => __item.id),
* ],
* }).result],
* width: 3,
* height: 1,
* }],
* });
* ```
*
* ### Column
*
* The dashboard is split into equal-sized charts, defined by `width` and `height`. The charts are placed in the grid by column. The column number is called `column`.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* const load = new signalfx.Dashboard("load", {
* name: "Load",
* dashboardGroup: example.id,
* columns: [
* {
* chartIds: [rps.map(__item => __item.id)],
* width: 2,
* },
* {
* chartIds: [cpuCapacity.map(__item => __item.id)],
* column: 2,
* width: 4,
* },
* ],
* });
* ```
*/
export declare class Dashboard extends pulumi.CustomResource {
/**
* Get an existing Dashboard 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?: DashboardState, opts?: pulumi.CustomResourceOptions): Dashboard;
/**
* Returns true if the given object is an instance of Dashboard. 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 Dashboard;
/**
* Team IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's team (or user id in `authorizedWriterTeams`). **Note:** Deprecated use `permissions` instead.
*
* @deprecated Please use permissions_* fields now
*/
readonly authorizedWriterTeams: pulumi.Output<string[] | undefined>;
/**
* User IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's user id (or team id in `authorizedWriterTeams`). **Note:** Deprecated use `permissions` instead.
*
* @deprecated Please use permissions fields now
*/
readonly authorizedWriterUsers: pulumi.Output<string[] | undefined>;
/**
* Chart ID and layout information for the charts in the dashboard.
*/
readonly charts: pulumi.Output<outputs.DashboardChart[] | undefined>;
/**
* Specifies the chart data display resolution for charts in this dashboard. Value can be one of `"default"`, `"low"`, `"high"`, or `"highest"`.
*/
readonly chartsResolution: pulumi.Output<string | undefined>;
/**
* Column layout. Charts listed will be placed in a single column with the same width and height.
*/
readonly columns: pulumi.Output<outputs.DashboardColumn[] | undefined>;
/**
* The ID of the dashboard group that contains the dashboard.
*/
readonly dashboardGroup: pulumi.Output<string>;
/**
* Description of the dashboard.
*/
readonly description: pulumi.Output<string | undefined>;
readonly discoveryOptionsQuery: pulumi.Output<string | undefined>;
readonly discoveryOptionsSelectors: pulumi.Output<string[] | undefined>;
/**
* Seconds since epoch. Used for visualization.
*/
readonly endTime: pulumi.Output<number | undefined>;
/**
* Specify a list of event overlays to include in the dashboard. Note: These overlays correspond to the *suggested* event overlays specified in the web UI, and they're not automatically applied as active overlays. To set default active event overlays, use the `selectedEventOverlay` property instead.
*/
readonly eventOverlays: pulumi.Output<outputs.DashboardEventOverlay[] | undefined>;
/**
* Filter to apply to the charts when displaying the dashboard.
*/
readonly filters: pulumi.Output<outputs.DashboardFilter[] | undefined>;
/**
* Grid dashboard layout. Charts listed will be placed in a grid by row with the same width and height. If a chart cannot fit in a row, it will be placed automatically in the next row.
*/
readonly grids: pulumi.Output<outputs.DashboardGrid[] | undefined>;
/**
* Name of the dashboard.
*/
readonly name: pulumi.Output<string>;
/**
* [Permissions](https://docs.splunk.com/Observability/infrastructure/terms-concepts/permissions.html) Controls who can view and/or edit your dashboard. **Note:** This feature is not present in all accounts. Please contact support if you are unsure.
*/
readonly permissions: pulumi.Output<outputs.DashboardPermissions>;
/**
* Defines event overlays which are enabled by **default**. Any overlay specified here should have an accompanying entry in `eventOverlay`, which are similar to the properties here.
*/
readonly selectedEventOverlays: pulumi.Output<outputs.DashboardSelectedEventOverlay[] | undefined>;
/**
* Seconds since epoch. Used for visualization.
*/
readonly startTime: pulumi.Output<number | undefined>;
/**
* Tags of the dashboard.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The time range prior to now to visualize. Splunk Observability Cloud time syntax (e.g. `"-5m"`, `"-1h"`).
*/
readonly timeRange: pulumi.Output<string | undefined>;
/**
* The URL of the dashboard.
*/
readonly url: pulumi.Output<string>;
/**
* Dashboard variable to apply to each chart in the dashboard.
*/
readonly variables: pulumi.Output<outputs.DashboardVariable[] | undefined>;
/**
* Create a Dashboard 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: DashboardArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Dashboard resources.
*/
export interface DashboardState {
/**
* Team IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's team (or user id in `authorizedWriterTeams`). **Note:** Deprecated use `permissions` instead.
*
* @deprecated Please use permissions_* fields now
*/
authorizedWriterTeams?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* User IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's user id (or team id in `authorizedWriterTeams`). **Note:** Deprecated use `permissions` instead.
*
* @deprecated Please use permissions fields now
*/
authorizedWriterUsers?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Chart ID and layout information for the charts in the dashboard.
*/
charts?: pulumi.Input<pulumi.Input<inputs.DashboardChart>[] | undefined>;
/**
* Specifies the chart data display resolution for charts in this dashboard. Value can be one of `"default"`, `"low"`, `"high"`, or `"highest"`.
*/
chartsResolution?: pulumi.Input<string | undefined>;
/**
* Column layout. Charts listed will be placed in a single column with the same width and height.
*/
columns?: pulumi.Input<pulumi.Input<inputs.DashboardColumn>[] | undefined>;
/**
* The ID of the dashboard group that contains the dashboard.
*/
dashboardGroup?: pulumi.Input<string | undefined>;
/**
* Description of the dashboard.
*/
description?: pulumi.Input<string | undefined>;
discoveryOptionsQuery?: pulumi.Input<string | undefined>;
discoveryOptionsSelectors?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Seconds since epoch. Used for visualization.
*/
endTime?: pulumi.Input<number | undefined>;
/**
* Specify a list of event overlays to include in the dashboard. Note: These overlays correspond to the *suggested* event overlays specified in the web UI, and they're not automatically applied as active overlays. To set default active event overlays, use the `selectedEventOverlay` property instead.
*/
eventOverlays?: pulumi.Input<pulumi.Input<inputs.DashboardEventOverlay>[] | undefined>;
/**
* Filter to apply to the charts when displaying the dashboard.
*/
filters?: pulumi.Input<pulumi.Input<inputs.DashboardFilter>[] | undefined>;
/**
* Grid dashboard layout. Charts listed will be placed in a grid by row with the same width and height. If a chart cannot fit in a row, it will be placed automatically in the next row.
*/
grids?: pulumi.Input<pulumi.Input<inputs.DashboardGrid>[] | undefined>;
/**
* Name of the dashboard.
*/
name?: pulumi.Input<string | undefined>;
/**
* [Permissions](https://docs.splunk.com/Observability/infrastructure/terms-concepts/permissions.html) Controls who can view and/or edit your dashboard. **Note:** This feature is not present in all accounts. Please contact support if you are unsure.
*/
permissions?: pulumi.Input<inputs.DashboardPermissions | undefined>;
/**
* Defines event overlays which are enabled by **default**. Any overlay specified here should have an accompanying entry in `eventOverlay`, which are similar to the properties here.
*/
selectedEventOverlays?: pulumi.Input<pulumi.Input<inputs.DashboardSelectedEventOverlay>[] | undefined>;
/**
* Seconds since epoch. Used for visualization.
*/
startTime?: pulumi.Input<number | undefined>;
/**
* Tags of the dashboard.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The time range prior to now to visualize. Splunk Observability Cloud time syntax (e.g. `"-5m"`, `"-1h"`).
*/
timeRange?: pulumi.Input<string | undefined>;
/**
* The URL of the dashboard.
*/
url?: pulumi.Input<string | undefined>;
/**
* Dashboard variable to apply to each chart in the dashboard.
*/
variables?: pulumi.Input<pulumi.Input<inputs.DashboardVariable>[] | undefined>;
}
/**
* The set of arguments for constructing a Dashboard resource.
*/
export interface DashboardArgs {
/**
* Team IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's team (or user id in `authorizedWriterTeams`). **Note:** Deprecated use `permissions` instead.
*
* @deprecated Please use permissions_* fields now
*/
authorizedWriterTeams?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* User IDs that have write access to this dashboard group. Remember to use an admin's token if using this feature and to include that admin's user id (or team id in `authorizedWriterTeams`). **Note:** Deprecated use `permissions` instead.
*
* @deprecated Please use permissions fields now
*/
authorizedWriterUsers?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Chart ID and layout information for the charts in the dashboard.
*/
charts?: pulumi.Input<pulumi.Input<inputs.DashboardChart>[] | undefined>;
/**
* Specifies the chart data display resolution for charts in this dashboard. Value can be one of `"default"`, `"low"`, `"high"`, or `"highest"`.
*/
chartsResolution?: pulumi.Input<string | undefined>;
/**
* Column layout. Charts listed will be placed in a single column with the same width and height.
*/
columns?: pulumi.Input<pulumi.Input<inputs.DashboardColumn>[] | undefined>;
/**
* The ID of the dashboard group that contains the dashboard.
*/
dashboardGroup: pulumi.Input<string>;
/**
* Description of the dashboard.
*/
description?: pulumi.Input<string | undefined>;
discoveryOptionsQuery?: pulumi.Input<string | undefined>;
discoveryOptionsSelectors?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* Seconds since epoch. Used for visualization.
*/
endTime?: pulumi.Input<number | undefined>;
/**
* Specify a list of event overlays to include in the dashboard. Note: These overlays correspond to the *suggested* event overlays specified in the web UI, and they're not automatically applied as active overlays. To set default active event overlays, use the `selectedEventOverlay` property instead.
*/
eventOverlays?: pulumi.Input<pulumi.Input<inputs.DashboardEventOverlay>[] | undefined>;
/**
* Filter to apply to the charts when displaying the dashboard.
*/
filters?: pulumi.Input<pulumi.Input<inputs.DashboardFilter>[] | undefined>;
/**
* Grid dashboard layout. Charts listed will be placed in a grid by row with the same width and height. If a chart cannot fit in a row, it will be placed automatically in the next row.
*/
grids?: pulumi.Input<pulumi.Input<inputs.DashboardGrid>[] | undefined>;
/**
* Name of the dashboard.
*/
name?: pulumi.Input<string | undefined>;
/**
* [Permissions](https://docs.splunk.com/Observability/infrastructure/terms-concepts/permissions.html) Controls who can view and/or edit your dashboard. **Note:** This feature is not present in all accounts. Please contact support if you are unsure.
*/
permissions?: pulumi.Input<inputs.DashboardPermissions | undefined>;
/**
* Defines event overlays which are enabled by **default**. Any overlay specified here should have an accompanying entry in `eventOverlay`, which are similar to the properties here.
*/
selectedEventOverlays?: pulumi.Input<pulumi.Input<inputs.DashboardSelectedEventOverlay>[] | undefined>;
/**
* Seconds since epoch. Used for visualization.
*/
startTime?: pulumi.Input<number | undefined>;
/**
* Tags of the dashboard.
*/
tags?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The time range prior to now to visualize. Splunk Observability Cloud time syntax (e.g. `"-5m"`, `"-1h"`).
*/
timeRange?: pulumi.Input<string | undefined>;
/**
* Dashboard variable to apply to each chart in the dashboard.
*/
variables?: pulumi.Input<pulumi.Input<inputs.DashboardVariable>[] | undefined>;
}
//# sourceMappingURL=dashboard.d.ts.map