How do I find the supported parameterValues for a general Azure API connection? - azure

I'm having a problem similar to this one. I'm attempting to deploy an API connection via an ARM template, and I'm getting 'ParameterNotDefined' errors when I deploy.
However, instead of creating an API connection to an azure table, I'm connecting to an azure queue.
Instead of getting a specific answer, I'd like guidance on how I can use documentation or other methods to answer this myself: I'm unable to find documentation on the existing APIs that are supported via the "MICROSOFT.WEB/CONNECTIONS" type, as well as the associated 'parameterValues' that each API expects you to supply.
Searching for a solution here is quite difficult because the terms are very overloaded. Here's what I've already tried:
I've tried using the Azure Resource Explorer, but it looks like this browses resources, not available APIs. If I can use it to view APIs, it's not clear how.
I've browsed through samples on the azure quickstart project. I see examples for azure blobs but not queues.
I've read some documentation on this page about creating API connections for logic apps. This appears relevent, and the author mentions making GET requests to "https://management.azure.com/.../" to view API details, but I get authorization header errors when doing this and I'd hope I can get documentation without operating this low on the stack.
I'm going to be creating a lot of API connections with logic apps in the near future and I need a more sophisticated method of discovery then google-searches, stack-overflow, and reuse of code samples. How do I view the entire set of API connections, along with the supported 'parameterValues' that are to be used with each one?

You can use ARMClient to retrieve the needed paremeters.
armclient.exe get https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{region}/managedApis/{Api}?api-version=2016-06-01
For more information https://www.bruttin.com/2017/06/13/deploy-logic-app-with-arm.html

For anyone, checking it now, you can create the Api Connection manually and check the JSON View of it, it contains all the parameters.

Related

How to add HTTP trigger in Azure Logic Apps

I want add a functionality in my ADF pipeline which will send me email notification in case of failure. On searching the internet, I came to know that Azure Logic Apps helps with this. I am trying to follow below link to achieve this.
https://microsoft-bitools.blogspot.com/2018/03/add-email-notification-in-azure-data.html
I have tried searching up many tutorials, guides and the official docs as well. However, all of them have some templates already there in the Logic Apps Designer. I cannot find the templates and the 'When a HTTP request is received' trigger is also not available in the drop-down.
Please let me know how to proceed.
EDIT :
If you start with a blank Logic App, search for 'HTTP' or 'Request' and select Request.
On the next screen under triggers, select "When a HTTP request is received" and you should be good to go.
EDIT:
It looks like you created a Standard Logic App, which works in a slightly different way. For instance it can contain multiple workflows, which means you create workflows yourself. In the Consumption model, there's one workflow withing a Logic App, so you can open up the editor for that one directly. If there's no explicit reason for you to use Standard, a Consumption Logic App will be easier to work with.
If you really need a Standard Logic App, go to 'Workflows' and create a new workflow:
Then click the newly created workflow to edit it, go to 'Designer' and search for 'HTTP' to add an HTTP trigger:
Here's some information on the Consumption model for Logic Apps:
Resource type
Benefits
Resource sharing and usage
Limits management
Logic App (Consumption) Host environment: Multi-tenant Azure Logic Apps
- Easiest to get started - Pay-for-what-you-use - Fully managed
A single logic app can have only one workflow. Logic apps created by customers across multiple tenants share the same processing (compute), storage, network, and so on.
Azure Logic Apps manages the default values for these limits, but you can change some of these values, if that option exists for a specific limit.
See Resource type and host environment differences for a comparison with the other hosting options.
I was able to solve this. I wasn't able to view a few functionalities because of another error : Functions runtime error Microsoft.WindowsAzure.Storage: Value cannot be null. (Parameter 'connectionString').
AzureWebJobsStorage App Setting was missing which caused the error. I added that and now I can see the triggers and other stuff.
Thanks #rickvdbosch

Posting data to Salesforce from an Azure Function (Is there a connector?)

I've been searching for some time now for a way to interact with our Salesforce org easily through Azure functions and have been coming up dry. I guess where I am confused is that through Azure Logic Apps I can pretty simply connect into Salesforce and post data through them and I assume on their backend they must have some sort of built in connector to Salesforce.
Is this a package somewhere that I can utilize in Azure functions? This would simplify so much of what we are trying to accomplish with some of our integrations.
There isn't a built in Salesforce binding for Azure Functions, but one option you do have is to invoke your Logic Apps workflow from Azure Functions with the relevant payload, which would allow you to leverage all the built in connectors they have.
You don't really need any fancy connector.
For most use cases, you can use the Salesforce REST API:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest.htm
You can use Postman to test this API and get code samples which could easily be adapted to your Function App:
https://www.postman.com/salesforce-developers/workspace/salesforce-developers/collection/12721794-67cb9baa-e0da-4986-957e-88d8734647e2?ctx=documentation
But be careful!
Salesforce limits your API calls and it is very easy to blow these limits.
The naïve approach would be to post one record at a time. Instead, try to collect as many records as possible and post them all at once.
If Salesforce does not need the data immediately, you can build a cache that will store data somewhere else (e.g. a MongoDb) and then periodically forward the data to Salesforce after it has been allowed to accumulate to some threshold quantity and/or a certain amount of time has elapsed.

Using Azure WebJobs for on demand responses

I currently have a couple of WebApi projects that use a few class libraries such as address lookup, bank validation, image storage etc.
Currently they are all in a shared solution but I'm planning to split them up. I thought about moving the libraries into NuGet packages so that they are separate from the API projects and is properly shared.
However, if I make a change to one of these components I will need to build and redeploy the API service even though it's a separate component which has changed.
I thought about putting these components into a separate service but seems a bit of overhead for what it is.
I've been looking at Azure WebJobs and think I may be able to move these components into this instead. I have two questions related to this:
Are WebJobs suitable for calling on demand (not using a queue)? The request will be activated from a user on a web site which calls my API service which then calls the Web Job so it needs to be quick.
Can a WebJob return data? I've seen examples where it does some processing and updates a database but I need a response (ideally Json) back to my API service.
Thanks
According to your requirement, I assume that you could try to leverage Azure Functions by creating a function using the HTTP trigger, which could be triggered by accessing the Function URL with parameters and return the response as you expected. You could follow this tutorial for getting started with Azure Functions.

Does azure provide a REST API for databases? Or do I have to write my own?

We need to write a very quick web application hosted on azure. Backed by sql database. I kind of hoping we don't need to start creating a full webapi project with visual studio - routing, EF etc. It would be great if azure could provide a rest api for my database.
I think dreamfactory might be doing this. But I tried to use their free trial but it didn't allow sql server unless you sign up.
I would have thought this would be a standard requirement for small apps.
If what you mean by "rest API for my database" is the possibility to use JSON documents against it, then you should definitely look at documentDB
It provides:
JSON based document access and indexing,
Low latency & scaling,
Support for mongoDB driver
To complement this answer, DocumentDB is also capable to be accessed using client-side JS as shown here but only with specific Windows 8/10 sdks
So bottom line is: DocumentDB can't be directly accessed.
If DocumentDB serves your purpose and CORS is the only issue then you can use Azure API Management as a gateway between ui/js and back-end DocDB. CORS can be enabled at APIM with a policy expression.
https://azure.microsoft.com/en-us/services/api-management/
https://msdn.microsoft.com/library/azure/7689d277-8abe-472a-a78c-e6d4bd43455d#CORS

What information can we collect from the service bus?

My problem is a simple one. I'm working on a project that uses the service bus from Microsoft Azure to send messages asynchronously between different modules on different virtual machines. And a lot of messages are sent through this bus, so we want to have some indicators about it's performance and other usage information. Why? Because when everything is working, users are happy. When the system is slow, we want to show the user some interesting graphs, statistics, meters and other gadgets to give them an indication if there's a problem within Azure or with something else. And to do this, I need data about the usage of the Azure service bus.
So, which Azure API's are available to display what kind of (diagnostic) information about the service bus?
(Users should have no access to Azure itself! They should just see some performance data to re-assure them Azure is working fine. Or else I could look at it and discover some problem with it, fix it and then make users happy again.)
To elaborate what I'm looking for, the Azure website has some nice chart when you click the Monitor of the Azure bus showing you overviews of the number of incoming messages, the number of errors and their types, size information and the number of succesful operations, all based on a specified period. It would be nice if I could receive this data within my project.
The entity metrics API will give you the exact data the portal is using:
http://msdn.microsoft.com/en-us/library/windowsazure/dn163589.aspx
Here's a Subscribe! episode I recorded with Rajat on the topic http://channel9.msdn.com/Blogs/Subscribe/Service-Bus-Namespace-Management-and-Analytics
I've spent quite some time to make the entity metrics API work, so I decided to share the results.
Here is a full C# code example of how to consume those API:
github repository.
It's a small library which wraps the HTTP request into strongly typed .NET classes. You can also grab it from NuGet.
Finally, here is my blog post with the walkthrough.

Resources