【问题标题】:Azure Node Js Api - Create Network InterfaceAzure Node Js Api - 创建网络接口
【发布时间】:2017-04-19 08:01:11
【问题描述】:

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

虽然它不起作用并且我不断收到“无法解析请求”。 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。

谢谢, 吉拉德

【问题讨论】:

  • 你能分享你创建网络接口的代码吗?

标签: node.js api azure sdk network-interface


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2019-05-24
    • 1970-01-01
    • 2018-12-15
    • 2019-06-30
    • 1970-01-01
    • 2018-05-13
    • 2021-08-17
    • 2021-05-15
    • 1970-01-01
    相关资源
    最近更新 更多