Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.24k stars 4.58k forks source link

How does one create API connections needed for Logic apps? #33064

Closed gorygregory closed 1 year ago

gorygregory commented 1 year ago

Library name and version

Azure.ResourceManager.Logic.1.0.0

Query/Question

How does one go about creating the connections needed to provision a logic app using this nuget package? I don't see any ways to do that using this nuget. None of the other Azure.ResourceManager.* nuget packages seem to expose this capability.

In general, the documentation for creation of LogicApps using this SDK is fairly lacking in samples/examples. It would be good to have common connections to event hub/service bus etc.. documented with all their authentication types.

Environment

No response

ArthurMa1978 commented 1 year ago

Thank you for your feedback, @HarveyLink please help on this question.

dvbb commented 1 year ago

The SDK(Rest API) Azure.ResourceManager.Logic does not support creating a connection with event hubs or other resources. Although CreateOrUpdate method allows adding definition payload, the definition only allows an existing connection like that:

{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {},
    "triggers": {},
    "actions": {
      "Response": {},
      "Send_event": {
        "runAfter": {
          "Response": [
            "Succeeded"
          ]
        },
        "type": "ApiConnection",
        "inputs": {
          "host": {
            "connection": {
              "name": "@parameters('$connections')['eventhubs']['connectionId']"
            }
          },
          "method": "post",
          "path": "/@{encodeURIComponent('hub1')}/events"
        }
      }
    },
    "outputs": {}
  }
}
ghost commented 1 year ago

Hi, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!