Advertisements
Home > Azure > Azure – Create and Rename a Function

Azure – Create and Rename a Function

Other day I was exploring Azure ‘Functions’ and had a tough time to rename the ‘Function’.

Below are the steps to create and rename Azure ‘Function’

What is an Azure Function:

Azure Function is a serverless compute service that enables you to run code on-demand without having to explicitly provision or manage infrastructure.

AzFunc_1

In simpler words, you can run your code with no Development/Hosting environment. All you need to do is start coding in ‘Azure Function’ editor like you code in Visual Studio, you can even refer external .dlls.

Steps to create Function:

  • Connect to your Azure Portal (http://portal.azure.com)
  • Create a new “Function App”
    • I named it as ‘AzrFunc’
  • Under the “Function App”, add a new ‘Function’ of type “Webhook + API”

AzFunc_3

  • Now a ‘Function’ will get created with a default name “HttpTriggerCSharp1”

AzFuncRename_1

Steps to rename a Function:

There is no rename option in UI to change the ‘Function’ name and you have to use ‘Console’ from “Platform features -> Development Tools”

  • Open the Console

AzFuncRename_3

  • Type command “ls” which lists out your function name
  • Use command “rename” to change the Function name
    • Syntax: rename <old_name> <new_name>
      • I renamed function to ‘WhoAmI’

AzFuncRename_4

  • Restart the ‘Function App’

AzFuncRename_6

  • Refresh your “Function App”, to see the change

AzFuncRename_5

Refer documentation to learn more about ‘Azure Functions’

🙂

Advertisements
Categories: Azure Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: