@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
110 lines • 3.44 kB
JavaScript
;
// *** 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.getHostVgpuProfileOutput = exports.getHostVgpuProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* The `vsphere.getHostVgpuProfile` data source can be used to discover the
* available vGPU profiles of a vSphere host.
*
* ## Example Usage
*
* ### To Return All VGPU Profiles
*
* ```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 vgpuProfile = host.then(host => vsphere.getHostVgpuProfile({
* hostId: host.id,
* }));
* ```
*
* ### With VGPU Profile Name_regex
*
* ```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 vgpuProfile = host.then(host => vsphere.getHostVgpuProfile({
* hostId: host.id,
* nameRegex: "a100",
* }));
* ```
*/
function getHostVgpuProfile(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", {
"hostId": args.hostId,
"nameRegex": args.nameRegex,
}, opts);
}
exports.getHostVgpuProfile = getHostVgpuProfile;
/**
* The `vsphere.getHostVgpuProfile` data source can be used to discover the
* available vGPU profiles of a vSphere host.
*
* ## Example Usage
*
* ### To Return All VGPU Profiles
*
* ```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 vgpuProfile = host.then(host => vsphere.getHostVgpuProfile({
* hostId: host.id,
* }));
* ```
*
* ### With VGPU Profile Name_regex
*
* ```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 vgpuProfile = host.then(host => vsphere.getHostVgpuProfile({
* hostId: host.id,
* nameRegex: "a100",
* }));
* ```
*/
function getHostVgpuProfileOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("vsphere:index/getHostVgpuProfile:getHostVgpuProfile", {
"hostId": args.hostId,
"nameRegex": args.nameRegex,
}, opts);
}
exports.getHostVgpuProfileOutput = getHostVgpuProfileOutput;
//# sourceMappingURL=getHostVgpuProfile.js.map