@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
154 lines (153 loc) • 5.22 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: **View SLOs** (`slo:slos:read`) and **Create and edit SLOs** (`slo:slos:write`).
*
* > This resource is excluded by default in the export utility, please explicitly specify the resource to retrieve existing configuration.
*
* ## Dynatrace Documentation
*
* - Service-Level Objectives overview - hhttps://docs.dynatrace.com/docs/deliver/service-level-objectives
*
* - SLO Service Public API - https://########.apps.dynatrace.com/platform/swagger-ui/index.html?urls.primaryName=Service-Level+Objectives
*
* ## Resource Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const _name_ = new dynatrace.PlatformSlo("#name#", {
* criteria: {
* criteriaDetails: [{
* target: 96,
* timeframeFrom: "now-30d",
* timeframeTo: "now",
* warning: 99,
* }],
* },
* customSli: {
* indicator: ` timeseries { total=sum(dt.service.request.count) ,failures=sum(dt.service.request.failure_count) }, by: { dt.entity.service }
* | fieldsAdd tags=entityAttr(dt.entity.service, "tags")
* | filter in(tags, "criticality:Gold")
* | fieldsAdd entityName = entityName(dt.entity.service)
* | fieldsAdd sli=(((total[]-failures[])/total[])*(100))
* | fieldsRemove total, failures, tags
*
* `,
* },
* description: "Sample custom SLO",
* tags: ["ExampleKey:ExampleValue"],
* });
* ```
*/
export declare class PlatformSlo extends pulumi.CustomResource {
/**
* Get an existing PlatformSlo 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?: PlatformSloState, opts?: pulumi.CustomResourceOptions): PlatformSlo;
/**
* Returns true if the given object is an instance of PlatformSlo. 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 PlatformSlo;
/**
* Criteria of the SLO
*/
readonly criteria: pulumi.Output<outputs.PlatformSloCriteria>;
/**
* Custom SLI of the SLO
*/
readonly customSli: pulumi.Output<outputs.PlatformSloCustomSli | undefined>;
/**
* Description of the SLO
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Name of the SLO
*/
readonly name: pulumi.Output<string>;
/**
* SLI reference of the SLO
*/
readonly sliReference: pulumi.Output<outputs.PlatformSloSliReference | undefined>;
/**
* Tags of the SLO. Example: `Stage:DEV`
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* Create a PlatformSlo 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: PlatformSloArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PlatformSlo resources.
*/
export interface PlatformSloState {
/**
* Criteria of the SLO
*/
criteria?: pulumi.Input<inputs.PlatformSloCriteria>;
/**
* Custom SLI of the SLO
*/
customSli?: pulumi.Input<inputs.PlatformSloCustomSli>;
/**
* Description of the SLO
*/
description?: pulumi.Input<string>;
/**
* Name of the SLO
*/
name?: pulumi.Input<string>;
/**
* SLI reference of the SLO
*/
sliReference?: pulumi.Input<inputs.PlatformSloSliReference>;
/**
* Tags of the SLO. Example: `Stage:DEV`
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a PlatformSlo resource.
*/
export interface PlatformSloArgs {
/**
* Criteria of the SLO
*/
criteria: pulumi.Input<inputs.PlatformSloCriteria>;
/**
* Custom SLI of the SLO
*/
customSli?: pulumi.Input<inputs.PlatformSloCustomSli>;
/**
* Description of the SLO
*/
description?: pulumi.Input<string>;
/**
* Name of the SLO
*/
name?: pulumi.Input<string>;
/**
* SLI reference of the SLO
*/
sliReference?: pulumi.Input<inputs.PlatformSloSliReference>;
/**
* Tags of the SLO. Example: `Stage:DEV`
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}