@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
96 lines • 3.71 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPlatformSloTemplateOutput = exports.getPlatformSloTemplate = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > To utilize this data source, 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 **View SLO objective templates** (`slo:objective-templates:read`).
*
* The SLO objective template data source allows the ID to be retrieved by its name.
*
* - `name` (String) Name of the SLO objective template
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const hostCPU = dynatrace.getPlatformSloTemplate({
* name: "Host CPU usage utilization",
* });
* const _name_ = new dynatrace.PlatformSlo("#name#", {
* description: "Measures the CPU usage of selected hosts over time.",
* criteria: {
* criteriaDetails: [{
* target: 95,
* timeframeFrom: "now-7d",
* timeframeTo: "now",
* }],
* },
* sliReference: {
* templateId: hostCPU.then(hostCPU => hostCPU.id),
* variables: {
* sliReferenceVariables: [{
* name: "hosts",
* value: "\"HOST-1234567890000000\"",
* }],
* },
* },
* });
* ```
*/
function getPlatformSloTemplate(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("dynatrace:index/getPlatformSloTemplate:getPlatformSloTemplate", {
"name": args.name,
}, opts);
}
exports.getPlatformSloTemplate = getPlatformSloTemplate;
/**
* > To utilize this data source, 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 **View SLO objective templates** (`slo:objective-templates:read`).
*
* The SLO objective template data source allows the ID to be retrieved by its name.
*
* - `name` (String) Name of the SLO objective template
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const hostCPU = dynatrace.getPlatformSloTemplate({
* name: "Host CPU usage utilization",
* });
* const _name_ = new dynatrace.PlatformSlo("#name#", {
* description: "Measures the CPU usage of selected hosts over time.",
* criteria: {
* criteriaDetails: [{
* target: 95,
* timeframeFrom: "now-7d",
* timeframeTo: "now",
* }],
* },
* sliReference: {
* templateId: hostCPU.then(hostCPU => hostCPU.id),
* variables: {
* sliReferenceVariables: [{
* name: "hosts",
* value: "\"HOST-1234567890000000\"",
* }],
* },
* },
* });
* ```
*/
function getPlatformSloTemplateOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("dynatrace:index/getPlatformSloTemplate:getPlatformSloTemplate", {
"name": args.name,
}, opts);
}
exports.getPlatformSloTemplateOutput = getPlatformSloTemplateOutput;
//# sourceMappingURL=getPlatformSloTemplate.js.map