def _create_public_ip(self, public_ip_name, resource_group_name, region):
public_ip_config = {<EOL>'<STR_LIT:location>': region,<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL>try:<EOL><INDENT>public_ip_setup =self.network.public_ip_addresses.create_or_update(<EOL>resource_group_name, public_ip_name, public_ip_config<EOL>)<EOL><DEDENT>except Exception as error:<EOL><INDENT>raise AzureCloudException(<EOL>'<STR_LIT>'.format(error)<EOL>)<EOL><DEDENT>return public_ip_setup.result()<EOL>
Create dynamic public IP address in the resource group.