'Sign Aliyun requests parameters and get the signature.
StringToSign = HTTPMethod + \'&\' +
percentEncode(\'/\') + \'&\' +
percentEncode(CanonicalizedQueryString)'

def _sign_request(self, params, method, path):

    keys = list(params.keys())
    keys.sort()
    pairs = []
    for key in keys:
        pairs.append(('%s=%s' % (_percent_encode(key), _percent_encode(params[key]))))
    qs = urlquote('&'.join(pairs), safe='-_.~')
    string_to_sign = '&'.join((method, urlquote(path, safe=''), qs))
    b64_hmac = base64.b64encode(hmac.new(b(self._get_access_secret()), b(string_to_sign), digestmod=hashlib.sha1).digest())
    return b64_hmac.decode('utf8')
