New-AzureRmApplicationGateway
Erstellt ein Anwendungsgateway.
Warnung
Das AzureRM PowerShell-Modul ist seit dem 29. Februar 2024 offiziell veraltet. Benutzern wird empfohlen, von AzureRM zum Az PowerShell-Modul zu migrieren, um weiterhin Support und Updates zu erhalten.
Obwohl das AzureRM-Modul weiterhin funktioniert, wird es nicht mehr Standard tained oder unterstützt, wobei eine fortgesetzte Verwendung nach Ermessen und Risiko des Benutzers erfolgt. Weitere Informationen zum Übergang zum Az-Modul finden Sie in unseren Migrationsressourcen.
Syntax
New-AzureRmApplicationGateway
-Name <String>
-ResourceGroupName <String>
-Location <String>
-Sku <PSApplicationGatewaySku>
[-SslPolicy <PSApplicationGatewaySslPolicy>]
-GatewayIPConfigurations <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayIPConfiguration]>
[-SslCertificates <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate]>]
[-AuthenticationCertificates <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate]>]
[-TrustedRootCertificate <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayTrustedRootCertificate]>]
[-FrontendIPConfigurations <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration]>]
-FrontendPorts <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort]>
[-Probes <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe]>]
-BackendAddressPools <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool]>
-BackendHttpSettingsCollection <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings]>
-HttpListeners <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener]>
[-UrlPathMaps <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap]>]
-RequestRoutingRules <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRequestRoutingRule]>
[-RedirectConfigurations <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration]>]
[-WebApplicationFirewallConfiguration <PSApplicationGatewayWebApplicationFirewallConfiguration>]
[-AutoscaleConfiguration <PSApplicationGatewayAutoscaleConfiguration>]
[-EnableHttp2]
[-EnableFIPS]
[-Zone <System.Collections.Generic.List`1[System.String]>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Das Cmdlet New-AzureRmApplicationGateway erstellt ein Azure-Anwendungsgateway. Ein Anwendungsgateway erfordert Folgendes:
- Eine Ressourcengruppe.
- Ein virtuelles Netzwerk
- Ein Back-End-Serverpool, der die IP-Adressen der Back-End-Server enthält.
- Back-End-Serverpooleinstellungen. Jeder Pool verfügt über Einstellungen wie Port, Protokoll und cookiebasierte Affinität, die auf alle Server innerhalb des Pools angewendet werden.
- Front-End-IP-Adressen, bei denen es sich um die IP-Adressen handelt, die auf dem Anwendungsgateway geöffnet sind. Eine Front-End-IP-Adresse kann eine öffentliche IP-Adresse oder eine interne IP-Adresse sein.
- Front-End-Ports, die die öffentlichen Ports sind, die auf dem Anwendungsgateway geöffnet sind. Datenverkehr, der auf diese Ports trifft, wird an die Back-End-Server umgeleitet.
- Eine Anforderungsroutingregel, die den Listener und den Back-End-Serverpool bindet. Die Regel definiert, an welchen Back-End-Serverpool der Datenverkehr gerichtet werden soll, wenn er auf einen bestimmten Listener trifft. Ein Listener verfügt über einen Front-End-Port, eine Front-End-IP-Adresse, ein Protokoll (HTTP oder HTTPS) und einen SSL-Zertifikatnamen (secure Sockets Layer).
Beispiele
Beispiel 1: Erstellen eines Anwendungsgateways
PS C:\> $ResourceGroup = New-AzureRmResourceGroup -Name "ResourceGroup01" -Location "West US" -Tag @{Name = "Department"; Value = "Marketing"}
PS C:\> $Subnet = New-AzureRmVirtualNetworkSubnetConfig -Name "Subnet01" -AddressPrefix 10.0.0.0/24
PS C:\> $VNet = New-AzureRmvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01" -Location "West US" -AddressPrefix 10.0.0.0/16 -Subnet $Subnet
PS C:\> $VNet = Get-AzureRmvirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01"
PS C:\> $Subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name $Subnet01 -VirtualNetwork $VNet
PS C:\> $GatewayIPconfig = New-AzureRmApplicationGatewayIPConfiguration -Name "GatewayIp01" -Subnet $Subnet
PS C:\> $Pool = New-AzureRmApplicationGatewayBackendAddressPool -Name "Pool01" -BackendIPAddresses 10.10.10.1, 10.10.10.2, 10.10.10.3
PS C:\> $PoolSetting = New-AzureRmApplicationGatewayBackendHttpSettings -Name "PoolSetting01" -Port 80 -Protocol "Http" -CookieBasedAffinity "Disabled"
PS C:\> $FrontEndPort = New-AzureRmApplicationGatewayFrontendPort -Name "FrontEndPort01" -Port 80
# Create a public IP address
PS C:\> $PublicIp = New-AzureRmPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIpName01" -Location "West US" -AllocationMethod "Dynamic"
PS C:\> $FrontEndIpConfig = New-AzureRmApplicationGatewayFrontendIPConfig -Name "FrontEndConfig01" -PublicIPAddress $PublicIp
PS C:\> $Listener = New-AzureRmApplicationGatewayHttpListener -Name "ListenerName01" -Protocol "Http" -FrontendIpConfiguration $FrontEndIpConfig -FrontendPort $FrontEndPort
PS C:\> $Rule = New-AzureRmApplicationGatewayRequestRoutingRule -Name "Rule01" -RuleType basic -BackendHttpSettings $PoolSetting -HttpListener $Listener -BackendAddressPool $Pool
PS C:\> $Sku = New-AzureRmApplicationGatewaySku -Name "Standard_Small" -Tier Standard -Capacity 2
PS C:\> $Gateway = New-AzureRmApplicationGateway -Name "AppGateway01" -ResourceGroupName "ResourceGroup01" -Location "West US" -BackendAddressPools $Pool -BackendHttpSettingsCollection $PoolSetting -FrontendIpConfigurations $FrontEndIpConfig -GatewayIpConfigurations $GatewayIpConfig -FrontendPorts $FrontEndPort -HttpListeners $Listener -RequestRoutingRules $Rule -Sku $Sku
Im folgenden Beispiel wird ein Anwendungsgateway erstellt, indem zuerst eine Ressourcengruppe und ein virtuelles Netzwerk sowie folgendes erstellt werden:
- Ein Back-End-Serverpool
- Back-End-Serverpooleinstellungen
- Front-End-Ports
- Front-End-IP-Adressen
- Eine Anforderungsroutingregel Diese vier Befehle erstellen ein virtuelles Netzwerk. Der erste Befehl erstellt eine Subnetzkonfiguration. Der zweite Befehl erstellt ein virtuelles Netzwerk. Der dritte Befehl überprüft die Subnetzkonfiguration und der vierte Befehl überprüft, ob das virtuelle Netzwerk erfolgreich erstellt wurde. Mit den folgenden Befehlen wird das Anwendungsgateway erstellt. Der erste Befehl erstellt eine IP-Konfiguration namens GatewayIp01 für das zuvor erstellte Subnetz. Der zweite Befehl erstellt einen Back-End-Serverpool namens Pool01 mit einer Liste von Back-End-IP-Adressen und speichert den Pool in der $Pool Variablen. Der dritte Befehl erstellt die Einstellungen für den Back-End-Serverpool und speichert die Einstellungen in der variablen $PoolSetting. Der vierte Befehl erstellt einen Front-End-Port auf Port 80, benennt ihn FrontEndPort01 und speichert den Port in der $FrontEndPort Variablen. Der fünfte Befehl erstellt eine öffentliche IP-Adresse mithilfe von New-AzureRmPublicIpAddress. Der sechste Befehl erstellt eine Front-End-IP-Konfiguration mit $PublicIp, benennt sie FrontEndPortConfig01 und speichert sie in der $FrontEndIpConfig Variablen. Mit dem siebten Befehl wird ein Listener erstellt, der die zuvor erstellte $FrontEndIpConfig $FrontEndPort verwendet. Der achte Befehl erstellt eine Regel für den Listener. Der neunte Befehl legt die SKU fest. Der zehnte Befehl erstellt das Gateway mithilfe der objekte, die von den vorherigen Befehlen festgelegt wurden.
Parameter
-AsJob
Cmdlet im Hintergrund ausführen
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AuthenticationCertificates
Gibt Authentifizierungszertifikate für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayAuthenticationCertificate] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AutoscaleConfiguration
Autoskalenkonfiguration
Type: | PSApplicationGatewayAutoscaleConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BackendAddressPools
Gibt die Liste der Back-End-Adresspools für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayBackendAddressPool] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BackendHttpSettingsCollection
Gibt die Liste der Back-End-HTTP-Einstellungen für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayBackendHttpSettings] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Die Anmeldeinformationen, Konten, Mandanten und Abonnements, die für die Kommunikation mit Azure verwendet werden.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableFIPS
Gibt an, ob FIPS aktiviert ist.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableHttp2
Gibt an, ob HTTP2 aktiviert ist.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Erzwingt die Ausführung des Befehls ohne Aufforderung zur Bestätigung durch den Benutzer.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendIPConfigurations
Gibt eine Liste der Front-End-IP-Konfigurationen für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayFrontendIPConfiguration] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FrontendPorts
Gibt eine Liste der Front-End-Ports für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayFrontendPort] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GatewayIPConfigurations
Gibt eine Liste der IP-Konfigurationen für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayIPConfiguration] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-HttpListeners
Gibt eine Liste der HTTP-Listener für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayHttpListener] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
Gibt die Region an, in der das Anwendungsgateway erstellt werden soll.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Gibt den Namen des Anwendungsgateways an.
Type: | String |
Aliases: | ResourceName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Probes
Gibt Prüfpunkte für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayProbe] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RedirectConfigurations
Die Liste der Umleitungskonfigurationen
Type: | List<T>[PSApplicationGatewayRedirectConfiguration] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RequestRoutingRules
Gibt eine Liste der Anforderungsroutingregeln für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayRequestRoutingRule] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Gibt den Namen der Ressourcengruppe an, in der das Anwendungsgateway erstellt werden soll.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Sku
Gibt die Lagerhaltungseinheit (SKU) des Anwendungsgateways an.
Type: | PSApplicationGatewaySku |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SslCertificates
Gibt die Liste der SSL-Zertifikate (Secure Sockets Layer) für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewaySslCertificate] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SslPolicy
Gibt eine SSL-Richtlinie für das Anwendungsgateway an.
Type: | PSApplicationGatewaySslPolicy |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Schlüssel-Wert-Paare in Form einer Hashtabelle. Beispiel: @{key0="value0"; key1=$null; key2="value2"}
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TrustedRootCertificate
Die Liste der vertrauenswürdigen Stammzertifikate
Type: | List<T>[PSApplicationGatewayTrustedRootCertificate] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UrlPathMaps
Gibt URL-Pfadzuordnungen für das Anwendungsgateway an.
Type: | List<T>[PSApplicationGatewayUrlPathMap] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WebApplicationFirewallConfiguration
Gibt eine Konfiguration der Webanwendungsfirewall (WAF) an. Sie können das Cmdlet Get-AzureRmApplicationGatewayWebApplicationFirewallConfiguration verwenden, um eine WAF abzurufen.
Type: | PSApplicationGatewayWebApplicationFirewallConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Zone
Eine Liste der Verfügbarkeitszonen, aus denen das Anwendungsgateway stammen muss.
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayIPConfiguration, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslCertificate, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAuthenticationCertificate, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendIPConfiguration, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFrontendPort, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayProbe, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendAddressPool, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayBackendHttpSettings, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayHttpListener, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayUrlPathMap, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRequestRoutingRule, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
List<T>[[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayRedirectConfiguration, Microsoft.Azure.Commands.Network, Version=6.4.1.0, Culture=neutral, PublicKeyToken=null]]
PSApplicationGatewayWebApplicationFirewallConfiguration
Ausgaben
Ähnliche Themen
- New-AzureRmApplicationGatewayBackendAddressPool
- New-AzureRmApplicationGatewayBackendHttpSettings
- New-AzureRmApplicationGatewayFrontendIPConfig
- New-AzureRmApplicationGatewayFrontendPort
- New-AzureRmApplicationGatewayHttpListener
- New-AzureRmApplicationGatewayIPConfiguration
- New-AzureRmApplicationGatewayRequestRoutingRule
- New-AzureRmApplicationGatewaySku
- New-AzureRmVirtualNetwork
- New-AzureRmVirtualNetworkSubnetConfig