@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
269 lines (268 loc) • 9.77 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > **Dynatrace SaaS only**
*
* > To utilize this resource, please define the environment variables `DT_CLIENT_ID`, `DT_CLIENT_SECRET`, `DT_ACCOUNT_ID` with an OAuth client including the following permissions: **Create and edit documents** (`document:documents:write`), **View documents** (`document:documents:read`) and **Delete documents** (`document:documents:delete`).
*
* > This resource is excluded by default in the export utility, please explicitly specify the resource to retrieve existing configuration.
*
* ## Dynatrace Documentation
*
* - Dynatrace Documents - https://########.apps.dynatrace.com/platform/swagger-ui/index.html?urls.primaryName=Document%20Service
*
* ## Resource Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const _this = new dynatrace.Document("this", {
* type: "dashboard",
* content: JSON.stringify({
* version: 13,
* variables: [],
* tiles: {
* "0": {
* type: "markdown",
* title: "",
* content: "",
* },
* "1": {
* type: "data",
* title: "",
* query: "timeseries avg(dt.host.cpu.user)",
* queryConfig: {
* additionalFilters: {},
* version: "4.3.1",
* datatype: "metrics",
* metricKey: "dt.host.cpu.user",
* aggregation: "avg",
* by: [],
* },
* subType: "dql-builder-metrics",
* visualization: "lineChart",
* visualizationSettings: {
* thresholds: [],
* chartSettings: {
* gapPolicy: "connect",
* circleChartSettings: {
* groupingThresholdType: "relative",
* groupingThresholdValue: 0,
* valueType: "relative",
* },
* categoryOverrides: {},
* fieldMapping: {
* timestamp: "timeframe",
* leftAxisValues: ["avg(dt.host.cpu.user)"],
* leftAxisDimensions: [],
* fields: [],
* values: [],
* },
* },
* singleValue: {
* showLabel: true,
* label: "",
* prefixIcon: "",
* autoscale: true,
* alignment: "center",
* colorThresholdTarget: "value",
* },
* table: {
* rowDensity: "condensed",
* enableSparklines: false,
* hiddenColumns: [],
* lineWrapIds: [],
* columnWidths: {},
* },
* },
* },
* "2": {
* type: "data",
* title: "",
* query: "timeseries avg(dt.host.memory.used)",
* queryConfig: {
* additionalFilters: {},
* version: "4.3.1",
* datatype: "metrics",
* metricKey: "dt.host.memory.used",
* aggregation: "avg",
* by: [],
* },
* subType: "dql-builder-metrics",
* visualization: "lineChart",
* visualizationSettings: {
* thresholds: [],
* chartSettings: {
* gapPolicy: "connect",
* circleChartSettings: {
* groupingThresholdType: "relative",
* groupingThresholdValue: 0,
* valueType: "relative",
* },
* categoryOverrides: {},
* fieldMapping: {
* timestamp: "timeframe",
* leftAxisValues: ["avg(dt.host.memory.used)"],
* leftAxisDimensions: [],
* fields: [],
* values: [],
* },
* categoricalBarChartSettings: {},
* },
* singleValue: {
* showLabel: true,
* label: "",
* prefixIcon: "",
* autoscale: true,
* alignment: "center",
* colorThresholdTarget: "value",
* },
* table: {
* rowDensity: "condensed",
* enableSparklines: false,
* hiddenColumns: [],
* lineWrapIds: [],
* columnWidths: {},
* },
* },
* },
* },
* layouts: {
* "0": {
* x: 0,
* y: 0,
* w: 24,
* h: 14,
* },
* "1": {
* x: 0,
* y: 14,
* w: 9,
* h: 6,
* },
* "2": {
* x: 15,
* y: 14,
* w: 9,
* h: 6,
* },
* },
* }),
* });
* ```
*/
export declare class Document extends pulumi.CustomResource {
/**
* Get an existing Document 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?: DocumentState, opts?: pulumi.CustomResourceOptions): Document;
/**
* Returns true if the given object is an instance of Document. 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 Document;
/**
* The user context the executions of the document will happen with
*/
readonly actor: pulumi.Output<string>;
/**
* Document content as JSON
*/
readonly content: pulumi.Output<string>;
/**
* The name/name of the document
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the owner of this document
*/
readonly owner: pulumi.Output<string>;
/**
* Specifies whether the document is private or readable by everybody
*/
readonly private: pulumi.Output<boolean | undefined>;
/**
* Type of the document. Possible Values are `dashboard`, `launchpad` and `notebook`
*/
readonly type: pulumi.Output<string>;
/**
* The version of the document
*/
readonly version: pulumi.Output<number>;
/**
* Create a Document 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: DocumentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Document resources.
*/
export interface DocumentState {
/**
* The user context the executions of the document will happen with
*/
actor?: pulumi.Input<string>;
/**
* Document content as JSON
*/
content?: pulumi.Input<string>;
/**
* The name/name of the document
*/
name?: pulumi.Input<string>;
/**
* The ID of the owner of this document
*/
owner?: pulumi.Input<string>;
/**
* Specifies whether the document is private or readable by everybody
*/
private?: pulumi.Input<boolean>;
/**
* Type of the document. Possible Values are `dashboard`, `launchpad` and `notebook`
*/
type?: pulumi.Input<string>;
/**
* The version of the document
*/
version?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Document resource.
*/
export interface DocumentArgs {
/**
* The user context the executions of the document will happen with
*/
actor?: pulumi.Input<string>;
/**
* Document content as JSON
*/
content: pulumi.Input<string>;
/**
* The name/name of the document
*/
name?: pulumi.Input<string>;
/**
* The ID of the owner of this document
*/
owner?: pulumi.Input<string>;
/**
* Specifies whether the document is private or readable by everybody
*/
private?: pulumi.Input<boolean>;
/**
* Type of the document. Possible Values are `dashboard`, `launchpad` and `notebook`
*/
type: pulumi.Input<string>;
}