UNPKG

@pulumi/vsphere

Version:

A Pulumi package for creating vsphere resources

120 lines 3.73 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.getHostPciDeviceOutput = exports.getHostPciDevice = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The `vsphere.getHostPciDevice` data source can be used to discover the device ID * of a vSphere host's PCI device. This can then be used with * `vsphere.VirtualMachine`'s `pciDeviceId`. * * ## Example Usage * * ### With Vendor ID And Class ID * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * const dev = host.then(host => vsphere.getHostPciDevice({ * hostId: host.id, * classId: "123", * vendorId: "456", * })); * ``` * * ### With Name Regular Expression * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * const dev = host.then(host => vsphere.getHostPciDevice({ * hostId: host.id, * nameRegex: "MMC", * })); * ``` */ function getHostPciDevice(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("vsphere:index/getHostPciDevice:getHostPciDevice", { "classId": args.classId, "hostId": args.hostId, "nameRegex": args.nameRegex, "vendorId": args.vendorId, }, opts); } exports.getHostPciDevice = getHostPciDevice; /** * The `vsphere.getHostPciDevice` data source can be used to discover the device ID * of a vSphere host's PCI device. This can then be used with * `vsphere.VirtualMachine`'s `pciDeviceId`. * * ## Example Usage * * ### With Vendor ID And Class ID * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * const dev = host.then(host => vsphere.getHostPciDevice({ * hostId: host.id, * classId: "123", * vendorId: "456", * })); * ``` * * ### With Name Regular Expression * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const host = datacenter.then(datacenter => vsphere.getHost({ * name: "esxi-01.example.com", * datacenterId: datacenter.id, * })); * const dev = host.then(host => vsphere.getHostPciDevice({ * hostId: host.id, * nameRegex: "MMC", * })); * ``` */ function getHostPciDeviceOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("vsphere:index/getHostPciDevice:getHostPciDevice", { "classId": args.classId, "hostId": args.hostId, "nameRegex": args.nameRegex, "vendorId": args.vendorId, }, opts); } exports.getHostPciDeviceOutput = getHostPciDeviceOutput; //# sourceMappingURL=getHostPciDevice.js.map