Monitor local Azure Functions? - azure

Is it possible to get Information out of the Azure function SDK?
For example the Function URI. Or the count of Functions running local.
Somthing like Swagger for local Azure Functions would be the goal.
Thanks for your help.

I remember trying to use something similar to swashbuckle for Azure Functions, but there was no easy way to integrate it. This may help: AzureFunction Swagger Definition Generator

Azure Function's OpenAPI 2.0 support may provide some of the functionality you are desiring. Note that as of April 2018, it is still in preview.

Related

Custom connector not found in Azure logic app(Standard)

I added a logic app custom connector resource to connect to on premise HTTP API. But I'm not able to find it in logic app actions,
I tried creating consumption logic app and it showed up there.
Not getting in standard logic app for some reason. I tried searching with different keywords like custom connector and name of connectors. No results. Also tried to include this action from code view . It got added, but the logic app stops after executing trigger only.
Both my connector and logic app are in same region as per documentation. Can someone let me know why it is not showing up in standard logic app actions?
Currently we don’t support invoking the customer connector from Logic App standard. This is something product team are planning to support but no ETA yet.
Custom managed connectors currently aren't currently supported.
As Mayank mentioned, custom connectors are not yet supported for Logic app standard version. Couple of possible workaround solutions are:
1.Try built-in connector extensibility - https://techcommunity.microsoft.com/t5/integrations-on-azure/azure-logic-apps-running-anywhere-built-in-connector/ba-p/1921272
2.Use a consumption logic app for integrating custom connectors and invoke it from your standard logic app.
Custom connector support is coming soon to Logic Apps Standard.
By creating a new custom connector and manually adding it to the connection json and manually crafting the workflow code view you can make this work today. Once you do this some of the UI will work, full support coming soon.

How to create F# azure function

Trying to create azure function in F# in the azure portal.
Selected .net as a runtime in function app settings, and now when I create new function C# one got created by default and there is no way to select or change language.
Azure Functions 2.x doesn't currently support .fsx scripts because of issues with F# Interactive and .NET Core, which means you can't add F# functions via the portal. It does support compiled F# though, so you can still use F# via Visual Studio, VS Code or the CLI.
"Starting with version 2.x of the Azure Functions runtime, all functions in a function app must be authored in the same language."
Quote from MS Azure function documentation
https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference
If possible delete function app and recreate then you can have options for f#
if you want to create an F# function, all you have to do is manually delete the FUNCTIONS_WORKER_RUNTIME App Setting from your app, and refresh the portal.
once you do this you can go to runtime v1 and select the language of your choice
the portal should look like this once you perform the above steps.

how to create Azure Functions from Azure python sdk?

Any examples on how to create Azure Functions with Azure Python SDK ?
is https://learn.microsoft.com/en-us/python/api/azure.mgmt.web.models.Site?view=azure-python a correct reference for it?
Explicit examples, at my knowledge there is not. But it's definitely using the azure-mgmt-web package you point at. You need to create an AppPlan (or serverfarm), and then a webapp of kind "functionapp".
The closest to an example would probably to look at what the Azure CLI (written in Python) is doing:
https://github.com/Azure/azure-cli/blob/e0c49d6fd4778b8e0c8884a54bca1716a916763e/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/custom.py#L1613-L1684

Is it possible to stop/start an Azure ARM Virtual Machine from an Azure Function?

Runbooks can be used to stop/start classic and ARM Virtual Machines in Azure.
Is this also possible from an Azure Function?
Some good news to update this thread. You will be able to do that now in Azure Functions. The steps are documented here based on HTTP-triggered Functions.
Azure Function role like permissions to Stop Azure Virtual Machines
You may switch out the trigger type to fit your use-case.
See Ling's response above. We've addressed this now. :)
It's not currently possible to do this via the Azure PowerShell commandlets in Azure Functions. You can write against the Azure C# SDK or use the x-plat CLI (if you bring it yourself, as it isn't installed by default). You'll need to upload a cert or use a service account to perform those actions.
FYI - I'm on the Functions team and we're working on improving this story, in the near future. I'll update this answer once it's been made possible.
You can either use the Azure REST API from here -> Docs or make use of the SDK to do the operations.

Use blob-leasing feature in the Azure cloud app

I want to use blob-leasing mechanism in my Windows Azure cloud app. I am using the StorageClient api released by Azure team for my blob transactions. However, the blob-leasing is not implemented in the StorageClient api and hence I need to implement it on my own.
Has anyone done this before and has any pointers on how to do it?
Thanks.
Kapil
See my recent blog post (including sample code) about how to do this: http://blog.smarx.com/posts/leasing-windows-azure-blobs-using-the-storage-client-library

Resources