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

com.pulumi.azure.containerapp.kotlin.AppArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.containerapp.kotlin

import com.pulumi.azure.containerapp.AppArgs.builder
import com.pulumi.azure.containerapp.kotlin.inputs.AppDaprArgs
import com.pulumi.azure.containerapp.kotlin.inputs.AppDaprArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.AppIdentityArgs
import com.pulumi.azure.containerapp.kotlin.inputs.AppIdentityArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.AppIngressArgs
import com.pulumi.azure.containerapp.kotlin.inputs.AppIngressArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.AppRegistryArgs
import com.pulumi.azure.containerapp.kotlin.inputs.AppRegistryArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.AppSecretArgs
import com.pulumi.azure.containerapp.kotlin.inputs.AppSecretArgsBuilder
import com.pulumi.azure.containerapp.kotlin.inputs.AppTemplateArgs
import com.pulumi.azure.containerapp.kotlin.inputs.AppTemplateArgsBuilder
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Container App.
 * ## 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 exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
 *     name: "acctest-01",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "PerGB2018",
 *     retentionInDays: 30,
 * });
 * const exampleEnvironment = new azure.containerapp.Environment("example", {
 *     name: "Example-Environment",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     logAnalyticsWorkspaceId: exampleAnalyticsWorkspace.id,
 * });
 * const exampleApp = new azure.containerapp.App("example", {
 *     name: "example-app",
 *     containerAppEnvironmentId: exampleEnvironment.id,
 *     resourceGroupName: example.name,
 *     revisionMode: "Single",
 *     template: {
 *         containers: [{
 *             name: "examplecontainerapp",
 *             image: "mcr.microsoft.com/k8se/quickstart:latest",
 *             cpu: 0.25,
 *             memory: "0.5Gi",
 *         }],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
 *     name="acctest-01",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="PerGB2018",
 *     retention_in_days=30)
 * example_environment = azure.containerapp.Environment("example",
 *     name="Example-Environment",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     log_analytics_workspace_id=example_analytics_workspace.id)
 * example_app = azure.containerapp.App("example",
 *     name="example-app",
 *     container_app_environment_id=example_environment.id,
 *     resource_group_name=example.name,
 *     revision_mode="Single",
 *     template={
 *         "containers": [{
 *             "name": "examplecontainerapp",
 *             "image": "mcr.microsoft.com/k8se/quickstart:latest",
 *             "cpu": 0.25,
 *             "memory": "0.5Gi",
 *         }],
 *     })
 * ```
 * ```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 exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
 *     {
 *         Name = "acctest-01",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "PerGB2018",
 *         RetentionInDays = 30,
 *     });
 *     var exampleEnvironment = new Azure.ContainerApp.Environment("example", new()
 *     {
 *         Name = "Example-Environment",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         LogAnalyticsWorkspaceId = exampleAnalyticsWorkspace.Id,
 *     });
 *     var exampleApp = new Azure.ContainerApp.App("example", new()
 *     {
 *         Name = "example-app",
 *         ContainerAppEnvironmentId = exampleEnvironment.Id,
 *         ResourceGroupName = example.Name,
 *         RevisionMode = "Single",
 *         Template = new Azure.ContainerApp.Inputs.AppTemplateArgs
 *         {
 *             Containers = new[]
 *             {
 *                 new Azure.ContainerApp.Inputs.AppTemplateContainerArgs
 *                 {
 *                     Name = "examplecontainerapp",
 *                     Image = "mcr.microsoft.com/k8se/quickstart:latest",
 *                     Cpu = 0.25,
 *                     Memory = "0.5Gi",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerapp"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
 * 	"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
 * 		}
 * 		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
 * 			Name:              pulumi.String("acctest-01"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("PerGB2018"),
 * 			RetentionInDays:   pulumi.Int(30),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleEnvironment, err := containerapp.NewEnvironment(ctx, "example", &containerapp.EnvironmentArgs{
 * 			Name:                    pulumi.String("Example-Environment"),
 * 			Location:                example.Location,
 * 			ResourceGroupName:       example.Name,
 * 			LogAnalyticsWorkspaceId: exampleAnalyticsWorkspace.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = containerapp.NewApp(ctx, "example", &containerapp.AppArgs{
 * 			Name:                      pulumi.String("example-app"),
 * 			ContainerAppEnvironmentId: exampleEnvironment.ID(),
 * 			ResourceGroupName:         example.Name,
 * 			RevisionMode:              pulumi.String("Single"),
 * 			Template: &containerapp.AppTemplateArgs{
 * 				Containers: containerapp.AppTemplateContainerArray{
 * 					&containerapp.AppTemplateContainerArgs{
 * 						Name:   pulumi.String("examplecontainerapp"),
 * 						Image:  pulumi.String("mcr.microsoft.com/k8se/quickstart:latest"),
 * 						Cpu:    pulumi.Float64(0.25),
 * 						Memory: pulumi.String("0.5Gi"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.operationalinsights.AnalyticsWorkspace;
 * import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
 * import com.pulumi.azure.containerapp.Environment;
 * import com.pulumi.azure.containerapp.EnvironmentArgs;
 * import com.pulumi.azure.containerapp.App;
 * import com.pulumi.azure.containerapp.AppArgs;
 * import com.pulumi.azure.containerapp.inputs.AppTemplateArgs;
 * 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 exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
 *             .name("acctest-01")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("PerGB2018")
 *             .retentionInDays(30)
 *             .build());
 *         var exampleEnvironment = new Environment("exampleEnvironment", EnvironmentArgs.builder()
 *             .name("Example-Environment")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .logAnalyticsWorkspaceId(exampleAnalyticsWorkspace.id())
 *             .build());
 *         var exampleApp = new App("exampleApp", AppArgs.builder()
 *             .name("example-app")
 *             .containerAppEnvironmentId(exampleEnvironment.id())
 *             .resourceGroupName(example.name())
 *             .revisionMode("Single")
 *             .template(AppTemplateArgs.builder()
 *                 .containers(AppTemplateContainerArgs.builder()
 *                     .name("examplecontainerapp")
 *                     .image("mcr.microsoft.com/k8se/quickstart:latest")
 *                     .cpu(0.25)
 *                     .memory("0.5Gi")
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleAnalyticsWorkspace:
 *     type: azure:operationalinsights:AnalyticsWorkspace
 *     name: example
 *     properties:
 *       name: acctest-01
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: PerGB2018
 *       retentionInDays: 30
 *   exampleEnvironment:
 *     type: azure:containerapp:Environment
 *     name: example
 *     properties:
 *       name: Example-Environment
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       logAnalyticsWorkspaceId: ${exampleAnalyticsWorkspace.id}
 *   exampleApp:
 *     type: azure:containerapp:App
 *     name: example
 *     properties:
 *       name: example-app
 *       containerAppEnvironmentId: ${exampleEnvironment.id}
 *       resourceGroupName: ${example.name}
 *       revisionMode: Single
 *       template:
 *         containers:
 *           - name: examplecontainerapp
 *             image: mcr.microsoft.com/k8se/quickstart:latest
 *             cpu: 0.25
 *             memory: 0.5Gi
 * ```
 * 
 * ## Import
 * A Container App can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:containerapp/app:App example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/containerApps/myContainerApp"
 * ```
 * @property containerAppEnvironmentId The ID of the Container App Environment within which this Container App should exist. Changing this forces a new resource to be created.
 * @property dapr A `dapr` block as detailed below.
 * @property identity An `identity` block as detailed below.
 * @property ingress An `ingress` block as detailed below.
 * @property name The name for this Container App. Changing this forces a new resource to be created.
 * @property registries A `registry` block as detailed below.
 * @property resourceGroupName The name of the resource group in which the Container App Environment is to be created. Changing this forces a new resource to be created.
 * @property revisionMode The revisions operational mode for the Container App. Possible values include `Single` and `Multiple`. In `Single` mode, a single revision is in operation at any given time. In `Multiple` mode, more than one revision can be active at a time and can be configured with load distribution via the `traffic_weight` block in the `ingress` configuration.
 * @property secrets One or more `secret` block as detailed below.
 * @property tags A mapping of tags to assign to the Container App.
 * @property template A `template` block as detailed below.
 * @property workloadProfileName The name of the Workload Profile in the Container App Environment to place this Container App.
 * > **Note:** Omit this value to use the default `Consumption` Workload Profile.
 */
public data class AppArgs(
    public val containerAppEnvironmentId: Output? = null,
    public val dapr: Output? = null,
    public val identity: Output? = null,
    public val ingress: Output? = null,
    public val name: Output? = null,
    public val registries: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val revisionMode: Output? = null,
    public val secrets: Output>? = null,
    public val tags: Output>? = null,
    public val template: Output? = null,
    public val workloadProfileName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerapp.AppArgs =
        com.pulumi.azure.containerapp.AppArgs.builder()
            .containerAppEnvironmentId(containerAppEnvironmentId?.applyValue({ args0 -> args0 }))
            .dapr(dapr?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ingress(ingress?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .registries(
                registries?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .revisionMode(revisionMode?.applyValue({ args0 -> args0 }))
            .secrets(
                secrets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .template(template?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .workloadProfileName(workloadProfileName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AppArgs].
 */
@PulumiTagMarker
public class AppArgsBuilder internal constructor() {
    private var containerAppEnvironmentId: Output? = null

    private var dapr: Output? = null

    private var identity: Output? = null

    private var ingress: Output? = null

    private var name: Output? = null

    private var registries: Output>? = null

    private var resourceGroupName: Output? = null

    private var revisionMode: Output? = null

    private var secrets: Output>? = null

    private var tags: Output>? = null

    private var template: Output? = null

    private var workloadProfileName: Output? = null

    /**
     * @param value The ID of the Container App Environment within which this Container App should exist. Changing this forces a new resource to be created.
     */
    @JvmName("pqojqmbimwmofwpt")
    public suspend fun containerAppEnvironmentId(`value`: Output) {
        this.containerAppEnvironmentId = value
    }

    /**
     * @param value A `dapr` block as detailed below.
     */
    @JvmName("jvsiqctbdfgiwwnt")
    public suspend fun dapr(`value`: Output) {
        this.dapr = value
    }

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

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

    /**
     * @param value The name for this Container App. Changing this forces a new resource to be created.
     */
    @JvmName("dsjflkrxqxqpniym")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A `registry` block as detailed below.
     */
    @JvmName("wkvytmnhatidiwlb")
    public suspend fun registries(`value`: Output>) {
        this.registries = value
    }

    @JvmName("iltespwqjmjhrntc")
    public suspend fun registries(vararg values: Output) {
        this.registries = Output.all(values.asList())
    }

    /**
     * @param values A `registry` block as detailed below.
     */
    @JvmName("qbluqwsyhpkamieh")
    public suspend fun registries(values: List>) {
        this.registries = Output.all(values)
    }

    /**
     * @param value The name of the resource group in which the Container App Environment is to be created. Changing this forces a new resource to be created.
     */
    @JvmName("nfxgoacefnsytwpg")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The revisions operational mode for the Container App. Possible values include `Single` and `Multiple`. In `Single` mode, a single revision is in operation at any given time. In `Multiple` mode, more than one revision can be active at a time and can be configured with load distribution via the `traffic_weight` block in the `ingress` configuration.
     */
    @JvmName("qwdabwogjsnkrbxl")
    public suspend fun revisionMode(`value`: Output) {
        this.revisionMode = value
    }

    /**
     * @param value One or more `secret` block as detailed below.
     */
    @JvmName("goiqewkjlaglsohf")
    public suspend fun secrets(`value`: Output>) {
        this.secrets = value
    }

    @JvmName("gtpgypweleldgenv")
    public suspend fun secrets(vararg values: Output) {
        this.secrets = Output.all(values.asList())
    }

    /**
     * @param values One or more `secret` block as detailed below.
     */
    @JvmName("qhetudmyceylvkgx")
    public suspend fun secrets(values: List>) {
        this.secrets = Output.all(values)
    }

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

    /**
     * @param value A `template` block as detailed below.
     */
    @JvmName("hvnbxjqhcesqhjld")
    public suspend fun template(`value`: Output) {
        this.template = value
    }

    /**
     * @param value The name of the Workload Profile in the Container App Environment to place this Container App.
     * > **Note:** Omit this value to use the default `Consumption` Workload Profile.
     */
    @JvmName("rpshsjujirghcxig")
    public suspend fun workloadProfileName(`value`: Output) {
        this.workloadProfileName = value
    }

    /**
     * @param value The ID of the Container App Environment within which this Container App should exist. Changing this forces a new resource to be created.
     */
    @JvmName("pedyorjlsmdqlnud")
    public suspend fun containerAppEnvironmentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerAppEnvironmentId = mapped
    }

    /**
     * @param value A `dapr` block as detailed below.
     */
    @JvmName("dehtxsehjtsricgj")
    public suspend fun dapr(`value`: AppDaprArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dapr = mapped
    }

    /**
     * @param argument A `dapr` block as detailed below.
     */
    @JvmName("ufuwhgwhjberrguj")
    public suspend fun dapr(argument: suspend AppDaprArgsBuilder.() -> Unit) {
        val toBeMapped = AppDaprArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dapr = mapped
    }

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

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

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

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

    /**
     * @param value The name for this Container App. Changing this forces a new resource to be created.
     */
    @JvmName("gbbkjisnbfevprkl")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A `registry` block as detailed below.
     */
    @JvmName("lkkfqdljexbsxdrc")
    public suspend fun registries(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registries = mapped
    }

    /**
     * @param argument A `registry` block as detailed below.
     */
    @JvmName("diwbucblldtahiph")
    public suspend fun registries(argument: List Unit>) {
        val toBeMapped = argument.toList().map { AppRegistryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument A `registry` block as detailed below.
     */
    @JvmName("eakrtbisidkkluol")
    public suspend fun registries(vararg argument: suspend AppRegistryArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { AppRegistryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument A `registry` block as detailed below.
     */
    @JvmName("dibsrgexmlpxonoh")
    public suspend fun registries(argument: suspend AppRegistryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppRegistryArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param values A `registry` block as detailed below.
     */
    @JvmName("xlhvlumviwlbhgjf")
    public suspend fun registries(vararg values: AppRegistryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.registries = mapped
    }

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

    /**
     * @param value The revisions operational mode for the Container App. Possible values include `Single` and `Multiple`. In `Single` mode, a single revision is in operation at any given time. In `Multiple` mode, more than one revision can be active at a time and can be configured with load distribution via the `traffic_weight` block in the `ingress` configuration.
     */
    @JvmName("lrkyktgqwwqlvuyk")
    public suspend fun revisionMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.revisionMode = mapped
    }

    /**
     * @param value One or more `secret` block as detailed below.
     */
    @JvmName("cfwwlhonqhgmpeni")
    public suspend fun secrets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param argument One or more `secret` block as detailed below.
     */
    @JvmName("thjrdeckvwvvitgo")
    public suspend fun secrets(argument: List Unit>) {
        val toBeMapped = argument.toList().map { AppSecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument One or more `secret` block as detailed below.
     */
    @JvmName("dleqncrsngdfcwiu")
    public suspend fun secrets(vararg argument: suspend AppSecretArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { AppSecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument One or more `secret` block as detailed below.
     */
    @JvmName("qwwkpxaxjogjfhkc")
    public suspend fun secrets(argument: suspend AppSecretArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppSecretArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param values One or more `secret` block as detailed below.
     */
    @JvmName("yspvftdxgjvapurf")
    public suspend fun secrets(vararg values: AppSecretArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

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

    /**
     * @param value A `template` block as detailed below.
     */
    @JvmName("apibckjqmyqoclhe")
    public suspend fun template(`value`: AppTemplateArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.template = mapped
    }

    /**
     * @param argument A `template` block as detailed below.
     */
    @JvmName("qfqtslqkqsrrpyta")
    public suspend fun template(argument: suspend AppTemplateArgsBuilder.() -> Unit) {
        val toBeMapped = AppTemplateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.template = mapped
    }

    /**
     * @param value The name of the Workload Profile in the Container App Environment to place this Container App.
     * > **Note:** Omit this value to use the default `Consumption` Workload Profile.
     */
    @JvmName("kbxvdljxlpyuvtcb")
    public suspend fun workloadProfileName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workloadProfileName = mapped
    }

    internal fun build(): AppArgs = AppArgs(
        containerAppEnvironmentId = containerAppEnvironmentId,
        dapr = dapr,
        identity = identity,
        ingress = ingress,
        name = name,
        registries = registries,
        resourceGroupName = resourceGroupName,
        revisionMode = revisionMode,
        secrets = secrets,
        tags = tags,
        template = template,
        workloadProfileName = workloadProfileName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy