@Nullable public String getAvailabilityZone() {
        InstanceInfo instanceInfo = server.getInstanceInfo();
        if (instanceInfo.getDataCenterInfo() instanceof AmazonInfo) {
            return ((AmazonInfo) instanceInfo.getDataCenterInfo()).getMetadata().get("availability-zone");
        }
        return null;
    }
This convenience method exists for usage in tests. For production usage, please use the constructor linked:

@see DiscoveryResult#DiscoveryResult(DiscoveryEnabledServer, LoadBalancerStats)
zuul-discovery/src/main/java/com/netflix/zuul/discovery/DiscoveryResult.java