def api_url(self, **kwargs):
query = {<EOL>'<STR_LIT>': self.Operation,<EOL>'<STR_LIT>': "<STR_LIT>",<EOL>'<STR_LIT>': time.strftime(<EOL>"<STR_LIT>", time.gmtime()),<EOL>'<STR_LIT>': self.Version,<EOL>}<EOL>query.update(kwargs)<EOL>query['<STR_LIT>'] = self.AWSAccessKeyId<EOL>query['<STR_LIT>'] = time.strftime("<STR_LIT>",<EOL>time.gmtime())<EOL>if self.AssociateTag:<EOL><INDENT>query['<STR_LIT>'] = self.AssociateTag<EOL><DEDENT>service_domain = SERVICE_DOMAINS[self.Region][<NUM_LIT:0>]<EOL>quoted_strings = _quote_query(query)<EOL>data = "<STR_LIT>" + service_domain + "<STR_LIT>" + quoted_strings<EOL>if type(self.AWSSecretAccessKey) is unicode:<EOL><INDENT>self.AWSSecretAccessKey = self.AWSSecretAccessKey.encode('<STR_LIT:utf-8>')<EOL><DEDENT>if type(data) is unicode:<EOL><INDENT>data = data.encode('<STR_LIT:utf-8>')<EOL><DEDENT>digest = hmac.new(self.AWSSecretAccessKey, data, sha256).digest()<EOL>if sys.version_info[<NUM_LIT:0>] == <NUM_LIT:3>:<EOL><INDENT>signature = urllib.parse.quote(b64encode(digest))<EOL><DEDENT>else:<EOL><INDENT>signature = urllib.quote(b64encode(digest))<EOL><DEDENT>return ("<STR_LIT>" + service_domain + "<STR_LIT>" +<EOL>quoted_strings + "<STR_LIT>" % signature)<EOL>
The URL for making the given query against the API.