1. Packages
  2. Azure Classic
  3. API Docs
  4. devcenter
  5. DevBoxDefinition

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.devcenter.DevBoxDefinition

Explore with Pulumi AI

Manages a Dev Center Dev Box Definition.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleDevCenter = new azure.devcenter.DevCenter("example", {
    name: "example-dc",
    resourceGroupName: example.name,
    location: example.location,
    identity: {
        type: "SystemAssigned",
    },
});
const exampleDevBoxDefinition = new azure.devcenter.DevBoxDefinition("example", {
    name: "example-dcet",
    location: example.location,
    devCenterId: exampleDevCenter.id,
    imageReferenceId: pulumi.interpolate`${exampleDevCenter.id}/galleries/default/images/microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win10-m365-gen2`,
    skuName: "general_i_8c32gb256ssd_v2",
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_dev_center = azure.devcenter.DevCenter("example",
    name="example-dc",
    resource_group_name=example.name,
    location=example.location,
    identity={
        "type": "SystemAssigned",
    })
example_dev_box_definition = azure.devcenter.DevBoxDefinition("example",
    name="example-dcet",
    location=example.location,
    dev_center_id=example_dev_center.id,
    image_reference_id=example_dev_center.id.apply(lambda id: f"{id}/galleries/default/images/microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win10-m365-gen2"),
    sku_name="general_i_8c32gb256ssd_v2")
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devcenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleDevCenter, err := devcenter.NewDevCenter(ctx, "example", &devcenter.DevCenterArgs{
			Name:              pulumi.String("example-dc"),
			ResourceGroupName: example.Name,
			Location:          example.Location,
			Identity: &devcenter.DevCenterIdentityArgs{
				Type: pulumi.String("SystemAssigned"),
			},
		})
		if err != nil {
			return err
		}
		_, err = devcenter.NewDevBoxDefinition(ctx, "example", &devcenter.DevBoxDefinitionArgs{
			Name:        pulumi.String("example-dcet"),
			Location:    example.Location,
			DevCenterId: exampleDevCenter.ID(),
			ImageReferenceId: exampleDevCenter.ID().ApplyT(func(id string) (string, error) {
				return fmt.Sprintf("%v/galleries/default/images/microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win10-m365-gen2", id), nil
			}).(pulumi.StringOutput),
			SkuName: pulumi.String("general_i_8c32gb256ssd_v2"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var exampleDevCenter = new Azure.DevCenter.DevCenter("example", new()
    {
        Name = "example-dc",
        ResourceGroupName = example.Name,
        Location = example.Location,
        Identity = new Azure.DevCenter.Inputs.DevCenterIdentityArgs
        {
            Type = "SystemAssigned",
        },
    });

    var exampleDevBoxDefinition = new Azure.DevCenter.DevBoxDefinition("example", new()
    {
        Name = "example-dcet",
        Location = example.Location,
        DevCenterId = exampleDevCenter.Id,
        ImageReferenceId = exampleDevCenter.Id.Apply(id => $"{id}/galleries/default/images/microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win10-m365-gen2"),
        SkuName = "general_i_8c32gb256ssd_v2",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.devcenter.DevCenter;
import com.pulumi.azure.devcenter.DevCenterArgs;
import com.pulumi.azure.devcenter.inputs.DevCenterIdentityArgs;
import com.pulumi.azure.devcenter.DevBoxDefinition;
import com.pulumi.azure.devcenter.DevBoxDefinitionArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        var exampleDevCenter = new DevCenter("exampleDevCenter", DevCenterArgs.builder()
            .name("example-dc")
            .resourceGroupName(example.name())
            .location(example.location())
            .identity(DevCenterIdentityArgs.builder()
                .type("SystemAssigned")
                .build())
            .build());

        var exampleDevBoxDefinition = new DevBoxDefinition("exampleDevBoxDefinition", DevBoxDefinitionArgs.builder()
            .name("example-dcet")
            .location(example.location())
            .devCenterId(exampleDevCenter.id())
            .imageReferenceId(exampleDevCenter.id().applyValue(id -> String.format("%s/galleries/default/images/microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win10-m365-gen2", id)))
            .skuName("general_i_8c32gb256ssd_v2")
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleDevCenter:
    type: azure:devcenter:DevCenter
    name: example
    properties:
      name: example-dc
      resourceGroupName: ${example.name}
      location: ${example.location}
      identity:
        type: SystemAssigned
  exampleDevBoxDefinition:
    type: azure:devcenter:DevBoxDefinition
    name: example
    properties:
      name: example-dcet
      location: ${example.location}
      devCenterId: ${exampleDevCenter.id}
      imageReferenceId: ${exampleDevCenter.id}/galleries/default/images/microsoftvisualstudio_visualstudioplustools_vs-2022-ent-general-win10-m365-gen2
      skuName: general_i_8c32gb256ssd_v2
Copy

Create DevBoxDefinition Resource

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

Constructor syntax

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

@overload
def DevBoxDefinition(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     dev_center_id: Optional[str] = None,
                     image_reference_id: Optional[str] = None,
                     sku_name: Optional[str] = None,
                     location: Optional[str] = None,
                     name: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None)
func NewDevBoxDefinition(ctx *Context, name string, args DevBoxDefinitionArgs, opts ...ResourceOption) (*DevBoxDefinition, error)
public DevBoxDefinition(string name, DevBoxDefinitionArgs args, CustomResourceOptions? opts = null)
public DevBoxDefinition(String name, DevBoxDefinitionArgs args)
public DevBoxDefinition(String name, DevBoxDefinitionArgs args, CustomResourceOptions options)
type: azure:devcenter:DevBoxDefinition
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. DevBoxDefinitionArgs
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. DevBoxDefinitionArgs
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. DevBoxDefinitionArgs
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. DevBoxDefinitionArgs
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. DevBoxDefinitionArgs
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 devBoxDefinitionResource = new Azure.DevCenter.DevBoxDefinition("devBoxDefinitionResource", new()
{
    DevCenterId = "string",
    ImageReferenceId = "string",
    SkuName = "string",
    Location = "string",
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := devcenter.NewDevBoxDefinition(ctx, "devBoxDefinitionResource", &devcenter.DevBoxDefinitionArgs{
	DevCenterId:      pulumi.String("string"),
	ImageReferenceId: pulumi.String("string"),
	SkuName:          pulumi.String("string"),
	Location:         pulumi.String("string"),
	Name:             pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var devBoxDefinitionResource = new DevBoxDefinition("devBoxDefinitionResource", DevBoxDefinitionArgs.builder()
    .devCenterId("string")
    .imageReferenceId("string")
    .skuName("string")
    .location("string")
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
dev_box_definition_resource = azure.devcenter.DevBoxDefinition("devBoxDefinitionResource",
    dev_center_id="string",
    image_reference_id="string",
    sku_name="string",
    location="string",
    name="string",
    tags={
        "string": "string",
    })
Copy
const devBoxDefinitionResource = new azure.devcenter.DevBoxDefinition("devBoxDefinitionResource", {
    devCenterId: "string",
    imageReferenceId: "string",
    skuName: "string",
    location: "string",
    name: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure:devcenter:DevBoxDefinition
properties:
    devCenterId: string
    imageReferenceId: string
    location: string
    name: string
    skuName: string
    tags:
        string: string
Copy

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

DevCenterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the associated Dev Center. Changing this forces a new resource to be created.
ImageReferenceId This property is required. string
The ID of the image for the Dev Center Dev Box Definition.
SkuName This property is required. string
The name of the SKU for the Dev Center Dev Box Definition.
Location Changes to this property will trigger replacement. string
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
DevCenterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the associated Dev Center. Changing this forces a new resource to be created.
ImageReferenceId This property is required. string
The ID of the image for the Dev Center Dev Box Definition.
SkuName This property is required. string
The name of the SKU for the Dev Center Dev Box Definition.
Location Changes to this property will trigger replacement. string
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
devCenterId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the associated Dev Center. Changing this forces a new resource to be created.
imageReferenceId This property is required. String
The ID of the image for the Dev Center Dev Box Definition.
skuName This property is required. String
The name of the SKU for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. String
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
tags Map<String,String>
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
devCenterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the associated Dev Center. Changing this forces a new resource to be created.
imageReferenceId This property is required. string
The ID of the image for the Dev Center Dev Box Definition.
skuName This property is required. string
The name of the SKU for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. string
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
dev_center_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the associated Dev Center. Changing this forces a new resource to be created.
image_reference_id This property is required. str
The ID of the image for the Dev Center Dev Box Definition.
sku_name This property is required. str
The name of the SKU for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. str
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
devCenterId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the associated Dev Center. Changing this forces a new resource to be created.
imageReferenceId This property is required. String
The ID of the image for the Dev Center Dev Box Definition.
skuName This property is required. String
The name of the SKU for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. String
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
tags Map<String>
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing DevBoxDefinition Resource

Get an existing DevBoxDefinition 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?: DevBoxDefinitionState, opts?: CustomResourceOptions): DevBoxDefinition
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dev_center_id: Optional[str] = None,
        image_reference_id: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        sku_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> DevBoxDefinition
func GetDevBoxDefinition(ctx *Context, name string, id IDInput, state *DevBoxDefinitionState, opts ...ResourceOption) (*DevBoxDefinition, error)
public static DevBoxDefinition Get(string name, Input<string> id, DevBoxDefinitionState? state, CustomResourceOptions? opts = null)
public static DevBoxDefinition get(String name, Output<String> id, DevBoxDefinitionState state, CustomResourceOptions options)
resources:  _:    type: azure:devcenter:DevBoxDefinition    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DevCenterId Changes to this property will trigger replacement. string
The ID of the associated Dev Center. Changing this forces a new resource to be created.
ImageReferenceId string
The ID of the image for the Dev Center Dev Box Definition.
Location Changes to this property will trigger replacement. string
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
SkuName string
The name of the SKU for the Dev Center Dev Box Definition.
Tags Dictionary<string, string>
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
DevCenterId Changes to this property will trigger replacement. string
The ID of the associated Dev Center. Changing this forces a new resource to be created.
ImageReferenceId string
The ID of the image for the Dev Center Dev Box Definition.
Location Changes to this property will trigger replacement. string
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
SkuName string
The name of the SKU for the Dev Center Dev Box Definition.
Tags map[string]string
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
devCenterId Changes to this property will trigger replacement. String
The ID of the associated Dev Center. Changing this forces a new resource to be created.
imageReferenceId String
The ID of the image for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. String
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
skuName String
The name of the SKU for the Dev Center Dev Box Definition.
tags Map<String,String>
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
devCenterId Changes to this property will trigger replacement. string
The ID of the associated Dev Center. Changing this forces a new resource to be created.
imageReferenceId string
The ID of the image for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. string
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
skuName string
The name of the SKU for the Dev Center Dev Box Definition.
tags {[key: string]: string}
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
dev_center_id Changes to this property will trigger replacement. str
The ID of the associated Dev Center. Changing this forces a new resource to be created.
image_reference_id str
The ID of the image for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. str
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
sku_name str
The name of the SKU for the Dev Center Dev Box Definition.
tags Mapping[str, str]
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
devCenterId Changes to this property will trigger replacement. String
The ID of the associated Dev Center. Changing this forces a new resource to be created.
imageReferenceId String
The ID of the image for the Dev Center Dev Box Definition.
location Changes to this property will trigger replacement. String
The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
skuName String
The name of the SKU for the Dev Center Dev Box Definition.
tags Map<String>
A mapping of tags which should be assigned to the Dev Center Dev Box Definition.

Import

An existing Dev Center Dev Box Definition can be imported into Pulumi using the resource id, e.g.

$ pulumi import azure:devcenter/devBoxDefinition:DevBoxDefinition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevCenter/devCenters/dc1/devBoxDefinitions/et1
Copy

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

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.