Reputation: 5787
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
Upvotes: 68
Views: 35170
Reputation: 72171
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.
Upvotes: 58
Reputation: 460
Go to Function Apps Click on platform features Click on app service editor Right click on your default function name-select
Upvotes: 25
Reputation: 27405
Below worked for me.
I wanted to rename my azure function from "HttpTriggerCSharp1" to "my-new-func1"
Go to
Function Apps >
My-Function-App >
Platform Features TAB >
Console >
Run below commands:
cd D:\home\site\wwwroot
move HttpTriggerCSharp1 my-new-func1
Now restart the application:
Function Apps >
My-Function-App >
Overview TAB >
Restart
NOTE: The function 'code' query param changes by doing this.
Upvotes: 10
Reputation: 1627
Now (2017.10) we can use console to rename the Azure Function name
Upvotes: 33
Reputation: 5950
Create a new function and you will have an option to name it, then delete the default one(HttpTriggerCSharp1).
I know it's not renaming, but the easiest option around.
Upvotes: 29