License
Provides a VMware vSphere license resource. This can be used to add and remove license keys.
Example Usage
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var licenseKey = new VSphere.License("licenseKey", new VSphere.LicenseArgs
{
Labels =
{
{ "VpxClientLicenseLabel", "Hello World" },
{ "Workflow", "Hello World" },
},
LicenseKey = "452CQ-2EK54-K8742-00000-00000",
});
}
}
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v2/go/vsphere"
"github.com/pulumi/pulumi/sdk/v2/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
})
}
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",
});
Create a License Resource
new License(name: string, args: LicenseArgs, opts?: CustomResourceOptions);
def License(resource_name: str, opts: Optional[ResourceOptions] = None, labels: Optional[Mapping[str, str]] = None, license_key: Optional[str] = None)
func NewLicense(ctx *Context, name string, args LicenseArgs, opts ...ResourceOption) (*License, error)
public License(string name, LicenseArgs args, CustomResourceOptions? opts = null)
- 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.
- opts ResourceOptions
- A bag of options that control this 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.
License Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model 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 {[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.
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 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.
Look up an 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)
- 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.
The following state arguments are supported:
- 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 {[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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphere
Terraform Provider.