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

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

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.devcenter.kotlin

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

/**
 * 
 * Manages a Dev Center Project.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const exampleResourceGroup = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const example = new azure.devcenter.DevCenter("example", {
 *     name: "example",
 *     resourceGroupName: exampleResourceGroup.name,
 *     location: exampleResourceGroup.location,
 *     identity: {
 *         type: "example-value",
 *     },
 * });
 * const exampleProject = new azure.devcenter.Project("example", {
 *     devCenterId: example.id,
 *     location: exampleResourceGroup.location,
 *     name: "example",
 *     resourceGroupName: exampleResourceGroup.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example_resource_group = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example = azure.devcenter.DevCenter("example",
 *     name="example",
 *     resource_group_name=example_resource_group.name,
 *     location=example_resource_group.location,
 *     identity={
 *         "type": "example-value",
 *     })
 * example_project = azure.devcenter.Project("example",
 *     dev_center_id=example.id,
 *     location=example_resource_group.location,
 *     name="example",
 *     resource_group_name=example_resource_group.name)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var example = new Azure.DevCenter.DevCenter("example", new()
 *     {
 *         Name = "example",
 *         ResourceGroupName = exampleResourceGroup.Name,
 *         Location = exampleResourceGroup.Location,
 *         Identity = new Azure.DevCenter.Inputs.DevCenterIdentityArgs
 *         {
 *             Type = "example-value",
 *         },
 *     });
 *     var exampleProject = new Azure.DevCenter.Project("example", new()
 *     {
 *         DevCenterId = example.Id,
 *         Location = exampleResourceGroup.Location,
 *         Name = "example",
 *         ResourceGroupName = exampleResourceGroup.Name,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"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 {
 * 		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		example, err := devcenter.NewDevCenter(ctx, "example", &devcenter.DevCenterArgs{
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: exampleResourceGroup.Name,
 * 			Location:          exampleResourceGroup.Location,
 * 			Identity: &devcenter.DevCenterIdentityArgs{
 * 				Type: pulumi.String("example-value"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = devcenter.NewProject(ctx, "example", &devcenter.ProjectArgs{
 * 			DevCenterId:       example.ID(),
 * 			Location:          exampleResourceGroup.Location,
 * 			Name:              pulumi.String("example"),
 * 			ResourceGroupName: exampleResourceGroup.Name,
 * 		})
 * 		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.Project;
 * import com.pulumi.azure.devcenter.ProjectArgs;
 * 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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var example = new DevCenter("example", DevCenterArgs.builder()
 *             .name("example")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .identity(DevCenterIdentityArgs.builder()
 *                 .type("example-value")
 *                 .build())
 *             .build());
 *         var exampleProject = new Project("exampleProject", ProjectArgs.builder()
 *             .devCenterId(example.id())
 *             .location(exampleResourceGroup.location())
 *             .name("example")
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:devcenter:DevCenter
 *     properties:
 *       name: example
 *       resourceGroupName: ${exampleResourceGroup.name}
 *       location: ${exampleResourceGroup.location}
 *       identity:
 *         type: example-value
 *   exampleResourceGroup:
 *     type: azure:core:ResourceGroup
 *     name: example
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleProject:
 *     type: azure:devcenter:Project
 *     name: example
 *     properties:
 *       devCenterId: ${example.id}
 *       location: ${exampleResourceGroup.location}
 *       name: example
 *       resourceGroupName: ${exampleResourceGroup.name}
 * ```
 * 
 * ## Import
 * An existing Dev Center Project can be imported into Terraform using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:devcenter/project:Project example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}
 * ```
 * * Where `{subscriptionId}` is the ID of the Azure Subscription where the Dev Center Project exists. For example `12345678-1234-9876-4563-123456789012`.
 * * Where `{resourceGroupName}` is the name of Resource Group where this Dev Center Project exists. For example `example-resource-group`.
 * * Where `{projectName}` is the name of the Project. For example `projectValue`.
 * @property description Description of the project. Changing this forces a new Dev Center Project to be created.
 * @property devCenterId Resource Id of an associated DevCenter. Changing this forces a new Dev Center Project to be created.
 * @property location The Azure Region where the Dev Center Project should exist. Changing this forces a new Dev Center Project to be created.
 * @property maximumDevBoxesPerUser When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project.
 * @property name Specifies the name of this Dev Center Project. Changing this forces a new Dev Center Project to be created.
 * @property resourceGroupName Specifies the name of the Resource Group within which this Dev Center Project should exist. Changing this forces a new Dev Center Project to be created.
 * @property tags A mapping of tags which should be assigned to the Dev Center Project.
 */
public data class ProjectArgs(
    public val description: Output? = null,
    public val devCenterId: Output? = null,
    public val location: Output? = null,
    public val maximumDevBoxesPerUser: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.devcenter.ProjectArgs =
        com.pulumi.azure.devcenter.ProjectArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .devCenterId(devCenterId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .maximumDevBoxesPerUser(maximumDevBoxesPerUser?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ProjectArgs].
 */
@PulumiTagMarker
public class ProjectArgsBuilder internal constructor() {
    private var description: Output? = null

    private var devCenterId: Output? = null

    private var location: Output? = null

    private var maximumDevBoxesPerUser: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Description of the project. Changing this forces a new Dev Center Project to be created.
     */
    @JvmName("hjwxpnoiaogodhwm")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Resource Id of an associated DevCenter. Changing this forces a new Dev Center Project to be created.
     */
    @JvmName("oonbrvfuxqclqpsr")
    public suspend fun devCenterId(`value`: Output) {
        this.devCenterId = value
    }

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

    /**
     * @param value When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project.
     */
    @JvmName("ffqwtdimaosemgom")
    public suspend fun maximumDevBoxesPerUser(`value`: Output) {
        this.maximumDevBoxesPerUser = value
    }

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

    /**
     * @param value Specifies the name of the Resource Group within which this Dev Center Project should exist. Changing this forces a new Dev Center Project to be created.
     */
    @JvmName("omblxggnhiygnqqn")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

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

    /**
     * @param value Description of the project. Changing this forces a new Dev Center Project to be created.
     */
    @JvmName("dicnticclnqrmwyl")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Resource Id of an associated DevCenter. Changing this forces a new Dev Center Project to be created.
     */
    @JvmName("ewhdmdqushawhlst")
    public suspend fun devCenterId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.devCenterId = mapped
    }

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

    /**
     * @param value When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project.
     */
    @JvmName("hmwqopmlfwbhgwya")
    public suspend fun maximumDevBoxesPerUser(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumDevBoxesPerUser = mapped
    }

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

    /**
     * @param value Specifies the name of the Resource Group within which this Dev Center Project should exist. Changing this forces a new Dev Center Project to be created.
     */
    @JvmName("skevntyuuxvypftw")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Dev Center Project.
     */
    @JvmName("cndiesgpxbjenllt")
    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 Project.
     */
    @JvmName("jbvdaayugdjkmivy")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ProjectArgs = ProjectArgs(
        description = description,
        devCenterId = devCenterId,
        location = location,
        maximumDevBoxesPerUser = maximumDevBoxesPerUser,
        name = name,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy