private String calculateStringToSignV2(SignableRequest<?> request) throws SdkClientException {
        URI endpoint = request.getEndpoint();

        StringBuilder data = new StringBuilder();
        data.append("POST")
            .append("\n")
            .append(getCanonicalizedEndpoint(endpoint))
            .append("\n")
            .append(getCanonicalizedResourcePath(request))
            .append("\n")
            .append(getCanonicalizedQueryString(request.getParameters()));
        return data.toString();
    }
Calculate string to sign for signature version 2.

@param request
           The request being signed.

@return String to sign

@throws SdkClientException
            If the string to sign cannot be calculated.
aws-java-sdk-core/src/main/java/com/amazonaws/auth/QueryStringSigner.java