private static function getServiceEndpoint(
        $scheme,
        $accountName,
        $dnsPrefix,
        $dnsSuffix = null,
        $isSecondary = false
    ) {
        if ($isSecondary) {
            $accountName .= Resources::SECONDARY_STRING;
        }
        if ($dnsSuffix === null) {
            $dnsSuffix = Resources::DEFAULT_ENDPOINT_SUFFIX;
        }
        return sprintf(
            Resources::SERVICE_URI_FORMAT,
            $scheme,
            $accountName,
            $dnsPrefix.$dnsSuffix
        );
    }