Azure Management 라이브러리를 사용하여 Azure 웹 앱/Api 앱을 확장 할 수 있습니까? 기본적으로 스로틀 링을 처리하기 위해 웹 애플리케이션을 위아래로 확장하는 것을 구현하려고합니다. 따라서 C# 코드를 통해 웹 응용 프로그램과 API 응용 프로그램을 확장해야합니다. apprpriate 라이브러리/ReST API에 대한 모든 포인터?Azure 웹 사이트 배율
아래에 언급 된 답변을 통해 APP 서비스 계획을 확장하는 방법을 이해하지만, 내 APP 서비스의 webHostingPlanName을 찾을 수 없습니다. 나는 아래의 코드로 시도하고 호스팅 계획은 항상 null로 나옵니다.
var regionName = "myregion";
var credentials = GetCredentials();
var websiteManagementClient = CloudContext.Clients.CreateWebSiteManagementClient(credentials);
var webSpaces = websiteManagementClient.WebSpaces.List();
var webSpace = webSpaces.FirstOrDefault(x => x.GeoRegion == regionName);
if (webSpace == null)
{
throw new Exception(string.Format("No webspace for region {0} found", regionName));
}
var webHostingPlans = websiteManagementClient.WebHostingPlans.List(webSpace.Name);
var webHostingPlan = webHostingPlans.FirstOrDefault();// this is null always, I know an APP service exists in this region
가능한 복제 [위아래 WebAPI와 나머지 API의 푸른 클라우드 서비스를 확장 할 수있는 방법] (http : // stackoverflow.com/questions/19197445/how-to-scale-azure-cloud-service-up-and-down-from-rest-api-with-webapi) –