UNPKG

@pulumiverse/dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

84 lines 3.08 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 data source API endpoint has been deprecated, please use dynatrace.getEntity with entity type `HOST` instead. * * 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 "@pulumi/dynatrace"; * import * as dynatrace from "@pulumiverse/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 data source API endpoint has been deprecated, please use dynatrace.getEntity with entity type `HOST` instead. * * 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 "@pulumi/dynatrace"; * import * as dynatrace from "@pulumiverse/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) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("dynatrace:index/getHost:getHost", { "name": args.name, "tags": args.tags, }, opts); } exports.getHostOutput = getHostOutput; //# sourceMappingURL=getHost.js.map