private <T> T validateIsInstanceOf(Class<T> clazz, Object toValidate, String error, Object... params) {
        if (!clazz.isAssignableFrom(toValidate.getClass())) {
            throw new IllegalArgumentException(String.format(error, params));
        }

        return clazz.cast(toValidate);
    }
It should redirect signer if the request is CreateBucketRequest or ListRegionalBucketsRequest with outpostId present
aws-java-sdk-s3control/src/main/java/com/amazonaws/services/s3control/internal/handlers/EndpointHandler.java