Add-AzApplicationGatewayHttpListener
Lägger till en HTTP-lyssnare i en programgateway.
Syntax
Add-AzApplicationGatewayHttpListener
-ApplicationGateway <PSApplicationGateway>
-Name <String>
[-FrontendIPConfigurationId <String>]
[-FrontendPortId <String>]
[-SslCertificateId <String>]
[-FirewallPolicyId <String>]
[-SslProfileId <String>]
[-HostName <String>]
[-HostNames <String[]>]
[-RequireServerNameIndication <String>]
-Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Add-AzApplicationGatewayHttpListener
-ApplicationGateway <PSApplicationGateway>
-Name <String>
[-FrontendIPConfiguration <PSApplicationGatewayFrontendIPConfiguration>]
[-FrontendPort <PSApplicationGatewayFrontendPort>]
[-FirewallPolicy <PSApplicationGatewayWebApplicationFirewallPolicy>]
[-SslCertificate <PSApplicationGatewaySslCertificate>]
[-SslProfile <PSApplicationGatewaySslProfile>]
[-HostName <String>]
[-HostNames <String[]>]
[-RequireServerNameIndication <String>]
-Protocol <String>
[-CustomErrorConfiguration <PSApplicationGatewayCustomError[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Cmdleten Add-AzApplicationGatewayHttpListener lägger till en HTTP-lyssnare i en programgateway.
Exempel
Exempel 1: Lägg till en HTTP-lyssnare
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$Appgw = Add-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "listener01" -Protocol "Http" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01
Det första kommandot hämtar programgatewayen och lagrar den i variabeln $AppGw. Det andra kommandot lägger till HTTP-lyssnaren i programgatewayen.
Exempel 2: Lägg till en HTTPS-lyssnare med SSL
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener01" -Protocol "Https" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01 -SslCertificate $SSLCert01
Det första kommandot hämtar programgatewayen och lagrar den i variabeln $AppGw. Det andra kommandot lägger till lyssnaren, som använder HTTPS-protokollet, till programgatewayen.
Exempel 3: Lägga till en HTTPS-lyssnare med SSL och HostNames
$AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"
$AppGw = Add-AzApplicationGatewayHttpListener -ApplicationGateway $AppGw -Name "Listener01" -Protocol "Https" -FrontendIpConfiguration $FIP01 -FrontendPort $FP01 -SslCertificate $SSLCert01 -HostNames "*.contoso.com","www.microsoft.com"
Det första kommandot hämtar programgatewayen och lagrar den i variabeln $AppGw. Det andra kommandot lägger till lyssnaren, som använder HTTPS-protokollet, med SSL-certifikat och Värdnamn, till programgatewayen.
Parametrar
-ApplicationGateway
Anger den programgateway som den här cmdleten lägger till en HTTP-lyssnare till.
Type: | PSApplicationGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomErrorConfiguration
Kundfel för en programgateway
Type: | PSApplicationGatewayCustomError[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FirewallPolicy
FirewallPolicy
Type: | PSApplicationGatewayWebApplicationFirewallPolicy |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FirewallPolicyId
FirewallPolicyId
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendIPConfiguration
Anger klientdels-IP-resursobjektet för programgatewayen.
Type: | PSApplicationGatewayFrontendIPConfiguration |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendIPConfigurationId
Anger klientdels-IP-ID:t för programgatewayen.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendPort
Anger klientdelsportobjektet för programgatewayen.
Type: | PSApplicationGatewayFrontendPort |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FrontendPortId
Anger programgatewayens port-ID för klientdelen.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostName
Anger värdnamnet som den här cmdleten lägger till en HTTP-lyssnare i.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HostNames
Värdnamn
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Anger namnet på den klientdelsport som det här kommandot lägger till.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Protocol
Anger protokollet för HTTP-lyssnaren. Både HTTP och HTTPS stöds.
Type: | String |
Accepted values: | Http, Https |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RequireServerNameIndication
Type: | String |
Accepted values: | true, false |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SslCertificate
Anger SSL-certifikatet för HTTP-lyssnaren. Måste anges om HTTPS väljs som lyssnarprotokoll.
Type: | PSApplicationGatewaySslCertificate |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SslCertificateId
Anger SSL-certifikat-ID för HTTP-lyssnaren. Måste anges om HTTPS väljs som lyssnarprotokoll.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SslProfile
SslProfile
Type: | PSApplicationGatewaySslProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SslProfileId
SslProfileId
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indata
Utdata
Relaterade länkar
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för