1. Packages
  2. Azure Native v2
  3. API Docs
  4. softwareplan
  5. HybridUseBenefit
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.softwareplan.HybridUseBenefit

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Response on GET of a hybrid use benefit Azure REST API version: 2019-12-01. Prior API version in Azure Native 1.x: 2019-06-01-preview.

Example Usage

HybridUseBenefit

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var hybridUseBenefit = new AzureNative.SoftwarePlan.HybridUseBenefit("hybridUseBenefit", new()
    {
        PlanId = "94f46eda-45f8-493a-8425-251921463a89",
        Scope = "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}",
        Sku = new AzureNative.SoftwarePlan.Inputs.SkuArgs
        {
            Name = "SQL_Server_Perpetual",
        },
    });

});
Copy
package main

import (
	softwareplan "github.com/pulumi/pulumi-azure-native-sdk/softwareplan/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := softwareplan.NewHybridUseBenefit(ctx, "hybridUseBenefit", &softwareplan.HybridUseBenefitArgs{
			PlanId: pulumi.String("94f46eda-45f8-493a-8425-251921463a89"),
			Scope:  pulumi.String("subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}"),
			Sku: &softwareplan.SkuArgs{
				Name: pulumi.String("SQL_Server_Perpetual"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.softwareplan.HybridUseBenefit;
import com.pulumi.azurenative.softwareplan.HybridUseBenefitArgs;
import com.pulumi.azurenative.softwareplan.inputs.SkuArgs;
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 hybridUseBenefit = new HybridUseBenefit("hybridUseBenefit", HybridUseBenefitArgs.builder()
            .planId("94f46eda-45f8-493a-8425-251921463a89")
            .scope("subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}")
            .sku(SkuArgs.builder()
                .name("SQL_Server_Perpetual")
                .build())
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const hybridUseBenefit = new azure_native.softwareplan.HybridUseBenefit("hybridUseBenefit", {
    planId: "94f46eda-45f8-493a-8425-251921463a89",
    scope: "subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}",
    sku: {
        name: "SQL_Server_Perpetual",
    },
});
Copy
import pulumi
import pulumi_azure_native as azure_native

hybrid_use_benefit = azure_native.softwareplan.HybridUseBenefit("hybridUseBenefit",
    plan_id="94f46eda-45f8-493a-8425-251921463a89",
    scope="subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}",
    sku={
        "name": "SQL_Server_Perpetual",
    })
Copy
resources:
  hybridUseBenefit:
    type: azure-native:softwareplan:HybridUseBenefit
    properties:
      planId: 94f46eda-45f8-493a-8425-251921463a89
      scope: subscriptions/{sub-id}/resourceGroups/{rg-name}/providers/Microsoft.Compute/HostGroups/{host-group-name}/hosts/{host-name}
      sku:
        name: SQL_Server_Perpetual
Copy

Create HybridUseBenefit Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new HybridUseBenefit(name: string, args: HybridUseBenefitArgs, opts?: CustomResourceOptions);
@overload
def HybridUseBenefit(resource_name: str,
                     args: HybridUseBenefitArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def HybridUseBenefit(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     scope: Optional[str] = None,
                     sku: Optional[SkuArgs] = None,
                     plan_id: Optional[str] = None)
func NewHybridUseBenefit(ctx *Context, name string, args HybridUseBenefitArgs, opts ...ResourceOption) (*HybridUseBenefit, error)
public HybridUseBenefit(string name, HybridUseBenefitArgs args, CustomResourceOptions? opts = null)
public HybridUseBenefit(String name, HybridUseBenefitArgs args)
public HybridUseBenefit(String name, HybridUseBenefitArgs args, CustomResourceOptions options)
type: azure-native:softwareplan:HybridUseBenefit
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. HybridUseBenefitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. HybridUseBenefitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. HybridUseBenefitArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. HybridUseBenefitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. HybridUseBenefitArgs
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 hybridUseBenefitResource = new AzureNative.Softwareplan.HybridUseBenefit("hybridUseBenefitResource", new()
{
    Scope = "string",
    Sku = 
    {
        { "name", "string" },
    },
    PlanId = "string",
});
Copy
example, err := softwareplan.NewHybridUseBenefit(ctx, "hybridUseBenefitResource", &softwareplan.HybridUseBenefitArgs{
	Scope: "string",
	Sku: map[string]interface{}{
		"name": "string",
	},
	PlanId: "string",
})
Copy
var hybridUseBenefitResource = new HybridUseBenefit("hybridUseBenefitResource", HybridUseBenefitArgs.builder()
    .scope("string")
    .sku(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .planId("string")
    .build());
Copy
hybrid_use_benefit_resource = azure_native.softwareplan.HybridUseBenefit("hybridUseBenefitResource",
    scope=string,
    sku={
        name: string,
    },
    plan_id=string)
Copy
const hybridUseBenefitResource = new azure_native.softwareplan.HybridUseBenefit("hybridUseBenefitResource", {
    scope: "string",
    sku: {
        name: "string",
    },
    planId: "string",
});
Copy
type: azure-native:softwareplan:HybridUseBenefit
properties:
    planId: string
    scope: string
    sku:
        name: string
Copy

HybridUseBenefit 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 HybridUseBenefit resource accepts the following input properties:

Scope
This property is required.
Changes to this property will trigger replacement.
string
The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now
Sku This property is required. Pulumi.AzureNative.SoftwarePlan.Inputs.Sku
Hybrid use benefit SKU
PlanId Changes to this property will trigger replacement. string
This is a unique identifier for a plan. Should be a guid.
Scope
This property is required.
Changes to this property will trigger replacement.
string
The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now
Sku This property is required. SkuArgs
Hybrid use benefit SKU
PlanId Changes to this property will trigger replacement. string
This is a unique identifier for a plan. Should be a guid.
scope
This property is required.
Changes to this property will trigger replacement.
String
The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now
sku This property is required. Sku
Hybrid use benefit SKU
planId Changes to this property will trigger replacement. String
This is a unique identifier for a plan. Should be a guid.
scope
This property is required.
Changes to this property will trigger replacement.
string
The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now
sku This property is required. Sku
Hybrid use benefit SKU
planId Changes to this property will trigger replacement. string
This is a unique identifier for a plan. Should be a guid.
scope
This property is required.
Changes to this property will trigger replacement.
str
The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now
sku This property is required. SkuArgs
Hybrid use benefit SKU
plan_id Changes to this property will trigger replacement. str
This is a unique identifier for a plan. Should be a guid.
scope
This property is required.
Changes to this property will trigger replacement.
String
The scope at which the operation is performed. This is limited to Microsoft.Compute/virtualMachines and Microsoft.Compute/hostGroups/hosts for now
sku This property is required. Property Map
Hybrid use benefit SKU
planId Changes to this property will trigger replacement. String
This is a unique identifier for a plan. Should be a guid.

Outputs

All input properties are implicitly available as output properties. Additionally, the HybridUseBenefit resource produces the following output properties:

CreatedDate string
Created date
Etag int
Indicates the revision of the hybrid use benefit
Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedDate string
Last updated date
Name string
The name of the resource
ProvisioningState string
Provisioning state
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
CreatedDate string
Created date
Etag int
Indicates the revision of the hybrid use benefit
Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedDate string
Last updated date
Name string
The name of the resource
ProvisioningState string
Provisioning state
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
createdDate String
Created date
etag Integer
Indicates the revision of the hybrid use benefit
id String
The provider-assigned unique ID for this managed resource.
lastUpdatedDate String
Last updated date
name String
The name of the resource
provisioningState String
Provisioning state
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
createdDate string
Created date
etag number
Indicates the revision of the hybrid use benefit
id string
The provider-assigned unique ID for this managed resource.
lastUpdatedDate string
Last updated date
name string
The name of the resource
provisioningState string
Provisioning state
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
created_date str
Created date
etag int
Indicates the revision of the hybrid use benefit
id str
The provider-assigned unique ID for this managed resource.
last_updated_date str
Last updated date
name str
The name of the resource
provisioning_state str
Provisioning state
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
createdDate String
Created date
etag Number
Indicates the revision of the hybrid use benefit
id String
The provider-assigned unique ID for this managed resource.
lastUpdatedDate String
Last updated date
name String
The name of the resource
provisioningState String
Provisioning state
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

Sku
, SkuArgs

Name string
Name of the SKU to be applied
Name string
Name of the SKU to be applied
name String
Name of the SKU to be applied
name string
Name of the SKU to be applied
name str
Name of the SKU to be applied
name String
Name of the SKU to be applied

SkuResponse
, SkuResponseArgs

Name string
Name of the SKU to be applied
Name string
Name of the SKU to be applied
name String
Name of the SKU to be applied
name string
Name of the SKU to be applied
name str
Name of the SKU to be applied
name String
Name of the SKU to be applied

Import

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

$ pulumi import azure-native:softwareplan:HybridUseBenefit SQL_{hostGroupName}_{hostName} /{scope}/providers/Microsoft.SoftwarePlan/hybridUseBenefits/{planId} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi