Azure Node Js Api - 创建网络接口

Azure Node Js Api - Create Network Interface

我正尝试在 Azure 中使用其 Node js SDK 创建网络接口。

虽然它不起作用,但我不断得到 "cannot parse request"。 Microsoft 的文档没有那么有用。

请求是:

{
  "resourceGroupName": "name",
  "networkInterfaceName": "another-name",
  "properties": {
    "location": "eastus2",
        "ipConfigurations": [
      {
        "properties": {
          "privateIpAddress": "10.1.10.1"
        }
      }
    ]
  }
}

响应是:

{
  "request": {
    "id": "7384079f-83a6-459f-b8a9-096f76db97ff",
    "url": "/network/networkInterface/",
    "method": "POST",
    "timestamp": "2017-04-19T07:40:56.022Z"
  },
  "response": {
    "status": {
      "code": 400,
      "message": "Bad Request"
    },
    "errors": [
      {
        "code": "Error",
        "message": "Cannot parse the request."
      }
    ]
  }
}

没有 ipConfigurations 数组,我收到一个响应,指出我必须附加 ipConfigurations。

谢谢, 吉拉德

其实我刚刚成功解决了这个问题。 我添加了一个子网属性并且它有效。