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. Uses Azure REST API version 2024-07-10. In version 2.x of the Azure Native provider, it used API version 2023-06-20-preview. Other available API versions: 2023-06-20-preview, 2023-10-03-preview, 2024-03-31-preview, 2024-05-20-preview, 2024-07-31-preview, 2024-09-10-preview, 2024-11-10-preview, 2025-01-13, 2025-02-19-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native hybridcompute [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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 = AzureNative.HybridCompute.LicenseEdition.Datacenter,
Processors = 6,
State = AzureNative.HybridCompute.LicenseState.Activated,
Target = AzureNative.HybridCompute.LicenseTarget.Windows_Server_2012,
Type = AzureNative.HybridCompute.LicenseCoreType.PCore,
},
LicenseName = "{licenseName}",
LicenseType = AzureNative.HybridCompute.LicenseType.ESU,
Location = "eastus2euap",
ResourceGroupName = "myResourceGroup",
});
});
package main
import (
hybridcompute "github.com/pulumi/pulumi-azure-native-sdk/hybridcompute/v3"
"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(hybridcompute.LicenseEditionDatacenter),
Processors: pulumi.Int(6),
State: pulumi.String(hybridcompute.LicenseStateActivated),
Target: pulumi.String(hybridcompute.LicenseTarget_Windows_Server_2012),
Type: pulumi.String(hybridcompute.LicenseCoreTypePCore),
},
LicenseName: pulumi.String("{licenseName}"),
LicenseType: pulumi.String(hybridcompute.LicenseTypeESU),
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 com.pulumi.azurenative.hybridcompute.inputs.LicenseDetailsArgs;
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(LicenseDetailsArgs.builder()
.edition("Datacenter")
.processors(6)
.state("Activated")
.target("Windows Server 2012")
.type("pCore")
.build())
.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
constructor(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)

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.

Functions

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