def _create_storage_profile(self):
if self.image_publisher:<EOL><INDENT>storage_profile = {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': self.image_publisher,<EOL>'<STR_LIT>': self.image_offer,<EOL>'<STR_LIT>': self.image_sku,<EOL>'<STR_LIT:version>': self.image_version<EOL>},<EOL>}<EOL><DEDENT>else:<EOL><INDENT>for image in self.compute.images.list():<EOL><INDENT>if image.name == self.image_id:<EOL><INDENT>image_id = image.id<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise AzureCloudException(<EOL>'<STR_LIT>'.format(self.image_id)<EOL>)<EOL><DEDENT>storage_profile = {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT:id>': image_id<EOL>}<EOL>}<EOL><DEDENT>return storage_profile<EOL>
Create the storage profile for the instance.

Image reference can be a custom image name or a published urn.