Editar

Partilhar via


New-AzAppServiceEnvironment

Creates an App Service Environment including the recommended Route Table and Network Security Group

Syntax

New-AzAppServiceEnvironment
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-Kind] <String>]
   -VirtualNetworkName <String>
   -SubnetName <String>
   -LoadBalancerMode <String>
   [-SkipRouteTable]
   [-SkipNetworkSecurityGroup]
   [-PassThru]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzAppServiceEnvironment
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-Kind] <String>]
   -VirtualNetworkName <String>
   -SubnetName <String>
   [-PassThru]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzAppServiceEnvironment
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-Kind] <String>]
   -SubnetId <String>
   -LoadBalancerMode <String>
   [-SkipRouteTable]
   [-SkipNetworkSecurityGroup]
   [-PassThru]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzAppServiceEnvironment
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Location] <String>
   [[-Kind] <String>]
   -SubnetId <String>
   [-PassThru]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzAppServiceEnvironment cmdlet creates an App Service Environment.

Examples

Example 1

New-AzAppServiceEnvironment -ResourceGroupName MyResourceGroup -Name MyAseV2 -Location WestEurope -VirtualNetworkName MyVirtualNetwork -SubnetName AseSubnet -LoadBalancerMode Internal

Create App Service Environment named MyAseV2 including recommended Route Table and Network Security Group

Example 2

New-AzAppServiceEnvironment -ResourceGroupName MyResourceGroup -Name MyAseV2 -Location WestEurope -VirtualNetworkName MyVirtualNetwork -SubnetName AseSubnet -LoadBalancerMode Internal -SkipRouteTable -SkipNetworkSecurityGroup

Create App Service Environment named MyAseV2 without recommended Route Table and Network Security Group. These should be create before or right after provisioning the App Service Environment to ensure a functional instance.

Parameters

-AsJob

Run cmdlet in the background and return a Job to track progress.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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

-Kind

The version of the app service environment.

Type:String
Accepted values:ASEv2, ASEv3
Position:3
Default value:ASEv2
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LoadBalancerMode

Load balancer mode of the app service environment.

Type:String
Accepted values:Internal, External
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Location

The Location of the app service environment eg: West Europe.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the app service environment.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Return the app service environment object.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SkipNetworkSecurityGroup

Do not create the recommended network security group as part of the app service environment.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SkipRouteTable

Do not create the recommended route table as part of the app service environment.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubnetId

The subnet id.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubnetName

The subnet name. Used in combination with -VirtualNetworkName and must be in same resource group as ASE. If not, use -SubnetId

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualNetworkName

The vNet name. Used in combination with -SubnetName and must be in same resource group as ASE. If not, use -SubnetId

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Object