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

com.pulumi.azure.iotcentral.kotlin.ApplicationArgs.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.21.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.iotcentral.kotlin

import com.pulumi.azure.iotcentral.ApplicationArgs.builder
import com.pulumi.azure.iotcentral.kotlin.inputs.ApplicationIdentityArgs
import com.pulumi.azure.iotcentral.kotlin.inputs.ApplicationIdentityArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an IoT Central Application
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resource",
 *     location: "West Europe",
 * });
 * const exampleApplication = new azure.iotcentral.Application("example", {
 *     name: "example-iotcentral-app",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     subDomain: "example-iotcentral-app-subdomain",
 *     displayName: "example-iotcentral-app-display-name",
 *     sku: "ST1",
 *     template: "[email protected]",
 *     tags: {
 *         Foo: "Bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resource",
 *     location="West Europe")
 * example_application = azure.iotcentral.Application("example",
 *     name="example-iotcentral-app",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     sub_domain="example-iotcentral-app-subdomain",
 *     display_name="example-iotcentral-app-display-name",
 *     sku="ST1",
 *     template="[email protected]",
 *     tags={
 *         "Foo": "Bar",
 *     })
 * ```
 * ```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-resource",
 *         Location = "West Europe",
 *     });
 *     var exampleApplication = new Azure.IotCentral.Application("example", new()
 *     {
 *         Name = "example-iotcentral-app",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         SubDomain = "example-iotcentral-app-subdomain",
 *         DisplayName = "example-iotcentral-app-display-name",
 *         Sku = "ST1",
 *         Template = "[email protected]",
 *         Tags =
 *         {
 *             { "Foo", "Bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iotcentral"
 * 	"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-resource"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = iotcentral.NewApplication(ctx, "example", &iotcentral.ApplicationArgs{
 * 			Name:              pulumi.String("example-iotcentral-app"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			SubDomain:         pulumi.String("example-iotcentral-app-subdomain"),
 * 			DisplayName:       pulumi.String("example-iotcentral-app-display-name"),
 * 			Sku:               pulumi.String("ST1"),
 * 			Template:          pulumi.String("[email protected]"),
 * 			Tags: pulumi.StringMap{
 * 				"Foo": pulumi.String("Bar"),
 * 			},
 * 		})
 * 		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.iotcentral.Application;
 * import com.pulumi.azure.iotcentral.ApplicationArgs;
 * 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-resource")
 *             .location("West Europe")
 *             .build());
 *         var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
 *             .name("example-iotcentral-app")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .subDomain("example-iotcentral-app-subdomain")
 *             .displayName("example-iotcentral-app-display-name")
 *             .sku("ST1")
 *             .template("[email protected]")
 *             .tags(Map.of("Foo", "Bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resource
 *       location: West Europe
 *   exampleApplication:
 *     type: azure:iotcentral:Application
 *     name: example
 *     properties:
 *       name: example-iotcentral-app
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       subDomain: example-iotcentral-app-subdomain
 *       displayName: example-iotcentral-app-display-name
 *       sku: ST1
 *       template: [email protected]
 *       tags:
 *         Foo: Bar
 * ```
 * 
 * ## Import
 * The IoT Central Application can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:iotcentral/application:Application example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.IoTCentral/iotApps/app1
 * ```
 * @property displayName A `display_name` name. Custom display name for the IoT Central application. Default is resource name.
 * > **NOTE:** Due to a bug in the provider, the default value of `display_name` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `display_name` explicitly.
 * @property identity An `identity` block as defined below.
 * @property location Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
 * @property name Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
 * @property publicNetworkAccessEnabled Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
 * @property resourceGroupName The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
 * @property sku A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
 * @property subDomain A `sub_domain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
 * @property tags A mapping of tags to assign to the resource.
 * @property template A `template` name. IoT Central application template name. Default is a custom application. Changing this forces a new resource to be created.
 */
public data class ApplicationArgs(
    public val displayName: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val subDomain: Output? = null,
    public val tags: Output>? = null,
    public val template: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.iotcentral.ApplicationArgs =
        com.pulumi.azure.iotcentral.ApplicationArgs.builder()
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0 }))
            .subDomain(subDomain?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .template(template?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ApplicationArgs].
 */
@PulumiTagMarker
public class ApplicationArgsBuilder internal constructor() {
    private var displayName: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var subDomain: Output? = null

    private var tags: Output>? = null

    private var template: Output? = null

    /**
     * @param value A `display_name` name. Custom display name for the IoT Central application. Default is resource name.
     * > **NOTE:** Due to a bug in the provider, the default value of `display_name` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `display_name` explicitly.
     */
    @JvmName("lsipuqrvtlkshpyd")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("iawovdaobqurramn")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
     */
    @JvmName("vfymsgxktsygjgmc")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

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

    /**
     * @param value Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
     */
    @JvmName("nmlsqubdhrkmquao")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
     */
    @JvmName("dyprnsmdouofetiy")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
     */
    @JvmName("xnvxarjspmyrcjqa")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value A `sub_domain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
     */
    @JvmName("xbuhmrthvlybnill")
    public suspend fun subDomain(`value`: Output) {
        this.subDomain = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("nhdectvoncuprkar")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A `template` name. IoT Central application template name. Default is a custom application. Changing this forces a new resource to be created.
     */
    @JvmName("xfmukjwkkugdsfbt")
    public suspend fun template(`value`: Output) {
        this.template = value
    }

    /**
     * @param value A `display_name` name. Custom display name for the IoT Central application. Default is resource name.
     * > **NOTE:** Due to a bug in the provider, the default value of `display_name` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `display_name` explicitly.
     */
    @JvmName("bemqnamgcyeewqtu")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("lrioievfpyyyyhtx")
    public suspend fun identity(`value`: ApplicationIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("nyxjpshwigtsglpd")
    public suspend fun identity(argument: suspend ApplicationIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = ApplicationIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
     */
    @JvmName("eycnqeyfbumjdthf")
    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 the IotHub resource. Changing this forces a new resource to be created.
     */
    @JvmName("xcgowydbdtjfphhk")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
     */
    @JvmName("uilffeqsbjxlkavx")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
     */
    @JvmName("oybphsthkbejcxrv")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
     */
    @JvmName("nxymejbrmdlfbdsh")
    public suspend fun sku(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param value A `sub_domain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
     */
    @JvmName("fsdktoiurjloswro")
    public suspend fun subDomain(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subDomain = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("kjhcwyjfhprcfjqi")
    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 to assign to the resource.
     */
    @JvmName("gsjplchgmcfaehkt")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A `template` name. IoT Central application template name. Default is a custom application. Changing this forces a new resource to be created.
     */
    @JvmName("vvcrhuagpkiicwhd")
    public suspend fun template(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.template = mapped
    }

    internal fun build(): ApplicationArgs = ApplicationArgs(
        displayName = displayName,
        identity = identity,
        location = location,
        name = name,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        resourceGroupName = resourceGroupName,
        sku = sku,
        subDomain = subDomain,
        tags = tags,
        template = template,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy