All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.devcenter.kotlin.DevBoxDefinitionArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.devcenter.kotlin

import com.pulumi.azure.devcenter.DevBoxDefinitionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Dev Center Dev Box Definition.
 * ## Example Usage
 * 
 * ```typescript
 * 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",
 * });
 * ```
 * ```python
 * 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")
 * ```
 * ```csharp
 * 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",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * ```
 * 
 * ## Import
 * An existing Dev Center Dev Box Definition can be imported into Terraform using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:devcenter/devBoxDefinition:DevBoxDefinition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevCenter/devCenters/dc1/devBoxDefinitions/et1
 * ```
 * @property devCenterId The ID of the associated Dev Center. Changing this forces a new resource to be created.
 * @property imageReferenceId The ID of the image for the Dev Center Dev Box Definition.
 * @property location The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
 * @property name Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
 * @property skuName The name of the SKU for the Dev Center Dev Box Definition.
 * @property tags A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
 */
public data class DevBoxDefinitionArgs(
    public val devCenterId: Output? = null,
    public val imageReferenceId: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.devcenter.DevBoxDefinitionArgs =
        com.pulumi.azure.devcenter.DevBoxDefinitionArgs.builder()
            .devCenterId(devCenterId?.applyValue({ args0 -> args0 }))
            .imageReferenceId(imageReferenceId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [DevBoxDefinitionArgs].
 */
@PulumiTagMarker
public class DevBoxDefinitionArgsBuilder internal constructor() {
    private var devCenterId: Output? = null

    private var imageReferenceId: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The ID of the associated Dev Center. Changing this forces a new resource to be created.
     */
    @JvmName("oykmklpiaemospae")
    public suspend fun devCenterId(`value`: Output) {
        this.devCenterId = value
    }

    /**
     * @param value The ID of the image for the Dev Center Dev Box Definition.
     */
    @JvmName("xadntxsifecobumk")
    public suspend fun imageReferenceId(`value`: Output) {
        this.imageReferenceId = value
    }

    /**
     * @param value The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
     */
    @JvmName("qelatmiwayyaxsqm")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
     */
    @JvmName("fpkvegjqpigytsag")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the SKU for the Dev Center Dev Box Definition.
     */
    @JvmName("iqxbvxlryolqiggs")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
     */
    @JvmName("qgpdewnfruwsjsjw")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ID of the associated Dev Center. Changing this forces a new resource to be created.
     */
    @JvmName("lefjnnnslfaencdc")
    public suspend fun devCenterId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.devCenterId = mapped
    }

    /**
     * @param value The ID of the image for the Dev Center Dev Box Definition.
     */
    @JvmName("phnhjoshkvryxkxb")
    public suspend fun imageReferenceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageReferenceId = mapped
    }

    /**
     * @param value The Azure Region where the Dev Center Dev Box Definition should exist. Changing this forces a new resource to be created.
     */
    @JvmName("jpecegyhdjqvvhsc")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Specifies the name of this Dev Center Dev Box Definition. Changing this forces a new resource to be created.
     */
    @JvmName("ewxnucdmsuddnbya")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The name of the SKU for the Dev Center Dev Box Definition.
     */
    @JvmName("fjnwytkeccdeckcf")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
     */
    @JvmName("owylfvysjnynaoiw")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Dev Center Dev Box Definition.
     */
    @JvmName("fiwjycmfrdjydexa")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): DevBoxDefinitionArgs = DevBoxDefinitionArgs(
        devCenterId = devCenterId,
        imageReferenceId = imageReferenceId,
        location = location,
        name = name,
        skuName = skuName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy