#NEWLINE# def generate_url( self , expires_in , method = 'GET' , headers = None , query_auth = True , force_http = False , response_headers = None , expires_in_absolute = False , version_id = None , policy = None , reduced_redundancy = False , encrypt_key = False ) : #NEWLINE# #INDENT# '\n        Generate a URL to access this key.\n\n        :type expires_in: int\n        :param expires_in: How long the url is valid for, in seconds\n\n        :type method: string\n        :param method: The method to use for retrieving the file\n                       (default is GET)\n\n        :type headers: dict\n        :param headers: Any headers to pass along in the request\n\n        :type query_auth: bool\n        :param query_auth:\n\n        :type force_http: bool\n        :param force_http: If True, http will be used instead of https.\n\n        :type response_headers: dict\n        :param response_headers: A dictionary containing HTTP headers/values\n                                 that will override any headers associated with\n                                 the stored object in the response.\n                                 See http://goo.gl/EWOPb for details.\n\n        :type expires_in_absolute: bool\n        :param expires_in_absolute: \n\n        :type version_id: string\n        :param version_id: The version_id of the object to GET. If specified\n                           this overrides any value in the key.\n\n        :type policy: :class:`boto.s3.acl.CannedACLStrings`\n        :param policy: A canned ACL policy that will be applied to the\n                       new key in S3.\n\n        :type reduced_redundancy: bool\n        :param reduced_redundancy: If True, this will set the storage\n                                   class of the new Key to be\n                                   REDUCED_REDUNDANCY. The Reduced Redundancy\n                                   Storage (RRS) feature of S3, provides lower\n                                   redundancy at lower storage cost.\n\n        :type encrypt_key: bool\n        :param encrypt_key: If True, the new copy of the object will\n                            be encrypted on the server-side by S3 and\n                            will be stored in an encrypted form while\n                            at rest in S3.\n\n        :rtype: string\n        :return: The URL to access the key\n        ' #NEWLINE# provider = self . bucket . connection . provider #NEWLINE# version_id = ( version_id or self . version_id ) #NEWLINE# if ( headers is None ) : #NEWLINE# #INDENT# headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# headers = headers . copy ( ) #NEWLINE# #UNINDENT# if policy : #NEWLINE# #INDENT# headers [ provider . acl_header ] = policy #NEWLINE# #UNINDENT# if reduced_redundancy : #NEWLINE# #INDENT# self . storage_class = 'REDUCED_REDUNDANCY' #NEWLINE# if provider . storage_class_header : #NEWLINE# #INDENT# headers [ provider . storage_class_header ] = self . storage_class #NEWLINE# #UNINDENT# #UNINDENT# if encrypt_key : #NEWLINE# #INDENT# headers [ provider . server_side_encryption_header ] = 'AES256' #NEWLINE# #UNINDENT# headers = boto . utils . merge_meta ( headers , self . metadata , provider ) #NEWLINE# return self . bucket . connection . generate_url ( expires_in , method , self . bucket . name , self . name , headers , query_auth , force_http , self , expires_in_absolute , version_id )