vsphere.License
Explore with Pulumi AI
Provides a VMware vSphere license resource. This can be used to add and remove license keys.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var licenseKey = new VSphere.License("licenseKey", new()
{
Labels =
{
{ "VpxClientLicenseLabel", "Hello World" },
{ "Workflow", "Hello World" },
},
LicenseKey = "452CQ-2EK54-K8742-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.NewLicense(ctx, "licenseKey", &vsphere.LicenseArgs{
Labels: pulumi.StringMap{
"VpxClientLicenseLabel": pulumi.String("Hello World"),
"Workflow": pulumi.String("Hello World"),
},
LicenseKey: pulumi.String("452CQ-2EK54-K8742-00000-00000"),
})
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.License;
import com.pulumi.vsphere.LicenseArgs;
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) {
var licenseKey = new License("licenseKey", LicenseArgs.builder()
.labels(Map.ofEntries(
Map.entry("VpxClientLicenseLabel", "Hello World"),
Map.entry("Workflow", "Hello World")
))
.licenseKey("452CQ-2EK54-K8742-00000-00000")
.build());
}
}
import pulumi
import pulumi_vsphere as vsphere
license_key = vsphere.License("licenseKey",
labels={
"VpxClientLicenseLabel": "Hello World",
"Workflow": "Hello World",
},
license_key="452CQ-2EK54-K8742-00000-00000")
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const licenseKey = new vsphere.License("licenseKey", {
labels: {
VpxClientLicenseLabel: "Hello World",
Workflow: "Hello World",
},
licenseKey: "452CQ-2EK54-K8742-00000-00000",
});
resources:
licenseKey:
type: vsphere:License
properties:
labels:
VpxClientLicenseLabel: Hello World
Workflow: Hello World
licenseKey: 452CQ-2EK54-K8742-00000-00000
Create License Resource
new License(name: string, args: LicenseArgs, opts?: CustomResourceOptions);
@overload
def License(resource_name: str,
opts: Optional[ResourceOptions] = None,
labels: Optional[Mapping[str, str]] = None,
license_key: Optional[str] = None)
@overload
def License(resource_name: str,
args: LicenseArgs,
opts: Optional[ResourceOptions] = None)
func NewLicense(ctx *Context, name string, args LicenseArgs, opts ...ResourceOption) (*License, error)
public License(string name, LicenseArgs args, CustomResourceOptions? opts = null)
public License(String name, LicenseArgs args)
public License(String name, LicenseArgs args, CustomResourceOptions options)
type: vsphere:License
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LicenseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LicenseArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LicenseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LicenseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LicenseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
License Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The License resource accepts the following input properties:
- License
Key string The license key to add.
- Labels Dictionary<string, string>
A map of key/value pairs to be attached as labels (tags) to the license key.
- License
Key string The license key to add.
- Labels map[string]string
A map of key/value pairs to be attached as labels (tags) to the license key.
- license
Key String The license key to add.
- labels Map<String,String>
A map of key/value pairs to be attached as labels (tags) to the license key.
- license
Key string The license key to add.
- labels {[key: string]: string}
A map of key/value pairs to be attached as labels (tags) to the license key.
- license_
key str The license key to add.
- labels Mapping[str, str]
A map of key/value pairs to be attached as labels (tags) to the license key.
- license
Key String The license key to add.
- labels Map<String>
A map of key/value pairs to be attached as labels (tags) to the license key.
Outputs
All input properties are implicitly available as output properties. Additionally, the License resource produces the following output properties:
- Edition
Key string The product edition of the license key.
- Id string
The provider-assigned unique ID for this managed resource.
- 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.
- Edition
Key string The product edition of the license key.
- Id string
The provider-assigned unique ID for this managed resource.
- 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.
- edition
Key String The product edition of the license key.
- id String
The provider-assigned unique ID for this managed resource.
- 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.
- edition
Key string The product edition of the license key.
- id string
The provider-assigned unique ID for this managed resource.
- 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
The provider-assigned unique ID for this managed resource.
- 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.
- edition
Key String The product edition of the license key.
- id String
The provider-assigned unique ID for this managed resource.
- 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.
Look up Existing License Resource
Get an existing License resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: LicenseState, opts?: CustomResourceOptions): License
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
edition_key: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
license_key: Optional[str] = None,
name: Optional[str] = None,
total: Optional[int] = None,
used: Optional[int] = None) -> License
func GetLicense(ctx *Context, name string, id IDInput, state *LicenseState, opts ...ResourceOption) (*License, error)
public static License Get(string name, Input<string> id, LicenseState? state, CustomResourceOptions? opts = null)
public static License get(String name, Output<String> id, LicenseState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Edition
Key string The product edition of the license key.
- Labels Dictionary<string, string>
A map of key/value pairs to be attached as labels (tags) to the license key.
- License
Key string The license key to add.
- 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.
- Edition
Key string The product edition of the license key.
- Labels map[string]string
A map of key/value pairs to be attached as labels (tags) to the license key.
- License
Key string The license key to add.
- 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.
- edition
Key String The product edition of the license key.
- labels Map<String,String>
A map of key/value pairs to be attached as labels (tags) to the license key.
- license
Key String The license key to add.
- 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.
- edition
Key string The product edition of the license key.
- labels {[key: string]: string}
A map of key/value pairs to be attached as labels (tags) to the license key.
- license
Key string The license key to add.
- 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.
- labels Mapping[str, str]
A map of key/value pairs to be attached as labels (tags) to the license key.
- license_
key str The license key to add.
- 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.
- edition
Key String The product edition of the license key.
- labels Map<String>
A map of key/value pairs to be attached as labels (tags) to the license key.
- license
Key String The license key to add.
- 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.