1. Packages
  2. vSphere
  3. API Docs
  4. getLicense
vSphere v4.9.0 published on Tuesday, Nov 28, 2023 by Pulumi

vsphere.getLicense

Explore with Pulumi AI

vsphere logo
vSphere v4.9.0 published on Tuesday, Nov 28, 2023 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

    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 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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_vsphere as vsphere
    
    license = vsphere.get_license(license_key="00000-00000-00000-00000-00000")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vsphere from "@pulumi/vsphere";
    
    const license = vsphere.getLicense({
        licenseKey: "00000-00000-00000-00000-00000",
    });
    
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vsphere:index/getLicense:getLicense
      arguments:
        # arguments dictionary

    The following arguments are supported:

    LicenseKey string

    The license key.

    LicenseKey string

    The license key.

    licenseKey String

    The license key.

    licenseKey string

    The license key.

    license_key str

    The license key.

    licenseKey String

    The license key.

    getLicense Result

    The following output properties are available:

    EditionKey string

    The product edition of the license key.

    Id string
    Labels Dictionary<string, string>

    A map of key/value pairs attached as labels (tags) to the license key.

    LicenseKey string
    Name string

    The display name for the license.

    Total int

    Total number of units (example: CPUs) contained in the license.

    Used int

    The number of units (example: CPUs) assigned to this license.

    EditionKey string

    The product edition of the license key.

    Id string
    Labels map[string]string

    A map of key/value pairs attached as labels (tags) to the license key.

    LicenseKey string
    Name string

    The display name for the license.

    Total int

    Total number of units (example: CPUs) contained in the license.

    Used int

    The number of units (example: CPUs) assigned to this license.

    editionKey String

    The product edition of the license key.

    id String
    labels Map<String,String>

    A map of key/value pairs attached as labels (tags) to the license key.

    licenseKey String
    name String

    The display name for the license.

    total Integer

    Total number of units (example: CPUs) contained in the license.

    used Integer

    The number of units (example: CPUs) assigned to this license.

    editionKey string

    The product edition of the license key.

    id string
    labels {[key: string]: string}

    A map of key/value pairs attached as labels (tags) to the license key.

    licenseKey string
    name string

    The display name for the license.

    total number

    Total number of units (example: CPUs) contained in the license.

    used number

    The number of units (example: CPUs) assigned to this license.

    edition_key str

    The product edition of the license key.

    id str
    labels Mapping[str, str]

    A map of key/value pairs attached as labels (tags) to the license key.

    license_key str
    name str

    The display name for the license.

    total int

    Total number of units (example: CPUs) contained in the license.

    used int

    The number of units (example: CPUs) assigned to this license.

    editionKey String

    The product edition of the license key.

    id String
    labels Map<String>

    A map of key/value pairs attached as labels (tags) to the license key.

    licenseKey String
    name String

    The display name for the license.

    total Number

    Total number of units (example: CPUs) contained in the license.

    used Number

    The number of units (example: CPUs) assigned to this license.

    Package Details

    Repository
    vSphere pulumi/pulumi-vsphere
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the vsphere Terraform Provider.

    vsphere logo
    vSphere v4.9.0 published on Tuesday, Nov 28, 2023 by Pulumi