A simple hello world Azure Stack Function

To provide a smart overview how Azure Stack Functions work and how to use them, a simple hello world function is described here.

To start, you just have to deploy the corresponding Function App:

For being deployed, you will have to set a unique name and a storage account. After it has been deployed, you can set your function type:

And now you can start writing your code:

In the function detail, you will find the following view:

As you can see, you can define the Triggers, the Inputs, and the Outputs:

You can write the code for your function in a language of your choice and save the code and configuration files in the same folder. The JSON configuration data is being named function.json. It defines the bindings and other configuration settings. The function uses this file to determine how to send data into and return it from function execution.

This is a sample JSON file:

The code for the functions in a defined Function App has to be saved in a root folder that contains a host configuration file and some subfolders, and in each of them, a separate function can live:

The host.json file is the file for runtime-specific configuration and it is saved in the root folder of the Function App. Each function has a folder that contains the code files and function.json contains the configuration and other dependencies.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.146.134