Skip to main content
The 2024 Developer Survey results are live! See the results
108

How to rename the function in the Azure Function Apps

Created
Active
Last edited
Viewed 401 times
1 min read
Part of Microsoft Azure Collective
1

Sometimes, renaming the function classes is required as that represents the meaningful name of the current version and the functionality of that class.

There is no inbuilt option for renaming the function class in the Azure Function app.

Still, there is a way to rename the function classes using the Console Option provided in the Azure Function App in the Azure Portal.

Implementation:

I have two Http Trigger Functions in Azure Function App:

enter image description here

To rename the function classes, it's a 2-step process:

  1. Go to the Console in the Azure Function App.

enter image description here

2. Syntax of renaming function class is: `ren <old_function_name> <new_function_name>`

enter image description here

That's it. Keep enjoying the Serverless Computing..!

7
  • Do you mean renaming the function when you do not have a source code? like directly on the portal? I may have not understood your question, but renaming a function with a source code is simple, you can rename and then you can change the attribute on the function definition and that's it.
    – Assil
    Commented Mar 22 at 19:55
  • If the function is having the source code, you can rename it. When you publish the functions to the function app in the portal, did you get rename option without going to the source code? @Assil Commented Mar 23 at 0:40
  • No, I am only aware of changing the name from the source control and that makes sense to keep things in sync.
    – Assil
    Commented Mar 23 at 18:02
  • Depends on the requirements and some may choose changing from the source control and some may choose from the portal. As a cloud engineer, we got the requirements from dev team to change the function names directly from the portal without touching source code. Commented Mar 24 at 2:12
  • How can I do the same but for an App Service? Will be very much appreciated. Thank you Commented Mar 28 at 11:51
  • @AnshumanKumar I didn't understand your requirement. Do you want to change the app service name or any files name deployed inside the app service? Commented Mar 29 at 3:23
  • Basically change the App Service name, but I have just redeployed and deleted the old one. Commented Apr 1 at 8:14