How to rename an Azure Function?
I want to replace a default 'HttpTriggerCSharp1' name to my own. At the moment unfortunately this name is included in the function url and there is no option to change it:
https://functions-xxx.azurewebsites.net/api/HttpTriggerCSharp1
Renaming an Azure function:To rename it we first need to click on the “Platform features”. Closer to the bottom, which says “Development Tools,” we need to select “Console.” Now, because this Azure function is being hosted on a Windows machine, We can get access to the Windows command line.
In the Azure portal, browse to your function app. Under Settings, choose Configuration. In the Function runtime settings tab, locate the Runtime version. Note the specific runtime version.
Answer is No, you can not rename the app service plan once it is created. Alternatively, you can create a new app service plan in the same region and same resource group where your web app exists and then remap your web app to a new app service plan and delete the old one.
The UI does not directly support renaming a Function, but you can work around this using the following manual steps:
Github Issue for renaming Azure Function
To anyone like myself that arrived here looking to rename their function, despite this being the previously correct answer, there is now a much smoother CMD based process as detailed in this answer by SLdragon and an even smoother GUI based process detailed in this answer by Amerdeep below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With