UNPKG

@pulumiverse/dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

132 lines 4.69 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getCredentialsOutput = exports.getCredentials = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `dynatrace.Credentials` data source queries for Credentials stored within the Credentials Vault using the properties `name`, `scope` and `type`. At least one of `name`, `scope` or `type` needs to be specified as a non empty value. Combinations of the three properties are also possible. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dynatrace from "@pulumi/dynatrace"; * import * as dynatrace from "@pulumiverse/dynatrace"; * * const creds = dynatrace.getCredentials({ * name: "Office365 Access Token", * }); * const _name_ = new dynatrace.HttpMonitor("#name#", { * enabled: true, * frequency: 60, * locations: ["SYNTHETIC_LOCATION-781752216580B1BC"], * anomalyDetections: [{ * loadingTimeThresholds: [{ * enabled: true, * }], * outageHandlings: [{ * globalOutage: true, * localOutage: false, * retryOnError: false, * }], * }], * script: { * requests: [{ * description: "google.com", * method: "GET", * url: "https://www.google.com", * authentication: { * type: "BASIC_AUTHENTICATION", * credentials: creds.then(creds => creds.id), * }, * configuration: { * acceptAnyCertificate: true, * followRedirects: true, * }, * validation: { * rules: [{ * type: "httpStatusesList", * passIfFound: false, * value: ">=400", * }], * }, * }], * }, * }); * ``` */ function getCredentials(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("dynatrace:index/getCredentials:getCredentials", { "name": args.name, "scope": args.scope, "type": args.type, }, opts); } exports.getCredentials = getCredentials; /** * The `dynatrace.Credentials` data source queries for Credentials stored within the Credentials Vault using the properties `name`, `scope` and `type`. At least one of `name`, `scope` or `type` needs to be specified as a non empty value. Combinations of the three properties are also possible. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dynatrace from "@pulumi/dynatrace"; * import * as dynatrace from "@pulumiverse/dynatrace"; * * const creds = dynatrace.getCredentials({ * name: "Office365 Access Token", * }); * const _name_ = new dynatrace.HttpMonitor("#name#", { * enabled: true, * frequency: 60, * locations: ["SYNTHETIC_LOCATION-781752216580B1BC"], * anomalyDetections: [{ * loadingTimeThresholds: [{ * enabled: true, * }], * outageHandlings: [{ * globalOutage: true, * localOutage: false, * retryOnError: false, * }], * }], * script: { * requests: [{ * description: "google.com", * method: "GET", * url: "https://www.google.com", * authentication: { * type: "BASIC_AUTHENTICATION", * credentials: creds.then(creds => creds.id), * }, * configuration: { * acceptAnyCertificate: true, * followRedirects: true, * }, * validation: { * rules: [{ * type: "httpStatusesList", * passIfFound: false, * value: ">=400", * }], * }, * }], * }, * }); * ``` */ function getCredentialsOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("dynatrace:index/getCredentials:getCredentials", { "name": args.name, "scope": args.scope, "type": args.type, }, opts); } exports.getCredentialsOutput = getCredentialsOutput; //# sourceMappingURL=getCredentials.js.map