private void resolveHostForNonOutpostNonArnRequest(Request<?> request) {
        boolean isDualStackEnabled = isDualstackEnabled(request);
        boolean isFipsEnabledInClient = isFipsEnabledInClientConfig(request);

        validateIsTrue(!isDualStackEnabled || !isFipsEnabledInClient, "Dual stack and FIPS are not supported together.");

        if (isEndpointOverridden(request)) {
            validateIsTrue(!isDualStackEnabled, "Dual stack is not supported with endpoint overrides.");
            validateIsTrue(!isFipsEnabledInClient, "FIPS is not supported with endpoint overrides.");
        } else if (isDualStackEnabled) {
            String newEndpointPrefix = String.format("%s.%s", ENDPOINT_PREFIX, "dualstack");
            replaceHost(request, request.getEndpoint().getHost().replace(ENDPOINT_PREFIX, newEndpointPrefix));
        } else if (isFipsEnabledInClient) {
            String newEndpointPrefix = String.format("%s-%s", ENDPOINT_PREFIX, "fips");
            replaceHost(request, request.getEndpoint().getHost().replace(ENDPOINT_PREFIX, newEndpointPrefix));
        }
    }
{@link RequestHandler2} that modifies the endpoint to handle virtual addressing (account id hoisting),
Dual-Stack, and FIPS.
aws-java-sdk-s3control/src/main/java/com/amazonaws/services/s3control/internal/handlers/EndpointHandler.java