Let’s assume you have started experimenting with Azure Functions and, for your first app, you have chosen the Azure Portal as your development environment.
You have created a new Azure Function by clicking the Plus icon next to your Azure Function name, selected In-portal from the first step of the wizard, and from the second screen you picked the Webhook + API option and clicked on the Create button at the bottom.
Your Azure Function was ready to use, however the name was set to HttpTrigger1
and the Function URL looked like this `https://gab-demo-athens-2019.azurewebsites.net/api/HttpTrigger1?code=9Nz10jQrgbbkjV5RRAUtWeBFgEgHAt14wxtyImge2NNsA6fVID2L5g==`.
Trying to find a way to rename your function might not be that obvious and to do so, the `Console` tab, from the bottom of the screen, comes to the rescue.
So, you can rename your Azure function in the Azure Portal by following the next steps:
- From the bottom toolbar, click on the Console tab,
- Type
cd ..
to the parent folder in the command prompt, - Rename the folder of your Azure Function, using a
ren
command, like: `ren HttpTrigger1 Hello`, and - Refresh the page of the Azure Portal
Your function will have the new name and you can give it a try using the Test tool from the right sidebar.
what about renaming the function app itself?
Renaming an Azure Function App is not possible at the moment. The best way to do so is to create a new function app and redeploy your code or copy the contents of your old one to the new one using Kudu console or the terminal.