UNPKG

@pulumi/vsphere

Version:

A Pulumi package for creating vsphere resources

92 lines 2.89 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.getDynamicOutput = exports.getDynamic = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `vsphere.getDynamic` data source can be used to get the * [managed object reference ID][docs-about-morefs] of any tagged managed object in * vCenter Server by providing a list of tag IDs and an optional regular expression * to filter objects by name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const category = vsphere.getTagCategory({ * name: "SomeCategory", * }); * const tag1 = vsphere.getTag({ * name: "FirstTag", * categoryId: cat.id, * }); * const tag2 = vsphere.getTag({ * name: "SecondTag", * categoryId: cat.id, * }); * const dyn = Promise.all([tag1, tag1]).then(([tag1, tag11]) => vsphere.getDynamic({ * filters: [ * tag1.id, * tag11.id, * ], * nameRegex: "ubuntu", * type: "Datacenter", * })); * ``` */ function getDynamic(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vsphere:index/getDynamic:getDynamic", { "filters": args.filters, "nameRegex": args.nameRegex, "type": args.type, }, opts); } exports.getDynamic = getDynamic; /** * The `vsphere.getDynamic` data source can be used to get the * [managed object reference ID][docs-about-morefs] of any tagged managed object in * vCenter Server by providing a list of tag IDs and an optional regular expression * to filter objects by name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const category = vsphere.getTagCategory({ * name: "SomeCategory", * }); * const tag1 = vsphere.getTag({ * name: "FirstTag", * categoryId: cat.id, * }); * const tag2 = vsphere.getTag({ * name: "SecondTag", * categoryId: cat.id, * }); * const dyn = Promise.all([tag1, tag1]).then(([tag1, tag11]) => vsphere.getDynamic({ * filters: [ * tag1.id, * tag11.id, * ], * nameRegex: "ubuntu", * type: "Datacenter", * })); * ``` */ function getDynamicOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vsphere:index/getDynamic:getDynamic", { "filters": args.filters, "nameRegex": args.nameRegex, "type": args.type, }, opts); } exports.getDynamicOutput = getDynamicOutput; //# sourceMappingURL=getDynamic.js.map