azure-native.hybridcompute.License
Explore with Pulumi AI
Describes a license in a hybrid machine.
Uses Azure REST API version 2023-06-20-preview.
Other available API versions: 2023-10-03-preview, 2024-03-31-preview, 2024-05-20-preview, 2024-07-10, 2024-07-31-preview, 2024-09-10-preview, 2024-11-10-preview, 2025-01-13.
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/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(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 * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const license = new azure_native.hybridcompute.License("license", {
    licenseDetails: {
        edition: azure_native.hybridcompute.LicenseEdition.Datacenter,
        processors: 6,
        state: azure_native.hybridcompute.LicenseState.Activated,
        target: azure_native.hybridcompute.LicenseTarget.Windows_Server_2012,
        type: azure_native.hybridcompute.LicenseCoreType.PCore,
    },
    licenseName: "{licenseName}",
    licenseType: azure_native.hybridcompute.LicenseType.ESU,
    location: "eastus2euap",
    resourceGroupName: "myResourceGroup",
});
import pulumi
import pulumi_azure_native as azure_native
license = azure_native.hybridcompute.License("license",
    license_details={
        "edition": azure_native.hybridcompute.LicenseEdition.DATACENTER,
        "processors": 6,
        "state": azure_native.hybridcompute.LicenseState.ACTIVATED,
        "target": azure_native.hybridcompute.LicenseTarget.WINDOWS_SERVER_2012,
        "type": azure_native.hybridcompute.LicenseCoreType.P_CORE,
    },
    license_name="{licenseName}",
    license_type=azure_native.hybridcompute.LicenseType.ESU,
    location="eastus2euap",
    resource_group_name="myResourceGroup")
resources:
  license:
    type: azure-native:hybridcompute:License
    properties:
      licenseDetails:
        edition: Datacenter
        processors: 6
        state: Activated
        target: Windows Server 2012
        type: pCore
      licenseName: '{licenseName}'
      licenseType: ESU
      location: eastus2euap
      resourceGroupName: myResourceGroup
Create License Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new License(name: string, args: LicenseArgs, opts?: CustomResourceOptions);@overload
def License(resource_name: str,
            args: LicenseArgs,
            opts: Optional[ResourceOptions] = None)
@overload
def License(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            resource_group_name: Optional[str] = None,
            license_details: Optional[LicenseDetailsArgs] = None,
            license_name: Optional[str] = None,
            license_type: Optional[Union[str, LicenseType]] = None,
            location: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tenant_id: Optional[str] = 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: azure-native:hybridcompute:License
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var licenseResource = new AzureNative.HybridCompute.License("licenseResource", new()
{
    ResourceGroupName = "string",
    LicenseDetails = new AzureNative.HybridCompute.Inputs.LicenseDetailsArgs
    {
        Edition = "string",
        Processors = 0,
        State = "string",
        Target = "string",
        Type = "string",
    },
    LicenseName = "string",
    LicenseType = "string",
    Location = "string",
    Tags = 
    {
        { "string", "string" },
    },
    TenantId = "string",
});
example, err := hybridcompute.NewLicense(ctx, "licenseResource", &hybridcompute.LicenseArgs{
	ResourceGroupName: pulumi.String("string"),
	LicenseDetails: &hybridcompute.LicenseDetailsArgs{
		Edition:    pulumi.String("string"),
		Processors: pulumi.Int(0),
		State:      pulumi.String("string"),
		Target:     pulumi.String("string"),
		Type:       pulumi.String("string"),
	},
	LicenseName: pulumi.String("string"),
	LicenseType: pulumi.String("string"),
	Location:    pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	TenantId: pulumi.String("string"),
})
var licenseResource = new License("licenseResource", LicenseArgs.builder()
    .resourceGroupName("string")
    .licenseDetails(LicenseDetailsArgs.builder()
        .edition("string")
        .processors(0)
        .state("string")
        .target("string")
        .type("string")
        .build())
    .licenseName("string")
    .licenseType("string")
    .location("string")
    .tags(Map.of("string", "string"))
    .tenantId("string")
    .build());
license_resource = azure_native.hybridcompute.License("licenseResource",
    resource_group_name="string",
    license_details={
        "edition": "string",
        "processors": 0,
        "state": "string",
        "target": "string",
        "type": "string",
    },
    license_name="string",
    license_type="string",
    location="string",
    tags={
        "string": "string",
    },
    tenant_id="string")
const licenseResource = new azure_native.hybridcompute.License("licenseResource", {
    resourceGroupName: "string",
    licenseDetails: {
        edition: "string",
        processors: 0,
        state: "string",
        target: "string",
        type: "string",
    },
    licenseName: "string",
    licenseType: "string",
    location: "string",
    tags: {
        string: "string",
    },
    tenantId: "string",
});
type: azure-native:hybridcompute:License
properties:
    licenseDetails:
        edition: string
        processors: 0
        state: string
        target: string
        type: string
    licenseName: string
    licenseType: string
    location: string
    resourceGroupName: string
    tags:
        string: string
    tenantId: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The License resource accepts the following input properties:
- ResourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- LicenseDetails Pulumi.Azure Native. Hybrid Compute. Inputs. License Details 
- Describes the properties of a License.
- LicenseName string
- The name of the license.
- LicenseType string | Pulumi.Azure Native. Hybrid Compute. License Type 
- The type of the license resource.
- Location string
- The geo-location where the resource lives
- Dictionary<string, string>
- Resource tags.
- TenantId string
- Describes the tenant id.
- ResourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- LicenseDetails LicenseDetails Args 
- Describes the properties of a License.
- LicenseName string
- The name of the license.
- LicenseType string | LicenseType 
- The type of the license resource.
- Location string
- The geo-location where the resource lives
- map[string]string
- Resource tags.
- TenantId string
- Describes the tenant id.
- resourceGroup StringName 
- The name of the resource group. The name is case insensitive.
- licenseDetails LicenseDetails 
- Describes the properties of a License.
- licenseName String
- The name of the license.
- licenseType String | LicenseType 
- The type of the license resource.
- location String
- The geo-location where the resource lives
- Map<String,String>
- Resource tags.
- tenantId String
- Describes the tenant id.
- resourceGroup stringName 
- The name of the resource group. The name is case insensitive.
- licenseDetails LicenseDetails 
- Describes the properties of a License.
- licenseName string
- The name of the license.
- licenseType string | LicenseType 
- The type of the license resource.
- location string
- The geo-location where the resource lives
- {[key: string]: string}
- Resource tags.
- tenantId string
- Describes the tenant id.
- resource_group_ strname 
- The name of the resource group. The name is case insensitive.
- license_details LicenseDetails Args 
- Describes the properties of a License.
- license_name str
- The name of the license.
- license_type str | LicenseType 
- The type of the license resource.
- location str
- The geo-location where the resource lives
- Mapping[str, str]
- Resource tags.
- tenant_id str
- Describes the tenant id.
- resourceGroup StringName 
- The name of the resource group. The name is case insensitive.
- licenseDetails Property Map
- Describes the properties of a License.
- licenseName String
- The name of the license.
- licenseType String | "ESU"
- The type of the license resource.
- location String
- The geo-location where the resource lives
- Map<String>
- Resource tags.
- tenantId String
- Describes the tenant id.
Outputs
All input properties are implicitly available as output properties. Additionally, the License resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- ProvisioningState string
- The provisioning state, which only appears in the response.
- SystemData Pulumi.Azure Native. Hybrid Compute. Outputs. System Data Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- ProvisioningState string
- The provisioning state, which only appears in the response.
- SystemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioningState String
- The provisioning state, which only appears in the response.
- systemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- provisioningState string
- The provisioning state, which only appears in the response.
- systemData SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- provisioning_state str
- The provisioning state, which only appears in the response.
- system_data SystemData Response 
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- provisioningState String
- The provisioning state, which only appears in the response.
- systemData Property Map
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
LicenseCoreType, LicenseCoreTypeArgs      
- PCore
- pCore
- VCore
- vCore
- LicenseCore Type PCore 
- pCore
- LicenseCore Type VCore 
- vCore
- PCore
- pCore
- VCore
- vCore
- PCore
- pCore
- VCore
- vCore
- P_CORE
- pCore
- V_CORE
- vCore
- "pCore" 
- pCore
- "vCore" 
- vCore
LicenseDetails, LicenseDetailsArgs    
- Edition
string | Pulumi.Azure Native. Hybrid Compute. License Edition 
- Describes the edition of the license. The values are either Standard or Datacenter.
- Processors int
- Describes the number of processors.
- State
string | Pulumi.Azure Native. Hybrid Compute. License State 
- Describes the state of the license.
- Target
string | Pulumi.Azure Native. Hybrid Compute. License Target 
- Describes the license target server.
- Type
string | Pulumi.Azure Native. Hybrid Compute. License Core Type 
- Describes the license core type (pCore or vCore).
- Edition
string | LicenseEdition 
- Describes the edition of the license. The values are either Standard or Datacenter.
- Processors int
- Describes the number of processors.
- State
string | LicenseState Enum 
- Describes the state of the license.
- Target
string | LicenseTarget 
- Describes the license target server.
- Type
string | LicenseCore Type 
- Describes the license core type (pCore or vCore).
- edition
String | LicenseEdition 
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors Integer
- Describes the number of processors.
- state
String | LicenseState 
- Describes the state of the license.
- target
String | LicenseTarget 
- Describes the license target server.
- type
String | LicenseCore Type 
- Describes the license core type (pCore or vCore).
- edition
string | LicenseEdition 
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors number
- Describes the number of processors.
- state
string | LicenseState 
- Describes the state of the license.
- target
string | LicenseTarget 
- Describes the license target server.
- type
string | LicenseCore Type 
- Describes the license core type (pCore or vCore).
- edition
str | LicenseEdition 
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors int
- Describes the number of processors.
- state
str | LicenseState 
- Describes the state of the license.
- target
str | LicenseTarget 
- Describes the license target server.
- type
str | LicenseCore Type 
- Describes the license core type (pCore or vCore).
- edition String | "Standard" | "Datacenter"
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors Number
- Describes the number of processors.
- state String | "Activated" | "Deactivated"
- Describes the state of the license.
- target String | "Windows Server 2012" | "Windows Server 2012 R2"
- Describes the license target server.
- type
String | "pCore" | "v Core" 
- Describes the license core type (pCore or vCore).
LicenseDetailsResponse, LicenseDetailsResponseArgs      
- AssignedLicenses int
- Describes the number of assigned licenses.
- ImmutableId string
- Describes the immutable id.
- Edition string
- Describes the edition of the license. The values are either Standard or Datacenter.
- Processors int
- Describes the number of processors.
- State string
- Describes the state of the license.
- Target string
- Describes the license target server.
- Type string
- Describes the license core type (pCore or vCore).
- AssignedLicenses int
- Describes the number of assigned licenses.
- ImmutableId string
- Describes the immutable id.
- Edition string
- Describes the edition of the license. The values are either Standard or Datacenter.
- Processors int
- Describes the number of processors.
- State string
- Describes the state of the license.
- Target string
- Describes the license target server.
- Type string
- Describes the license core type (pCore or vCore).
- assignedLicenses Integer
- Describes the number of assigned licenses.
- immutableId String
- Describes the immutable id.
- edition String
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors Integer
- Describes the number of processors.
- state String
- Describes the state of the license.
- target String
- Describes the license target server.
- type String
- Describes the license core type (pCore or vCore).
- assignedLicenses number
- Describes the number of assigned licenses.
- immutableId string
- Describes the immutable id.
- edition string
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors number
- Describes the number of processors.
- state string
- Describes the state of the license.
- target string
- Describes the license target server.
- type string
- Describes the license core type (pCore or vCore).
- assigned_licenses int
- Describes the number of assigned licenses.
- immutable_id str
- Describes the immutable id.
- edition str
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors int
- Describes the number of processors.
- state str
- Describes the state of the license.
- target str
- Describes the license target server.
- type str
- Describes the license core type (pCore or vCore).
- assignedLicenses Number
- Describes the number of assigned licenses.
- immutableId String
- Describes the immutable id.
- edition String
- Describes the edition of the license. The values are either Standard or Datacenter.
- processors Number
- Describes the number of processors.
- state String
- Describes the state of the license.
- target String
- Describes the license target server.
- type String
- Describes the license core type (pCore or vCore).
LicenseEdition, LicenseEditionArgs    
- Standard
- Standard
- Datacenter
- Datacenter
- LicenseEdition Standard 
- Standard
- LicenseEdition Datacenter 
- Datacenter
- Standard
- Standard
- Datacenter
- Datacenter
- Standard
- Standard
- Datacenter
- Datacenter
- STANDARD
- Standard
- DATACENTER
- Datacenter
- "Standard"
- Standard
- "Datacenter"
- Datacenter
LicenseState, LicenseStateArgs    
- Activated
- Activated
- Deactivated
- Deactivated
- LicenseState Activated 
- Activated
- LicenseState Deactivated 
- Deactivated
- Activated
- Activated
- Deactivated
- Deactivated
- Activated
- Activated
- Deactivated
- Deactivated
- ACTIVATED
- Activated
- DEACTIVATED
- Deactivated
- "Activated"
- Activated
- "Deactivated"
- Deactivated
LicenseTarget, LicenseTargetArgs    
- Windows_Server_2012
- Windows Server 2012
- Windows_Server_2012_R2
- Windows Server 2012 R2
- LicenseTarget_Windows_Server_2012 
- Windows Server 2012
- LicenseTarget_Windows_Server_2012_R2 
- Windows Server 2012 R2
- Windows_Server_2012
- Windows Server 2012
- Windows_Server_2012_R2
- Windows Server 2012 R2
- Windows_Server_2012
- Windows Server 2012
- Windows_Server_2012_R2
- Windows Server 2012 R2
- WINDOWS_SERVER_2012
- Windows Server 2012
- WINDOWS_SERVER_2012_R2
- Windows Server 2012 R2
- "Windows Server 2012"
- Windows Server 2012
- "Windows Server 2012 R2"
- Windows Server 2012 R2
LicenseType, LicenseTypeArgs    
- ESU
- ESU
- LicenseType ESU 
- ESU
- ESU
- ESU
- ESU
- ESU
- ESU
- ESU
- "ESU"
- ESU
SystemDataResponse, SystemDataResponseArgs      
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- CreatedAt string
- The timestamp of resource creation (UTC).
- CreatedBy string
- The identity that created the resource.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The timestamp of resource last modification (UTC)
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
- createdAt string
- The timestamp of resource creation (UTC).
- createdBy string
- The identity that created the resource.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The timestamp of resource last modification (UTC)
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- The type of identity that last modified the resource.
- created_at str
- The timestamp of resource creation (UTC).
- created_by str
- The identity that created the resource.
- created_by_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The timestamp of resource last modification (UTC)
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- The type of identity that last modified the resource.
- createdAt String
- The timestamp of resource creation (UTC).
- createdBy String
- The identity that created the resource.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The timestamp of resource last modification (UTC)
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- The type of identity that last modified the resource.
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} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0