Azure functions

Local link: This is a continuation of work started on data factory

Azure functions developer guide is here

Tutorial: Deploying azure functions with vscode


\users\user\appdata\roaming\npmand
\users\user\appdata\roaming\npm\node_modules

//It also adds to the path
\users\user\appdata\roaming\npm

Incompatible node versions

nvm for windows


\i\nvm
\i\node-root

node version for azure functions

Search for: node version for azure functions


nvm list available

[error] Incompatible Node.js version. The version you are using is v12.13.0, but the runtime requires an LTS-covered major version (ex: 8.11.1 or 10.14.1). LTS-covered versions have an even major version number (8.x, 10.x, etc.) as per https://github.com/nodejs/Release#release-plan. For deployed code, change WEBSITE_NODE_DEFAULT_VERSION in App Settings. Locally, install or switch to a supported node version (make sure to quit and restart your code editor to pick up the changes).Hosting environment: Production

Some misbehavior seem to be related to restarting vscode

Otherwise it seem to add a whole lot of files to the .vscode of which there is only one at the root folder


//64 is the 64 bit version
nvm install 10.14.1 64

\root\v10.14.1

Introduction to azure functions is here

Securing an azure function is broached here

Securing it in prod an azure function is here

A broader introduction (marketing) to azure functions is here

azure pricing plan options are here

1. Consumption: You're only charged for the time that your function app runs. This plan includes a free grant on a per subscription basis.

2. Premium: Provides you with the same features and scaling mechanism as the Consumption plan, but with enhanced performance and VNET access.

3. Dedicated (App Service): When you need to run in dedicated VMs or in isolation, use custom images, etc.

How do I enable admin auth level on azure function app that is already deployed through vscode?

Search for: How do I enable admin auth level on azure function app that is already deployed through vscode?

1. Not able to find a place to make changes on line portal

2. I have changed it in the function.json

3. If I attempt to upload from the local azure function app, it seem to go ahead and create a new app!! thats not what I want

4. It seem to work if I locate the function app under an azure subscription (pointing to the server) still inside vscode and then them deploy. It warns it will overwrite. Not sure how vscode knows the connection between server and local function apps!!!

How to redeploy and azure function app from vscode?

Search for: How to redeploy and azure function app from vscode?

How to create multiple functions in a node.js function app in azure vscode?

Search for: How to create multiple functions in a node.js function app in azure vscode?

Why is only the master key working for azure functions?

Search for: Why is only the master key working for azure functions?

Azure function activity

Passing parameters for GET url via Azure Function Activity in adf v2

Passing parameters for GET url via Azure Function Activity in adf v2

Search for: Passing parameters for GET url via Azure Function Activity in adf v2

1. You may be tempted to use it from the function.json function name or as t is shown in the portal or in your vscode.

2. it should be taken instead from the portion of the function app url after the "api" segment

3. here is an example: https://tst-fapp-01-satya.azurewebsites.net/api/SatyaFapp01HttpTrigger

4. In the URL above the function name is SatyaFapp01HttpTrigger


//The body portion of the POST
{
   "name": "satya"
   "arg2": "some string value"
}

{
    //These are json given out
    "folder": "some-folder-name",
    "message": "This is from folder json",

    //These are added on by runtime
    "effectiveIntegrationRuntime": "DefaultIntegrationRuntime (Central India)",
    "executionDuration": 3,
    "durationInQueue": {
        "integrationRuntimeQueue": 0
    }
}

//Body attached to the output of a function
body: getFolderJson(req)

//Function returns a json
function getFolderJson(req)
{
    return {
        folder: "some-folder",
        message: "This is from folder json"
    }
    //orig-message = "Hello " + (req.query.name || req.body.name)
}

Do I need to stop an azure function app for billing purposes?

Search for: Do I need to stop an azure function app for billing purposes?

1. i have stopped an app, even though, i have the pricing model set to "consumption". Just in case

2. Then i was looking for the keys of this function to put them in a vault

3. Looks like when the app is stopped these options are not available. (looks like they are sub tabs on ONE of the functions. As the app has stopped, the functions are not visible)

4. when i restarted the app, i see the options ("Manage") to see the keys

5. It looks like it kept the previous keys between stop and start.

what is the difference between host keys, default keys, and master keys in azure functions

Search for: what is the difference between host keys, default keys, and master keys in azure functions

See this page on how to use azure key vault for securing an azure function