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

com.pulumi.azure.appservice.kotlin.AppServiceArgs.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.appservice.kotlin

import com.pulumi.azure.appservice.AppServiceArgs.builder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceAuthSettingsArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceAuthSettingsArgsBuilder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceBackupArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceBackupArgsBuilder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceConnectionStringArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceConnectionStringArgsBuilder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceIdentityArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceIdentityArgsBuilder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceLogsArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceLogsArgsBuilder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceSiteConfigArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceSiteConfigArgsBuilder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceSourceControlArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceSourceControlArgsBuilder
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceStorageAccountArgs
import com.pulumi.azure.appservice.kotlin.inputs.AppServiceStorageAccountArgsBuilder
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an App Service (within an App Service Plan).
 * !> **NOTE:** This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use `azure.appservice.LinuxWebApp` resources instead.
 * > **Note:** When using Slots - the `app_settings`, `connection_string` and `site_config` blocks on the `azure.appservice.AppService` resource will be overwritten when promoting a Slot using the `azure.appservice.ActiveSlot` resource.
 * ## Example Usage
 * This example provisions a Windows App Service.
 * 
 * ```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 examplePlan = new azure.appservice.Plan("example", {
 *     name: "example-appserviceplan",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: {
 *         tier: "Standard",
 *         size: "S1",
 *     },
 * });
 * const exampleAppService = new azure.appservice.AppService("example", {
 *     name: "example-app-service",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     appServicePlanId: examplePlan.id,
 *     siteConfig: {
 *         dotnetFrameworkVersion: "v4.0",
 *         scmType: "LocalGit",
 *     },
 *     appSettings: {
 *         SOME_KEY: "some-value",
 *     },
 *     connectionStrings: [{
 *         name: "Database",
 *         type: "SQLServer",
 *         value: "Server=some-server.mydomain.com;Integrated Security=SSPI",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_plan = azure.appservice.Plan("example",
 *     name="example-appserviceplan",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku=azure.appservice.PlanSkuArgs(
 *         tier="Standard",
 *         size="S1",
 *     ))
 * example_app_service = azure.appservice.AppService("example",
 *     name="example-app-service",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     app_service_plan_id=example_plan.id,
 *     site_config=azure.appservice.AppServiceSiteConfigArgs(
 *         dotnet_framework_version="v4.0",
 *         scm_type="LocalGit",
 *     ),
 *     app_settings={
 *         "SOME_KEY": "some-value",
 *     },
 *     connection_strings=[azure.appservice.AppServiceConnectionStringArgs(
 *         name="Database",
 *         type="SQLServer",
 *         value="Server=some-server.mydomain.com;Integrated Security=SSPI",
 *     )])
 * ```
 * ```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 examplePlan = new Azure.AppService.Plan("example", new()
 *     {
 *         Name = "example-appserviceplan",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = new Azure.AppService.Inputs.PlanSkuArgs
 *         {
 *             Tier = "Standard",
 *             Size = "S1",
 *         },
 *     });
 *     var exampleAppService = new Azure.AppService.AppService("example", new()
 *     {
 *         Name = "example-app-service",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AppServicePlanId = examplePlan.Id,
 *         SiteConfig = new Azure.AppService.Inputs.AppServiceSiteConfigArgs
 *         {
 *             DotnetFrameworkVersion = "v4.0",
 *             ScmType = "LocalGit",
 *         },
 *         AppSettings =
 *         {
 *             { "SOME_KEY", "some-value" },
 *         },
 *         ConnectionStrings = new[]
 *         {
 *             new Azure.AppService.Inputs.AppServiceConnectionStringArgs
 *             {
 *                 Name = "Database",
 *                 Type = "SQLServer",
 *                 Value = "Server=some-server.mydomain.com;Integrated Security=SSPI",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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
 * 		}
 * 		examplePlan, err := appservice.NewPlan(ctx, "example", &appservice.PlanArgs{
 * 			Name:              pulumi.String("example-appserviceplan"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku: &appservice.PlanSkuArgs{
 * 				Tier: pulumi.String("Standard"),
 * 				Size: pulumi.String("S1"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = appservice.NewAppService(ctx, "example", &appservice.AppServiceArgs{
 * 			Name:              pulumi.String("example-app-service"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AppServicePlanId:  examplePlan.ID(),
 * 			SiteConfig: &appservice.AppServiceSiteConfigArgs{
 * 				DotnetFrameworkVersion: pulumi.String("v4.0"),
 * 				ScmType:                pulumi.String("LocalGit"),
 * 			},
 * 			AppSettings: pulumi.StringMap{
 * 				"SOME_KEY": pulumi.String("some-value"),
 * 			},
 * 			ConnectionStrings: appservice.AppServiceConnectionStringArray{
 * 				&appservice.AppServiceConnectionStringArgs{
 * 					Name:  pulumi.String("Database"),
 * 					Type:  pulumi.String("SQLServer"),
 * 					Value: pulumi.String("Server=some-server.mydomain.com;Integrated Security=SSPI"),
 * 				},
 * 			},
 * 		})
 * 		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.appservice.Plan;
 * import com.pulumi.azure.appservice.PlanArgs;
 * import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
 * import com.pulumi.azure.appservice.AppService;
 * import com.pulumi.azure.appservice.AppServiceArgs;
 * import com.pulumi.azure.appservice.inputs.AppServiceSiteConfigArgs;
 * import com.pulumi.azure.appservice.inputs.AppServiceConnectionStringArgs;
 * 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 examplePlan = new Plan("examplePlan", PlanArgs.builder()
 *             .name("example-appserviceplan")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku(PlanSkuArgs.builder()
 *                 .tier("Standard")
 *                 .size("S1")
 *                 .build())
 *             .build());
 *         var exampleAppService = new AppService("exampleAppService", AppServiceArgs.builder()
 *             .name("example-app-service")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .appServicePlanId(examplePlan.id())
 *             .siteConfig(AppServiceSiteConfigArgs.builder()
 *                 .dotnetFrameworkVersion("v4.0")
 *                 .scmType("LocalGit")
 *                 .build())
 *             .appSettings(Map.of("SOME_KEY", "some-value"))
 *             .connectionStrings(AppServiceConnectionStringArgs.builder()
 *                 .name("Database")
 *                 .type("SQLServer")
 *                 .value("Server=some-server.mydomain.com;Integrated Security=SSPI")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   examplePlan:
 *     type: azure:appservice:Plan
 *     name: example
 *     properties:
 *       name: example-appserviceplan
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku:
 *         tier: Standard
 *         size: S1
 *   exampleAppService:
 *     type: azure:appservice:AppService
 *     name: example
 *     properties:
 *       name: example-app-service
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       appServicePlanId: ${examplePlan.id}
 *       siteConfig:
 *         dotnetFrameworkVersion: v4.0
 *         scmType: LocalGit
 *       appSettings:
 *         SOME_KEY: some-value
 *       connectionStrings:
 *         - name: Database
 *           type: SQLServer
 *           value: Server=some-server.mydomain.com;Integrated Security=SSPI
 * ```
 * 
 * ## Import
 * App Services can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:appservice/appService:AppService instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/instance1
 * ```
 * @property appServicePlanId The ID of the App Service Plan within which to create this App Service.
 * @property appSettings A key-value pair of App Settings.
 * @property authSettings A `auth_settings` block as defined below.
 * @property backup A `backup` block as defined below.
 * @property clientAffinityEnabled Should the App Service send session affinity cookies, which route client requests in the same session to the same instance?
 * @property clientCertEnabled Does the App Service require client certificates for incoming requests? Defaults to `false`.
 * @property clientCertMode Mode of client certificates for this App Service. Possible values are `Required`, `Optional` and `OptionalInteractiveUser`. If this parameter is set, `client_cert_enabled` must be set to `true`, otherwise this parameter is ignored.
 * @property connectionStrings One or more `connection_string` blocks as defined below.
 * @property enabled Is the App Service Enabled? Defaults to `true`.
 * @property httpsOnly Can the App Service only be accessed via HTTPS? Defaults to `false`.
 * @property identity An `identity` block as defined below.
 * @property keyVaultReferenceIdentityId The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity)
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property logs A `logs` block as defined below.
 * @property name Specifies the name of the App Service. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which to create the App Service. Changing this forces a new resource to be created.
 * @property siteConfig A `site_config` block as defined below.
 * @property sourceControl A `source_control` block as defined below.
 * @property storageAccounts One or more `storage_account` blocks as defined below.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class AppServiceArgs(
    public val appServicePlanId: Output? = null,
    public val appSettings: Output>? = null,
    public val authSettings: Output? = null,
    public val backup: Output? = null,
    public val clientAffinityEnabled: Output? = null,
    public val clientCertEnabled: Output? = null,
    public val clientCertMode: Output? = null,
    public val connectionStrings: Output>? = null,
    public val enabled: Output? = null,
    public val httpsOnly: Output? = null,
    public val identity: Output? = null,
    public val keyVaultReferenceIdentityId: Output? = null,
    public val location: Output? = null,
    public val logs: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val siteConfig: Output? = null,
    public val sourceControl: Output? = null,
    public val storageAccounts: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.appservice.AppServiceArgs =
        com.pulumi.azure.appservice.AppServiceArgs.builder()
            .appServicePlanId(appServicePlanId?.applyValue({ args0 -> args0 }))
            .appSettings(
                appSettings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .authSettings(authSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .backup(backup?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .clientAffinityEnabled(clientAffinityEnabled?.applyValue({ args0 -> args0 }))
            .clientCertEnabled(clientCertEnabled?.applyValue({ args0 -> args0 }))
            .clientCertMode(clientCertMode?.applyValue({ args0 -> args0 }))
            .connectionStrings(
                connectionStrings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .httpsOnly(httpsOnly?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .keyVaultReferenceIdentityId(keyVaultReferenceIdentityId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .logs(logs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .siteConfig(siteConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sourceControl(sourceControl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .storageAccounts(
                storageAccounts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AppServiceArgs].
 */
@PulumiTagMarker
public class AppServiceArgsBuilder internal constructor() {
    private var appServicePlanId: Output? = null

    private var appSettings: Output>? = null

    private var authSettings: Output? = null

    private var backup: Output? = null

    private var clientAffinityEnabled: Output? = null

    private var clientCertEnabled: Output? = null

    private var clientCertMode: Output? = null

    private var connectionStrings: Output>? = null

    private var enabled: Output? = null

    private var httpsOnly: Output? = null

    private var identity: Output? = null

    private var keyVaultReferenceIdentityId: Output? = null

    private var location: Output? = null

    private var logs: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var siteConfig: Output? = null

    private var sourceControl: Output? = null

    private var storageAccounts: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value The ID of the App Service Plan within which to create this App Service.
     */
    @JvmName("ppxtkdbjnsmcacxy")
    public suspend fun appServicePlanId(`value`: Output) {
        this.appServicePlanId = value
    }

    /**
     * @param value A key-value pair of App Settings.
     */
    @JvmName("nyvuxolorvtdjnga")
    public suspend fun appSettings(`value`: Output>) {
        this.appSettings = value
    }

    /**
     * @param value A `auth_settings` block as defined below.
     */
    @JvmName("jengpnaoiwwkjskt")
    public suspend fun authSettings(`value`: Output) {
        this.authSettings = value
    }

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

    /**
     * @param value Should the App Service send session affinity cookies, which route client requests in the same session to the same instance?
     */
    @JvmName("vsfulyubstaeggml")
    public suspend fun clientAffinityEnabled(`value`: Output) {
        this.clientAffinityEnabled = value
    }

    /**
     * @param value Does the App Service require client certificates for incoming requests? Defaults to `false`.
     */
    @JvmName("ifchmoulbvebvooc")
    public suspend fun clientCertEnabled(`value`: Output) {
        this.clientCertEnabled = value
    }

    /**
     * @param value Mode of client certificates for this App Service. Possible values are `Required`, `Optional` and `OptionalInteractiveUser`. If this parameter is set, `client_cert_enabled` must be set to `true`, otherwise this parameter is ignored.
     */
    @JvmName("wybhewsaisteeqni")
    public suspend fun clientCertMode(`value`: Output) {
        this.clientCertMode = value
    }

    /**
     * @param value One or more `connection_string` blocks as defined below.
     */
    @JvmName("gibjjdqvgehdjvcv")
    public suspend fun connectionStrings(`value`: Output>) {
        this.connectionStrings = value
    }

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

    /**
     * @param values One or more `connection_string` blocks as defined below.
     */
    @JvmName("vtehqfomvnieyihd")
    public suspend fun connectionStrings(values: List>) {
        this.connectionStrings = Output.all(values)
    }

    /**
     * @param value Is the App Service Enabled? Defaults to `true`.
     */
    @JvmName("upxdrpembxlbsmcr")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Can the App Service only be accessed via HTTPS? Defaults to `false`.
     */
    @JvmName("mtjasdofbybykqbr")
    public suspend fun httpsOnly(`value`: Output) {
        this.httpsOnly = value
    }

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

    /**
     * @param value The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity)
     */
    @JvmName("jwdjqmdouadwbxar")
    public suspend fun keyVaultReferenceIdentityId(`value`: Output) {
        this.keyVaultReferenceIdentityId = value
    }

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

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

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

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

    /**
     * @param value A `site_config` block as defined below.
     */
    @JvmName("yhwplvctrhvcoorx")
    public suspend fun siteConfig(`value`: Output) {
        this.siteConfig = value
    }

    /**
     * @param value A `source_control` block as defined below.
     */
    @JvmName("uoncygynatowveym")
    public suspend fun sourceControl(`value`: Output) {
        this.sourceControl = value
    }

    /**
     * @param value One or more `storage_account` blocks as defined below.
     */
    @JvmName("ndwlvmauabgtqivf")
    public suspend fun storageAccounts(`value`: Output>) {
        this.storageAccounts = value
    }

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

    /**
     * @param values One or more `storage_account` blocks as defined below.
     */
    @JvmName("jgxcfbnpsokfltrx")
    public suspend fun storageAccounts(values: List>) {
        this.storageAccounts = Output.all(values)
    }

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

    /**
     * @param value The ID of the App Service Plan within which to create this App Service.
     */
    @JvmName("jnrrctyamikdkoyr")
    public suspend fun appServicePlanId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appServicePlanId = mapped
    }

    /**
     * @param value A key-value pair of App Settings.
     */
    @JvmName("waumolvevxhvrpbg")
    public suspend fun appSettings(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appSettings = mapped
    }

    /**
     * @param values A key-value pair of App Settings.
     */
    @JvmName("qqbwxfjeeklhjpvn")
    public fun appSettings(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.appSettings = mapped
    }

    /**
     * @param value A `auth_settings` block as defined below.
     */
    @JvmName("wxhvjkmgntryhyci")
    public suspend fun authSettings(`value`: AppServiceAuthSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authSettings = mapped
    }

    /**
     * @param argument A `auth_settings` block as defined below.
     */
    @JvmName("ccefeslcsvwauten")
    public suspend fun authSettings(argument: suspend AppServiceAuthSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = AppServiceAuthSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.authSettings = mapped
    }

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

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

    /**
     * @param value Should the App Service send session affinity cookies, which route client requests in the same session to the same instance?
     */
    @JvmName("wfhvjdjrlukkcnwx")
    public suspend fun clientAffinityEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientAffinityEnabled = mapped
    }

    /**
     * @param value Does the App Service require client certificates for incoming requests? Defaults to `false`.
     */
    @JvmName("ufrjvkjconekhvhv")
    public suspend fun clientCertEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientCertEnabled = mapped
    }

    /**
     * @param value Mode of client certificates for this App Service. Possible values are `Required`, `Optional` and `OptionalInteractiveUser`. If this parameter is set, `client_cert_enabled` must be set to `true`, otherwise this parameter is ignored.
     */
    @JvmName("cxagvblxkrixtlav")
    public suspend fun clientCertMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientCertMode = mapped
    }

    /**
     * @param value One or more `connection_string` blocks as defined below.
     */
    @JvmName("dtrffhclgefwrtao")
    public suspend fun connectionStrings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionStrings = mapped
    }

    /**
     * @param argument One or more `connection_string` blocks as defined below.
     */
    @JvmName("faedunetfvujdvuv")
    public suspend
    fun connectionStrings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppServiceConnectionStringArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.connectionStrings = mapped
    }

    /**
     * @param argument One or more `connection_string` blocks as defined below.
     */
    @JvmName("qmgsyxcvsbaoionp")
    public suspend fun connectionStrings(
        vararg
        argument: suspend AppServiceConnectionStringArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AppServiceConnectionStringArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.connectionStrings = mapped
    }

    /**
     * @param argument One or more `connection_string` blocks as defined below.
     */
    @JvmName("qybkkkfrkdgedvpd")
    public suspend
    fun connectionStrings(argument: suspend AppServiceConnectionStringArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AppServiceConnectionStringArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.connectionStrings = mapped
    }

    /**
     * @param values One or more `connection_string` blocks as defined below.
     */
    @JvmName("vvsdeacgeclurcnb")
    public suspend fun connectionStrings(vararg values: AppServiceConnectionStringArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.connectionStrings = mapped
    }

    /**
     * @param value Is the App Service Enabled? Defaults to `true`.
     */
    @JvmName("spfvyfvvkeistefy")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Can the App Service only be accessed via HTTPS? Defaults to `false`.
     */
    @JvmName("cocbbwikxokjoufv")
    public suspend fun httpsOnly(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpsOnly = mapped
    }

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

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

    /**
     * @param value The User Assigned Identity Id used for looking up KeyVault secrets. The identity must be assigned to the application. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity)
     */
    @JvmName("ckfvimmohsfefwir")
    public suspend fun keyVaultReferenceIdentityId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultReferenceIdentityId = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("lcglbcfnxlftwdcl")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

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

    /**
     * @param value Specifies the name of the App Service. Changing this forces a new resource to be created.
     */
    @JvmName("fmdkmvciukyxdify")
    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 in which to create the App Service. Changing this forces a new resource to be created.
     */
    @JvmName("txoofuamcmullipn")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `site_config` block as defined below.
     */
    @JvmName("mduyadbaqeumqrad")
    public suspend fun siteConfig(`value`: AppServiceSiteConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.siteConfig = mapped
    }

    /**
     * @param argument A `site_config` block as defined below.
     */
    @JvmName("cqbjocjntbstdylk")
    public suspend fun siteConfig(argument: suspend AppServiceSiteConfigArgsBuilder.() -> Unit) {
        val toBeMapped = AppServiceSiteConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.siteConfig = mapped
    }

    /**
     * @param value A `source_control` block as defined below.
     */
    @JvmName("fidrkguljtwfjkcs")
    public suspend fun sourceControl(`value`: AppServiceSourceControlArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceControl = mapped
    }

    /**
     * @param argument A `source_control` block as defined below.
     */
    @JvmName("xgrnsctceqkmjyyl")
    public suspend
    fun sourceControl(argument: suspend AppServiceSourceControlArgsBuilder.() -> Unit) {
        val toBeMapped = AppServiceSourceControlArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceControl = mapped
    }

    /**
     * @param value One or more `storage_account` blocks as defined below.
     */
    @JvmName("utlwaugdliqmxtok")
    public suspend fun storageAccounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccounts = mapped
    }

    /**
     * @param argument One or more `storage_account` blocks as defined below.
     */
    @JvmName("mdepcbagwbjnftkk")
    public suspend
    fun storageAccounts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppServiceStorageAccountArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.storageAccounts = mapped
    }

    /**
     * @param argument One or more `storage_account` blocks as defined below.
     */
    @JvmName("cxxynskyenryswca")
    public suspend fun storageAccounts(
        vararg
        argument: suspend AppServiceStorageAccountArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AppServiceStorageAccountArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.storageAccounts = mapped
    }

    /**
     * @param argument One or more `storage_account` blocks as defined below.
     */
    @JvmName("uqnpqniotxkmacca")
    public suspend
    fun storageAccounts(argument: suspend AppServiceStorageAccountArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AppServiceStorageAccountArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.storageAccounts = mapped
    }

    /**
     * @param values One or more `storage_account` blocks as defined below.
     */
    @JvmName("gidhvdejjyxoyldb")
    public suspend fun storageAccounts(vararg values: AppServiceStorageAccountArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.storageAccounts = mapped
    }

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

    internal fun build(): AppServiceArgs = AppServiceArgs(
        appServicePlanId = appServicePlanId,
        appSettings = appSettings,
        authSettings = authSettings,
        backup = backup,
        clientAffinityEnabled = clientAffinityEnabled,
        clientCertEnabled = clientCertEnabled,
        clientCertMode = clientCertMode,
        connectionStrings = connectionStrings,
        enabled = enabled,
        httpsOnly = httpsOnly,
        identity = identity,
        keyVaultReferenceIdentityId = keyVaultReferenceIdentityId,
        location = location,
        logs = logs,
        name = name,
        resourceGroupName = resourceGroupName,
        siteConfig = siteConfig,
        sourceControl = sourceControl,
        storageAccounts = storageAccounts,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy