UNPKG

@pulumiverse/dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

74 lines 2.78 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.getEntityOutput = exports.getEntity = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The entity data source allows the entity ID to be retrieved by its name and type. * * - `name` (String) Display name of the entity * - `type` (String) Type of the entity, e.g. SERVICE. All available entity types can be retrieved with [/api/v2/entityTypes](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-all-entity-types). * * If multiple services 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"; * * const test = dynatrace.getEntity({ * type: "SERVICE", * name: "BookingService", * }); * export const id = test.then(test => test.id); * ``` */ function getEntity(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("dynatrace:index/getEntity:getEntity", { "entitySelector": args.entitySelector, "from": args.from, "name": args.name, "to": args.to, "type": args.type, }, opts); } exports.getEntity = getEntity; /** * The entity data source allows the entity ID to be retrieved by its name and type. * * - `name` (String) Display name of the entity * - `type` (String) Type of the entity, e.g. SERVICE. All available entity types can be retrieved with [/api/v2/entityTypes](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-all-entity-types). * * If multiple services 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"; * * const test = dynatrace.getEntity({ * type: "SERVICE", * name: "BookingService", * }); * export const id = test.then(test => test.id); * ``` */ function getEntityOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("dynatrace:index/getEntity:getEntity", { "entitySelector": args.entitySelector, "from": args.from, "name": args.name, "to": args.to, "type": args.type, }, opts); } exports.getEntityOutput = getEntityOutput; //# sourceMappingURL=getEntity.js.map