public static CloudAccount from(String cloudAccount) {
        int index = cloudAccount.indexOf(':');
        if (index < 0) {
            // Tenants are allowed to specify "default" in services.xml.
            if (cloudAccount.isEmpty() || cloudAccount.equals("default"))
                return empty;
            if (META_BY_CLOUD.get("aws").matches(cloudAccount))
                return new CloudAccount(cloudAccount, CloudName.AWS);
            if (META_BY_CLOUD.get("gcp").matches(cloudAccount)) // TODO (freva): Remove July 2024
                return new CloudAccount(cloudAccount, CloudName.GCP);
            throw illegal(cloudAccount, "Must be on format '<cloud-name>:<account>' or 'default'");
        }

        String cloud = cloudAccount.substring(0, index);
        String account = cloudAccount.substring(index + 1);
        CloudMeta cloudMeta = META_BY_CLOUD.get(cloud);
        if (cloudMeta == null)
            throw illegal(cloudAccount, "Cloud name must be one of: " + META_BY_CLOUD.keySet().stream().sorted().collect(Collectors.joining(", ")));

        if (!cloudMeta.matches(account))
            throw illegal(cloudAccount, cloudMeta.accountType + " must match '" + cloudMeta.pattern.pattern() + "'");
        return new CloudAccount(account, CloudName.from(cloud));
    }
Returns true if this is an enclave account.
config-provisioning/src/main/java/com/yahoo/config/provision/CloudAccount.java