WebAppArgs

data class WebAppArgs(val clientAffinityEnabled: Output<Boolean>? = null, val clientCertEnabled: Output<Boolean>? = null, val clientCertExclusionPaths: Output<String>? = null, val clientCertMode: Output<ClientCertMode>? = null, val cloningInfo: Output<CloningInfoArgs>? = null, val containerSize: Output<Int>? = null, val customDomainVerificationId: Output<String>? = null, val dailyMemoryTimeQuota: Output<Int>? = null, val enabled: Output<Boolean>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val hostNameSslStates: Output<List<HostNameSslStateArgs>>? = null, val hostNamesDisabled: Output<Boolean>? = null, val hostingEnvironmentProfile: Output<HostingEnvironmentProfileArgs>? = null, val httpsOnly: Output<Boolean>? = null, val hyperV: Output<Boolean>? = null, val identity: Output<ManagedServiceIdentityArgs>? = null, val isXenon: Output<Boolean>? = null, val keyVaultReferenceIdentity: Output<String>? = null, val kind: Output<String>? = null, val location: Output<String>? = null, val managedEnvironmentId: Output<String>? = null, val name: Output<String>? = null, val publicNetworkAccess: Output<String>? = null, val redundancyMode: Output<RedundancyMode>? = null, val reserved: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val scmSiteAlsoStopped: Output<Boolean>? = null, val serverFarmId: Output<String>? = null, val siteConfig: Output<SiteConfigArgs>? = null, val storageAccountRequired: Output<Boolean>? = null, val tags: Output<Map<String, String>>? = null, val virtualNetworkSubnetId: Output<String>? = null, val vnetContentShareEnabled: Output<Boolean>? = null, val vnetImagePullEnabled: Output<Boolean>? = null, val vnetRouteAllEnabled: Output<Boolean>? = null) : ConvertibleToJava<WebAppArgs>

A web app, a mobile app backend, or an API app. Uses Azure REST API version 2022-09-01. In version 1.x of the Azure Native provider, it used API version 2020-12-01. Other available API versions: 2016-08-01, 2018-11-01, 2020-10-01, 2023-01-01, 2023-12-01, 2024-04-01.

Example Usage

Clone web app

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webApp = new AzureNative.Web.WebApp("webApp", new()
{
CloningInfo = new AzureNative.Web.Inputs.CloningInfoArgs
{
AppSettingsOverrides =
{
{ "Setting1", "NewValue1" },
{ "Setting3", "NewValue5" },
},
CloneCustomHostNames = true,
CloneSourceControl = true,
ConfigureLoadBalancing = false,
HostingEnvironment = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites",
Overwrite = false,
SourceWebAppId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478",
SourceWebAppLocation = "West Europe",
},
Kind = "app",
Location = "East US",
Name = "sitef6141",
ResourceGroupName = "testrg123",
});
});
package main
import (
web "github.com/pulumi/pulumi-azure-native-sdk/web/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := web.NewWebApp(ctx, "webApp", &web.WebAppArgs{
CloningInfo: &web.CloningInfoArgs{
AppSettingsOverrides: pulumi.StringMap{
"Setting1": pulumi.String("NewValue1"),
"Setting3": pulumi.String("NewValue5"),
},
CloneCustomHostNames: pulumi.Bool(true),
CloneSourceControl: pulumi.Bool(true),
ConfigureLoadBalancing: pulumi.Bool(false),
HostingEnvironment: pulumi.String("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites"),
Overwrite: pulumi.Bool(false),
SourceWebAppId: pulumi.String("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478"),
SourceWebAppLocation: pulumi.String("West Europe"),
},
Kind: pulumi.String("app"),
Location: pulumi.String("East US"),
Name: pulumi.String("sitef6141"),
ResourceGroupName: pulumi.String("testrg123"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.web.WebApp;
import com.pulumi.azurenative.web.WebAppArgs;
import com.pulumi.azurenative.web.inputs.CloningInfoArgs;
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 webApp = new WebApp("webApp", WebAppArgs.builder()
.cloningInfo(CloningInfoArgs.builder()
.appSettingsOverrides(Map.ofEntries(
Map.entry("Setting1", "NewValue1"),
Map.entry("Setting3", "NewValue5")
))
.cloneCustomHostNames(true)
.cloneSourceControl(true)
.configureLoadBalancing(false)
.hostingEnvironment("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites")
.overwrite(false)
.sourceWebAppId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478")
.sourceWebAppLocation("West Europe")
.build())
.kind("app")
.location("East US")
.name("sitef6141")
.resourceGroupName("testrg123")
.build());
}
}

Create or Update web app

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webApp = new AzureNative.Web.WebApp("webApp", new()
{
Kind = "app",
Location = "East US",
Name = "sitef6141",
ResourceGroupName = "testrg123",
ServerFarmId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp",
});
});
package main
import (
web "github.com/pulumi/pulumi-azure-native-sdk/web/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := web.NewWebApp(ctx, "webApp", &web.WebAppArgs{
Kind: pulumi.String("app"),
Location: pulumi.String("East US"),
Name: pulumi.String("sitef6141"),
ResourceGroupName: pulumi.String("testrg123"),
ServerFarmId: pulumi.String("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.web.WebApp;
import com.pulumi.azurenative.web.WebAppArgs;
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 webApp = new WebApp("webApp", WebAppArgs.builder()
.kind("app")
.location("East US")
.name("sitef6141")
.resourceGroupName("testrg123")
.serverFarmId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:web:WebApp sitef6141 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}

Constructors

Link copied to clipboard
constructor(clientAffinityEnabled: Output<Boolean>? = null, clientCertEnabled: Output<Boolean>? = null, clientCertExclusionPaths: Output<String>? = null, clientCertMode: Output<ClientCertMode>? = null, cloningInfo: Output<CloningInfoArgs>? = null, containerSize: Output<Int>? = null, customDomainVerificationId: Output<String>? = null, dailyMemoryTimeQuota: Output<Int>? = null, enabled: Output<Boolean>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, hostNameSslStates: Output<List<HostNameSslStateArgs>>? = null, hostNamesDisabled: Output<Boolean>? = null, hostingEnvironmentProfile: Output<HostingEnvironmentProfileArgs>? = null, httpsOnly: Output<Boolean>? = null, hyperV: Output<Boolean>? = null, identity: Output<ManagedServiceIdentityArgs>? = null, isXenon: Output<Boolean>? = null, keyVaultReferenceIdentity: Output<String>? = null, kind: Output<String>? = null, location: Output<String>? = null, managedEnvironmentId: Output<String>? = null, name: Output<String>? = null, publicNetworkAccess: Output<String>? = null, redundancyMode: Output<RedundancyMode>? = null, reserved: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, scmSiteAlsoStopped: Output<Boolean>? = null, serverFarmId: Output<String>? = null, siteConfig: Output<SiteConfigArgs>? = null, storageAccountRequired: Output<Boolean>? = null, tags: Output<Map<String, String>>? = null, virtualNetworkSubnetId: Output<String>? = null, vnetContentShareEnabled: Output<Boolean>? = null, vnetImagePullEnabled: Output<Boolean>? = null, vnetRouteAllEnabled: Output<Boolean>? = null)

Properties

Link copied to clipboard
val clientAffinityEnabled: Output<Boolean>? = null

true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is true.

Link copied to clipboard
val clientCertEnabled: Output<Boolean>? = null

true to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false.

Link copied to clipboard
val clientCertExclusionPaths: Output<String>? = null

client certificate authentication comma-separated exclusion paths

Link copied to clipboard
val clientCertMode: Output<ClientCertMode>? = null

This composes with ClientCertEnabled setting.

Link copied to clipboard
val cloningInfo: Output<CloningInfoArgs>? = null

If specified during app creation, the app is cloned from a source app.

Link copied to clipboard
val containerSize: Output<Int>? = null

Size of the function container.

Link copied to clipboard
val customDomainVerificationId: Output<String>? = null

Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification.

Link copied to clipboard
val dailyMemoryTimeQuota: Output<Int>? = null

Maximum allowed daily memory-time quota (applicable on dynamic apps only).

Link copied to clipboard
val enabled: Output<Boolean>? = null

true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline).

Link copied to clipboard

Extended Location.

Link copied to clipboard

App Service Environment to use for the app.

Link copied to clipboard
val hostNamesDisabled: Output<Boolean>? = null

true to disable the public hostnames of the app; otherwise, false. If true, the app is only accessible via API management process.

Link copied to clipboard

Hostname SSL states are used to manage the SSL bindings for app's hostnames.

Link copied to clipboard
val httpsOnly: Output<Boolean>? = null

HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests

Link copied to clipboard
val hyperV: Output<Boolean>? = null

Hyper-V sandbox.

Link copied to clipboard

Managed service identity.

Link copied to clipboard
val isXenon: Output<Boolean>? = null

Obsolete: Hyper-V sandbox.

Link copied to clipboard
val keyVaultReferenceIdentity: Output<String>? = null

Identity to use for Key Vault Reference authentication.

Link copied to clipboard
val kind: Output<String>? = null

Kind of resource.

Link copied to clipboard
val location: Output<String>? = null

Resource Location.

Link copied to clipboard
val managedEnvironmentId: Output<String>? = null

Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}

Link copied to clipboard
val name: Output<String>? = null

Unique name of the app to create or update. To create or update a deployment slot, use the {slot} parameter.

Link copied to clipboard
val publicNetworkAccess: Output<String>? = null

Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string.

Link copied to clipboard
val redundancyMode: Output<RedundancyMode>? = null

Site redundancy mode

Link copied to clipboard
val reserved: Output<Boolean>? = null

true if reserved; otherwise, false.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group to which the resource belongs.

Link copied to clipboard
val scmSiteAlsoStopped: Output<Boolean>? = null

true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false.

Link copied to clipboard
val serverFarmId: Output<String>? = null

Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".

Link copied to clipboard
val siteConfig: Output<SiteConfigArgs>? = null

Configuration of the app.

Link copied to clipboard
val storageAccountRequired: Output<Boolean>? = null

Checks if Customer provided storage account is required

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val virtualNetworkSubnetId: Output<String>? = null

Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}

Link copied to clipboard
val vnetContentShareEnabled: Output<Boolean>? = null

To enable accessing content over virtual network

Link copied to clipboard
val vnetImagePullEnabled: Output<Boolean>? = null

To enable pulling image over Virtual Network

Link copied to clipboard
val vnetRouteAllEnabled: Output<Boolean>? = null

Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied.

Functions

Link copied to clipboard
open override fun toJava(): WebAppArgs