New-AzWebAppSlot
Creates an Azure Web App slot.
Syntax
New-AzWebAppSlot
[-ResourceGroupName] <String>
[-Name] <String>
[[-Slot] <String>]
[[-AppServicePlan] <String>]
[[-SourceWebApp] <PSSite>]
[-IgnoreSourceControl]
[-IgnoreCustomHostNames]
[[-AppSettingsOverrides] <Hashtable>]
[[-AseName] <String>]
[[-AseResourceGroupName] <String>]
[-ContainerImageName <String>]
[-ContainerRegistryUrl <String>]
[-ContainerRegistryUser <String>]
[-ContainerRegistryPassword <SecureString>]
[-EnableContainerContinuousDeployment]
[-CopyIdentity]
[-AsJob]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzWebAppSlot cmdlet creates an Azure Web App Slot in a given a resource group that uses the specified App Service plan and data center.
Examples
Example 1
New-AzWebAppSlot -ResourceGroupName Default-Web-WestUS -Name "ContosoSite" -AppServicePlan "ContosoServicePlan" -Slot "Slot001"
This command creates a Slot named Slot001 under an existing Web App names ContosoSite in the existing resource group named Default-Web-WestUS in data center West US. The command uses an existing App Service plan named ContosoServicePlan.
Parameters
-AppServicePlan
App Service Plan Name or App Service Plan Id. If the Slot and App Service Plan are in different Resource Groups, use the ID instead of the name. The App Service Plan Id can be retrieved using: $asp = Get-AzAppServicePlan -ResourceGroup myRG -Name MyWebapp $asp.id returns the App Service Plan Id.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AppSettingsOverrides
App Settings Overrides Hashtable. It works only with SourceWebApp parameter.
Type: | Hashtable |
Position: | 8 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AseName
App Service Environment Name
Type: | String |
Position: | 9 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AseResourceGroupName
App Service Environment Resource Group Name
Type: | String |
Position: | 10 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContainerImageName
Container Image Name and optional tag, for example (image:tag)
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContainerRegistryPassword
Private Container Registry Password
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContainerRegistryUrl
Private Container Registry Server Url
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContainerRegistryUser
Private Container Registry Username
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CopyIdentity
Copies the managed identity from the parent or source WebApp.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableContainerContinuousDeployment
Enables/Disables container continuous deployment webhook
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IgnoreCustomHostNames
Ignore Custom HostNames Option
Type: | SwitchParameter |
Position: | 7 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IgnoreSourceControl
Ignore Source Control Option
Type: | SwitchParameter |
Position: | 6 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Webapp Name
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group Name
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Slot
Webapp Slot Name
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SourceWebApp
Source WebApp Object
Type: | PSSite |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Tags are name/value pairs that enable you to categorize resources
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |