From d153580b17f6f7665ba040132a60bde56e4c45b9 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 5 Jan 2017 14:09:49 -0800 Subject: [PATCH] Fix traffic manager sample --- .../samples/ManageWebAppWithTrafficManager.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/appservice/samples/ManageWebAppWithTrafficManager.java b/azure-samples/src/main/java/com/microsoft/azure/management/appservice/samples/ManageWebAppWithTrafficManager.java index a1fe8759924ae..6cc041aad4f85 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/appservice/samples/ManageWebAppWithTrafficManager.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/appservice/samples/ManageWebAppWithTrafficManager.java @@ -186,21 +186,18 @@ public static void main(String[] args) { .define(tmName) .withExistingResourceGroup(RG_NAME) .withLeafDomainLabel(tmName) - .withTrafficRoutingMethod(TrafficRoutingMethod.WEIGHTED) + .withTrafficRoutingMethod(TrafficRoutingMethod.PRIORITY) .defineAzureTargetEndpoint("endpoint1") .toResourceId(app1.id()) + .withRoutingPriority(1) .attach() .defineAzureTargetEndpoint("endpoint2") .toResourceId(app2.id()) + .withRoutingPriority(2) .attach() .defineAzureTargetEndpoint("endpoint3") .toResourceId(app3.id()) - .attach() - .defineAzureTargetEndpoint("endpoint4") - .toResourceId(app4.id()) - .attach() - .defineAzureTargetEndpoint("endpoint5") - .toResourceId(app5.id()) + .withRoutingPriority(3) .attach() .create();