Tezza
Tezza

Reputation: 282

Can you edit a Logic App custom connector? and how does one deploy then maintain (update)

I created a logic app custom connector successfully (via the portal, not ARM) and it's in use (demo) working fine. It's a wrapper for an azure function but to provide better usability up front to less tech savy users i.e. expose properties VS providing json.

Any how once created my query is a simple one. Can it be edited 1. in the portal? 2. via ARM (if it was created by arm)? i.e. I want to add a better icon.

When I view the logic apps custom connector though in the portal and click EDIT all it does is populate the Connector Name and no more. See below. All original configuration, paramaters etc is missing.

So my queries.

  1. Is this the norm?
  2. On export of the custom connector (azure portal menu item) the template really has nothing in it. No content either of the connector details?
  3. Is there an ARM template to deploy this?
  4. If yes to 3, how do you go about modifying in the scenario you have to?
  5. I also understand in using it in a logic app it created an API Connection reference. Does this stand alone, almost derived off the customer connector? And further uses say of a modified connector would create different API connections?

I feel I'm just missing some of the basic knowledge on how these are implemented. which in turn would explain the deploying, and maintenance.

Anyone :) ?

EDIT: Think I've come to learn the portal is very buggy. The swagger editor loaded no content either and broke the screen. I've since tried a simpler connector i.e. no sample markup with escaped regex patterns and it seems to like going back into it to edit :) (Maybe one to report as a bug after all this)

That said then - Yes, edit should be possible but the other queries regarding ARM, export, redeploy and current connections still stands :)

enter image description here

Upvotes: 0

Views: 1725

Answers (1)

Mandar Dharmadhikari
Mandar Dharmadhikari

Reputation: 1119

You can deploy the Logic apps custom connector really easily. You need to do following steps

  1. Configure you custom connector with proper settings and update it.

  2. Once updated, click on the download link available at the top of the connector. enter image description here

  3. Download the ARM template skeleton using the Export Template.

  4. In the properties section, just add a new property called swagger and paste the swagger you downloaded in step 2.

  5. Parameterise your ARM template

  6. Deploy using your choice of deployment using Azure DevOps , PowerShell etc. Please refer to following ARM template for your perusal.

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "customApis_tempconnector_name": {
      "defaultValue": "tempconnector",
      "type": "String"
    }
  },
  "variables": {},
  "resources": [
    {
      "type": "Microsoft.Web/customApis",
      "apiVersion": "2016-06-01",
      "name": "[parameters('customApis_tempconnector_name')]",
      "location": "australiaeast",
      "properties": {
        "connectionParameters": {
          "api_key": {
            "type": "securestring",
            "uiDefinition": {
              "displayName": "API Key",
              "description": "The API Key for this api",
              "tooltip": "Provide your API Key",
              "constraints": {
                "tabIndex": 2,
                "clearText": false,
                "required": "true"
              }
            }
          }
        },
        "backendService": {
          "serviceUrl": "http://petstore.swagger.io/v2"
        },
        "description": "This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.",
        "displayName": "[parameters('customApis_tempconnector_name')]",
        "iconUri": "/Content/retail/assets/default-connection-icon.e6bb72160664a5e37b9923c3d9f50ca5.2.svg",
        "swagger": { "Enter Swagger Downloaded from Step 2 here" }
      }
    }
  ]

}

Upvotes: 1

Related Questions