}
protected String initAppId(String appid, AppConfig appConfig) throws IOException {
try {
String appId = null;
BeesClient client = getBeesClient(BeesClient.class);
BlueGreenSettings blueGreenSettings = BlueGreenSettings.getInstance(client, getAccount(), getName());
// Get the app1 alias
ApplicationInfo applicationInfo = client.applicationInfo(blueGreenSettings.getApplication1());
String aliases = applicationInfo.getSettings().get("aliases");
ApplicationAlias application1 = new ApplicationAlias(getAccount(), blueGreenSettings.getApplication1(), aliases);
// If the app1 has the alias already, deploy to the other app
if (application1.containAliases(blueGreenSettings.getActiveAliases())) {