簡體   English   中英

使用ARM模板使用swagger鏈接更新Azure Api Managment中的操作

[英]Update operations in Azure Api Managment with swagger link using ARM template

我想使用ARM模板更新帶有swagger鏈接的API的操作。 當我運行以下ARM模板時,我收到錯誤

“error”:{“code”:“InvalidRequestContent”,“message”:“請求內容無效且無法反序列化:'無法在類型'DeploymentPropertiesDefinition'的對象上找到成員'dependsOn'。路徑'properties.dependsOn ',第1行,第734位。'。“

https://docs.microsoft.com/en-us/azure/templates/microsoft.apimanagement/2018-06-01-preview/service/apis

{
    "$schema":
        "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
  "parameters": {
    "ApimServiceName": {
      "type": "string"
    },
    "swaggerjson": {"type": "string"}
  },
  "variables": {    
  },
    "resources": [
      {
        "type": "Microsoft.ApiManagement/service/apis",
        "name": "[concat(parameters('ApimServiceName'), '/animalAPI4')]",
        "apiVersion": "2018-02-01-preview",
        "scale": null,
        "properties": {
          "displayName": "HTTP animal API",
          "apiRevision": "1",
          "description": "API Management facade for a very handy and free online HTTP toolsds",
          "serviceUrl": "https://animailhttpbin.org",
          "path": "animals4",
          "contentFormat": "swagger-link-json",
          "contentValue": "[parameters('swaggerjson')]",
          "apiVersionSet": {
            "id": "[concat(resourceId('Microsoft.ApiManagement/service', parameters('ApimServiceName')), '/api-version-sets/versionset-animal-api4')]"
          },
          "protocols": [
            "https"
          ],
          "authenticationSettings": null,
          "subscriptionKeyParameterNames": null,
          "apiVersion": "v1"
        },
        "dependsOn": [
        ]
      }

    ]
}

想出來的問題是鏈接模板我從哪里調用括號周圍的屬性還包括dependsOn。 修復了支架問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM