Azure functions

satya - 11/9/2019, 10:16:08 AM

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

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

satya - 11/9/2019, 10:19:09 AM

Azure functions developer guide is here

Azure functions developer guide is here

satya - 11/9/2019, 10:40:23 AM

Tutorial: Deploying azure functions with vscode

Tutorial: Deploying azure functions with vscode

satya - 11/9/2019, 10:42:07 AM

Where does npm install crap on windows by default


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

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

satya - 11/9/2019, 12:05:30 PM

Incompatible node versions

Incompatible node versions

satya - 11/9/2019, 4:43:04 PM

nvm for windows

nvm for windows

satya - 11/9/2019, 4:43:25 PM

My installation of nvm so far


\i\nvm
\i\node-root

satya - 11/9/2019, 4:46:02 PM

node version for azure functions

node version for azure functions

Search for: node version for azure functions

satya - 11/9/2019, 4:46:19 PM

Show list of available node versions


nvm list available

satya - 11/9/2019, 5:41:34 PM

An error I see often

[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

satya - 11/9/2019, 5:42:04 PM

Some misbehavior seem to be related to restarting vscode

Some misbehavior seem to be related to restarting vscode

satya - 11/9/2019, 5:43:02 PM

Put a function app in its own repo and root folder

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

satya - 11/9/2019, 5:45:32 PM

Installing 10.14.1


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

satya - 11/9/2019, 5:50:16 PM

it installed it in


\root\v10.14.1

satya - 11/11/2019, 4:21:31 PM

Introduction to azure functions is here

Introduction to azure functions is here

satya - 11/11/2019, 4:26:35 PM

Securing an azure function is broached here

Securing an azure function is broached here

satya - 11/11/2019, 4:36:04 PM

Securing it in prod an azure function is here

Securing it in prod an azure function is here

satya - 11/11/2019, 6:01:56 PM

A broader introduction (marketing) to azure functions is here

A broader introduction (marketing) to azure functions is here

satya - 11/11/2019, 6:03:53 PM

azure pricing plan options are here

azure pricing plan options are here

satya - 11/11/2019, 6:05:03 PM

Briefly

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.

satya - 11/11/2019, 6:28:21 PM

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

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?

satya - 11/11/2019, 6:30:47 PM

Notes

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!!!

satya - 11/11/2019, 6:31:01 PM

How to redeploy and azure function app from vscode?

How to redeploy and azure function app from vscode?

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

satya - 11/11/2019, 6:31:32 PM

How to create multiple functions in a node.js function app in azure 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?

satya - 11/12/2019, 9:57:21 AM

Why is only the master key working for azure functions?

Why is only the master key working for azure functions?

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

satya - 11/13/2019, 9:59:41 AM

Azure function activity

Azure function activity

satya - 11/13/2019, 10:14:06 AM

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

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

satya - 11/13/2019, 10:14:18 AM

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

satya - 11/13/2019, 10:52:41 AM

So the function name is misleading the function activity settings

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

satya - 11/13/2019, 10:54:07 AM

Also GET won't work. It has to PUT when calling form the data factory


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

satya - 11/13/2019, 11:25:01 AM

Output of a function activity may look like this


{
    //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
    }
}

satya - 11/13/2019, 11:26:44 AM

Output of the function as a json inside the function body


//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)
}

satya - 11/21/2019, 10:29:45 AM

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

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?

satya - 11/21/2019, 10:32:43 AM

When I stopped an app, ....

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.

satya - 11/21/2019, 10:33:13 AM

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

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

satya - 11/21/2019, 11:14:36 AM

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

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