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

com.pulumi.azurenative.devtestlab.kotlin.EnvironmentArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.devtestlab.kotlin

import com.pulumi.azurenative.devtestlab.EnvironmentArgs.builder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.EnvironmentDeploymentPropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.EnvironmentDeploymentPropertiesArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * An environment, which is essentially an ARM template deployment.
 * Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
 * Other available API versions: 2016-05-15.
 * ## Example Usage
 * ### Environments_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var environment = new AzureNative.DevTestLab.Environment("environment", new()
 *     {
 *         DeploymentProperties = new AzureNative.DevTestLab.Inputs.EnvironmentDeploymentPropertiesArgs
 *         {
 *             ArmTemplateId = "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
 *             Parameters = new() { },
 *         },
 *         LabName = "{labName}",
 *         Name = "{environmentName}",
 *         ResourceGroupName = "resourceGroupName",
 *         UserName = "@me",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := devtestlab.NewEnvironment(ctx, "environment", &devtestlab.EnvironmentArgs{
 * 			DeploymentProperties: &devtestlab.EnvironmentDeploymentPropertiesArgs{
 * 				ArmTemplateId: pulumi.String("/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"),
 * 				Parameters:    devtestlab.ArmTemplateParameterPropertiesArray{},
 * 			},
 * 			LabName:           pulumi.String("{labName}"),
 * 			Name:              pulumi.String("{environmentName}"),
 * 			ResourceGroupName: pulumi.String("resourceGroupName"),
 * 			UserName:          pulumi.String("@me"),
 * 		})
 * 		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.azurenative.devtestlab.Environment;
 * import com.pulumi.azurenative.devtestlab.EnvironmentArgs;
 * import com.pulumi.azurenative.devtestlab.inputs.EnvironmentDeploymentPropertiesArgs;
 * 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 environment = new Environment("environment", EnvironmentArgs.builder()
 *             .deploymentProperties(EnvironmentDeploymentPropertiesArgs.builder()
 *                 .armTemplateId("/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}")
 *                 .parameters()
 *                 .build())
 *             .labName("{labName}")
 *             .name("{environmentName}")
 *             .resourceGroupName("resourceGroupName")
 *             .userName("@me")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:devtestlab:Environment {environmentName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments/{name}
 * ```
 * @property armTemplateDisplayName The display name of the Azure Resource Manager template that produced the environment.
 * @property deploymentProperties The deployment properties of the environment.
 * @property labName The name of the lab.
 * @property location The location of the resource.
 * @property name The name of the environment.
 * @property resourceGroupName The name of the resource group.
 * @property tags The tags of the resource.
 * @property userName The name of the user profile.
 */
public data class EnvironmentArgs(
    public val armTemplateDisplayName: Output? = null,
    public val deploymentProperties: Output? = null,
    public val labName: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val userName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devtestlab.EnvironmentArgs =
        com.pulumi.azurenative.devtestlab.EnvironmentArgs.builder()
            .armTemplateDisplayName(armTemplateDisplayName?.applyValue({ args0 -> args0 }))
            .deploymentProperties(
                deploymentProperties?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .labName(labName?.applyValue({ args0 -> args0 }))
            .location(location?.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() }))
            .userName(userName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EnvironmentArgs].
 */
@PulumiTagMarker
public class EnvironmentArgsBuilder internal constructor() {
    private var armTemplateDisplayName: Output? = null

    private var deploymentProperties: Output? = null

    private var labName: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var userName: Output? = null

    /**
     * @param value The display name of the Azure Resource Manager template that produced the environment.
     */
    @JvmName("cldnoqnunwdnrxqo")
    public suspend fun armTemplateDisplayName(`value`: Output) {
        this.armTemplateDisplayName = value
    }

    /**
     * @param value The deployment properties of the environment.
     */
    @JvmName("mlhwqlxyloogvymu")
    public suspend fun deploymentProperties(`value`: Output) {
        this.deploymentProperties = value
    }

    /**
     * @param value The name of the lab.
     */
    @JvmName("mubmejbabijchstg")
    public suspend fun labName(`value`: Output) {
        this.labName = value
    }

    /**
     * @param value The location of the resource.
     */
    @JvmName("pbuwevcswmakfawk")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the environment.
     */
    @JvmName("bqifstuyrnytcmmt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the resource group.
     */
    @JvmName("gfjphncgvrikckmt")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The tags of the resource.
     */
    @JvmName("iqitykfatothxckr")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The name of the user profile.
     */
    @JvmName("jkwhxfpyenjgwihl")
    public suspend fun userName(`value`: Output) {
        this.userName = value
    }

    /**
     * @param value The display name of the Azure Resource Manager template that produced the environment.
     */
    @JvmName("xftsvufypclgesuu")
    public suspend fun armTemplateDisplayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.armTemplateDisplayName = mapped
    }

    /**
     * @param value The deployment properties of the environment.
     */
    @JvmName("csakmqcdaqdfymer")
    public suspend fun deploymentProperties(`value`: EnvironmentDeploymentPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentProperties = mapped
    }

    /**
     * @param argument The deployment properties of the environment.
     */
    @JvmName("dbnxmkdiuvlggjyx")
    public suspend fun deploymentProperties(argument: suspend EnvironmentDeploymentPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = EnvironmentDeploymentPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.deploymentProperties = mapped
    }

    /**
     * @param value The name of the lab.
     */
    @JvmName("gtxvstamlwienvya")
    public suspend fun labName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labName = mapped
    }

    /**
     * @param value The location of the resource.
     */
    @JvmName("uygtjuwkdfeaophk")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name of the environment.
     */
    @JvmName("jyxvngwrurbdionv")
    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 resource group.
     */
    @JvmName("ejyfsfeljebfsmfo")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The tags of the resource.
     */
    @JvmName("jilxcqlljhfewhmh")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The tags of the resource.
     */
    @JvmName("ijjragdtvatqvpmp")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The name of the user profile.
     */
    @JvmName("dmnjdeabugdxwcbn")
    public suspend fun userName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userName = mapped
    }

    internal fun build(): EnvironmentArgs = EnvironmentArgs(
        armTemplateDisplayName = armTemplateDisplayName,
        deploymentProperties = deploymentProperties,
        labName = labName,
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        tags = tags,
        userName = userName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy