【问题标题】:Attach IP to VM instance using Node.js API in Google Cloud在 Google Cloud 中使用 Node.js API 将 IP 附加到 VM 实例
【发布时间】:2018-12-27 22:12:23
【问题描述】:

如何使用 node.js API 将现有静态 IP 附加到 VM?

我可以使用 gcloud command 做到这一点,但我找不到节点 API 在 AddressVM 文档上实现此功能的位置

【问题讨论】:

  • 您可以从您的节点APP拨打REST API method。在API Explorer 中尝试一下,这样您就可以知道请求必须如何格式化

标签: node.js google-app-engine google-cloud-functions


【解决方案1】:

Node.js Google Cloud library 上没有您需要的方法,但您可以使用 Node.js 通过 REST Compute Engine API 来实现。

你有两个选择:

1.- 添加new network configuration

2.- Update (just partially if you want) the network configuration.

完全在文档中查看代码示例(也在 Node.js 中)。

【讨论】:

    猜你喜欢
    • 2021-12-21
    • 2018-02-09
    • 1970-01-01
    • 2018-12-02
    • 2020-11-13
    • 2020-01-09
    • 2019-04-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多