📜  vultr 通过 api 创建服务器 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:55.233000             🧑  作者: Mango

代码示例1
vpsOptions := &govultr.ServerOptions{
    Label:                "awesome-go-app",
    Hostname:             "awesome-go.com",
    EnablePrivateNetwork: true,
    AutoBackups:          true,
    EnableIPV6:           true,
}

// RegionId, VpsPlanID, OsID can be grabbed from their respective API calls
res, err := vultrClient.Server.Create(context.Background(), 1, 201, 1, vpsOptions)

if err != nil {
    fmt.Println(err)
}