从门户更改 Azure Api 中的服务结构端点端口管理

change service fabric endpoint port in Azure Api Management from portal

如何在 API 管理中将 Service fabric 的端点端口从 19000 更改为 19080?遵循 API 中的快速设置示例时,管理犯了错误 http://mktestsf2.westus.cloudapp.azure.com:19000 代替 http://mktestsf2.westus.cloudapp.azure.com:19080

如何在门户中更改此设置

您可以通过https://resources.azure.com更改它。在那里,导航到您的订阅 > 您的资源组 > 提供商 > Microsoft.APIManagement > 您的 API 管理服务 > 后端 > servicefabric。确保您处于 read/write 模式。单击编辑,根据需要更改 managementEndpoints 和 resourceID,然后单击 PUT。

您也可以通过 Azure RM Powershell 更改它。要获取后端详细信息:

$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "RGName" -ServiceName "APIM_Name"
Get-AzureRmApiManagementBackend -Context $apimContext

要更改 resourceID 和 managementEndpoint:

$sf=(Get-AzureRmApiManagementBackend -Context $apimContext).ServiceFabricCluster
$sf.ManagementEndpoints="https://mysfcluster123.southcentralus.cloudapp.azure.com:19080"
Set-AzureRmApiManagementBackend -Context $apimContext -resourceId "https://mysfcluster123.southcentralus.cloudapp.azure.com:19080" -BackendId servicefabric -ServiceFabricCluster $sf