com.pulumi.azure.devcenter.kotlin.Project.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.devcenter.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
/**
* Builder for [Project].
*/
@PulumiTagMarker
public class ProjectResourceBuilder internal constructor() {
public var name: String? = null
public var args: ProjectArgs = ProjectArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ProjectArgsBuilder.() -> Unit) {
val builder = ProjectArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Project {
val builtJavaResource = com.pulumi.azure.devcenter.Project(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Project(builtJavaResource)
}
}
/**
*
* 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=azure.devcenter.DevCenterIdentityArgs(
* 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`.
*/
public class Project internal constructor(
override val javaResource: com.pulumi.azure.devcenter.Project,
) : KotlinCustomResource(javaResource, ProjectMapper) {
/**
* Description of the project. Changing this forces a new Dev Center Project to be created.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Resource Id of an associated DevCenter. Changing this forces a new Dev Center Project to be created.
*/
public val devCenterId: Output
get() = javaResource.devCenterId().applyValue({ args0 -> args0 })
/**
* The URI of the Dev Center resource this project is associated with.
*/
public val devCenterUri: Output
get() = javaResource.devCenterUri().applyValue({ args0 -> args0 })
/**
* The Azure Region where the Dev Center Project should exist. Changing this forces a new Dev Center Project to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project.
*/
public val maximumDevBoxesPerUser: Output?
get() = javaResource.maximumDevBoxesPerUser().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the name of this Dev Center Project. Changing this forces a new Dev Center Project to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* A mapping of tags which should be assigned to the Dev Center Project.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy