简体   繁体   English

使用本地数据网关的Azure自定义连接器的ARM模板

[英]ARM Template for Azure Custom Connector using On-Premises Data Gateway

I am trying to make an ARM Template for a Custom Connector which needs to have enabled the use of on-premises Data Gateway. 我正在尝试为自定义连接器制作一个ARM模板,该模板需要启用本地数据网关的使用。 I am getting everything right except this last requirement, since I create a fully configured Custom Connector, except for the fact that the check-mark for using the on-premises Data Gateway is not active. 除了最后一个要求之外,我一切正常,因为我创建了一个完全配置的自定义连接器,但使用本地数据网关的复选标记未激活这一事实除外。

Any idea which setting/element I need to add change to get this done? 知道我需要添加更改以完成此设置的哪个元素吗?

This is my template up to now: 到目前为止,这是我的模板:

{
    "type": "Microsoft.Web/customApis",
    "name": "[parameters('Connection_Name')]",
    "apiVersion": "2016-06-01",
    "location": "centralus",
    "scale": null,
    "properties": {
        "connectionParameters": {
            "authType": {
                "type": "string",
                "allowedValues": [
                    {
                        "value": "none"
                    }
                ],
                "uiDefinition": {
                    "displayName": "Authentication Type",
                    "description": "Authentication type to connect to your API",
                    "tooltip": "Authentication type to connect to your API",
                    "constraints": {
                        "tabIndex": 1,
                        "required": "true",
                        "allowedValues": [
                            {
                                "text": "none",
                                "value": "anonymous"
                            }
                        ],
                        "capability": [
                            "gateway"
                        ]
                    }
                }
            },
            "gateway": {
                "type": "gatewaySetting",
                "gatewaySettings": {
                    "dataSourceType": "CustomConnector",
                    "connectionDetails": []
                },
                "uiDefinition": {
                    "constraints": {
                        "tabIndex": 4,
                        "required": "true",
                        "capability": [
                            "gateway"
                        ]
                    }
                }
            }
        },
        "backendService": {
          "serviceUrl": "[parameters('ServiceUrl')]"
        },
        "apiType": "Soap",
        "wsdlDefinition": {
          "importMethod": "SoapPassThrough"
        },          
        "swagger": {
          "swagger": "2.0",
          "info": {
            "title": "SOAP pass-through",
            "description": "Custom Connector for SOAP Operation",
            "version": "1.0"
          },
          "host": "xxxxxxxxxxxxx",
          "basePath": "/xxxxxxxx/xxxxxxxxxx",
          "consumes": [],
          "produces": [],
          "paths": {
            "/": {
              "post": {
                "responses": {
                  "default": {
                    "description": "default",
                    "schema": {
                      "type": "string",
                      "title": "",
                      "x-ms-visibility": "important"
                    },
                    "headers": {
                      "Content-Type": {
                        "description": "Content-Type",
                        "type": "string"
                      }
                    }
                  }
                },
                "summary": "GetOrigins",
                "description": "GetOrigins",
                "operationId": "GetOrigins",
                "parameters": [
                  {
                    "name": "Content-Type",
                    "in": "header",
                    "required": false,
                    "type": "string"
                  },
                  {
                    "name": "body",
                    "in": "body",
                    "required": false,
                    "schema": {
                      "type": "string"
                    }
                  }
                ]
              }
            }
          },
          "definitions": {},
          "parameters": {},
          "responses": {},
          "securityDefinitions": {},
          "security": [],
          "tags": [],
          "schemes": [
            "http"
          ]
        },          
        "description": "[concat('Custom Connector for SOAP', parameters('Connection_Name'),' Operation')]",
        "displayName": "[parameters('Connection_Name')]",
        "iconUri": "/Content/retail/assets/default-connection-icon.6296199fc1d74aa45ca68e1253762025.2.svg"
    },      
    "dependsOn": []
}

To enable the 'On-Premises Data Gateway' option, you need to add gateway to the capabilities array like so: 要启用“本地数据网关”选项,您需要将网关添加到功能阵列,如下所示:

"properties" {        
    "capabilities": [
        "gateway"
    ],

}

the On-Premises Data Gateway option is not available from ARM templates, you must to install your template and manually add the check box from the Azure portal. “本地数据网关”选项在ARM模板中不可用,您必须安装模板并从Azure门户手动添加复选框。

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM