UNPKG

@lbrlabs/pulumi-dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

76 lines 2.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.getHostOutput = exports.getHost = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The host data source allows the host ID to be retrieved by its name and optionally tags / tag-value pairs. * * - `name` queries for all hosts with the specified name * - `tags` (optional) refers to the tags that need to be present for the host (inclusive) * * If multiple hosts match the given criteria, the first result will be retrieved. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dynatrace from "@lbrlabs/pulumi-dynatrace"; * import * as dynatrace from "@pulumi/dynatrace"; * * const test = dynatrace.getHost({ * name: "Example", * tags: [ * "TerraformKeyTest", * "TerraformKeyValueTest=TestValue", * ], * }); * const _name_ = new dynatrace.ManagementZone("#name#", {entitySelectorBasedRules: [{ * enabled: true, * selector: test.then(test => `type("host"),entityId("${test.id}")`), * }]}); * ``` */ function getHost(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("dynatrace:index/getHost:getHost", { "name": args.name, "tags": args.tags, }, opts); } exports.getHost = getHost; /** * The host data source allows the host ID to be retrieved by its name and optionally tags / tag-value pairs. * * - `name` queries for all hosts with the specified name * - `tags` (optional) refers to the tags that need to be present for the host (inclusive) * * If multiple hosts match the given criteria, the first result will be retrieved. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dynatrace from "@lbrlabs/pulumi-dynatrace"; * import * as dynatrace from "@pulumi/dynatrace"; * * const test = dynatrace.getHost({ * name: "Example", * tags: [ * "TerraformKeyTest", * "TerraformKeyValueTest=TestValue", * ], * }); * const _name_ = new dynatrace.ManagementZone("#name#", {entitySelectorBasedRules: [{ * enabled: true, * selector: test.then(test => `type("host"),entityId("${test.id}")`), * }]}); * ``` */ function getHostOutput(args, opts) { return pulumi.output(args).apply((a) => getHost(a, opts)); } exports.getHostOutput = getHostOutput; //# sourceMappingURL=getHost.js.map