Viewing docs for vSphere v4.16.3
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
Viewing docs for vSphere v4.16.3
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
The vsphere.License data source can be used to get the general attributes of
a license keys from a vCenter Server instance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const license = vsphere.getLicense({
licenseKey: "00000-00000-00000-00000-00000",
});
import pulumi
import pulumi_vsphere as vsphere
license = vsphere.get_license(license_key="00000-00000-00000-00000-00000")
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vsphere.LookupLicense(ctx, &vsphere.LookupLicenseArgs{
LicenseKey: "00000-00000-00000-00000-00000",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var license = VSphere.GetLicense.Invoke(new()
{
LicenseKey = "00000-00000-00000-00000-00000",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetLicenseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var license = VsphereFunctions.getLicense(GetLicenseArgs.builder()
.licenseKey("00000-00000-00000-00000-00000")
.build());
}
}
variables:
license:
fn::invoke:
function: vsphere:getLicense
arguments:
licenseKey: 00000-00000-00000-00000-00000
Using getLicense
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLicense(args: GetLicenseArgs, opts?: InvokeOptions): Promise<GetLicenseResult>
function getLicenseOutput(args: GetLicenseOutputArgs, opts?: InvokeOptions): Output<GetLicenseResult>def get_license(license_key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLicenseResult
def get_license_output(license_key: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLicenseResult]func LookupLicense(ctx *Context, args *LookupLicenseArgs, opts ...InvokeOption) (*LookupLicenseResult, error)
func LookupLicenseOutput(ctx *Context, args *LookupLicenseOutputArgs, opts ...InvokeOption) LookupLicenseResultOutput> Note: This function is named LookupLicense in the Go SDK.
public static class GetLicense
{
public static Task<GetLicenseResult> InvokeAsync(GetLicenseArgs args, InvokeOptions? opts = null)
public static Output<GetLicenseResult> Invoke(GetLicenseInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLicenseResult> getLicense(GetLicenseArgs args, InvokeOptions options)
public static Output<GetLicenseResult> getLicense(GetLicenseArgs args, InvokeOptions options)
fn::invoke:
function: vsphere:index/getLicense:getLicense
arguments:
# arguments dictionaryThe following arguments are supported:
- License
Key string - The license key value.
- License
Key string - The license key value.
- license
Key String - The license key value.
- license
Key string - The license key value.
- license_
key str - The license key value.
- license
Key String - The license key value.
getLicense Result
The following output properties are available:
- Edition
Key string - The product edition of the license key.
- Id string
- The license key ID.
- Labels Dictionary<string, string>
- A map of labels applied to the license key.
- License
Key string - Name string
- The display name for the license.
- Total int
- The total number of units contained in the license key.
- Used int
- The number of units assigned to this license key.
- Edition
Key string - The product edition of the license key.
- Id string
- The license key ID.
- Labels map[string]string
- A map of labels applied to the license key.
- License
Key string - Name string
- The display name for the license.
- Total int
- The total number of units contained in the license key.
- Used int
- The number of units assigned to this license key.
- edition
Key String - The product edition of the license key.
- id String
- The license key ID.
- labels Map<String,String>
- A map of labels applied to the license key.
- license
Key String - name String
- The display name for the license.
- total Integer
- The total number of units contained in the license key.
- used Integer
- The number of units assigned to this license key.
- edition
Key string - The product edition of the license key.
- id string
- The license key ID.
- labels {[key: string]: string}
- A map of labels applied to the license key.
- license
Key string - name string
- The display name for the license.
- total number
- The total number of units contained in the license key.
- used number
- The number of units assigned to this license key.
- edition_
key str - The product edition of the license key.
- id str
- The license key ID.
- labels Mapping[str, str]
- A map of labels applied to the license key.
- license_
key str - name str
- The display name for the license.
- total int
- The total number of units contained in the license key.
- used int
- The number of units assigned to this license key.
- edition
Key String - The product edition of the license key.
- id String
- The license key ID.
- labels Map<String>
- A map of labels applied to the license key.
- license
Key String - name String
- The display name for the license.
- total Number
- The total number of units contained in the license key.
- used Number
- The number of units assigned to this license key.
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphereTerraform Provider.
Viewing docs for vSphere v4.16.3
published on Thursday, Feb 26, 2026 by Pulumi
published on Thursday, Feb 26, 2026 by Pulumi
