@pulumi/signalfx
Version:
A Pulumi package for creating and managing SignalFx resources.
138 lines • 5.22 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* This data sources allows for obtaining a list of dimension values by on query provided.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
* import * as std from "@pulumi/std";
*
* const mydashboardgroup0 = new signalfx.DashboardGroup("mydashboardgroup0", {
* name: "My team dashboard group",
* description: "Cool dashboard group",
* });
* const hosts = signalfx.getDimensionValues({
* query: "key:host",
* });
* const hostCharts: signalfx.TimeChart[] = [];
* for (const range = {value: 0}; range.value < std.toset({
* input: hosts.values,
* }).result; range.value++) {
* hostCharts.push(new signalfx.TimeChart(`host_charts-${range.value}`, {
* name: `CPU Total Idle ${range.value}`,
* plotType: "ColumnChart",
* axesIncludeZero: true,
* colorBy: "Metric",
* programText: `A = data(\"cpu.idle\", filter('host', '${range.key}').publish(label=\"CPU\")
* `,
* }));
* }
* const mydashboard1 = new signalfx.Dashboard("mydashboard1", {
* name: "My Dashboard",
* dashboardGroup: mydashboardgroup0.id,
* timeRange: "-30m",
* grids: [{
* chartIds: std.toset({
* input: hostCharts.map(v => (v.id)),
* }).result,
* width: 3,
* height: 1,
* }],
* });
* ```
*/
export declare function getDimensionValues(args: GetDimensionValuesArgs, opts?: pulumi.InvokeOptions): Promise<GetDimensionValuesResult>;
/**
* A collection of arguments for invoking getDimensionValues.
*/
export interface GetDimensionValuesArgs {
/**
* This allows you to define how many dimensions are returned as the values output.
*/
limit?: number;
orderBy?: string;
/**
* Acepts a query string that allows for defining a key value deintion, wild card matching on values, or where the dimension value exists. Refer to https://dev.splunk.com/observability/reference/api/metrics_metadata/latest#endpoint-retrieve-dimensions-query for more details
*/
query: string;
}
/**
* A collection of values returned by getDimensionValues.
*/
export interface GetDimensionValuesResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* This allows you to define how many dimensions are returned as the values output.
*/
readonly limit?: number;
readonly orderBy?: string;
/**
* Acepts a query string that allows for defining a key value deintion, wild card matching on values, or where the dimension value exists. Refer to https://dev.splunk.com/observability/reference/api/metrics_metadata/latest#endpoint-retrieve-dimensions-query for more details
*/
readonly query: string;
/**
* List of all the match dimension values that the provided query, ordered by orderBy field
*/
readonly values: string[];
}
/**
* This data sources allows for obtaining a list of dimension values by on query provided.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
* import * as std from "@pulumi/std";
*
* const mydashboardgroup0 = new signalfx.DashboardGroup("mydashboardgroup0", {
* name: "My team dashboard group",
* description: "Cool dashboard group",
* });
* const hosts = signalfx.getDimensionValues({
* query: "key:host",
* });
* const hostCharts: signalfx.TimeChart[] = [];
* for (const range = {value: 0}; range.value < std.toset({
* input: hosts.values,
* }).result; range.value++) {
* hostCharts.push(new signalfx.TimeChart(`host_charts-${range.value}`, {
* name: `CPU Total Idle ${range.value}`,
* plotType: "ColumnChart",
* axesIncludeZero: true,
* colorBy: "Metric",
* programText: `A = data(\"cpu.idle\", filter('host', '${range.key}').publish(label=\"CPU\")
* `,
* }));
* }
* const mydashboard1 = new signalfx.Dashboard("mydashboard1", {
* name: "My Dashboard",
* dashboardGroup: mydashboardgroup0.id,
* timeRange: "-30m",
* grids: [{
* chartIds: std.toset({
* input: hostCharts.map(v => (v.id)),
* }).result,
* width: 3,
* height: 1,
* }],
* });
* ```
*/
export declare function getDimensionValuesOutput(args: GetDimensionValuesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDimensionValuesResult>;
/**
* A collection of arguments for invoking getDimensionValues.
*/
export interface GetDimensionValuesOutputArgs {
/**
* This allows you to define how many dimensions are returned as the values output.
*/
limit?: pulumi.Input<number | undefined>;
orderBy?: pulumi.Input<string | undefined>;
/**
* Acepts a query string that allows for defining a key value deintion, wild card matching on values, or where the dimension value exists. Refer to https://dev.splunk.com/observability/reference/api/metrics_metadata/latest#endpoint-retrieve-dimensions-query for more details
*/
query: pulumi.Input<string>;
}
//# sourceMappingURL=getDimensionValues.d.ts.map