LicenseArgs

data class LicenseArgs(val licenseDetails: Output<LicenseDetailsArgs>? = null, val licenseName: Output<String>? = null, val licenseType: Output<Either<String, LicenseType>>? = null, val location: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val tenantId: Output<String>? = null) : ConvertibleToJava<LicenseArgs>

Describes a license in a hybrid machine. Azure REST API version: 2023-06-20-preview.

Example Usage

Create or Update a License

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var license = new AzureNative.HybridCompute.License("license", new()
{
LicenseDetails = new AzureNative.HybridCompute.Inputs.LicenseDetailsArgs
{
Edition = "Datacenter",
Processors = 6,
State = "Activated",
Target = "Windows Server 2012",
Type = "pCore",
},
LicenseName = "{licenseName}",
LicenseType = "ESU",
Location = "eastus2euap",
ResourceGroupName = "myResourceGroup",
});
});
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/hybridcompute/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := hybridcompute.NewLicense(ctx, "license", &hybridcompute.LicenseArgs{
LicenseDetails: &hybridcompute.LicenseDetailsArgs{
Edition: pulumi.String("Datacenter"),
Processors: pulumi.Int(6),
State: pulumi.String("Activated"),
Target: pulumi.String("Windows Server 2012"),
Type: pulumi.String("pCore"),
},
LicenseName: pulumi.String("{licenseName}"),
LicenseType: pulumi.String("ESU"),
Location: pulumi.String("eastus2euap"),
ResourceGroupName: pulumi.String("myResourceGroup"),
})
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.azurenative.hybridcompute.License;
import com.pulumi.azurenative.hybridcompute.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 license = new License("license", LicenseArgs.builder()
.licenseDetails(Map.ofEntries(
Map.entry("edition", "Datacenter"),
Map.entry("processors", 6),
Map.entry("state", "Activated"),
Map.entry("target", "Windows Server 2012"),
Map.entry("type", "pCore")
))
.licenseName("{licenseName}")
.licenseType("ESU")
.location("eastus2euap")
.resourceGroupName("myResourceGroup")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:hybridcompute:License {licenseName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}

Constructors

Link copied to clipboard
fun LicenseArgs(licenseDetails: Output<LicenseDetailsArgs>? = null, licenseName: Output<String>? = null, licenseType: Output<Either<String, LicenseType>>? = null, location: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, tenantId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): LicenseArgs

Properties

Link copied to clipboard
val licenseDetails: Output<LicenseDetailsArgs>? = null

Describes the properties of a License.

Link copied to clipboard
val licenseName: Output<String>? = null

The name of the license.

Link copied to clipboard
val licenseType: Output<Either<String, LicenseType>>? = null

The type of the license resource.

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val tenantId: Output<String>? = null

Describes the tenant id.