public bool DeploymentExists(string rootPath, string inServiceName, string inSlot, string subscription) { string serviceName; string slot; InitializeArguments(rootPath, inServiceName, inSlot, subscription, out serviceName, out slot); try { GetStatus(serviceName, slot); return true; } catch (EndpointNotFoundException) { // Reaching this means there's no deployment with this slot // return false; } }