gpt4 book ai didi

Azure Front Door 后端详细介绍了现有 Front Door 问题的补充

转载 作者:行者123 更新时间:2023-12-03 00:47:08 25 4
gpt4 key购买 nike

我执行了以下命令并能够创建 FrontDoor rnd-test。

$test = New-AzFrontDoorBackendObject -Address bing.com -httpPort 80 -httpsPort 443 -Priority 1 -Weight 50 -BackendHostHeader bing.com -EnabledState Enabled

New-AzFrontDoorBackendPoolObject -Name "rndbackendpool" -FrontDoorName "rnd-test" -ResourceGroupName "Nexxe-RND-RahulTripathi" -Backend $test -HealthProbeSettingsName "rndHP" -LoadBalancingSettingsName "rndLB" -DefaultProfile $AzSubscription

现在,我正在尝试在现有 FrontDoor 下创建一个后端池。

最佳答案

您可以引用this script用于更新现有的 Azure Front Door 新前端、后端和规则。

$afd = Get-AzFrontDoor 

$bpoolname= Read-Host -Prompt "Enter name for backend Pool:"
$backobject1= Read-Host -Prompt "Enter name for backend object (IP address or FQDN):"
$frontdoorname= Read-Host -Prompt "Enter Azure Front door name"
$rgname = Read-Host -Prompt "Enter Resource Group"
$routingRuleName = $bpoolname
$FrontendEndpointHostname = Read-Host -Prompt "enter FQDN of Frontend points name: "
$FrontendEndpointName = Read-Host -Prompt "enter name of Frontend point: "
$LbName = $bpoolname + "-lb01"
$probeName = $bpoolname + "-probe01"

$backEndObject1 = New-AzFrontDoorBackendObject -Address $backobject1



$HealthProbeSettingObject1 = New-AzFrontDoorHealthProbeSettingObject -Name $probeName -Protocol Https
$LoadBalancingSettingObject1 = New-AzFrontDoorLoadBalancingSettingObject -Name $LbName
$FrontendEndpointObject1 = New-AzFrontDoorFrontendEndpointObject -Name $FrontendEndpointName -HostName $FrontendEndpointHostname

$BackendPoolObject1 = New-AzFrontDoorBackendPoolObject -Name $bpoolname -FrontDoorName $frontDoorName -ResourceGroupName $rgName -Backend $backendObject1 -HealthProbeSettingsName $probeName -LoadBalancingSettingsName $LbName


$afd.HealthProbeSettings.Add($HealthProbeSettingObject1)
$afd.LoadBalancingSettings.Add($LoadBalancingSettingObject1)
$afd.FrontendEndpoints.Add($FrontendEndpointObject1)
$afd.BackendPools.Add($BackendPoolObject1)



$RoutingRuleObject1 = New-AzFrontDoorRoutingRuleObject -Name $routingRuleName -FrontDoorName $frontDoorName -ResourceGroupName $rgName -FrontendEndpointName $FrontendEndpointName -BackendPoolName $bpoolname -ForwardingProtocol HttpsOnly

$afd.RoutingRules.Add($RoutingRuleObject1)


Set-AzFrontDoor -Resourcegroupname $rgname -Name $frontdoorname -FrontendEndpoint $afd.FrontendEndpoints -BackendPool $afd.BackendPools -RoutingRule $afd.RoutingRules -LoadBalancingSetting $afd.LoadBalancingSettings -HealthProbeSetting $afd.HealthProbeSettings -Debug

关于Azure Front Door 后端详细介绍了现有 Front Door 问题的补充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61101640/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com