UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

88 lines 3.46 kB
"use strict"; // *** 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.getDiscoveryAgentOutput = exports.getDiscoveryAgent = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Data source for retrieving a Harness Service Discovery Agent. * * This data source allows you to fetch details of a Service Discovery Agent using either its unique identifier or name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // Data source to fetch a specific agent by name * const byName = harness.service.getDiscoveryAgent({ * name: "example-agent", * orgIdentifier: orgIdentifier, * projectIdentifier: projectIdentifier, * environmentIdentifier: environmentIdentifier, * }); * export const agentDetailsByName = byName; * // Data source to fetch a specific agent by identity * const byIdentity = harness.service.getDiscoveryAgent({ * identity: "example-infra", * orgIdentifier: orgIdentifier, * projectIdentifier: projectIdentifier, * environmentIdentifier: environmentIdentifier, * }); * export const agentDetailsByIdentity = byIdentity; * ``` */ function getDiscoveryAgent(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("harness:service/getDiscoveryAgent:getDiscoveryAgent", { "environmentIdentifier": args.environmentIdentifier, "identity": args.identity, "name": args.name, "orgIdentifier": args.orgIdentifier, "projectIdentifier": args.projectIdentifier, }, opts); } exports.getDiscoveryAgent = getDiscoveryAgent; /** * Data source for retrieving a Harness Service Discovery Agent. * * This data source allows you to fetch details of a Service Discovery Agent using either its unique identifier or name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // Data source to fetch a specific agent by name * const byName = harness.service.getDiscoveryAgent({ * name: "example-agent", * orgIdentifier: orgIdentifier, * projectIdentifier: projectIdentifier, * environmentIdentifier: environmentIdentifier, * }); * export const agentDetailsByName = byName; * // Data source to fetch a specific agent by identity * const byIdentity = harness.service.getDiscoveryAgent({ * identity: "example-infra", * orgIdentifier: orgIdentifier, * projectIdentifier: projectIdentifier, * environmentIdentifier: environmentIdentifier, * }); * export const agentDetailsByIdentity = byIdentity; * ``` */ function getDiscoveryAgentOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("harness:service/getDiscoveryAgent:getDiscoveryAgent", { "environmentIdentifier": args.environmentIdentifier, "identity": args.identity, "name": args.name, "orgIdentifier": args.orgIdentifier, "projectIdentifier": args.projectIdentifier, }, opts); } exports.getDiscoveryAgentOutput = getDiscoveryAgentOutput; //# sourceMappingURL=getDiscoveryAgent.js.map