def generate_instance_identity_document(instance):
 document = {u'devPayProductCodes': None, u'availabilityZone': instance.placement[u'AvailabilityZone'], u'privateIp': instance.private_ip_address, u'version': u'2010-8-31', u'region': instance.placement[u'AvailabilityZone'][:(-1)], u'instanceId': instance.id, u'billingProducts': None, u'instanceType': instance.instance_type, u'accountId': u'012345678910', u'pendingTime': u'2015-11-19T16:32:11Z', u'imageId': instance.image_id, u'kernelId': instance.kernel_id, u'ramdiskId': instance.ramdisk_id, u'architecture': instance.architecture}
 return document

def generate_instance_identity_document ( instance ) : document = { u'devPayProductCodes' : None , u'availabilityZone' : instance . placement [ u'AvailabilityZone' ] , u'privateIp' : instance . private_ip_address , u'version' : u'2010-8-31' , u'region' : instance . placement [ u'AvailabilityZone' ] [ : ( - 1 ) ] , u'instanceId' : instance . id , u'billingProducts' : None , u'instanceType' : instance . instance_type , u'accountId' : u'012345678910' , u'pendingTime' : u'2015-11-19T16:32:11Z' , u'imageId' : instance . image_id , u'kernelId' : instance . kernel_id , u'ramdiskId' : instance . ramdisk_id , u'architecture' : instance . architecture } return document
URL a json file that describes an instance .