@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
243 lines (242 loc) • 9.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* > **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: **Read direct-shares** (`document:direct-shares:read`), **Write direct-shares** (`document:direct-shares:write`), and **Delete direct-shares** (`document:direct-shares:delete`).
*
* > This resource is currently not covered by the export utility.
*
* ## 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 thisDocument = new dynatrace.Document("thisDocument", {
* 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,
* },
* },
* }),
* });
* const thisDirectShares = new dynatrace.DirectShares("thisDirectShares", {
* documentId: thisDocument.id,
* access: "read-write",
* recipients: {
* recipients: [
* {
* id: "441664f0-23c9-40ef-b344-18c02c23d787",
* type: "user",
* },
* {
* id: "441664f0-23c9-40ef-b344-18c02c23d788",
* type: "group",
* },
* ],
* },
* });
* ```
*/
export declare class DirectShares extends pulumi.CustomResource {
/**
* Get an existing DirectShares 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?: DirectSharesState, opts?: pulumi.CustomResourceOptions): DirectShares;
/**
* Returns true if the given object is an instance of DirectShares. 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 DirectShares;
/**
* Access grants. Possible values are `read` and `read-write`
*/
readonly access: pulumi.Output<string | undefined>;
/**
* Document ID
*/
readonly documentId: pulumi.Output<string>;
/**
* Recipients of the direct share
*/
readonly recipients: pulumi.Output<outputs.DirectSharesRecipients>;
/**
* Create a DirectShares 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: DirectSharesArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DirectShares resources.
*/
export interface DirectSharesState {
/**
* Access grants. Possible values are `read` and `read-write`
*/
access?: pulumi.Input<string>;
/**
* Document ID
*/
documentId?: pulumi.Input<string>;
/**
* Recipients of the direct share
*/
recipients?: pulumi.Input<inputs.DirectSharesRecipients>;
}
/**
* The set of arguments for constructing a DirectShares resource.
*/
export interface DirectSharesArgs {
/**
* Access grants. Possible values are `read` and `read-write`
*/
access?: pulumi.Input<string>;
/**
* Document ID
*/
documentId: pulumi.Input<string>;
/**
* Recipients of the direct share
*/
recipients: pulumi.Input<inputs.DirectSharesRecipients>;
}