From dafdb1d53797e1c10f2087c9746654b69b4742df Mon Sep 17 00:00:00 2001 From: simisoft-exo Date: Thu, 16 Jul 2026 11:43:00 +0100 Subject: [PATCH] build(deps): bump egoscale v3 to v3.1.42 (#875) AI-assisted: true Co-authored-by: hermes-local-thinking-cap-27b@users.noreply.github.com --- CHANGELOG.md | 10 + cmd/internal/x/x.gen.go | 5894 ++++++++++------- go.mod | 2 +- go.sum | 4 +- .../github.com/exoscale/egoscale/v3/errors.go | 5 +- .../exoscale/egoscale/v3/operations.go | 8 +- .../exoscale/egoscale/v3/schemas.go | 31 +- .../exoscale/egoscale/v3/version.go | 2 +- vendor/modules.txt | 2 +- 9 files changed, 3566 insertions(+), 2392 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23956acbb..3e64829bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## Unreleased + +### Bug fixes + +- dbaas: revert breaking error format change, regenerate API spec (egoscale v3.1.42) + +### Improvements + +- deps: bump egoscale/v3 to v3.1.42 (#875) + ## 1.96.0 ### Features diff --git a/cmd/internal/x/x.gen.go b/cmd/internal/x/x.gen.go index 22d1f3533..9dabc8c72 100644 --- a/cmd/internal/x/x.gen.go +++ b/cmd/internal/x/x.gen.go @@ -1993,9 +1993,9 @@ func XGetDbaasCaCertificate(params *viper.Viper) (*gentleman.Response, map[strin return resp, decoded, nil } -// XDeleteDbaasExternalEndpointDatadog delete-dbaas-external-endpoint-datadog -func XDeleteDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-external-endpoint-datadog" +// XCreateDbaasServiceClickhouse [BETA] Create a DBaaS ClickHouse service +func XCreateDbaasServiceClickhouse(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-clickhouse" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2005,10 +2005,14 @@ func XDeleteDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.V server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-datadog/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) + url := server + "/dbaas-clickhouse/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -2035,9 +2039,9 @@ func XDeleteDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.V return resp, decoded, nil } -// XGetDbaasExternalEndpointDatadog get-dbaas-external-endpoint-datadog -func XGetDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-external-endpoint-datadog" +// XDeleteDbaasServiceClickhouse [BETA] Delete a ClickHouse service +func XDeleteDbaasServiceClickhouse(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-clickhouse" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2047,10 +2051,10 @@ func XGetDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-datadog/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) + url := server + "/dbaas-clickhouse/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2077,9 +2081,9 @@ func XGetDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Vipe return resp, decoded, nil } -// XUpdateDbaasExternalEndpointDatadog update-dbaas-external-endpoint-datadog -func XUpdateDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-external-endpoint-datadog" +// XGetDbaasServiceClickhouse [BETA] Get a DBaaS ClickHouse service +func XGetDbaasServiceClickhouse(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-clickhouse" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2089,14 +2093,10 @@ func XUpdateDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.V server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-datadog/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-clickhouse/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2123,9 +2123,9 @@ func XUpdateDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.V return resp, decoded, nil } -// XCreateDbaasExternalEndpointDatadog create-dbaas-external-endpoint-datadog -func XCreateDbaasExternalEndpointDatadog(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-external-endpoint-datadog" +// XUpdateDbaasServiceClickhouse [BETA] Update a DBaaS ClickHouse service +func XUpdateDbaasServiceClickhouse(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-clickhouse" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2135,10 +2135,10 @@ func XCreateDbaasExternalEndpointDatadog(paramName string, params *viper.Viper, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-datadog/{name}" + url := server + "/dbaas-clickhouse/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -2169,9 +2169,9 @@ func XCreateDbaasExternalEndpointDatadog(paramName string, params *viper.Viper, return resp, decoded, nil } -// XDeleteDbaasExternalEndpointElasticsearch delete-dbaas-external-endpoint-elasticsearch -func XDeleteDbaasExternalEndpointElasticsearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-external-endpoint-elasticsearch" +// XStartDbaasClickhouseMaintenance [BETA] Initiate ClickHouse maintenance update +func XStartDbaasClickhouseMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-clickhouse-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2181,53 +2181,15 @@ func XDeleteDbaasExternalEndpointElasticsearch(paramEndpointId string, params *v server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-elasticsearch/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - - req := cli.Client.Delete().URL(url) - - cli.HandleBefore(handlerPath, params, req) - - resp, err := req.Do() - if err != nil { - return nil, nil, errors.Wrap(err, "Request failed") - } - - var decoded map[string]interface{} - - if resp.StatusCode < 400 { - if err := cli.UnmarshalResponse(resp, &decoded); err != nil { - return nil, nil, errors.Wrap(err, "Unmarshalling response failed") - } - } else { - return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) - } - - after := cli.HandleAfter(handlerPath, params, resp, decoded) - if after != nil { - decoded = after.(map[string]interface{}) - } - - return resp, decoded, nil -} + url := server + "/dbaas-clickhouse/{name}/maintenance/start" + url = strings.Replace(url, "{name}", paramName, 1) -// XGetDbaasExternalEndpointElasticsearch get-dbaas-external-endpoint-elasticsearch -func XGetDbaasExternalEndpointElasticsearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-external-endpoint-elasticsearch" - if xSubcommand { - handlerPath = "x " + handlerPath - } + req := cli.Client.Put().URL(url) - server := viper.GetString("server") - if server == "" { - server = xServers()[viper.GetInt("server-index")]["url"] + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) } - url := server + "/dbaas-external-endpoint-elasticsearch/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - - req := cli.Client.Get().URL(url) - cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() @@ -2253,9 +2215,9 @@ func XGetDbaasExternalEndpointElasticsearch(paramEndpointId string, params *vipe return resp, decoded, nil } -// XUpdateDbaasExternalEndpointElasticsearch update-dbaas-external-endpoint-elasticsearch -func XUpdateDbaasExternalEndpointElasticsearch(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-external-endpoint-elasticsearch" +// XGetDbaasClickhouseAclConfig [BETA] Get DBaaS ClickHouse ACL configuration +func XGetDbaasClickhouseAclConfig(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-clickhouse-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2265,14 +2227,10 @@ func XUpdateDbaasExternalEndpointElasticsearch(paramEndpointId string, params *v server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-elasticsearch/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-clickhouse/{service-name}/acl-config" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2299,9 +2257,9 @@ func XUpdateDbaasExternalEndpointElasticsearch(paramEndpointId string, params *v return resp, decoded, nil } -// XCreateDbaasExternalEndpointElasticsearch create-dbaas-external-endpoint-elasticsearch -func XCreateDbaasExternalEndpointElasticsearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-external-endpoint-elasticsearch" +// XCreateDbaasClickhouseUser [BETA] Create a DBaaS ClickHouse user +func XCreateDbaasClickhouseUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-clickhouse-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2311,8 +2269,8 @@ func XCreateDbaasExternalEndpointElasticsearch(paramName string, params *viper.V server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-elasticsearch/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-clickhouse/{service-name}/user" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) req := cli.Client.Post().URL(url) @@ -2345,9 +2303,9 @@ func XCreateDbaasExternalEndpointElasticsearch(paramName string, params *viper.V return resp, decoded, nil } -// XDeleteDbaasExternalEndpointOpensearch delete-dbaas-external-endpoint-opensearch -func XDeleteDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-external-endpoint-opensearch" +// XListDbaasClickhouseUsers [BETA] List DBaaS ClickHouse users +func XListDbaasClickhouseUsers(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-clickhouse-users" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2357,10 +2315,10 @@ func XDeleteDbaasExternalEndpointOpensearch(paramEndpointId string, params *vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-opensearch/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) + url := server + "/dbaas-clickhouse/{service-name}/user" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2387,9 +2345,9 @@ func XDeleteDbaasExternalEndpointOpensearch(paramEndpointId string, params *vipe return resp, decoded, nil } -// XGetDbaasExternalEndpointOpensearch get-dbaas-external-endpoint-opensearch -func XGetDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-external-endpoint-opensearch" +// XDeleteDbaasClickhouseUser [BETA] Delete a DBaaS ClickHouse user +func XDeleteDbaasClickhouseUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-clickhouse-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2399,10 +2357,11 @@ func XGetDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.V server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-opensearch/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) + url := server + "/dbaas-clickhouse/{service-name}/user/{username}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2429,9 +2388,9 @@ func XGetDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.V return resp, decoded, nil } -// XUpdateDbaasExternalEndpointOpensearch update-dbaas-external-endpoint-opensearch -func XUpdateDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-external-endpoint-opensearch" +// XResetDbaasClickhouseUserPassword [BETA] Reset the credentials of a DBaaS ClickHouse user +func XResetDbaasClickhouseUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-dbaas-clickhouse-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2441,8 +2400,9 @@ func XUpdateDbaasExternalEndpointOpensearch(paramEndpointId string, params *vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-opensearch/{endpoint-id}" - url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) + url := server + "/dbaas-clickhouse/{service-name}/user/{username}/password/reset" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) req := cli.Client.Put().URL(url) @@ -2475,9 +2435,9 @@ func XUpdateDbaasExternalEndpointOpensearch(paramEndpointId string, params *vipe return resp, decoded, nil } -// XCreateDbaasExternalEndpointOpensearch create-dbaas-external-endpoint-opensearch -func XCreateDbaasExternalEndpointOpensearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-external-endpoint-opensearch" +// XRevealDbaasClickhouseUserPassword [BETA] Reveal the secrets of a DBaaS ClickHouse user +func XRevealDbaasClickhouseUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-clickhouse-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2487,14 +2447,11 @@ func XCreateDbaasExternalEndpointOpensearch(paramName string, params *viper.Vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-opensearch/{name}" - url = strings.Replace(url, "{name}", paramName, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-clickhouse/{service-name}/user/{username}/password/reveal" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2521,9 +2478,9 @@ func XCreateDbaasExternalEndpointOpensearch(paramName string, params *viper.Vipe return resp, decoded, nil } -// XDeleteDbaasExternalEndpointPrometheus delete-dbaas-external-endpoint-prometheus -func XDeleteDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-external-endpoint-prometheus" +// XDeleteDbaasExternalEndpointDatadog delete-dbaas-external-endpoint-datadog +func XDeleteDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-external-endpoint-datadog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2533,7 +2490,7 @@ func XDeleteDbaasExternalEndpointPrometheus(paramEndpointId string, params *vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-prometheus/{endpoint-id}" + url := server + "/dbaas-external-endpoint-datadog/{endpoint-id}" url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Delete().URL(url) @@ -2563,9 +2520,9 @@ func XDeleteDbaasExternalEndpointPrometheus(paramEndpointId string, params *vipe return resp, decoded, nil } -// XGetDbaasExternalEndpointPrometheus get-dbaas-external-endpoint-prometheus -func XGetDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-external-endpoint-prometheus" +// XGetDbaasExternalEndpointDatadog get-dbaas-external-endpoint-datadog +func XGetDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-external-endpoint-datadog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2575,7 +2532,7 @@ func XGetDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.V server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-prometheus/{endpoint-id}" + url := server + "/dbaas-external-endpoint-datadog/{endpoint-id}" url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Get().URL(url) @@ -2605,9 +2562,9 @@ func XGetDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.V return resp, decoded, nil } -// XUpdateDbaasExternalEndpointPrometheus update-dbaas-external-endpoint-prometheus -func XUpdateDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-external-endpoint-prometheus" +// XUpdateDbaasExternalEndpointDatadog update-dbaas-external-endpoint-datadog +func XUpdateDbaasExternalEndpointDatadog(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-external-endpoint-datadog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2617,7 +2574,7 @@ func XUpdateDbaasExternalEndpointPrometheus(paramEndpointId string, params *vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-prometheus/{endpoint-id}" + url := server + "/dbaas-external-endpoint-datadog/{endpoint-id}" url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Put().URL(url) @@ -2651,9 +2608,9 @@ func XUpdateDbaasExternalEndpointPrometheus(paramEndpointId string, params *vipe return resp, decoded, nil } -// XCreateDbaasExternalEndpointPrometheus create-dbaas-external-endpoint-prometheus -func XCreateDbaasExternalEndpointPrometheus(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-external-endpoint-prometheus" +// XCreateDbaasExternalEndpointDatadog create-dbaas-external-endpoint-datadog +func XCreateDbaasExternalEndpointDatadog(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-external-endpoint-datadog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2663,7 +2620,7 @@ func XCreateDbaasExternalEndpointPrometheus(paramName string, params *viper.Vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-prometheus/{name}" + url := server + "/dbaas-external-endpoint-datadog/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Post().URL(url) @@ -2697,9 +2654,9 @@ func XCreateDbaasExternalEndpointPrometheus(paramName string, params *viper.Vipe return resp, decoded, nil } -// XDeleteDbaasExternalEndpointRsyslog delete-dbaas-external-endpoint-rsyslog -func XDeleteDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-external-endpoint-rsyslog" +// XDeleteDbaasExternalEndpointElasticsearch delete-dbaas-external-endpoint-elasticsearch +func XDeleteDbaasExternalEndpointElasticsearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-external-endpoint-elasticsearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2709,7 +2666,7 @@ func XDeleteDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.V server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-rsyslog/{endpoint-id}" + url := server + "/dbaas-external-endpoint-elasticsearch/{endpoint-id}" url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Delete().URL(url) @@ -2739,9 +2696,9 @@ func XDeleteDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.V return resp, decoded, nil } -// XGetDbaasExternalEndpointRsyslog get-dbaas-external-endpoint-rsyslog -func XGetDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-external-endpoint-rsyslog" +// XGetDbaasExternalEndpointElasticsearch get-dbaas-external-endpoint-elasticsearch +func XGetDbaasExternalEndpointElasticsearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-external-endpoint-elasticsearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2751,7 +2708,7 @@ func XGetDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-rsyslog/{endpoint-id}" + url := server + "/dbaas-external-endpoint-elasticsearch/{endpoint-id}" url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Get().URL(url) @@ -2781,9 +2738,9 @@ func XGetDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Vipe return resp, decoded, nil } -// XUpdateDbaasExternalEndpointRsyslog update-dbaas-external-endpoint-rsyslog -func XUpdateDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-external-endpoint-rsyslog" +// XUpdateDbaasExternalEndpointElasticsearch update-dbaas-external-endpoint-elasticsearch +func XUpdateDbaasExternalEndpointElasticsearch(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-external-endpoint-elasticsearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2793,7 +2750,7 @@ func XUpdateDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.V server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-rsyslog/{endpoint-id}" + url := server + "/dbaas-external-endpoint-elasticsearch/{endpoint-id}" url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Put().URL(url) @@ -2827,9 +2784,9 @@ func XUpdateDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.V return resp, decoded, nil } -// XCreateDbaasExternalEndpointRsyslog create-dbaas-external-endpoint-rsyslog -func XCreateDbaasExternalEndpointRsyslog(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-external-endpoint-rsyslog" +// XCreateDbaasExternalEndpointElasticsearch create-dbaas-external-endpoint-elasticsearch +func XCreateDbaasExternalEndpointElasticsearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-external-endpoint-elasticsearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2839,7 +2796,7 @@ func XCreateDbaasExternalEndpointRsyslog(paramName string, params *viper.Viper, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-rsyslog/{name}" + url := server + "/dbaas-external-endpoint-elasticsearch/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Post().URL(url) @@ -2873,9 +2830,9 @@ func XCreateDbaasExternalEndpointRsyslog(paramName string, params *viper.Viper, return resp, decoded, nil } -// XListDbaasExternalEndpointTypes list-dbaas-external-endpoint-types -func XListDbaasExternalEndpointTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-external-endpoint-types" +// XDeleteDbaasExternalEndpointOpensearch delete-dbaas-external-endpoint-opensearch +func XDeleteDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-external-endpoint-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2885,9 +2842,10 @@ func XListDbaasExternalEndpointTypes(params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint-types" + url := server + "/dbaas-external-endpoint-opensearch/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2914,9 +2872,9 @@ func XListDbaasExternalEndpointTypes(params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XAttachDbaasServiceToEndpoint attach-dbaas-service-to-endpoint -func XAttachDbaasServiceToEndpoint(paramSourceServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "attach-dbaas-service-to-endpoint" +// XGetDbaasExternalEndpointOpensearch get-dbaas-external-endpoint-opensearch +func XGetDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-external-endpoint-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2926,14 +2884,10 @@ func XAttachDbaasServiceToEndpoint(paramSourceServiceName string, params *viper. server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint/{source-service-name}/attach" - url = strings.Replace(url, "{source-service-name}", paramSourceServiceName, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-external-endpoint-opensearch/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -2960,9 +2914,9 @@ func XAttachDbaasServiceToEndpoint(paramSourceServiceName string, params *viper. return resp, decoded, nil } -// XDetachDbaasServiceFromEndpoint detach-dbaas-service-from-endpoint -func XDetachDbaasServiceFromEndpoint(paramSourceServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "detach-dbaas-service-from-endpoint" +// XUpdateDbaasExternalEndpointOpensearch update-dbaas-external-endpoint-opensearch +func XUpdateDbaasExternalEndpointOpensearch(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-external-endpoint-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -2972,8 +2926,8 @@ func XDetachDbaasServiceFromEndpoint(paramSourceServiceName string, params *vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoint/{source-service-name}/detach" - url = strings.Replace(url, "{source-service-name}", paramSourceServiceName, 1) + url := server + "/dbaas-external-endpoint-opensearch/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Put().URL(url) @@ -3006,9 +2960,9 @@ func XDetachDbaasServiceFromEndpoint(paramSourceServiceName string, params *vipe return resp, decoded, nil } -// XListDbaasExternalEndpoints list-dbaas-external-endpoints -func XListDbaasExternalEndpoints(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-external-endpoints" +// XCreateDbaasExternalEndpointOpensearch create-dbaas-external-endpoint-opensearch +func XCreateDbaasExternalEndpointOpensearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-external-endpoint-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3018,52 +2972,15 @@ func XListDbaasExternalEndpoints(params *viper.Viper) (*gentleman.Response, map[ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-endpoints" + url := server + "/dbaas-external-endpoint-opensearch/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) - cli.HandleBefore(handlerPath, params, req) - - resp, err := req.Do() - if err != nil { - return nil, nil, errors.Wrap(err, "Request failed") - } - - var decoded map[string]interface{} - - if resp.StatusCode < 400 { - if err := cli.UnmarshalResponse(resp, &decoded); err != nil { - return nil, nil, errors.Wrap(err, "Unmarshalling response failed") - } - } else { - return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) - } - - after := cli.HandleAfter(handlerPath, params, resp, decoded) - if after != nil { - decoded = after.(map[string]interface{}) - } - - return resp, decoded, nil -} - -// XGetDbaasExternalIntegrationSettingsDatadog get-dbaas-external-integration-settings-datadog -func XGetDbaasExternalIntegrationSettingsDatadog(paramIntegrationId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-external-integration-settings-datadog" - if xSubcommand { - handlerPath = "x " + handlerPath - } - - server := viper.GetString("server") - if server == "" { - server = xServers()[viper.GetInt("server-index")]["url"] + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } - url := server + "/dbaas-external-integration-settings-datadog/{integration-id}" - url = strings.Replace(url, "{integration-id}", paramIntegrationId, 1) - - req := cli.Client.Get().URL(url) - cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() @@ -3089,9 +3006,9 @@ func XGetDbaasExternalIntegrationSettingsDatadog(paramIntegrationId string, para return resp, decoded, nil } -// XUpdateDbaasExternalIntegrationSettingsDatadog update-dbaas-external-integration-settings-datadog -func XUpdateDbaasExternalIntegrationSettingsDatadog(paramIntegrationId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-external-integration-settings-datadog" +// XDeleteDbaasExternalEndpointPrometheus delete-dbaas-external-endpoint-prometheus +func XDeleteDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-external-endpoint-prometheus" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3101,14 +3018,10 @@ func XUpdateDbaasExternalIntegrationSettingsDatadog(paramIntegrationId string, p server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-integration-settings-datadog/{integration-id}" - url = strings.Replace(url, "{integration-id}", paramIntegrationId, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-external-endpoint-prometheus/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -3135,9 +3048,9 @@ func XUpdateDbaasExternalIntegrationSettingsDatadog(paramIntegrationId string, p return resp, decoded, nil } -// XGetDbaasExternalIntegration get-dbaas-external-integration -func XGetDbaasExternalIntegration(paramIntegrationId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-external-integration" +// XGetDbaasExternalEndpointPrometheus get-dbaas-external-endpoint-prometheus +func XGetDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-external-endpoint-prometheus" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3147,8 +3060,8 @@ func XGetDbaasExternalIntegration(paramIntegrationId string, params *viper.Viper server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-integration/{integration-id}" - url = strings.Replace(url, "{integration-id}", paramIntegrationId, 1) + url := server + "/dbaas-external-endpoint-prometheus/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Get().URL(url) @@ -3177,9 +3090,9 @@ func XGetDbaasExternalIntegration(paramIntegrationId string, params *viper.Viper return resp, decoded, nil } -// XListDbaasExternalIntegrations list-dbaas-external-integrations -func XListDbaasExternalIntegrations(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-external-integrations" +// XUpdateDbaasExternalEndpointPrometheus update-dbaas-external-endpoint-prometheus +func XUpdateDbaasExternalEndpointPrometheus(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-external-endpoint-prometheus" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3189,10 +3102,14 @@ func XListDbaasExternalIntegrations(paramServiceName string, params *viper.Viper server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-external-integrations/{service-name}" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url := server + "/dbaas-external-endpoint-prometheus/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -3219,9 +3136,9 @@ func XListDbaasExternalIntegrations(paramServiceName string, params *viper.Viper return resp, decoded, nil } -// XCreateDbaasServiceGrafana create-dbaas-service-grafana -func XCreateDbaasServiceGrafana(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-service-grafana" +// XCreateDbaasExternalEndpointPrometheus create-dbaas-external-endpoint-prometheus +func XCreateDbaasExternalEndpointPrometheus(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-external-endpoint-prometheus" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3231,7 +3148,7 @@ func XCreateDbaasServiceGrafana(paramName string, params *viper.Viper, body stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-grafana/{name}" + url := server + "/dbaas-external-endpoint-prometheus/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Post().URL(url) @@ -3265,9 +3182,9 @@ func XCreateDbaasServiceGrafana(paramName string, params *viper.Viper, body stri return resp, decoded, nil } -// XDeleteDbaasServiceGrafana Delete a Grafana service -func XDeleteDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service-grafana" +// XDeleteDbaasExternalEndpointRsyslog delete-dbaas-external-endpoint-rsyslog +func XDeleteDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-external-endpoint-rsyslog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3277,8 +3194,8 @@ func XDeleteDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-grafana/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-external-endpoint-rsyslog/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Delete().URL(url) @@ -3307,9 +3224,9 @@ func XDeleteDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentlem return resp, decoded, nil } -// XGetDbaasServiceGrafana Get a DBaaS Grafana service -func XGetDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-grafana" +// XGetDbaasExternalEndpointRsyslog get-dbaas-external-endpoint-rsyslog +func XGetDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-external-endpoint-rsyslog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3319,8 +3236,8 @@ func XGetDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentleman. server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-grafana/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-external-endpoint-rsyslog/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Get().URL(url) @@ -3349,9 +3266,9 @@ func XGetDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentleman. return resp, decoded, nil } -// XUpdateDbaasServiceGrafana Update a DBaaS Grafana service -func XUpdateDbaasServiceGrafana(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-service-grafana" +// XUpdateDbaasExternalEndpointRsyslog update-dbaas-external-endpoint-rsyslog +func XUpdateDbaasExternalEndpointRsyslog(paramEndpointId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-external-endpoint-rsyslog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3361,8 +3278,8 @@ func XUpdateDbaasServiceGrafana(paramName string, params *viper.Viper, body stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-grafana/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-external-endpoint-rsyslog/{endpoint-id}" + url = strings.Replace(url, "{endpoint-id}", paramEndpointId, 1) req := cli.Client.Put().URL(url) @@ -3395,9 +3312,9 @@ func XUpdateDbaasServiceGrafana(paramName string, params *viper.Viper, body stri return resp, decoded, nil } -// XStartDbaasGrafanaMaintenance Initiate Grafana maintenance update -func XStartDbaasGrafanaMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-dbaas-grafana-maintenance" +// XCreateDbaasExternalEndpointRsyslog create-dbaas-external-endpoint-rsyslog +func XCreateDbaasExternalEndpointRsyslog(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-external-endpoint-rsyslog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3407,13 +3324,13 @@ func XStartDbaasGrafanaMaintenance(paramName string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-grafana/{name}/maintenance/start" + url := server + "/dbaas-external-endpoint-rsyslog/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -3441,9 +3358,9 @@ func XStartDbaasGrafanaMaintenance(paramName string, params *viper.Viper, body s return resp, decoded, nil } -// XResetDbaasGrafanaUserPassword Reset the credentials of a DBaaS Grafana user -func XResetDbaasGrafanaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-dbaas-grafana-user-password" +// XListDbaasExternalEndpointTypes list-dbaas-external-endpoint-types +func XListDbaasExternalEndpointTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-external-endpoint-types" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3453,15 +3370,9 @@ func XResetDbaasGrafanaUserPassword(paramServiceName string, paramUsername strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-grafana/{service-name}/user/{username}/password/reset" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-external-endpoint-types" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -3488,9 +3399,9 @@ func XResetDbaasGrafanaUserPassword(paramServiceName string, paramUsername strin return resp, decoded, nil } -// XRevealDbaasGrafanaUserPassword Reveal the secrets of a DBaaS Grafana user -func XRevealDbaasGrafanaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-grafana-user-password" +// XAttachDbaasServiceToEndpoint attach-dbaas-service-to-endpoint +func XAttachDbaasServiceToEndpoint(paramSourceServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "attach-dbaas-service-to-endpoint" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3500,11 +3411,14 @@ func XRevealDbaasGrafanaUserPassword(paramServiceName string, paramUsername stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-grafana/{service-name}/user/{username}/password/reveal" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-external-endpoint/{source-service-name}/attach" + url = strings.Replace(url, "{source-service-name}", paramSourceServiceName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -3531,9 +3445,9 @@ func XRevealDbaasGrafanaUserPassword(paramServiceName string, paramUsername stri return resp, decoded, nil } -// XCreateDbaasIntegration create-dbaas-integration -func XCreateDbaasIntegration(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-integration" +// XDetachDbaasServiceFromEndpoint detach-dbaas-service-from-endpoint +func XDetachDbaasServiceFromEndpoint(paramSourceServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "detach-dbaas-service-from-endpoint" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3543,9 +3457,10 @@ func XCreateDbaasIntegration(params *viper.Viper, body string) (*gentleman.Respo server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-integration" + url := server + "/dbaas-external-endpoint/{source-service-name}/detach" + url = strings.Replace(url, "{source-service-name}", paramSourceServiceName, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -3576,9 +3491,9 @@ func XCreateDbaasIntegration(params *viper.Viper, body string) (*gentleman.Respo return resp, decoded, nil } -// XListDbaasIntegrationSettings list-dbaas-integration-settings -func XListDbaasIntegrationSettings(paramIntegrationType string, paramSourceType string, paramDestType string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-integration-settings" +// XListDbaasExternalEndpoints list-dbaas-external-endpoints +func XListDbaasExternalEndpoints(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-external-endpoints" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3588,10 +3503,7 @@ func XListDbaasIntegrationSettings(paramIntegrationType string, paramSourceType server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-integration-settings/{integration-type}/{source-type}/{dest-type}" - url = strings.Replace(url, "{integration-type}", paramIntegrationType, 1) - url = strings.Replace(url, "{source-type}", paramSourceType, 1) - url = strings.Replace(url, "{dest-type}", paramDestType, 1) + url := server + "/dbaas-external-endpoints" req := cli.Client.Get().URL(url) @@ -3620,9 +3532,9 @@ func XListDbaasIntegrationSettings(paramIntegrationType string, paramSourceType return resp, decoded, nil } -// XListDbaasIntegrationTypes list-dbaas-integration-types -func XListDbaasIntegrationTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-integration-types" +// XGetDbaasExternalIntegrationSettingsDatadog get-dbaas-external-integration-settings-datadog +func XGetDbaasExternalIntegrationSettingsDatadog(paramIntegrationId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-external-integration-settings-datadog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3632,7 +3544,8 @@ func XListDbaasIntegrationTypes(params *viper.Viper) (*gentleman.Response, map[s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-integration-types" + url := server + "/dbaas-external-integration-settings-datadog/{integration-id}" + url = strings.Replace(url, "{integration-id}", paramIntegrationId, 1) req := cli.Client.Get().URL(url) @@ -3661,9 +3574,9 @@ func XListDbaasIntegrationTypes(params *viper.Viper) (*gentleman.Response, map[s return resp, decoded, nil } -// XDeleteDbaasIntegration delete-dbaas-integration -func XDeleteDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-integration" +// XUpdateDbaasExternalIntegrationSettingsDatadog update-dbaas-external-integration-settings-datadog +func XUpdateDbaasExternalIntegrationSettingsDatadog(paramIntegrationId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-external-integration-settings-datadog" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3673,10 +3586,14 @@ func XDeleteDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-integration/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dbaas-external-integration-settings-datadog/{integration-id}" + url = strings.Replace(url, "{integration-id}", paramIntegrationId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -3703,9 +3620,9 @@ func XDeleteDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Re return resp, decoded, nil } -// XGetDbaasIntegration get-dbaas-integration -func XGetDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-integration" +// XGetDbaasExternalIntegration get-dbaas-external-integration +func XGetDbaasExternalIntegration(paramIntegrationId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-external-integration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3715,8 +3632,8 @@ func XGetDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Respo server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-integration/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dbaas-external-integration/{integration-id}" + url = strings.Replace(url, "{integration-id}", paramIntegrationId, 1) req := cli.Client.Get().URL(url) @@ -3745,9 +3662,9 @@ func XGetDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Respo return resp, decoded, nil } -// XUpdateDbaasIntegration update-dbaas-integration -func XUpdateDbaasIntegration(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-integration" +// XListDbaasExternalIntegrations list-dbaas-external-integrations +func XListDbaasExternalIntegrations(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-external-integrations" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3757,14 +3674,10 @@ func XUpdateDbaasIntegration(paramId string, params *viper.Viper, body string) ( server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-integration/{id}" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-external-integrations/{service-name}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -3791,9 +3704,9 @@ func XUpdateDbaasIntegration(paramId string, params *viper.Viper, body string) ( return resp, decoded, nil } -// XCreateDbaasServiceKafka Create a DBaaS Kafka service -func XCreateDbaasServiceKafka(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-service-kafka" +// XCreateDbaasServiceGrafana create-dbaas-service-grafana +func XCreateDbaasServiceGrafana(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-grafana" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3803,7 +3716,7 @@ func XCreateDbaasServiceKafka(paramName string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}" + url := server + "/dbaas-grafana/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Post().URL(url) @@ -3837,9 +3750,9 @@ func XCreateDbaasServiceKafka(paramName string, params *viper.Viper, body string return resp, decoded, nil } -// XDeleteDbaasServiceKafka Delete a Kafka service -func XDeleteDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service-kafka" +// XDeleteDbaasServiceGrafana Delete a Grafana service +func XDeleteDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-grafana" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3849,7 +3762,7 @@ func XDeleteDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}" + url := server + "/dbaas-grafana/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Delete().URL(url) @@ -3879,9 +3792,9 @@ func XDeleteDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman return resp, decoded, nil } -// XGetDbaasServiceKafka Get a DBaaS Kafka service -func XGetDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-kafka" +// XGetDbaasServiceGrafana Get a DBaaS Grafana service +func XGetDbaasServiceGrafana(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-grafana" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3891,7 +3804,7 @@ func XGetDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}" + url := server + "/dbaas-grafana/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Get().URL(url) @@ -3921,9 +3834,9 @@ func XGetDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman.Re return resp, decoded, nil } -// XUpdateDbaasServiceKafka Update a DBaaS Kafka service -func XUpdateDbaasServiceKafka(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-service-kafka" +// XUpdateDbaasServiceGrafana Update a DBaaS Grafana service +func XUpdateDbaasServiceGrafana(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-grafana" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3933,7 +3846,7 @@ func XUpdateDbaasServiceKafka(paramName string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}" + url := server + "/dbaas-grafana/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Put().URL(url) @@ -3967,9 +3880,9 @@ func XUpdateDbaasServiceKafka(paramName string, params *viper.Viper, body string return resp, decoded, nil } -// XGetDbaasKafkaAclConfig Get DBaaS kafka ACL configuration -func XGetDbaasKafkaAclConfig(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-kafka-acl-config" +// XStartDbaasGrafanaMaintenance Initiate Grafana maintenance update +func XStartDbaasGrafanaMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-grafana-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -3979,10 +3892,14 @@ func XGetDbaasKafkaAclConfig(paramName string, params *viper.Viper) (*gentleman. server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}/acl-config" + url := server + "/dbaas-grafana/{name}/maintenance/start" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -4009,9 +3926,9 @@ func XGetDbaasKafkaAclConfig(paramName string, params *viper.Viper) (*gentleman. return resp, decoded, nil } -// XStartDbaasKafkaMaintenance Initiate Kafka maintenance update -func XStartDbaasKafkaMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-dbaas-kafka-maintenance" +// XResetDbaasGrafanaUserPassword Reset the credentials of a DBaaS Grafana user +func XResetDbaasGrafanaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-dbaas-grafana-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4021,13 +3938,14 @@ func XStartDbaasKafkaMaintenance(paramName string, params *viper.Viper, body str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}/maintenance/start" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-grafana/{service-name}/user/{username}/password/reset" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -4055,9 +3973,9 @@ func XStartDbaasKafkaMaintenance(paramName string, params *viper.Viper, body str return resp, decoded, nil } -// XCreateDbaasKafkaSchemaRegistryAclConfig Add a Kafka Schema Registry ACL entry -func XCreateDbaasKafkaSchemaRegistryAclConfig(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-kafka-schema-registry-acl-config" +// XRevealDbaasGrafanaUserPassword Reveal the secrets of a DBaaS Grafana user +func XRevealDbaasGrafanaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-grafana-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4067,14 +3985,11 @@ func XCreateDbaasKafkaSchemaRegistryAclConfig(paramName string, params *viper.Vi server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}/schema-registry/acl-config" - url = strings.Replace(url, "{name}", paramName, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-grafana/{service-name}/user/{username}/password/reveal" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4101,9 +4016,9 @@ func XCreateDbaasKafkaSchemaRegistryAclConfig(paramName string, params *viper.Vi return resp, decoded, nil } -// XDeleteDbaasKafkaSchemaRegistryAclConfig Delete a Kafka ACL entry -func XDeleteDbaasKafkaSchemaRegistryAclConfig(paramName string, paramAclId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-kafka-schema-registry-acl-config" +// XCreateDbaasIntegration create-dbaas-integration +func XCreateDbaasIntegration(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-integration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4113,11 +4028,13 @@ func XDeleteDbaasKafkaSchemaRegistryAclConfig(paramName string, paramAclId strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}/schema-registry/acl-config/{acl-id}" - url = strings.Replace(url, "{name}", paramName, 1) - url = strings.Replace(url, "{acl-id}", paramAclId, 1) + url := server + "/dbaas-integration" - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -4144,9 +4061,9 @@ func XDeleteDbaasKafkaSchemaRegistryAclConfig(paramName string, paramAclId strin return resp, decoded, nil } -// XCreateDbaasKafkaTopicAclConfig Add a Kafka topic ACL entry -func XCreateDbaasKafkaTopicAclConfig(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-kafka-topic-acl-config" +// XListDbaasIntegrationSettings list-dbaas-integration-settings +func XListDbaasIntegrationSettings(paramIntegrationType string, paramSourceType string, paramDestType string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-integration-settings" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4156,14 +4073,12 @@ func XCreateDbaasKafkaTopicAclConfig(paramName string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}/topic/acl-config" - url = strings.Replace(url, "{name}", paramName, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-integration-settings/{integration-type}/{source-type}/{dest-type}" + url = strings.Replace(url, "{integration-type}", paramIntegrationType, 1) + url = strings.Replace(url, "{source-type}", paramSourceType, 1) + url = strings.Replace(url, "{dest-type}", paramDestType, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4190,9 +4105,9 @@ func XCreateDbaasKafkaTopicAclConfig(paramName string, params *viper.Viper, body return resp, decoded, nil } -// XDeleteDbaasKafkaTopicAclConfig Delete a Kafka ACL entry -func XDeleteDbaasKafkaTopicAclConfig(paramName string, paramAclId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-kafka-topic-acl-config" +// XListDbaasIntegrationTypes list-dbaas-integration-types +func XListDbaasIntegrationTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-integration-types" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4202,11 +4117,9 @@ func XDeleteDbaasKafkaTopicAclConfig(paramName string, paramAclId string, params server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{name}/topic/acl-config/{acl-id}" - url = strings.Replace(url, "{name}", paramName, 1) - url = strings.Replace(url, "{acl-id}", paramAclId, 1) + url := server + "/dbaas-integration-types" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4233,9 +4146,9 @@ func XDeleteDbaasKafkaTopicAclConfig(paramName string, paramAclId string, params return resp, decoded, nil } -// XRevealDbaasKafkaConnectPassword Reveal the secrets for DBaaS Kafka Connect -func XRevealDbaasKafkaConnectPassword(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-kafka-connect-password" +// XDeleteDbaasIntegration delete-dbaas-integration +func XDeleteDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-integration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4245,10 +4158,10 @@ func XRevealDbaasKafkaConnectPassword(paramServiceName string, params *viper.Vip server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{service-name}/connect/password/reveal" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url := server + "/dbaas-integration/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4275,9 +4188,9 @@ func XRevealDbaasKafkaConnectPassword(paramServiceName string, params *viper.Vip return resp, decoded, nil } -// XCreateDbaasKafkaUser Create a DBaaS Kafka user -func XCreateDbaasKafkaUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-kafka-user" +// XGetDbaasIntegration get-dbaas-integration +func XGetDbaasIntegration(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-integration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4287,14 +4200,10 @@ func XCreateDbaasKafkaUser(paramServiceName string, params *viper.Viper, body st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{service-name}/user" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-integration/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4321,9 +4230,9 @@ func XCreateDbaasKafkaUser(paramServiceName string, params *viper.Viper, body st return resp, decoded, nil } -// XDeleteDbaasKafkaUser Delete a DBaaS kafka user -func XDeleteDbaasKafkaUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-kafka-user" +// XUpdateDbaasIntegration update-dbaas-integration +func XUpdateDbaasIntegration(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-integration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4333,11 +4242,14 @@ func XDeleteDbaasKafkaUser(paramServiceName string, paramUsername string, params server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{service-name}/user/{username}" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-integration/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -4364,9 +4276,9 @@ func XDeleteDbaasKafkaUser(paramServiceName string, paramUsername string, params return resp, decoded, nil } -// XResetDbaasKafkaUserPassword Reset the credentials of a DBaaS Kafka user -func XResetDbaasKafkaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-dbaas-kafka-user-password" +// XCreateDbaasServiceKafka Create a DBaaS Kafka service +func XCreateDbaasServiceKafka(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-kafka" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4376,11 +4288,10 @@ func XResetDbaasKafkaUserPassword(paramServiceName string, paramUsername string, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{service-name}/user/{username}/password/reset" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-kafka/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -4411,9 +4322,9 @@ func XResetDbaasKafkaUserPassword(paramServiceName string, paramUsername string, return resp, decoded, nil } -// XRevealDbaasKafkaUserPassword Reveal the secrets of a DBaaS Kafka user -func XRevealDbaasKafkaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-kafka-user-password" +// XDeleteDbaasServiceKafka Delete a Kafka service +func XDeleteDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-kafka" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4423,11 +4334,10 @@ func XRevealDbaasKafkaUserPassword(paramServiceName string, paramUsername string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-kafka/{service-name}/user/{username}/password/reveal" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-kafka/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4454,9 +4364,9 @@ func XRevealDbaasKafkaUserPassword(paramServiceName string, paramUsername string return resp, decoded, nil } -// XGetDbaasMigrationStatus Get a DBaaS migration status -func XGetDbaasMigrationStatus(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-migration-status" +// XGetDbaasServiceKafka Get a DBaaS Kafka service +func XGetDbaasServiceKafka(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-kafka" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4466,7 +4376,7 @@ func XGetDbaasMigrationStatus(paramName string, params *viper.Viper) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-migration-status/{name}" + url := server + "/dbaas-kafka/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Get().URL(url) @@ -4496,9 +4406,9 @@ func XGetDbaasMigrationStatus(paramName string, params *viper.Viper) (*gentleman return resp, decoded, nil } -// XCreateDbaasServiceMysql Create a DBaaS MySQL service -func XCreateDbaasServiceMysql(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-service-mysql" +// XUpdateDbaasServiceKafka Update a DBaaS Kafka service +func XUpdateDbaasServiceKafka(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-kafka" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4508,10 +4418,10 @@ func XCreateDbaasServiceMysql(paramName string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{name}" + url := server + "/dbaas-kafka/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -4542,9 +4452,9 @@ func XCreateDbaasServiceMysql(paramName string, params *viper.Viper, body string return resp, decoded, nil } -// XDeleteDbaasServiceMysql Delete a MySQL service -func XDeleteDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service-mysql" +// XGetDbaasKafkaAclConfig Get DBaaS kafka ACL configuration +func XGetDbaasKafkaAclConfig(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-kafka-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4554,10 +4464,10 @@ func XDeleteDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{name}" + url := server + "/dbaas-kafka/{name}/acl-config" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4584,9 +4494,9 @@ func XDeleteDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman return resp, decoded, nil } -// XGetDbaasServiceMysql Get a DBaaS MySQL service -func XGetDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-mysql" +// XStartDbaasKafkaMaintenance Initiate Kafka maintenance update +func XStartDbaasKafkaMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-kafka-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4596,10 +4506,14 @@ func XGetDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{name}" + url := server + "/dbaas-kafka/{name}/maintenance/start" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -4626,9 +4540,9 @@ func XGetDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman.Re return resp, decoded, nil } -// XUpdateDbaasServiceMysql Update a DBaaS MySQL service -func XUpdateDbaasServiceMysql(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-service-mysql" +// XCreateDbaasKafkaSchemaRegistryAclConfig Add a Kafka Schema Registry ACL entry +func XCreateDbaasKafkaSchemaRegistryAclConfig(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-kafka-schema-registry-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4638,10 +4552,10 @@ func XUpdateDbaasServiceMysql(paramName string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{name}" + url := server + "/dbaas-kafka/{name}/schema-registry/acl-config" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -4672,9 +4586,9 @@ func XUpdateDbaasServiceMysql(paramName string, params *viper.Viper, body string return resp, decoded, nil } -// XEnableDbaasMysqlWrites Temporarily enable writes for MySQL services in read-only mode due to filled up storage -func XEnableDbaasMysqlWrites(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "enable-dbaas-mysql-writes" +// XDeleteDbaasKafkaSchemaRegistryAclConfig Delete a Kafka ACL entry +func XDeleteDbaasKafkaSchemaRegistryAclConfig(paramName string, paramAclId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-kafka-schema-registry-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4684,14 +4598,11 @@ func XEnableDbaasMysqlWrites(paramName string, params *viper.Viper, body string) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{name}/enable/writes" + url := server + "/dbaas-kafka/{name}/schema-registry/acl-config/{acl-id}" url = strings.Replace(url, "{name}", paramName, 1) + url = strings.Replace(url, "{acl-id}", paramAclId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4718,9 +4629,9 @@ func XEnableDbaasMysqlWrites(paramName string, params *viper.Viper, body string) return resp, decoded, nil } -// XStartDbaasMysqlMaintenance Initiate MySQL maintenance update -func XStartDbaasMysqlMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-dbaas-mysql-maintenance" +// XCreateDbaasKafkaTopicAclConfig Add a Kafka topic ACL entry +func XCreateDbaasKafkaTopicAclConfig(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-kafka-topic-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4730,13 +4641,13 @@ func XStartDbaasMysqlMaintenance(paramName string, params *viper.Viper, body str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{name}/maintenance/start" + url := server + "/dbaas-kafka/{name}/topic/acl-config" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -4764,9 +4675,9 @@ func XStartDbaasMysqlMaintenance(paramName string, params *viper.Viper, body str return resp, decoded, nil } -// XStopDbaasMysqlMigration Stop a DBaaS MySQL migration -func XStopDbaasMysqlMigration(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "stop-dbaas-mysql-migration" +// XDeleteDbaasKafkaTopicAclConfig Delete a Kafka ACL entry +func XDeleteDbaasKafkaTopicAclConfig(paramName string, paramAclId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-kafka-topic-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4776,14 +4687,11 @@ func XStopDbaasMysqlMigration(paramName string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{name}/migration/stop" + url := server + "/dbaas-kafka/{name}/topic/acl-config/{acl-id}" url = strings.Replace(url, "{name}", paramName, 1) + url = strings.Replace(url, "{acl-id}", paramAclId, 1) - req := cli.Client.Post().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4810,9 +4718,9 @@ func XStopDbaasMysqlMigration(paramName string, params *viper.Viper, body string return resp, decoded, nil } -// XCreateDbaasMysqlDatabase Create a DBaaS MySQL database -func XCreateDbaasMysqlDatabase(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-mysql-database" +// XRevealDbaasKafkaConnectPassword Reveal the secrets for DBaaS Kafka Connect +func XRevealDbaasKafkaConnectPassword(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-kafka-connect-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4822,14 +4730,10 @@ func XCreateDbaasMysqlDatabase(paramServiceName string, params *viper.Viper, bod server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{service-name}/database" + url := server + "/dbaas-kafka/{service-name}/connect/password/reveal" url = strings.Replace(url, "{service-name}", paramServiceName, 1) - req := cli.Client.Post().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4856,9 +4760,9 @@ func XCreateDbaasMysqlDatabase(paramServiceName string, params *viper.Viper, bod return resp, decoded, nil } -// XDeleteDbaasMysqlDatabase Delete a DBaaS MySQL database -func XDeleteDbaasMysqlDatabase(paramServiceName string, paramDatabaseName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-mysql-database" +// XCreateDbaasKafkaUser Create a DBaaS Kafka user +func XCreateDbaasKafkaUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-kafka-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4868,11 +4772,14 @@ func XDeleteDbaasMysqlDatabase(paramServiceName string, paramDatabaseName string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{service-name}/database/{database-name}" + url := server + "/dbaas-kafka/{service-name}/user" url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{database-name}", paramDatabaseName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -4899,9 +4806,9 @@ func XDeleteDbaasMysqlDatabase(paramServiceName string, paramDatabaseName string return resp, decoded, nil } -// XCreateDbaasMysqlUser Create a DBaaS MySQL user -func XCreateDbaasMysqlUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-mysql-user" +// XDeleteDbaasKafkaUser Delete a DBaaS kafka user +func XDeleteDbaasKafkaUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-kafka-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4911,14 +4818,11 @@ func XCreateDbaasMysqlUser(paramServiceName string, params *viper.Viper, body st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{service-name}/user" + url := server + "/dbaas-kafka/{service-name}/user/{username}" url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Post().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -4945,9 +4849,9 @@ func XCreateDbaasMysqlUser(paramServiceName string, params *viper.Viper, body st return resp, decoded, nil } -// XDeleteDbaasMysqlUser Delete a DBaaS MySQL user -func XDeleteDbaasMysqlUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-mysql-user" +// XResetDbaasKafkaUserPassword Reset the credentials of a DBaaS Kafka user +func XResetDbaasKafkaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-dbaas-kafka-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -4957,11 +4861,15 @@ func XDeleteDbaasMysqlUser(paramServiceName string, paramUsername string, params server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{service-name}/user/{username}" + url := server + "/dbaas-kafka/{service-name}/user/{username}/password/reset" url = strings.Replace(url, "{service-name}", paramServiceName, 1) url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -4988,9 +4896,9 @@ func XDeleteDbaasMysqlUser(paramServiceName string, paramUsername string, params return resp, decoded, nil } -// XResetDbaasMysqlUserPassword Reset the credentials of a DBaaS mysql user -func XResetDbaasMysqlUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-dbaas-mysql-user-password" +// XRevealDbaasKafkaUserPassword Reveal the secrets of a DBaaS Kafka user +func XRevealDbaasKafkaUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-kafka-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5000,15 +4908,11 @@ func XResetDbaasMysqlUserPassword(paramServiceName string, paramUsername string, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{service-name}/user/{username}/password/reset" + url := server + "/dbaas-kafka/{service-name}/user/{username}/password/reveal" url = strings.Replace(url, "{service-name}", paramServiceName, 1) url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -5035,9 +4939,9 @@ func XResetDbaasMysqlUserPassword(paramServiceName string, paramUsername string, return resp, decoded, nil } -// XRevealDbaasMysqlUserPassword Reveal the secrets of a DBaaS MySQL user -func XRevealDbaasMysqlUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-mysql-user-password" +// XGetDbaasMigrationStatus Get a DBaaS migration status +func XGetDbaasMigrationStatus(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-migration-status" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5047,9 +4951,8 @@ func XRevealDbaasMysqlUserPassword(paramServiceName string, paramUsername string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-mysql/{service-name}/user/{username}/password/reveal" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-migration-status/{name}" + url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Get().URL(url) @@ -5078,9 +4981,9 @@ func XRevealDbaasMysqlUserPassword(paramServiceName string, paramUsername string return resp, decoded, nil } -// XCreateDbaasServiceOpensearch Create a DBaaS OpenSearch service -func XCreateDbaasServiceOpensearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-service-opensearch" +// XCreateDbaasServiceMysql Create a DBaaS MySQL service +func XCreateDbaasServiceMysql(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-mysql" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5090,7 +4993,7 @@ func XCreateDbaasServiceOpensearch(paramName string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{name}" + url := server + "/dbaas-mysql/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Post().URL(url) @@ -5124,9 +5027,9 @@ func XCreateDbaasServiceOpensearch(paramName string, params *viper.Viper, body s return resp, decoded, nil } -// XDeleteDbaasServiceOpensearch Delete a OpenSearch service -func XDeleteDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service-opensearch" +// XDeleteDbaasServiceMysql Delete a MySQL service +func XDeleteDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-mysql" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5136,7 +5039,7 @@ func XDeleteDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gent server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{name}" + url := server + "/dbaas-mysql/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Delete().URL(url) @@ -5166,9 +5069,9 @@ func XDeleteDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gent return resp, decoded, nil } -// XGetDbaasServiceOpensearch Get a DBaaS OpenSearch service -func XGetDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-opensearch" +// XGetDbaasServiceMysql Get a DBaaS MySQL service +func XGetDbaasServiceMysql(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-mysql" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5178,7 +5081,7 @@ func XGetDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{name}" + url := server + "/dbaas-mysql/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Get().URL(url) @@ -5208,9 +5111,9 @@ func XGetDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gentlem return resp, decoded, nil } -// XUpdateDbaasServiceOpensearch Update a DBaaS OpenSearch service -func XUpdateDbaasServiceOpensearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-service-opensearch" +// XUpdateDbaasServiceMysql Update a DBaaS MySQL service +func XUpdateDbaasServiceMysql(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-mysql" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5220,7 +5123,7 @@ func XUpdateDbaasServiceOpensearch(paramName string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{name}" + url := server + "/dbaas-mysql/{name}" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Put().URL(url) @@ -5254,9 +5157,9 @@ func XUpdateDbaasServiceOpensearch(paramName string, params *viper.Viper, body s return resp, decoded, nil } -// XGetDbaasOpensearchAclConfig Get DBaaS OpenSearch ACL configuration -func XGetDbaasOpensearchAclConfig(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-opensearch-acl-config" +// XEnableDbaasMysqlWrites Temporarily enable writes for MySQL services in read-only mode due to filled up storage +func XEnableDbaasMysqlWrites(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "enable-dbaas-mysql-writes" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5266,10 +5169,14 @@ func XGetDbaasOpensearchAclConfig(paramName string, params *viper.Viper) (*gentl server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{name}/acl-config" + url := server + "/dbaas-mysql/{name}/enable/writes" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -5296,9 +5203,9 @@ func XGetDbaasOpensearchAclConfig(paramName string, params *viper.Viper) (*gentl return resp, decoded, nil } -// XUpdateDbaasOpensearchAclConfig Create a DBaaS OpenSearch ACL configuration -func XUpdateDbaasOpensearchAclConfig(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-opensearch-acl-config" +// XStartDbaasMysqlMaintenance Initiate MySQL maintenance update +func XStartDbaasMysqlMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-mysql-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5308,13 +5215,13 @@ func XUpdateDbaasOpensearchAclConfig(paramName string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{name}/acl-config" + url := server + "/dbaas-mysql/{name}/maintenance/start" url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -5342,9 +5249,9 @@ func XUpdateDbaasOpensearchAclConfig(paramName string, params *viper.Viper, body return resp, decoded, nil } -// XStartDbaasOpensearchMaintenance Initiate OpenSearch maintenance update -func XStartDbaasOpensearchMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-dbaas-opensearch-maintenance" +// XStopDbaasMysqlMigration Stop a DBaaS MySQL migration +func XStopDbaasMysqlMigration(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "stop-dbaas-mysql-migration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5354,10 +5261,10 @@ func XStartDbaasOpensearchMaintenance(paramName string, params *viper.Viper, bod server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{name}/maintenance/start" + url := server + "/dbaas-mysql/{name}/migration/stop" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) @@ -5388,9 +5295,9 @@ func XStartDbaasOpensearchMaintenance(paramName string, params *viper.Viper, bod return resp, decoded, nil } -// XCreateDbaasOpensearchUser Create a DBaaS OpenSearch user -func XCreateDbaasOpensearchUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-opensearch-user" +// XCreateDbaasMysqlDatabase Create a DBaaS MySQL database +func XCreateDbaasMysqlDatabase(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-mysql-database" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5400,7 +5307,7 @@ func XCreateDbaasOpensearchUser(paramServiceName string, params *viper.Viper, bo server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{service-name}/user" + url := server + "/dbaas-mysql/{service-name}/database" url = strings.Replace(url, "{service-name}", paramServiceName, 1) req := cli.Client.Post().URL(url) @@ -5434,9 +5341,9 @@ func XCreateDbaasOpensearchUser(paramServiceName string, params *viper.Viper, bo return resp, decoded, nil } -// XDeleteDbaasOpensearchUser Delete a DBaaS OpenSearch user -func XDeleteDbaasOpensearchUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-opensearch-user" +// XDeleteDbaasMysqlDatabase Delete a DBaaS MySQL database +func XDeleteDbaasMysqlDatabase(paramServiceName string, paramDatabaseName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-mysql-database" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5446,9 +5353,9 @@ func XDeleteDbaasOpensearchUser(paramServiceName string, paramUsername string, p server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{service-name}/user/{username}" + url := server + "/dbaas-mysql/{service-name}/database/{database-name}" url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url = strings.Replace(url, "{database-name}", paramDatabaseName, 1) req := cli.Client.Delete().URL(url) @@ -5477,9 +5384,9 @@ func XDeleteDbaasOpensearchUser(paramServiceName string, paramUsername string, p return resp, decoded, nil } -// XResetDbaasOpensearchUserPassword Reset the credentials of a DBaaS OpenSearch user -func XResetDbaasOpensearchUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-dbaas-opensearch-user-password" +// XCreateDbaasMysqlUser Create a DBaaS MySQL user +func XCreateDbaasMysqlUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-mysql-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5489,11 +5396,10 @@ func XResetDbaasOpensearchUserPassword(paramServiceName string, paramUsername st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{service-name}/user/{username}/password/reset" + url := server + "/dbaas-mysql/{service-name}/user" url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -5524,9 +5430,9 @@ func XResetDbaasOpensearchUserPassword(paramServiceName string, paramUsername st return resp, decoded, nil } -// XRevealDbaasOpensearchUserPassword Reveal the secrets of a DBaaS OpenSearch user -func XRevealDbaasOpensearchUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-opensearch-user-password" +// XDeleteDbaasMysqlUser Delete a DBaaS MySQL user +func XDeleteDbaasMysqlUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-mysql-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5536,11 +5442,11 @@ func XRevealDbaasOpensearchUserPassword(paramServiceName string, paramUsername s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-opensearch/{service-name}/user/{username}/password/reveal" + url := server + "/dbaas-mysql/{service-name}/user/{username}" url = strings.Replace(url, "{service-name}", paramServiceName, 1) url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -5567,9 +5473,9 @@ func XRevealDbaasOpensearchUserPassword(paramServiceName string, paramUsername s return resp, decoded, nil } -// XCreateDbaasServicePg Create a DBaaS PostgreSQL service -func XCreateDbaasServicePg(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-service-pg" +// XResetDbaasMysqlUserPassword Reset the credentials of a DBaaS mysql user +func XResetDbaasMysqlUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-dbaas-mysql-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5579,10 +5485,11 @@ func XCreateDbaasServicePg(paramName string, params *viper.Viper, body string) ( server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-mysql/{service-name}/user/{username}/password/reset" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -5613,9 +5520,9 @@ func XCreateDbaasServicePg(paramName string, params *viper.Viper, body string) ( return resp, decoded, nil } -// XDeleteDbaasServicePg Delete a Postgres service -func XDeleteDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service-pg" +// XRevealDbaasMysqlUserPassword Reveal the secrets of a DBaaS MySQL user +func XRevealDbaasMysqlUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-mysql-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5625,10 +5532,11 @@ func XDeleteDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-mysql/{service-name}/user/{username}/password/reveal" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -5655,9 +5563,9 @@ func XDeleteDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Re return resp, decoded, nil } -// XGetDbaasServicePg Get a DBaaS PostgreSQL service -func XGetDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-pg" +// XCreateDbaasServiceOpensearch Create a DBaaS OpenSearch service +func XCreateDbaasServiceOpensearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5667,10 +5575,14 @@ func XGetDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Respo server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{name}" + url := server + "/dbaas-opensearch/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -5697,9 +5609,9 @@ func XGetDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Respo return resp, decoded, nil } -// XUpdateDbaasServicePg Update a DBaaS PostgreSQL service -func XUpdateDbaasServicePg(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-service-pg" +// XDeleteDbaasServiceOpensearch Delete a OpenSearch service +func XDeleteDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5709,14 +5621,10 @@ func XUpdateDbaasServicePg(paramName string, params *viper.Viper, body string) ( server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{name}" + url := server + "/dbaas-opensearch/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -5743,9 +5651,9 @@ func XUpdateDbaasServicePg(paramName string, params *viper.Viper, body string) ( return resp, decoded, nil } -// XStartDbaasPgMaintenance Initiate PostgreSQL maintenance update -func XStartDbaasPgMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-dbaas-pg-maintenance" +// XGetDbaasServiceOpensearch Get a DBaaS OpenSearch service +func XGetDbaasServiceOpensearch(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5755,14 +5663,10 @@ func XStartDbaasPgMaintenance(paramName string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{name}/maintenance/start" + url := server + "/dbaas-opensearch/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -5789,9 +5693,9 @@ func XStartDbaasPgMaintenance(paramName string, params *viper.Viper, body string return resp, decoded, nil } -// XStopDbaasPgMigration Stop a DBaaS PostgreSQL migration -func XStopDbaasPgMigration(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "stop-dbaas-pg-migration" +// XUpdateDbaasServiceOpensearch Update a DBaaS OpenSearch service +func XUpdateDbaasServiceOpensearch(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5801,13 +5705,13 @@ func XStopDbaasPgMigration(paramName string, params *viper.Viper, body string) ( server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{name}/migration/stop" + url := server + "/dbaas-opensearch/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -5835,9 +5739,9 @@ func XStopDbaasPgMigration(paramName string, params *viper.Viper, body string) ( return resp, decoded, nil } -// XCreateDbaasPgConnectionPool Create a DBaaS PostgreSQL connection pool -func XCreateDbaasPgConnectionPool(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-pg-connection-pool" +// XGetDbaasOpensearchAclConfig Get DBaaS OpenSearch ACL configuration +func XGetDbaasOpensearchAclConfig(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-opensearch-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5847,14 +5751,10 @@ func XCreateDbaasPgConnectionPool(paramServiceName string, params *viper.Viper, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/connection-pool" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-opensearch/{name}/acl-config" + url = strings.Replace(url, "{name}", paramName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -5881,9 +5781,9 @@ func XCreateDbaasPgConnectionPool(paramServiceName string, params *viper.Viper, return resp, decoded, nil } -// XDeleteDbaasPgConnectionPool Delete a DBaaS PostgreSQL connection pool -func XDeleteDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-pg-connection-pool" +// XUpdateDbaasOpensearchAclConfig Create a DBaaS OpenSearch ACL configuration +func XUpdateDbaasOpensearchAclConfig(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-opensearch-acl-config" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5893,11 +5793,14 @@ func XDeleteDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolNa server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/connection-pool/{connection-pool-name}" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{connection-pool-name}", paramConnectionPoolName, 1) + url := server + "/dbaas-opensearch/{name}/acl-config" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -5924,9 +5827,9 @@ func XDeleteDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolNa return resp, decoded, nil } -// XUpdateDbaasPgConnectionPool Update a DBaaS PostgreSQL connection pool -func XUpdateDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-pg-connection-pool" +// XStartDbaasOpensearchMaintenance Initiate OpenSearch maintenance update +func XStartDbaasOpensearchMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-opensearch-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5936,14 +5839,13 @@ func XUpdateDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolNa server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/connection-pool/{connection-pool-name}" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{connection-pool-name}", paramConnectionPoolName, 1) + url := server + "/dbaas-opensearch/{name}/maintenance/start" + url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -5971,9 +5873,9 @@ func XUpdateDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolNa return resp, decoded, nil } -// XCreateDbaasPgDatabase Create a DBaaS Postgres database -func XCreateDbaasPgDatabase(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-pg-database" +// XCreateDbaasOpensearchUser Create a DBaaS OpenSearch user +func XCreateDbaasOpensearchUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-opensearch-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -5983,7 +5885,7 @@ func XCreateDbaasPgDatabase(paramServiceName string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/database" + url := server + "/dbaas-opensearch/{service-name}/user" url = strings.Replace(url, "{service-name}", paramServiceName, 1) req := cli.Client.Post().URL(url) @@ -6017,9 +5919,9 @@ func XCreateDbaasPgDatabase(paramServiceName string, params *viper.Viper, body s return resp, decoded, nil } -// XDeleteDbaasPgDatabase Delete a DBaaS Postgres database -func XDeleteDbaasPgDatabase(paramServiceName string, paramDatabaseName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-pg-database" +// XDeleteDbaasOpensearchUser Delete a DBaaS OpenSearch user +func XDeleteDbaasOpensearchUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-opensearch-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6029,9 +5931,9 @@ func XDeleteDbaasPgDatabase(paramServiceName string, paramDatabaseName string, p server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/database/{database-name}" + url := server + "/dbaas-opensearch/{service-name}/user/{username}" url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{database-name}", paramDatabaseName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) req := cli.Client.Delete().URL(url) @@ -6060,9 +5962,9 @@ func XDeleteDbaasPgDatabase(paramServiceName string, paramDatabaseName string, p return resp, decoded, nil } -// XCreateDbaasPostgresUser Create a DBaaS Postgres user -func XCreateDbaasPostgresUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-postgres-user" +// XResetDbaasOpensearchUserPassword Reset the credentials of a DBaaS OpenSearch user +func XResetDbaasOpensearchUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-dbaas-opensearch-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6072,10 +5974,11 @@ func XCreateDbaasPostgresUser(paramServiceName string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/user" + url := server + "/dbaas-opensearch/{service-name}/user/{username}/password/reset" url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -6106,9 +6009,9 @@ func XCreateDbaasPostgresUser(paramServiceName string, params *viper.Viper, body return resp, decoded, nil } -// XDeleteDbaasPostgresUser Delete a DBaaS Postgres user -func XDeleteDbaasPostgresUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-postgres-user" +// XRevealDbaasOpensearchUserPassword Reveal the secrets of a DBaaS OpenSearch user +func XRevealDbaasOpensearchUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-opensearch-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6118,11 +6021,11 @@ func XDeleteDbaasPostgresUser(paramServiceName string, paramUsername string, par server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/user/{username}" + url := server + "/dbaas-opensearch/{service-name}/user/{username}/password/reveal" url = strings.Replace(url, "{service-name}", paramServiceName, 1) url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -6149,9 +6052,9 @@ func XDeleteDbaasPostgresUser(paramServiceName string, paramUsername string, par return resp, decoded, nil } -// XUpdateDbaasPostgresAllowReplication Update access control for one service user -func XUpdateDbaasPostgresAllowReplication(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-postgres-allow-replication" +// XCreateDbaasServicePg Create a DBaaS PostgreSQL service +func XCreateDbaasServicePg(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-pg" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6161,11 +6064,10 @@ func XUpdateDbaasPostgresAllowReplication(paramServiceName string, paramUsername server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/user/{username}/allow-replication" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-postgres/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -6196,9 +6098,9 @@ func XUpdateDbaasPostgresAllowReplication(paramServiceName string, paramUsername return resp, decoded, nil } -// XResetDbaasPostgresUserPassword Reset the credentials of a DBaaS Postgres user -func XResetDbaasPostgresUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-dbaas-postgres-user-password" +// XDeleteDbaasServicePg Delete a Postgres service +func XDeleteDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-pg" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6208,15 +6110,10 @@ func XResetDbaasPostgresUserPassword(paramServiceName string, paramUsername stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/user/{username}/password/reset" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-postgres/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -6243,9 +6140,9 @@ func XResetDbaasPostgresUserPassword(paramServiceName string, paramUsername stri return resp, decoded, nil } -// XRevealDbaasPostgresUserPassword Reveal the secrets of a DBaaS Postgres user -func XRevealDbaasPostgresUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-postgres-user-password" +// XGetDbaasServicePg Get a DBaaS PostgreSQL service +func XGetDbaasServicePg(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-pg" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6255,9 +6152,8 @@ func XRevealDbaasPostgresUserPassword(paramServiceName string, paramUsername str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service-name}/user/{username}/password/reveal" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-postgres/{name}" + url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Get().URL(url) @@ -6286,9 +6182,9 @@ func XRevealDbaasPostgresUserPassword(paramServiceName string, paramUsername str return resp, decoded, nil } -// XCreateDbaasPgUpgradeCheck create-dbaas-pg-upgrade-check -func XCreateDbaasPgUpgradeCheck(paramService string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-pg-upgrade-check" +// XUpdateDbaasServicePg Update a DBaaS PostgreSQL service +func XUpdateDbaasServicePg(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-pg" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6298,10 +6194,10 @@ func XCreateDbaasPgUpgradeCheck(paramService string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-postgres/{service}/upgrade-check" - url = strings.Replace(url, "{service}", paramService, 1) + url := server + "/dbaas-postgres/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -6332,9 +6228,9 @@ func XCreateDbaasPgUpgradeCheck(paramService string, params *viper.Viper, body s return resp, decoded, nil } -// XListDbaasServices List DBaaS services -func XListDbaasServices(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-services" +// XStartDbaasPgMaintenance Initiate PostgreSQL maintenance update +func XStartDbaasPgMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-pg-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6344,9 +6240,14 @@ func XListDbaasServices(params *viper.Viper) (*gentleman.Response, map[string]in server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-service" + url := server + "/dbaas-postgres/{name}/maintenance/start" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6373,9 +6274,9 @@ func XListDbaasServices(params *viper.Viper) (*gentleman.Response, map[string]in return resp, decoded, nil } -// XGetDbaasServiceLogs Get logs of DBaaS service -func XGetDbaasServiceLogs(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-logs" +// XStopDbaasPgMigration Stop a DBaaS PostgreSQL migration +func XStopDbaasPgMigration(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "stop-dbaas-pg-migration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6385,13 +6286,13 @@ func XGetDbaasServiceLogs(paramServiceName string, params *viper.Viper, body str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-service-logs/{service-name}" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url := server + "/dbaas-postgres/{name}/migration/stop" + url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -6419,9 +6320,9 @@ func XGetDbaasServiceLogs(paramServiceName string, params *viper.Viper, body str return resp, decoded, nil } -// XGetDbaasServiceMetrics Get metrics of DBaaS service -func XGetDbaasServiceMetrics(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-metrics" +// XCreateDbaasPgConnectionPool Create a DBaaS PostgreSQL connection pool +func XCreateDbaasPgConnectionPool(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-pg-connection-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6431,7 +6332,7 @@ func XGetDbaasServiceMetrics(paramServiceName string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-service-metrics/{service-name}" + url := server + "/dbaas-postgres/{service-name}/connection-pool" url = strings.Replace(url, "{service-name}", paramServiceName, 1) req := cli.Client.Post().URL(url) @@ -6465,9 +6366,9 @@ func XGetDbaasServiceMetrics(paramServiceName string, params *viper.Viper, body return resp, decoded, nil } -// XListDbaasServiceTypes DBaaS Service Types -func XListDbaasServiceTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-service-types" +// XDeleteDbaasPgConnectionPool Delete a DBaaS PostgreSQL connection pool +func XDeleteDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-pg-connection-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6477,9 +6378,11 @@ func XListDbaasServiceTypes(params *viper.Viper) (*gentleman.Response, map[strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-service-type" + url := server + "/dbaas-postgres/{service-name}/connection-pool/{connection-pool-name}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{connection-pool-name}", paramConnectionPoolName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -6506,9 +6409,9 @@ func XListDbaasServiceTypes(params *viper.Viper) (*gentleman.Response, map[strin return resp, decoded, nil } -// XGetDbaasServiceType Get a DBaaS service type -func XGetDbaasServiceType(paramServiceTypeName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-type" +// XUpdateDbaasPgConnectionPool Update a DBaaS PostgreSQL connection pool +func XUpdateDbaasPgConnectionPool(paramServiceName string, paramConnectionPoolName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-pg-connection-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6518,10 +6421,15 @@ func XGetDbaasServiceType(paramServiceTypeName string, params *viper.Viper) (*ge server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-service-type/{service-type-name}" - url = strings.Replace(url, "{service-type-name}", paramServiceTypeName, 1) + url := server + "/dbaas-postgres/{service-name}/connection-pool/{connection-pool-name}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{connection-pool-name}", paramConnectionPoolName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6548,9 +6456,9 @@ func XGetDbaasServiceType(paramServiceTypeName string, params *viper.Viper) (*ge return resp, decoded, nil } -// XDeleteDbaasService Delete a DBaaS service -func XDeleteDbaasService(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service" +// XCreateDbaasPgDatabase Create a DBaaS Postgres database +func XCreateDbaasPgDatabase(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-pg-database" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6560,10 +6468,14 @@ func XDeleteDbaasService(paramName string, params *viper.Viper) (*gentleman.Resp server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-service/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-postgres/{service-name}/database" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6590,9 +6502,9 @@ func XDeleteDbaasService(paramName string, params *viper.Viper) (*gentleman.Resp return resp, decoded, nil } -// XGetDbaasSettingsGrafana Get DBaaS Grafana settings -func XGetDbaasSettingsGrafana(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-settings-grafana" +// XDeleteDbaasPgDatabase Delete a DBaaS Postgres database +func XDeleteDbaasPgDatabase(paramServiceName string, paramDatabaseName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-pg-database" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6602,9 +6514,11 @@ func XGetDbaasSettingsGrafana(params *viper.Viper) (*gentleman.Response, map[str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-settings-grafana" + url := server + "/dbaas-postgres/{service-name}/database/{database-name}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{database-name}", paramDatabaseName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -6631,9 +6545,9 @@ func XGetDbaasSettingsGrafana(params *viper.Viper) (*gentleman.Response, map[str return resp, decoded, nil } -// XGetDbaasSettingsKafka Get DBaaS Kafka settings -func XGetDbaasSettingsKafka(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-settings-kafka" +// XCreateDbaasPostgresUser Create a DBaaS Postgres user +func XCreateDbaasPostgresUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-postgres-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6643,9 +6557,14 @@ func XGetDbaasSettingsKafka(params *viper.Viper) (*gentleman.Response, map[strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-settings-kafka" + url := server + "/dbaas-postgres/{service-name}/user" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6672,9 +6591,9 @@ func XGetDbaasSettingsKafka(params *viper.Viper) (*gentleman.Response, map[strin return resp, decoded, nil } -// XGetDbaasSettingsMysql Get DBaaS MySQL settings -func XGetDbaasSettingsMysql(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-settings-mysql" +// XDeleteDbaasPostgresUser Delete a DBaaS Postgres user +func XDeleteDbaasPostgresUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-postgres-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6684,9 +6603,11 @@ func XGetDbaasSettingsMysql(params *viper.Viper) (*gentleman.Response, map[strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-settings-mysql" + url := server + "/dbaas-postgres/{service-name}/user/{username}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -6713,9 +6634,9 @@ func XGetDbaasSettingsMysql(params *viper.Viper) (*gentleman.Response, map[strin return resp, decoded, nil } -// XGetDbaasSettingsOpensearch Get DBaaS OpenSearch settings -func XGetDbaasSettingsOpensearch(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-settings-opensearch" +// XUpdateDbaasPostgresAllowReplication Update access control for one service user +func XUpdateDbaasPostgresAllowReplication(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-postgres-allow-replication" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6725,9 +6646,15 @@ func XGetDbaasSettingsOpensearch(params *viper.Viper) (*gentleman.Response, map[ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-settings-opensearch" + url := server + "/dbaas-postgres/{service-name}/user/{username}/allow-replication" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6754,9 +6681,9 @@ func XGetDbaasSettingsOpensearch(params *viper.Viper) (*gentleman.Response, map[ return resp, decoded, nil } -// XGetDbaasSettingsPg Get DBaaS PostgreSQL settings -func XGetDbaasSettingsPg(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-settings-pg" +// XResetDbaasPostgresUserPassword Reset the credentials of a DBaaS Postgres user +func XResetDbaasPostgresUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-dbaas-postgres-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6766,9 +6693,15 @@ func XGetDbaasSettingsPg(params *viper.Viper) (*gentleman.Response, map[string]i server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-settings-pg" + url := server + "/dbaas-postgres/{service-name}/user/{username}/password/reset" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6795,9 +6728,9 @@ func XGetDbaasSettingsPg(params *viper.Viper) (*gentleman.Response, map[string]i return resp, decoded, nil } -// XGetDbaasSettingsThanos Get DBaaS Thanos settings -func XGetDbaasSettingsThanos(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-settings-thanos" +// XRevealDbaasPostgresUserPassword Reveal the secrets of a DBaaS Postgres user +func XRevealDbaasPostgresUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-postgres-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6807,7 +6740,9 @@ func XGetDbaasSettingsThanos(params *viper.Viper) (*gentleman.Response, map[stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-settings-thanos" + url := server + "/dbaas-postgres/{service-name}/user/{username}/password/reveal" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) req := cli.Client.Get().URL(url) @@ -6836,9 +6771,9 @@ func XGetDbaasSettingsThanos(params *viper.Viper) (*gentleman.Response, map[stri return resp, decoded, nil } -// XGetDbaasSettingsValkey Get DBaaS Valkey settings -func XGetDbaasSettingsValkey(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-settings-valkey" +// XCreateDbaasPgUpgradeCheck create-dbaas-pg-upgrade-check +func XCreateDbaasPgUpgradeCheck(paramService string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-pg-upgrade-check" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6848,9 +6783,14 @@ func XGetDbaasSettingsValkey(params *viper.Viper) (*gentleman.Response, map[stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-settings-valkey" + url := server + "/dbaas-postgres/{service}/upgrade-check" + url = strings.Replace(url, "{service}", paramService, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6877,9 +6817,9 @@ func XGetDbaasSettingsValkey(params *viper.Viper) (*gentleman.Response, map[stri return resp, decoded, nil } -// XCreateDbaasTaskMigrationCheck create-dbaas-task-migration-check -func XCreateDbaasTaskMigrationCheck(paramService string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-task-migration-check" +// XListDbaasServices List DBaaS services +func XListDbaasServices(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-services" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6889,14 +6829,9 @@ func XCreateDbaasTaskMigrationCheck(paramService string, params *viper.Viper, bo server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-task-migration-check/{service}" - url = strings.Replace(url, "{service}", paramService, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-service" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -6923,9 +6858,9 @@ func XCreateDbaasTaskMigrationCheck(paramService string, params *viper.Viper, bo return resp, decoded, nil } -// XGetDbaasTask Get a DBaaS task -func XGetDbaasTask(paramService string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-task" +// XGetDbaasServiceLogs Get logs of DBaaS service +func XGetDbaasServiceLogs(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-logs" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6935,11 +6870,14 @@ func XGetDbaasTask(paramService string, paramId string, params *viper.Viper) (*g server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-task/{service}/{id}" - url = strings.Replace(url, "{service}", paramService, 1) - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dbaas-service-logs/{service-name}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -6966,9 +6904,9 @@ func XGetDbaasTask(paramService string, paramId string, params *viper.Viper) (*g return resp, decoded, nil } -// XCreateDbaasServiceThanos Create a DBaaS Thanos service -func XCreateDbaasServiceThanos(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-service-thanos" +// XGetDbaasServiceMetrics Get metrics of DBaaS service +func XGetDbaasServiceMetrics(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-metrics" if xSubcommand { handlerPath = "x " + handlerPath } @@ -6978,8 +6916,8 @@ func XCreateDbaasServiceThanos(paramName string, params *viper.Viper, body strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-thanos/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-service-metrics/{service-name}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) req := cli.Client.Post().URL(url) @@ -7012,9 +6950,9 @@ func XCreateDbaasServiceThanos(paramName string, params *viper.Viper, body strin return resp, decoded, nil } -// XDeleteDbaasServiceThanos Delete a Thanos service -func XDeleteDbaasServiceThanos(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service-thanos" +// XListDbaasServiceTypes DBaaS Service Types +func XListDbaasServiceTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-service-types" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7024,10 +6962,9 @@ func XDeleteDbaasServiceThanos(paramName string, params *viper.Viper) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-thanos/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-service-type" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7054,9 +6991,9 @@ func XDeleteDbaasServiceThanos(paramName string, params *viper.Viper) (*gentlema return resp, decoded, nil } -// XGetDbaasServiceThanos get-dbaas-service-thanos -func XGetDbaasServiceThanos(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-thanos" +// XGetDbaasServiceType Get a DBaaS service type +func XGetDbaasServiceType(paramServiceTypeName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-type" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7066,8 +7003,8 @@ func XGetDbaasServiceThanos(paramName string, params *viper.Viper) (*gentleman.R server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-thanos/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-service-type/{service-type-name}" + url = strings.Replace(url, "{service-type-name}", paramServiceTypeName, 1) req := cli.Client.Get().URL(url) @@ -7096,9 +7033,9 @@ func XGetDbaasServiceThanos(paramName string, params *viper.Viper) (*gentleman.R return resp, decoded, nil } -// XUpdateDbaasServiceThanos update-dbaas-service-thanos -func XUpdateDbaasServiceThanos(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-service-thanos" +// XDeleteDbaasService Delete a DBaaS service +func XDeleteDbaasService(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7108,14 +7045,10 @@ func XUpdateDbaasServiceThanos(paramName string, params *viper.Viper, body strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-thanos/{name}" + url := server + "/dbaas-service/{name}" url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7142,9 +7075,9 @@ func XUpdateDbaasServiceThanos(paramName string, params *viper.Viper, body strin return resp, decoded, nil } -// XStartDbaasThanosMaintenance Initiate Thanos maintenance update -func XStartDbaasThanosMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-dbaas-thanos-maintenance" +// XGetDbaasSettingsClickhouse [BETA] Get DBaaS ClickHouse settings +func XGetDbaasSettingsClickhouse(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-clickhouse" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7154,14 +7087,9 @@ func XStartDbaasThanosMaintenance(paramName string, params *viper.Viper, body st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-thanos/{name}/maintenance/start" - url = strings.Replace(url, "{name}", paramName, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-settings-clickhouse" - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7188,9 +7116,9 @@ func XStartDbaasThanosMaintenance(paramName string, params *viper.Viper, body st return resp, decoded, nil } -// XRevealDbaasThanosUserPassword Reveal the secrets of a DBaaS Thanos user -func XRevealDbaasThanosUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-thanos-user-password" +// XGetDbaasSettingsGrafana Get DBaaS Grafana settings +func XGetDbaasSettingsGrafana(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-grafana" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7200,9 +7128,7 @@ func XRevealDbaasThanosUserPassword(paramServiceName string, paramUsername strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-thanos/{service-name}/user/{username}/password/reveal" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-settings-grafana" req := cli.Client.Get().URL(url) @@ -7231,9 +7157,9 @@ func XRevealDbaasThanosUserPassword(paramServiceName string, paramUsername strin return resp, decoded, nil } -// XCreateDbaasServiceValkey Create a DBaaS Valkey service -func XCreateDbaasServiceValkey(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-service-valkey" +// XGetDbaasSettingsKafka Get DBaaS Kafka settings +func XGetDbaasSettingsKafka(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-kafka" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7243,14 +7169,9 @@ func XCreateDbaasServiceValkey(paramName string, params *viper.Viper, body strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{name}" - url = strings.Replace(url, "{name}", paramName, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-settings-kafka" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7277,9 +7198,9 @@ func XCreateDbaasServiceValkey(paramName string, params *viper.Viper, body strin return resp, decoded, nil } -// XDeleteDbaasServiceValkey Delete a Valkey service -func XDeleteDbaasServiceValkey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-service-valkey" +// XGetDbaasSettingsMysql Get DBaaS MySQL settings +func XGetDbaasSettingsMysql(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-mysql" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7289,10 +7210,9 @@ func XDeleteDbaasServiceValkey(paramName string, params *viper.Viper) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-settings-mysql" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7319,9 +7239,9 @@ func XDeleteDbaasServiceValkey(paramName string, params *viper.Viper) (*gentlema return resp, decoded, nil } -// XGetDbaasServiceValkey get-dbaas-service-valkey -func XGetDbaasServiceValkey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dbaas-service-valkey" +// XGetDbaasSettingsOpensearch Get DBaaS OpenSearch settings +func XGetDbaasSettingsOpensearch(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-opensearch" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7331,8 +7251,7 @@ func XGetDbaasServiceValkey(paramName string, params *viper.Viper) (*gentleman.R server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-settings-opensearch" req := cli.Client.Get().URL(url) @@ -7361,9 +7280,9 @@ func XGetDbaasServiceValkey(paramName string, params *viper.Viper) (*gentleman.R return resp, decoded, nil } -// XUpdateDbaasServiceValkey update-dbaas-service-valkey -func XUpdateDbaasServiceValkey(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-service-valkey" +// XGetDbaasSettingsPg Get DBaaS PostgreSQL settings +func XGetDbaasSettingsPg(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-pg" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7373,14 +7292,9 @@ func XUpdateDbaasServiceValkey(paramName string, params *viper.Viper, body strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{name}" - url = strings.Replace(url, "{name}", paramName, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-settings-pg" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7407,9 +7321,9 @@ func XUpdateDbaasServiceValkey(paramName string, params *viper.Viper, body strin return resp, decoded, nil } -// XStartDbaasValkeyMaintenance Initiate Valkey maintenance update -func XStartDbaasValkeyMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-dbaas-valkey-maintenance" +// XGetDbaasSettingsThanos Get DBaaS Thanos settings +func XGetDbaasSettingsThanos(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-thanos" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7419,14 +7333,9 @@ func XStartDbaasValkeyMaintenance(paramName string, params *viper.Viper, body st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{name}/maintenance/start" - url = strings.Replace(url, "{name}", paramName, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-settings-thanos" - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7453,9 +7362,9 @@ func XStartDbaasValkeyMaintenance(paramName string, params *viper.Viper, body st return resp, decoded, nil } -// XStopDbaasValkeyMigration Stop a DBaaS Valkey migration -func XStopDbaasValkeyMigration(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "stop-dbaas-valkey-migration" +// XGetDbaasSettingsValkey Get DBaaS Valkey settings +func XGetDbaasSettingsValkey(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-settings-valkey" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7465,14 +7374,9 @@ func XStopDbaasValkeyMigration(paramName string, params *viper.Viper, body strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{name}/migration/stop" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/dbaas-settings-valkey" - req := cli.Client.Post().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7499,9 +7403,9 @@ func XStopDbaasValkeyMigration(paramName string, params *viper.Viper, body strin return resp, decoded, nil } -// XCreateDbaasValkeyUser Create a DBaaS Valkey user -func XCreateDbaasValkeyUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dbaas-valkey-user" +// XCreateDbaasTaskMigrationCheck create-dbaas-task-migration-check +func XCreateDbaasTaskMigrationCheck(paramService string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-task-migration-check" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7511,8 +7415,8 @@ func XCreateDbaasValkeyUser(paramServiceName string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{service-name}/user" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url := server + "/dbaas-task-migration-check/{service}" + url = strings.Replace(url, "{service}", paramService, 1) req := cli.Client.Post().URL(url) @@ -7545,9 +7449,9 @@ func XCreateDbaasValkeyUser(paramServiceName string, params *viper.Viper, body s return resp, decoded, nil } -// XListDbaasValkeyUsers List DBaaS Valkey users with ACL configuration -func XListDbaasValkeyUsers(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dbaas-valkey-users" +// XGetDbaasTask Get a DBaaS task +func XGetDbaasTask(paramService string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-task" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7557,8 +7461,9 @@ func XListDbaasValkeyUsers(paramServiceName string, params *viper.Viper) (*gentl server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{service-name}/user" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url := server + "/dbaas-task/{service}/{id}" + url = strings.Replace(url, "{service}", paramService, 1) + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -7587,9 +7492,9 @@ func XListDbaasValkeyUsers(paramServiceName string, params *viper.Viper) (*gentl return resp, decoded, nil } -// XDeleteDbaasValkeyUser Delete a DBaaS Valkey user -func XDeleteDbaasValkeyUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dbaas-valkey-user" +// XCreateDbaasServiceThanos Create a DBaaS Thanos service +func XCreateDbaasServiceThanos(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-thanos" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7599,11 +7504,14 @@ func XDeleteDbaasValkeyUser(paramServiceName string, paramUsername string, param server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{service-name}/user/{username}" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-thanos/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -7630,9 +7538,9 @@ func XDeleteDbaasValkeyUser(paramServiceName string, paramUsername string, param return resp, decoded, nil } -// XUpdateDbaasValkeyUserAccessControl Update access control for one DBaaS Valkey service user -func XUpdateDbaasValkeyUserAccessControl(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dbaas-valkey-user-access-control" +// XDeleteDbaasServiceThanos Delete a Thanos service +func XDeleteDbaasServiceThanos(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-thanos" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7642,15 +7550,10 @@ func XUpdateDbaasValkeyUserAccessControl(paramServiceName string, paramUsername server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{service-name}/user/{username}" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-thanos/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7677,9 +7580,9 @@ func XUpdateDbaasValkeyUserAccessControl(paramServiceName string, paramUsername return resp, decoded, nil } -// XResetDbaasValkeyUserPassword Reset the credentials of a DBaaS Valkey user -func XResetDbaasValkeyUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-dbaas-valkey-user-password" +// XGetDbaasServiceThanos get-dbaas-service-thanos +func XGetDbaasServiceThanos(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-thanos" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7689,15 +7592,10 @@ func XResetDbaasValkeyUserPassword(paramServiceName string, paramUsername string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{service-name}/user/{username}/password/reset" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dbaas-thanos/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7724,9 +7622,9 @@ func XResetDbaasValkeyUserPassword(paramServiceName string, paramUsername string return resp, decoded, nil } -// XRevealDbaasValkeyUserPassword Reveal the secrets of a DBaaS Valkey user -func XRevealDbaasValkeyUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-dbaas-valkey-user-password" +// XUpdateDbaasServiceThanos update-dbaas-service-thanos +func XUpdateDbaasServiceThanos(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-thanos" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7736,11 +7634,14 @@ func XRevealDbaasValkeyUserPassword(paramServiceName string, paramUsername strin server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dbaas-valkey/{service-name}/user/{username}/password/reveal" - url = strings.Replace(url, "{service-name}", paramServiceName, 1) - url = strings.Replace(url, "{username}", paramUsername, 1) + url := server + "/dbaas-thanos/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -7767,9 +7668,9 @@ func XRevealDbaasValkeyUserPassword(paramServiceName string, paramUsername strin return resp, decoded, nil } -// XListDeployTargets List Deploy Targets -func XListDeployTargets(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-deploy-targets" +// XStartDbaasThanosMaintenance Initiate Thanos maintenance update +func XStartDbaasThanosMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-thanos-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7779,9 +7680,14 @@ func XListDeployTargets(params *viper.Viper) (*gentleman.Response, map[string]in server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/deploy-target" + url := server + "/dbaas-thanos/{name}/maintenance/start" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -7808,9 +7714,9 @@ func XListDeployTargets(params *viper.Viper) (*gentleman.Response, map[string]in return resp, decoded, nil } -// XGetDeployTarget Retrieve Deploy Target details -func XGetDeployTarget(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-deploy-target" +// XRevealDbaasThanosUserPassword Reveal the secrets of a DBaaS Thanos user +func XRevealDbaasThanosUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-thanos-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7820,8 +7726,9 @@ func XGetDeployTarget(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/deploy-target/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dbaas-thanos/{service-name}/user/{username}/password/reveal" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) req := cli.Client.Get().URL(url) @@ -7850,9 +7757,9 @@ func XGetDeployTarget(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XCreateDnsDomain Create DNS domain -func XCreateDnsDomain(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dns-domain" +// XCreateDbaasServiceValkey Create a DBaaS Valkey service +func XCreateDbaasServiceValkey(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-service-valkey" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7862,7 +7769,8 @@ func XCreateDnsDomain(params *viper.Viper, body string) (*gentleman.Response, ma server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain" + url := server + "/dbaas-valkey/{name}" + url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Post().URL(url) @@ -7895,9 +7803,9 @@ func XCreateDnsDomain(params *viper.Viper, body string) (*gentleman.Response, ma return resp, decoded, nil } -// XListDnsDomains List DNS domains -func XListDnsDomains(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dns-domains" +// XDeleteDbaasServiceValkey Delete a Valkey service +func XDeleteDbaasServiceValkey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-service-valkey" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7907,9 +7815,10 @@ func XListDnsDomains(params *viper.Viper) (*gentleman.Response, map[string]inter server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain" + url := server + "/dbaas-valkey/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7936,9 +7845,9 @@ func XListDnsDomains(params *viper.Viper) (*gentleman.Response, map[string]inter return resp, decoded, nil } -// XCreateDnsDomainRecord Create DNS domain record -func XCreateDnsDomainRecord(paramDomainId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-dns-domain-record" +// XGetDbaasServiceValkey get-dbaas-service-valkey +func XGetDbaasServiceValkey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dbaas-service-valkey" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7948,14 +7857,10 @@ func XCreateDnsDomainRecord(paramDomainId string, params *viper.Viper, body stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{domain-id}/record" - url = strings.Replace(url, "{domain-id}", paramDomainId, 1) - - req := cli.Client.Post().URL(url) + url := server + "/dbaas-valkey/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -7982,9 +7887,9 @@ func XCreateDnsDomainRecord(paramDomainId string, params *viper.Viper, body stri return resp, decoded, nil } -// XListDnsDomainRecords List DNS domain records -func XListDnsDomainRecords(paramDomainId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-dns-domain-records" +// XUpdateDbaasServiceValkey update-dbaas-service-valkey +func XUpdateDbaasServiceValkey(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-service-valkey" if xSubcommand { handlerPath = "x " + handlerPath } @@ -7994,10 +7899,14 @@ func XListDnsDomainRecords(paramDomainId string, params *viper.Viper) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{domain-id}/record" - url = strings.Replace(url, "{domain-id}", paramDomainId, 1) + url := server + "/dbaas-valkey/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -8024,9 +7933,9 @@ func XListDnsDomainRecords(paramDomainId string, params *viper.Viper) (*gentlema return resp, decoded, nil } -// XDeleteDnsDomainRecord Delete DNS domain record -func XDeleteDnsDomainRecord(paramDomainId string, paramRecordId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dns-domain-record" +// XStartDbaasValkeyMaintenance Initiate Valkey maintenance update +func XStartDbaasValkeyMaintenance(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-dbaas-valkey-maintenance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8036,11 +7945,14 @@ func XDeleteDnsDomainRecord(paramDomainId string, paramRecordId string, params * server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{domain-id}/record/{record-id}" - url = strings.Replace(url, "{domain-id}", paramDomainId, 1) - url = strings.Replace(url, "{record-id}", paramRecordId, 1) + url := server + "/dbaas-valkey/{name}/maintenance/start" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -8067,9 +7979,9 @@ func XDeleteDnsDomainRecord(paramDomainId string, paramRecordId string, params * return resp, decoded, nil } -// XGetDnsDomainRecord Retrieve DNS domain record details -func XGetDnsDomainRecord(paramDomainId string, paramRecordId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dns-domain-record" +// XStopDbaasValkeyMigration Stop a DBaaS Valkey migration +func XStopDbaasValkeyMigration(paramName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "stop-dbaas-valkey-migration" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8079,11 +7991,14 @@ func XGetDnsDomainRecord(paramDomainId string, paramRecordId string, params *vip server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{domain-id}/record/{record-id}" - url = strings.Replace(url, "{domain-id}", paramDomainId, 1) - url = strings.Replace(url, "{record-id}", paramRecordId, 1) + url := server + "/dbaas-valkey/{name}/migration/stop" + url = strings.Replace(url, "{name}", paramName, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -8110,9 +8025,9 @@ func XGetDnsDomainRecord(paramDomainId string, paramRecordId string, params *vip return resp, decoded, nil } -// XUpdateDnsDomainRecord Update DNS domain record -func XUpdateDnsDomainRecord(paramDomainId string, paramRecordId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-dns-domain-record" +// XCreateDbaasValkeyUser Create a DBaaS Valkey user +func XCreateDbaasValkeyUser(paramServiceName string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dbaas-valkey-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8122,11 +8037,10 @@ func XUpdateDnsDomainRecord(paramDomainId string, paramRecordId string, params * server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{domain-id}/record/{record-id}" - url = strings.Replace(url, "{domain-id}", paramDomainId, 1) - url = strings.Replace(url, "{record-id}", paramRecordId, 1) + url := server + "/dbaas-valkey/{service-name}/user" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -8157,9 +8071,9 @@ func XUpdateDnsDomainRecord(paramDomainId string, paramRecordId string, params * return resp, decoded, nil } -// XDeleteDnsDomain Delete DNS Domain -func XDeleteDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-dns-domain" +// XListDbaasValkeyUsers List DBaaS Valkey users with ACL configuration +func XListDbaasValkeyUsers(paramServiceName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dbaas-valkey-users" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8169,10 +8083,10 @@ func XDeleteDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dbaas-valkey/{service-name}/user" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8199,9 +8113,9 @@ func XDeleteDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XGetDnsDomain Retrieve DNS domain details -func XGetDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dns-domain" +// XDeleteDbaasValkeyUser Delete a DBaaS Valkey user +func XDeleteDbaasValkeyUser(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dbaas-valkey-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8211,10 +8125,11 @@ func XGetDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, ma server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dbaas-valkey/{service-name}/user/{username}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8241,9 +8156,9 @@ func XGetDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, ma return resp, decoded, nil } -// XGetDnsDomainZoneFile Retrieve DNS domain zone file -func XGetDnsDomainZoneFile(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-dns-domain-zone-file" +// XUpdateDbaasValkeyUserAccessControl Update access control for one DBaaS Valkey service user +func XUpdateDbaasValkeyUserAccessControl(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dbaas-valkey-user-access-control" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8253,10 +8168,15 @@ func XGetDnsDomainZoneFile(paramId string, params *viper.Viper) (*gentleman.Resp server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/dns-domain/{id}/zone" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dbaas-valkey/{service-name}/user/{username}" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -8283,9 +8203,9 @@ func XGetDnsDomainZoneFile(paramId string, params *viper.Viper) (*gentleman.Resp return resp, decoded, nil } -// XCreateElasticIp Create an Elastic IP -func XCreateElasticIp(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-elastic-ip" +// XResetDbaasValkeyUserPassword Reset the credentials of a DBaaS Valkey user +func XResetDbaasValkeyUserPassword(paramServiceName string, paramUsername string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-dbaas-valkey-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8295,9 +8215,11 @@ func XCreateElasticIp(params *viper.Viper, body string) (*gentleman.Response, ma server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip" + url := server + "/dbaas-valkey/{service-name}/user/{username}/password/reset" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -8328,9 +8250,9 @@ func XCreateElasticIp(params *viper.Viper, body string) (*gentleman.Response, ma return resp, decoded, nil } -// XListElasticIps List Elastic IPs -func XListElasticIps(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-elastic-ips" +// XRevealDbaasValkeyUserPassword Reveal the secrets of a DBaaS Valkey user +func XRevealDbaasValkeyUserPassword(paramServiceName string, paramUsername string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-dbaas-valkey-user-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8340,7 +8262,9 @@ func XListElasticIps(params *viper.Viper) (*gentleman.Response, map[string]inter server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip" + url := server + "/dbaas-valkey/{service-name}/user/{username}/password/reveal" + url = strings.Replace(url, "{service-name}", paramServiceName, 1) + url = strings.Replace(url, "{username}", paramUsername, 1) req := cli.Client.Get().URL(url) @@ -8369,9 +8293,9 @@ func XListElasticIps(params *viper.Viper) (*gentleman.Response, map[string]inter return resp, decoded, nil } -// XDeleteElasticIp Delete an Elastic IP -func XDeleteElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-elastic-ip" +// XListDeployTargets List Deploy Targets +func XListDeployTargets(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-deploy-targets" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8381,10 +8305,9 @@ func XDeleteElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/deploy-target" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8411,9 +8334,9 @@ func XDeleteElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XGetElasticIp Retrieve Elastic IP details -func XGetElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-elastic-ip" +// XGetDeployTarget Retrieve Deploy Target details +func XGetDeployTarget(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-deploy-target" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8423,7 +8346,7 @@ func XGetElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, ma server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip/{id}" + url := server + "/deploy-target/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -8453,9 +8376,9 @@ func XGetElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, ma return resp, decoded, nil } -// XUpdateElasticIp Update an Elastic IP -func XUpdateElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-elastic-ip" +// XCreateDnsDomain Create DNS domain +func XCreateDnsDomain(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dns-domain" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8465,10 +8388,9 @@ func XUpdateElasticIp(paramId string, params *viper.Viper, body string) (*gentle server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dns-domain" - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -8499,9 +8421,9 @@ func XUpdateElasticIp(paramId string, params *viper.Viper, body string) (*gentle return resp, decoded, nil } -// XResetElasticIpField Reset an Elastic IP field to its default value -func XResetElasticIpField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-elastic-ip-field" +// XListDnsDomains List DNS domains +func XListDnsDomains(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dns-domains" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8511,11 +8433,9 @@ func XResetElasticIpField(paramId string, paramField string, params *viper.Viper server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip/{id}/{field}" - url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{field}", paramField, 1) + url := server + "/dns-domain" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8542,9 +8462,9 @@ func XResetElasticIpField(paramId string, paramField string, params *viper.Viper return resp, decoded, nil } -// XAttachInstanceToElasticIp Attach a Compute instance to an Elastic IP -func XAttachInstanceToElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "attach-instance-to-elastic-ip" +// XCreateDnsDomainRecord Create DNS domain record +func XCreateDnsDomainRecord(paramDomainId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-dns-domain-record" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8554,10 +8474,10 @@ func XAttachInstanceToElasticIp(paramId string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip/{id}:attach" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/dns-domain/{domain-id}/record" + url = strings.Replace(url, "{domain-id}", paramDomainId, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -8588,9 +8508,9 @@ func XAttachInstanceToElasticIp(paramId string, params *viper.Viper, body string return resp, decoded, nil } -// XDetachInstanceFromElasticIp Detach a Compute instance from an Elastic IP -func XDetachInstanceFromElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "detach-instance-from-elastic-ip" +// XListDnsDomainRecords List DNS domain records +func XListDnsDomainRecords(paramDomainId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-dns-domain-records" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8600,14 +8520,10 @@ func XDetachInstanceFromElasticIp(paramId string, params *viper.Viper, body stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/elastic-ip/{id}:detach" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Put().URL(url) + url := server + "/dns-domain/{domain-id}/record" + url = strings.Replace(url, "{domain-id}", paramDomainId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8634,9 +8550,9 @@ func XDetachInstanceFromElasticIp(paramId string, params *viper.Viper, body stri return resp, decoded, nil } -// XGetEnvImpact [BETA] Retrieve organization environmental impact reports -func XGetEnvImpact(paramPeriod string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-env-impact" +// XDeleteDnsDomainRecord Delete DNS domain record +func XDeleteDnsDomainRecord(paramDomainId string, paramRecordId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dns-domain-record" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8646,10 +8562,11 @@ func XGetEnvImpact(paramPeriod string, params *viper.Viper) (*gentleman.Response server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/env-impact/{period}" - url = strings.Replace(url, "{period}", paramPeriod, 1) + url := server + "/dns-domain/{domain-id}/record/{record-id}" + url = strings.Replace(url, "{domain-id}", paramDomainId, 1) + url = strings.Replace(url, "{record-id}", paramRecordId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8676,9 +8593,9 @@ func XGetEnvImpact(paramPeriod string, params *viper.Viper) (*gentleman.Response return resp, decoded, nil } -// XListEvents List Events -func XListEvents(params *viper.Viper) (*gentleman.Response, interface{}, error) { - handlerPath := "list-events" +// XGetDnsDomainRecord Retrieve DNS domain record details +func XGetDnsDomainRecord(paramDomainId string, paramRecordId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dns-domain-record" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8688,19 +8605,12 @@ func XListEvents(params *viper.Viper) (*gentleman.Response, interface{}, error) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/event" + url := server + "/dns-domain/{domain-id}/record/{record-id}" + url = strings.Replace(url, "{domain-id}", paramDomainId, 1) + url = strings.Replace(url, "{record-id}", paramRecordId, 1) req := cli.Client.Get().URL(url) - paramFrom := params.GetString("from") - if paramFrom != "" { - req = req.AddQuery("from", fmt.Sprintf("%v", paramFrom)) - } - paramTo := params.GetString("to") - if paramTo != "" { - req = req.AddQuery("to", fmt.Sprintf("%v", paramTo)) - } - cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() @@ -8708,7 +8618,7 @@ func XListEvents(params *viper.Viper) (*gentleman.Response, interface{}, error) return nil, nil, errors.Wrap(err, "Request failed") } - var decoded interface{} + var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { @@ -8720,15 +8630,15 @@ func XListEvents(params *viper.Viper) (*gentleman.Response, interface{}, error) after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { - decoded = after + decoded = after.(map[string]interface{}) } return resp, decoded, nil } -// XGetIamOrganizationPolicy Retrieve IAM Organization Policy -func XGetIamOrganizationPolicy(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-iam-organization-policy" +// XUpdateDnsDomainRecord Update DNS domain record +func XUpdateDnsDomainRecord(paramDomainId string, paramRecordId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-dns-domain-record" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8738,9 +8648,15 @@ func XGetIamOrganizationPolicy(params *viper.Viper) (*gentleman.Response, map[st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-organization-policy" + url := server + "/dns-domain/{domain-id}/record/{record-id}" + url = strings.Replace(url, "{domain-id}", paramDomainId, 1) + url = strings.Replace(url, "{record-id}", paramRecordId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -8767,9 +8683,9 @@ func XGetIamOrganizationPolicy(params *viper.Viper) (*gentleman.Response, map[st return resp, decoded, nil } -// XUpdateIamOrganizationPolicy Update IAM Organization Policy -func XUpdateIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-iam-organization-policy" +// XDeleteDnsDomain Delete DNS Domain +func XDeleteDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-dns-domain" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8779,13 +8695,10 @@ func XUpdateIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman. server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-organization-policy" - - req := cli.Client.Put().URL(url) + url := server + "/dns-domain/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8812,9 +8725,9 @@ func XUpdateIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman. return resp, decoded, nil } -// XResetIamOrganizationPolicy Reset IAM Organization Policy -func XResetIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-iam-organization-policy" +// XGetDnsDomain Retrieve DNS domain details +func XGetDnsDomain(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dns-domain" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8824,13 +8737,10 @@ func XResetIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman.R server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-organization-policy:reset" - - req := cli.Client.Post().URL(url) + url := server + "/dns-domain/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8857,9 +8767,9 @@ func XResetIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman.R return resp, decoded, nil } -// XCreateIamRole Create IAM Role -func XCreateIamRole(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-iam-role" +// XGetDnsDomainZoneFile Retrieve DNS domain zone file +func XGetDnsDomainZoneFile(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-dns-domain-zone-file" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8869,13 +8779,10 @@ func XCreateIamRole(params *viper.Viper, body string) (*gentleman.Response, map[ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role" - - req := cli.Client.Post().URL(url) + url := server + "/dns-domain/{id}/zone" + url = strings.Replace(url, "{id}", paramId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8902,9 +8809,9 @@ func XCreateIamRole(params *viper.Viper, body string) (*gentleman.Response, map[ return resp, decoded, nil } -// XListIamRoles List IAM Roles -func XListIamRoles(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-iam-roles" +// XCreateElasticIp Create an Elastic IP +func XCreateElasticIp(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8914,9 +8821,13 @@ func XListIamRoles(params *viper.Viper) (*gentleman.Response, map[string]interfa server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role" + url := server + "/elastic-ip" - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -8943,9 +8854,9 @@ func XListIamRoles(params *viper.Viper) (*gentleman.Response, map[string]interfa return resp, decoded, nil } -// XDeleteIamRole Delete IAM Role -func XDeleteIamRole(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-iam-role" +// XListElasticIps List Elastic IPs +func XListElasticIps(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-elastic-ips" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8955,10 +8866,9 @@ func XDeleteIamRole(paramId string, params *viper.Viper) (*gentleman.Response, m server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/elastic-ip" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -8985,9 +8895,9 @@ func XDeleteIamRole(paramId string, params *viper.Viper) (*gentleman.Response, m return resp, decoded, nil } -// XGetIamRole Retrieve IAM Role -func XGetIamRole(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-iam-role" +// XDeleteElasticIp Delete an Elastic IP +func XDeleteElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -8997,10 +8907,10 @@ func XGetIamRole(paramId string, params *viper.Viper) (*gentleman.Response, map[ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role/{id}" + url := server + "/elastic-ip/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9027,9 +8937,9 @@ func XGetIamRole(paramId string, params *viper.Viper) (*gentleman.Response, map[ return resp, decoded, nil } -// XUpdateIamRole Update IAM Role -func XUpdateIamRole(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-iam-role" +// XGetElasticIp Retrieve Elastic IP details +func XGetElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9039,14 +8949,10 @@ func XUpdateIamRole(paramId string, params *viper.Viper, body string) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role/{id}" + url := server + "/elastic-ip/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9073,9 +8979,9 @@ func XUpdateIamRole(paramId string, params *viper.Viper, body string) (*gentlema return resp, decoded, nil } -// XAssumeIamRole [BETA] Request generation of key/secret that allow caller to assume target role -func XAssumeIamRole(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "assume-iam-role" +// XUpdateElasticIp Update an Elastic IP +func XUpdateElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9085,10 +8991,10 @@ func XAssumeIamRole(paramId string, params *viper.Viper, body string) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role/{id}/assume" + url := server + "/elastic-ip/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -9119,9 +9025,9 @@ func XAssumeIamRole(paramId string, params *viper.Viper, body string) (*gentlema return resp, decoded, nil } -// XUpdateIamRolePolicy Update IAM Role Policy -func XUpdateIamRolePolicy(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-iam-role-policy" +// XResetElasticIpField Reset an Elastic IP field to its default value +func XResetElasticIpField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-elastic-ip-field" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9131,14 +9037,11 @@ func XUpdateIamRolePolicy(paramId string, params *viper.Viper, body string) (*ge server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role/{id}:policy" + url := server + "/elastic-ip/{id}/{field}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{field}", paramField, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9165,9 +9068,9 @@ func XUpdateIamRolePolicy(paramId string, params *viper.Viper, body string) (*ge return resp, decoded, nil } -// XCreateInstance Create a Compute instance -func XCreateInstance(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-instance" +// XAttachInstanceToElasticIp Attach a Compute instance to an Elastic IP +func XAttachInstanceToElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "attach-instance-to-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9177,9 +9080,10 @@ func XCreateInstance(params *viper.Viper, body string) (*gentleman.Response, map server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance" + url := server + "/elastic-ip/{id}:attach" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -9210,9 +9114,9 @@ func XCreateInstance(params *viper.Viper, body string) (*gentleman.Response, map return resp, decoded, nil } -// XListInstances List Compute instances -func XListInstances(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-instances" +// XDetachInstanceFromElasticIp Detach a Compute instance from an Elastic IP +func XDetachInstanceFromElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "detach-instance-from-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9222,25 +9126,13 @@ func XListInstances(params *viper.Viper) (*gentleman.Response, map[string]interf server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance" + url := server + "/elastic-ip/{id}:detach" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) - paramManagerId := params.GetString("manager-id") - if paramManagerId != "" { - req = req.AddQuery("manager-id", fmt.Sprintf("%v", paramManagerId)) - } - paramManagerType := params.GetString("manager-type") - if paramManagerType != "" { - req = req.AddQuery("manager-type", fmt.Sprintf("%v", paramManagerType)) - } - paramIpAddress := params.GetString("ip-address") - if paramIpAddress != "" { - req = req.AddQuery("ip-address", fmt.Sprintf("%v", paramIpAddress)) - } - paramLabels := params.GetString("labels") - if paramLabels != "" { - req = req.AddQuery("labels", fmt.Sprintf("%v", paramLabels)) + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -9268,9 +9160,9 @@ func XListInstances(params *viper.Viper) (*gentleman.Response, map[string]interf return resp, decoded, nil } -// XCreateInstancePool Create an Instance Pool -func XCreateInstancePool(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-instance-pool" +// XGetEnvImpact [BETA] Retrieve organization environmental impact reports +func XGetEnvImpact(paramPeriod string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-env-impact" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9280,13 +9172,10 @@ func XCreateInstancePool(params *viper.Viper, body string) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool" - - req := cli.Client.Post().URL(url) + url := server + "/env-impact/{period}" + url = strings.Replace(url, "{period}", paramPeriod, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9313,9 +9202,9 @@ func XCreateInstancePool(params *viper.Viper, body string) (*gentleman.Response, return resp, decoded, nil } -// XListInstancePools List Instance Pools -func XListInstancePools(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-instance-pools" +// XListEvents List Events +func XListEvents(params *viper.Viper) (*gentleman.Response, interface{}, error) { + handlerPath := "list-events" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9325,10 +9214,19 @@ func XListInstancePools(params *viper.Viper) (*gentleman.Response, map[string]in server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool" + url := server + "/event" req := cli.Client.Get().URL(url) + paramFrom := params.GetString("from") + if paramFrom != "" { + req = req.AddQuery("from", fmt.Sprintf("%v", paramFrom)) + } + paramTo := params.GetString("to") + if paramTo != "" { + req = req.AddQuery("to", fmt.Sprintf("%v", paramTo)) + } + cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() @@ -9336,7 +9234,7 @@ func XListInstancePools(params *viper.Viper) (*gentleman.Response, map[string]in return nil, nil, errors.Wrap(err, "Request failed") } - var decoded map[string]interface{} + var decoded interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { @@ -9348,15 +9246,15 @@ func XListInstancePools(params *viper.Viper) (*gentleman.Response, map[string]in after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { - decoded = after.(map[string]interface{}) + decoded = after } return resp, decoded, nil } -// XDeleteInstancePool Delete an Instance Pool -func XDeleteInstancePool(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-instance-pool" +// XGetIamOrganizationPolicy Retrieve IAM Organization Policy +func XGetIamOrganizationPolicy(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-iam-organization-policy" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9366,10 +9264,9 @@ func XDeleteInstancePool(paramId string, params *viper.Viper) (*gentleman.Respon server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/iam-organization-policy" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9396,9 +9293,9 @@ func XDeleteInstancePool(paramId string, params *viper.Viper) (*gentleman.Respon return resp, decoded, nil } -// XGetInstancePool Retrieve Instance Pool details -func XGetInstancePool(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-instance-pool" +// XUpdateIamOrganizationPolicy Update IAM Organization Policy +func XUpdateIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-iam-organization-policy" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9408,10 +9305,13 @@ func XGetInstancePool(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/iam-organization-policy" - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -9438,9 +9338,9 @@ func XGetInstancePool(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XUpdateInstancePool Update an Instance Pool -func XUpdateInstancePool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-instance-pool" +// XResetIamOrganizationPolicy Reset IAM Organization Policy +func XResetIamOrganizationPolicy(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-iam-organization-policy" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9450,13 +9350,12 @@ func XUpdateInstancePool(paramId string, params *viper.Viper, body string) (*gen server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/iam-organization-policy:reset" - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -9484,9 +9383,9 @@ func XUpdateInstancePool(paramId string, params *viper.Viper, body string) (*gen return resp, decoded, nil } -// XResetInstancePoolField Reset an Instance Pool field to its default value -func XResetInstancePoolField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-instance-pool-field" +// XCreateIamRole Create IAM Role +func XCreateIamRole(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-iam-role" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9496,11 +9395,13 @@ func XResetInstancePoolField(paramId string, paramField string, params *viper.Vi server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool/{id}/{field}" - url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{field}", paramField, 1) + url := server + "/iam-role" - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -9527,9 +9428,9 @@ func XResetInstancePoolField(paramId string, paramField string, params *viper.Vi return resp, decoded, nil } -// XEvictInstancePoolMembers Evict Instance Pool members -func XEvictInstancePoolMembers(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "evict-instance-pool-members" +// XListIamRoles List IAM Roles +func XListIamRoles(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-iam-roles" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9539,14 +9440,9 @@ func XEvictInstancePoolMembers(paramId string, params *viper.Viper, body string) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool/{id}:evict" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Put().URL(url) + url := server + "/iam-role" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9573,9 +9469,9 @@ func XEvictInstancePoolMembers(paramId string, params *viper.Viper, body string) return resp, decoded, nil } -// XScaleInstancePool Scale an Instance Pool -func XScaleInstancePool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "scale-instance-pool" +// XDeleteIamRole Delete IAM Role +func XDeleteIamRole(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-iam-role" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9585,14 +9481,10 @@ func XScaleInstancePool(paramId string, params *viper.Viper, body string) (*gent server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-pool/{id}:scale" + url := server + "/iam-role/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9619,9 +9511,9 @@ func XScaleInstancePool(paramId string, params *viper.Viper, body string) (*gent return resp, decoded, nil } -// XListInstanceTypes List Compute instance Types -func XListInstanceTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-instance-types" +// XGetIamRole Retrieve IAM Role +func XGetIamRole(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-iam-role" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9631,7 +9523,8 @@ func XListInstanceTypes(params *viper.Viper) (*gentleman.Response, map[string]in server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-type" + url := server + "/iam-role/{id}" + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -9660,9 +9553,9 @@ func XListInstanceTypes(params *viper.Viper) (*gentleman.Response, map[string]in return resp, decoded, nil } -// XGetInstanceType Retrieve Instance Type details -func XGetInstanceType(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-instance-type" +// XUpdateIamRole Update IAM Role +func XUpdateIamRole(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-iam-role" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9672,10 +9565,14 @@ func XGetInstanceType(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance-type/{id}" + url := server + "/iam-role/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -9702,9 +9599,9 @@ func XGetInstanceType(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XDeleteInstance Delete a Compute instance -func XDeleteInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-instance" +// XAssumeIamRole [BETA] Request generation of key/secret that allow caller to assume target role +func XAssumeIamRole(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "assume-iam-role" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9714,10 +9611,14 @@ func XDeleteInstance(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}" + url := server + "/iam-role/{id}/assume" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -9744,9 +9645,9 @@ func XDeleteInstance(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XGetInstance Retrieve Compute instance details -func XGetInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-instance" +// XUpdateIamRolePolicy Update IAM Role Policy +func XUpdateIamRolePolicy(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-iam-role-policy" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9756,10 +9657,14 @@ func XGetInstance(paramId string, params *viper.Viper) (*gentleman.Response, map server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}" + url := server + "/iam-role/{id}:policy" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -9786,9 +9691,9 @@ func XGetInstance(paramId string, params *viper.Viper) (*gentleman.Response, map return resp, decoded, nil } -// XUpdateInstance Update a Compute instance -func XUpdateInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-instance" +// XCreateInstance Create a Compute instance +func XCreateInstance(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9798,10 +9703,9 @@ func XUpdateInstance(paramId string, params *viper.Viper, body string) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/instance" - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -9832,9 +9736,9 @@ func XUpdateInstance(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XResetInstanceField Reset Instance field -func XResetInstanceField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-instance-field" +// XListInstances List Compute instances +func XListInstances(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-instances" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9844,20 +9748,35 @@ func XResetInstanceField(paramId string, paramField string, params *viper.Viper) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}/{field}" - url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{field}", paramField, 1) - - req := cli.Client.Delete().URL(url) + url := server + "/instance" - cli.HandleBefore(handlerPath, params, req) + req := cli.Client.Get().URL(url) - resp, err := req.Do() - if err != nil { - return nil, nil, errors.Wrap(err, "Request failed") + paramManagerId := params.GetString("manager-id") + if paramManagerId != "" { + req = req.AddQuery("manager-id", fmt.Sprintf("%v", paramManagerId)) } - - var decoded map[string]interface{} + paramManagerType := params.GetString("manager-type") + if paramManagerType != "" { + req = req.AddQuery("manager-type", fmt.Sprintf("%v", paramManagerType)) + } + paramIpAddress := params.GetString("ip-address") + if paramIpAddress != "" { + req = req.AddQuery("ip-address", fmt.Sprintf("%v", paramIpAddress)) + } + paramLabels := params.GetString("labels") + if paramLabels != "" { + req = req.AddQuery("labels", fmt.Sprintf("%v", paramLabels)) + } + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { @@ -9875,9 +9794,9 @@ func XResetInstanceField(paramId string, paramField string, params *viper.Viper) return resp, decoded, nil } -// XAddInstanceProtection Set instance destruction protection -func XAddInstanceProtection(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "add-instance-protection" +// XCreateInstancePool Create an Instance Pool +func XCreateInstancePool(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-instance-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9887,13 +9806,12 @@ func XAddInstanceProtection(paramId string, params *viper.Viper, body string) (* server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:add-protection" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/instance-pool" - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -9921,9 +9839,9 @@ func XAddInstanceProtection(paramId string, params *viper.Viper, body string) (* return resp, decoded, nil } -// XCreateSnapshot Create a Snapshot of a Compute instance -func XCreateSnapshot(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-snapshot" +// XListInstancePools List Instance Pools +func XListInstancePools(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-instance-pools" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9933,14 +9851,9 @@ func XCreateSnapshot(paramId string, params *viper.Viper, body string) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:create-snapshot" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Post().URL(url) + url := server + "/instance-pool" - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -9967,9 +9880,9 @@ func XCreateSnapshot(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XEnableTpm Enable tpm for the instance. -func XEnableTpm(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "enable-tpm" +// XDeleteInstancePool Delete an Instance Pool +func XDeleteInstancePool(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-instance-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -9979,14 +9892,10 @@ func XEnableTpm(paramId string, params *viper.Viper, body string) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:enable-tpm" + url := server + "/instance-pool/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10013,9 +9922,9 @@ func XEnableTpm(paramId string, params *viper.Viper, body string) (*gentleman.Re return resp, decoded, nil } -// XRevealInstancePassword Reveal the password used during instance creation or the latest password reset. -func XRevealInstancePassword(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reveal-instance-password" +// XGetInstancePool Retrieve Instance Pool details +func XGetInstancePool(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-instance-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10025,7 +9934,7 @@ func XRevealInstancePassword(paramId string, params *viper.Viper) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:password" + url := server + "/instance-pool/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -10055,9 +9964,9 @@ func XRevealInstancePassword(paramId string, params *viper.Viper) (*gentleman.Re return resp, decoded, nil } -// XRebootInstance Reboot a Compute instance -func XRebootInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reboot-instance" +// XUpdateInstancePool Update an Instance Pool +func XUpdateInstancePool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-instance-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10067,13 +9976,13 @@ func XRebootInstance(paramId string, params *viper.Viper, body string) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:reboot" + url := server + "/instance-pool/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -10101,9 +10010,9 @@ func XRebootInstance(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XRemoveInstanceProtection Remove instance destruction protection -func XRemoveInstanceProtection(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "remove-instance-protection" +// XResetInstancePoolField Reset an Instance Pool field to its default value +func XResetInstancePoolField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-instance-pool-field" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10113,14 +10022,11 @@ func XRemoveInstanceProtection(paramId string, params *viper.Viper, body string) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:remove-protection" + url := server + "/instance-pool/{id}/{field}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{field}", paramField, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10147,9 +10053,9 @@ func XRemoveInstanceProtection(paramId string, params *viper.Viper, body string) return resp, decoded, nil } -// XResetInstance Reset a Compute instance to a base/target template -func XResetInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-instance" +// XEvictInstancePoolMembers Evict Instance Pool members +func XEvictInstancePoolMembers(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "evict-instance-pool-members" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10159,7 +10065,7 @@ func XResetInstance(paramId string, params *viper.Viper, body string) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:reset" + url := server + "/instance-pool/{id}:evict" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) @@ -10193,9 +10099,9 @@ func XResetInstance(paramId string, params *viper.Viper, body string) (*gentlema return resp, decoded, nil } -// XResetInstancePassword Reset a compute instance password -func XResetInstancePassword(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-instance-password" +// XScaleInstancePool Scale an Instance Pool +func XScaleInstancePool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "scale-instance-pool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10205,13 +10111,13 @@ func XResetInstancePassword(paramId string, params *viper.Viper, body string) (* server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:reset-password" + url := server + "/instance-pool/{id}:scale" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -10239,9 +10145,9 @@ func XResetInstancePassword(paramId string, params *viper.Viper, body string) (* return resp, decoded, nil } -// XResizeInstanceDisk Resize a Compute instance disk -func XResizeInstanceDisk(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "resize-instance-disk" +// XListInstanceTypes List Compute instance Types +func XListInstanceTypes(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-instance-types" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10251,14 +10157,9 @@ func XResizeInstanceDisk(paramId string, params *viper.Viper, body string) (*gen server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:resize-disk" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Put().URL(url) + url := server + "/instance-type" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10285,9 +10186,9 @@ func XResizeInstanceDisk(paramId string, params *viper.Viper, body string) (*gen return resp, decoded, nil } -// XScaleInstance Scale a Compute instance to a new Instance Type -func XScaleInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "scale-instance" +// XGetInstanceType Retrieve Instance Type details +func XGetInstanceType(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-instance-type" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10297,14 +10198,10 @@ func XScaleInstance(paramId string, params *viper.Viper, body string) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:scale" + url := server + "/instance-type/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10331,9 +10228,9 @@ func XScaleInstance(paramId string, params *viper.Viper, body string) (*gentlema return resp, decoded, nil } -// XStartInstance Start a Compute instance -func XStartInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "start-instance" +// XDeleteInstance Delete a Compute instance +func XDeleteInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10343,14 +10240,10 @@ func XStartInstance(paramId string, params *viper.Viper, body string) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:start" + url := server + "/instance/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10377,9 +10270,9 @@ func XStartInstance(paramId string, params *viper.Viper, body string) (*gentlema return resp, decoded, nil } -// XStopInstance Stop a Compute instance -func XStopInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "stop-instance" +// XGetInstance Retrieve Compute instance details +func XGetInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10389,14 +10282,10 @@ func XStopInstance(paramId string, params *viper.Viper, body string) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{id}:stop" + url := server + "/instance/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10423,9 +10312,9 @@ func XStopInstance(paramId string, params *viper.Viper, body string) (*gentleman return resp, decoded, nil } -// XRevertInstanceToSnapshot Revert a snapshot for an instance -func XRevertInstanceToSnapshot(paramInstanceId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "revert-instance-to-snapshot" +// XUpdateInstance Update a Compute instance +func XUpdateInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10435,10 +10324,10 @@ func XRevertInstanceToSnapshot(paramInstanceId string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/instance/{instance-id}:revert-snapshot" - url = strings.Replace(url, "{instance-id}", paramInstanceId, 1) + url := server + "/instance/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -10469,9 +10358,9 @@ func XRevertInstanceToSnapshot(paramInstanceId string, params *viper.Viper, body return resp, decoded, nil } -// XCreateKmsKey [BETA] Create KMS Key -func XCreateKmsKey(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-kms-key" +// XResetInstanceField Reset Instance field +func XResetInstanceField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-instance-field" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10481,13 +10370,11 @@ func XCreateKmsKey(params *viper.Viper, body string) (*gentleman.Response, map[s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key" - - req := cli.Client.Post().URL(url) + url := server + "/instance/{id}/{field}" + url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{field}", paramField, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10514,9 +10401,9 @@ func XCreateKmsKey(params *viper.Viper, body string) (*gentleman.Response, map[s return resp, decoded, nil } -// XListKmsKeys [BETA] List KMS Keys -func XListKmsKeys(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-kms-keys" +// XAddInstanceProtection Set instance destruction protection +func XAddInstanceProtection(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "add-instance-protection" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10526,9 +10413,14 @@ func XListKmsKeys(params *viper.Viper) (*gentleman.Response, map[string]interfac server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key" + url := server + "/instance/{id}:add-protection" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -10555,9 +10447,9 @@ func XListKmsKeys(params *viper.Viper) (*gentleman.Response, map[string]interfac return resp, decoded, nil } -// XGetKmsKey [BETA] Get KMS Key -func XGetKmsKey(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-kms-key" +// XCreateSnapshot Create a Snapshot of a Compute instance +func XCreateSnapshot(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-snapshot" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10567,10 +10459,14 @@ func XGetKmsKey(paramId string, params *viper.Viper) (*gentleman.Response, map[s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}" + url := server + "/instance/{id}:create-snapshot" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -10597,9 +10493,9 @@ func XGetKmsKey(paramId string, params *viper.Viper) (*gentleman.Response, map[s return resp, decoded, nil } -// XCancelKmsKeyDeletion [BETA] Cancel KMS Key Deletion -func XCancelKmsKeyDeletion(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "cancel-kms-key-deletion" +// XEnableTpm Enable tpm for the instance. +func XEnableTpm(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "enable-tpm" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10609,7 +10505,7 @@ func XCancelKmsKeyDeletion(paramId string, params *viper.Viper, body string) (*g server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/cancel-deletion" + url := server + "/instance/{id}:enable-tpm" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Post().URL(url) @@ -10643,9 +10539,9 @@ func XCancelKmsKeyDeletion(paramId string, params *viper.Viper, body string) (*g return resp, decoded, nil } -// XDecrypt [BETA] Decrypt -func XDecrypt(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "decrypt" +// XRevealInstancePassword Reveal the password used during instance creation or the latest password reset. +func XRevealInstancePassword(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reveal-instance-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10655,14 +10551,10 @@ func XDecrypt(paramId string, params *viper.Viper, body string) (*gentleman.Resp server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/decrypt" + url := server + "/instance/{id}:password" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -10689,9 +10581,9 @@ func XDecrypt(paramId string, params *viper.Viper, body string) (*gentleman.Resp return resp, decoded, nil } -// XDisableKmsKey [BETA] Disable KMS Key -func XDisableKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "disable-kms-key" +// XRebootInstance Reboot a Compute instance +func XRebootInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reboot-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10701,10 +10593,10 @@ func XDisableKmsKey(paramId string, params *viper.Viper, body string) (*gentlema server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/disable" + url := server + "/instance/{id}:reboot" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) @@ -10735,9 +10627,9 @@ func XDisableKmsKey(paramId string, params *viper.Viper, body string) (*gentlema return resp, decoded, nil } -// XDisableKmsKeyRotation [BETA] Disable Key Rotation -func XDisableKmsKeyRotation(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "disable-kms-key-rotation" +// XRemoveInstanceProtection Remove instance destruction protection +func XRemoveInstanceProtection(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "remove-instance-protection" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10747,10 +10639,10 @@ func XDisableKmsKeyRotation(paramId string, params *viper.Viper, body string) (* server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/disable-key-rotation" + url := server + "/instance/{id}:remove-protection" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "").BodyString(body) @@ -10781,9 +10673,9 @@ func XDisableKmsKeyRotation(paramId string, params *viper.Viper, body string) (* return resp, decoded, nil } -// XEnableKmsKey [BETA] Enable KMS Key -func XEnableKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "enable-kms-key" +// XResetInstance Reset a Compute instance to a base/target template +func XResetInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10793,13 +10685,13 @@ func XEnableKmsKey(paramId string, params *viper.Viper, body string) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/enable" + url := server + "/instance/{id}:reset" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -10827,9 +10719,9 @@ func XEnableKmsKey(paramId string, params *viper.Viper, body string) (*gentleman return resp, decoded, nil } -// XEnableKmsKeyRotation [BETA] Enable Key Rotation -func XEnableKmsKeyRotation(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "enable-kms-key-rotation" +// XResetInstancePassword Reset a compute instance password +func XResetInstancePassword(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-instance-password" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10839,13 +10731,13 @@ func XEnableKmsKeyRotation(paramId string, params *viper.Viper, body string) (*g server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/enable-key-rotation" + url := server + "/instance/{id}:reset-password" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -10873,9 +10765,9 @@ func XEnableKmsKeyRotation(paramId string, params *viper.Viper, body string) (*g return resp, decoded, nil } -// XEncrypt [BETA] Encrypt -func XEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "encrypt" +// XResizeInstanceDisk Resize a Compute instance disk +func XResizeInstanceDisk(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "resize-instance-disk" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10885,10 +10777,10 @@ func XEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Resp server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/encrypt" + url := server + "/instance/{id}:resize-disk" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -10919,9 +10811,9 @@ func XEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Resp return resp, decoded, nil } -// XGenerateDataKey [BETA] Generate Data Key -func XGenerateDataKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "generate-data-key" +// XScaleInstance Scale a Compute instance to a new Instance Type +func XScaleInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "scale-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10931,10 +10823,10 @@ func XGenerateDataKey(paramId string, params *viper.Viper, body string) (*gentle server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/generate-data-key" + url := server + "/instance/{id}:scale" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -10965,9 +10857,9 @@ func XGenerateDataKey(paramId string, params *viper.Viper, body string) (*gentle return resp, decoded, nil } -// XListKmsKeyRotations [BETA] List KMS Key Rotations -func XListKmsKeyRotations(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-kms-key-rotations" +// XStartInstance Start a Compute instance +func XStartInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "start-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -10977,10 +10869,14 @@ func XListKmsKeyRotations(paramId string, params *viper.Viper) (*gentleman.Respo server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/list-key-rotations" + url := server + "/instance/{id}:start" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11007,9 +10903,9 @@ func XListKmsKeyRotations(paramId string, params *viper.Viper) (*gentleman.Respo return resp, decoded, nil } -// XReEncrypt [BETA] Re-encrypt -func XReEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "re-encrypt" +// XStopInstance Stop a Compute instance +func XStopInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "stop-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11019,13 +10915,13 @@ func XReEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/re-encrypt" + url := server + "/instance/{id}:stop" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -11053,9 +10949,9 @@ func XReEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Re return resp, decoded, nil } -// XReplicateKmsKey [BETA] Replicate KMS Key -func XReplicateKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "replicate-kms-key" +// XRevertInstanceToSnapshot Revert a snapshot for an instance +func XRevertInstanceToSnapshot(paramInstanceId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "revert-instance-to-snapshot" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11065,8 +10961,8 @@ func XReplicateKmsKey(paramId string, params *viper.Viper, body string) (*gentle server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/replicate" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/instance/{instance-id}:revert-snapshot" + url = strings.Replace(url, "{instance-id}", paramInstanceId, 1) req := cli.Client.Post().URL(url) @@ -11099,9 +10995,9 @@ func XReplicateKmsKey(paramId string, params *viper.Viper, body string) (*gentle return resp, decoded, nil } -// XRotateKmsKey [BETA] Rotate Key -func XRotateKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "rotate-kms-key" +// XCreateKmsKey Create KMS Key +func XCreateKmsKey(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-kms-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11111,13 +11007,12 @@ func XRotateKmsKey(paramId string, params *viper.Viper, body string) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/rotate" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/kms-key" req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -11145,9 +11040,9 @@ func XRotateKmsKey(paramId string, params *viper.Viper, body string) (*gentleman return resp, decoded, nil } -// XScheduleKmsKeyDeletion [BETA] Schedule KMS Key Deletion -func XScheduleKmsKeyDeletion(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "schedule-kms-key-deletion" +// XListKmsKeys List KMS Keys +func XListKmsKeys(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-kms-keys" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11157,14 +11052,9 @@ func XScheduleKmsKeyDeletion(paramId string, params *viper.Viper, body string) ( server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/kms-key/{id}/schedule-deletion" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Post().URL(url) + url := server + "/kms-key" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -11191,9 +11081,9 @@ func XScheduleKmsKeyDeletion(paramId string, params *viper.Viper, body string) ( return resp, decoded, nil } -// XGetLiveBalance [BETA] Retrieve the live-balance -func XGetLiveBalance(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-live-balance" +// XGetKmsKey Get KMS Key +func XGetKmsKey(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-kms-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11203,7 +11093,8 @@ func XGetLiveBalance(params *viper.Viper) (*gentleman.Response, map[string]inter server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/live-balance" + url := server + "/kms-key/{id}" + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -11232,9 +11123,9 @@ func XGetLiveBalance(params *viper.Viper) (*gentleman.Response, map[string]inter return resp, decoded, nil } -// XCreateLoadBalancer Create a Load Balancer -func XCreateLoadBalancer(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-load-balancer" +// XCancelKmsKeyDeletion Cancel KMS Key Deletion +func XCancelKmsKeyDeletion(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "cancel-kms-key-deletion" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11244,12 +11135,13 @@ func XCreateLoadBalancer(params *viper.Viper, body string) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer" + url := server + "/kms-key/{id}/cancel-deletion" + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -11277,9 +11169,9 @@ func XCreateLoadBalancer(params *viper.Viper, body string) (*gentleman.Response, return resp, decoded, nil } -// XListLoadBalancers List Load Balancers -func XListLoadBalancers(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-load-balancers" +// XDecrypt Decrypt +func XDecrypt(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "decrypt" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11289,9 +11181,14 @@ func XListLoadBalancers(params *viper.Viper) (*gentleman.Response, map[string]in server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer" + url := server + "/kms-key/{id}/decrypt" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11318,9 +11215,9 @@ func XListLoadBalancers(params *viper.Viper) (*gentleman.Response, map[string]in return resp, decoded, nil } -// XDeleteLoadBalancer Delete a Load Balancer -func XDeleteLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-load-balancer" +// XDisableKmsKey Disable KMS Key +func XDisableKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "disable-kms-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11330,10 +11227,14 @@ func XDeleteLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Respon server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}" + url := server + "/kms-key/{id}/disable" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11360,9 +11261,9 @@ func XDeleteLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Respon return resp, decoded, nil } -// XGetLoadBalancer Retrieve Load Balancer details -func XGetLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-load-balancer" +// XDisableKmsKeyRotation Disable Key Rotation +func XDisableKmsKeyRotation(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "disable-kms-key-rotation" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11372,10 +11273,14 @@ func XGetLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}" + url := server + "/kms-key/{id}/disable-key-rotation" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11402,9 +11307,9 @@ func XGetLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XUpdateLoadBalancer Update a Load Balancer -func XUpdateLoadBalancer(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-load-balancer" +// XEnableKmsKey Enable KMS Key +func XEnableKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "enable-kms-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11414,13 +11319,13 @@ func XUpdateLoadBalancer(paramId string, params *viper.Viper, body string) (*gen server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}" + url := server + "/kms-key/{id}/enable" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -11448,9 +11353,9 @@ func XUpdateLoadBalancer(paramId string, params *viper.Viper, body string) (*gen return resp, decoded, nil } -// XAddServiceToLoadBalancer Add a Load Balancer Service -func XAddServiceToLoadBalancer(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "add-service-to-load-balancer" +// XEnableKmsKeyRotation Enable Key Rotation +func XEnableKmsKeyRotation(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "enable-kms-key-rotation" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11460,7 +11365,7 @@ func XAddServiceToLoadBalancer(paramId string, params *viper.Viper, body string) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}/service" + url := server + "/kms-key/{id}/enable-key-rotation" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Post().URL(url) @@ -11494,9 +11399,9 @@ func XAddServiceToLoadBalancer(paramId string, params *viper.Viper, body string) return resp, decoded, nil } -// XDeleteLoadBalancerService Delete a Load Balancer Service -func XDeleteLoadBalancerService(paramId string, paramServiceId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-load-balancer-service" +// XEncrypt Encrypt +func XEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "encrypt" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11506,11 +11411,14 @@ func XDeleteLoadBalancerService(paramId string, paramServiceId string, params *v server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}/service/{service-id}" + url := server + "/kms-key/{id}/encrypt" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{service-id}", paramServiceId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11537,9 +11445,9 @@ func XDeleteLoadBalancerService(paramId string, paramServiceId string, params *v return resp, decoded, nil } -// XGetLoadBalancerService Retrieve Load Balancer Service details -func XGetLoadBalancerService(paramId string, paramServiceId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-load-balancer-service" +// XGenerateDataKey Generate Data Encryption Key +func XGenerateDataKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "generate-data-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11549,11 +11457,14 @@ func XGetLoadBalancerService(paramId string, paramServiceId string, params *vipe server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}/service/{service-id}" + url := server + "/kms-key/{id}/generate-data-key" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{service-id}", paramServiceId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11580,9 +11491,9 @@ func XGetLoadBalancerService(paramId string, paramServiceId string, params *vipe return resp, decoded, nil } -// XUpdateLoadBalancerService Update a Load Balancer Service -func XUpdateLoadBalancerService(paramId string, paramServiceId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-load-balancer-service" +// XListKmsKeyRotations List KMS Key Rotations +func XListKmsKeyRotations(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-kms-key-rotations" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11592,15 +11503,10 @@ func XUpdateLoadBalancerService(paramId string, paramServiceId string, params *v server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}/service/{service-id}" + url := server + "/kms-key/{id}/list-key-rotations" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{service-id}", paramServiceId, 1) - - req := cli.Client.Put().URL(url) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -11627,9 +11533,9 @@ func XUpdateLoadBalancerService(paramId string, paramServiceId string, params *v return resp, decoded, nil } -// XResetLoadBalancerServiceField Reset a Load Balancer Service field to its default value -func XResetLoadBalancerServiceField(paramId string, paramServiceId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-load-balancer-service-field" +// XReEncrypt Re-encrypt +func XReEncrypt(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "re-encrypt" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11639,12 +11545,14 @@ func XResetLoadBalancerServiceField(paramId string, paramServiceId string, param server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}/service/{service-id}/{field}" + url := server + "/kms-key/{id}/re-encrypt" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{service-id}", paramServiceId, 1) - url = strings.Replace(url, "{field}", paramField, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11671,9 +11579,9 @@ func XResetLoadBalancerServiceField(paramId string, paramServiceId string, param return resp, decoded, nil } -// XResetLoadBalancerField Reset a Load Balancer field to its default value -func XResetLoadBalancerField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-load-balancer-field" +// XReplicateKmsKey Replicate KMS Key +func XReplicateKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "replicate-kms-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11683,11 +11591,14 @@ func XResetLoadBalancerField(paramId string, paramField string, params *viper.Vi server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/load-balancer/{id}/{field}" + url := server + "/kms-key/{id}/replicate" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{field}", paramField, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11714,9 +11625,9 @@ func XResetLoadBalancerField(paramId string, paramField string, params *viper.Vi return resp, decoded, nil } -// XGetOperation Retrieve Operation details -func XGetOperation(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-operation" +// XRotateKmsKey Rotate Key +func XRotateKmsKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "rotate-kms-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11726,10 +11637,14 @@ func XGetOperation(paramId string, params *viper.Viper) (*gentleman.Response, ma server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/operation/{id}" + url := server + "/kms-key/{id}/rotate" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -11756,9 +11671,9 @@ func XGetOperation(paramId string, params *viper.Viper) (*gentleman.Response, ma return resp, decoded, nil } -// XGetOrganization Retrieve an organization -func XGetOrganization(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-organization" +// XScheduleKmsKeyDeletion Schedule KMS Key Deletion +func XScheduleKmsKeyDeletion(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "schedule-kms-key-deletion" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11768,7 +11683,53 @@ func XGetOrganization(params *viper.Viper) (*gentleman.Response, map[string]inte server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/organization" + url := server + "/kms-key/{id}/schedule-deletion" + url = strings.Replace(url, "{id}", paramId, 1) + + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XGetLiveBalance [BETA] Retrieve the live-balance +func XGetLiveBalance(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-live-balance" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/live-balance" req := cli.Client.Get().URL(url) @@ -11797,9 +11758,9 @@ func XGetOrganization(params *viper.Viper) (*gentleman.Response, map[string]inte return resp, decoded, nil } -// XCreatePrivateNetwork Create a Private Network -func XCreatePrivateNetwork(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-private-network" +// XCreateLoadBalancer Create a Load Balancer +func XCreateLoadBalancer(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-load-balancer" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11809,7 +11770,7 @@ func XCreatePrivateNetwork(params *viper.Viper, body string) (*gentleman.Respons server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network" + url := server + "/load-balancer" req := cli.Client.Post().URL(url) @@ -11842,9 +11803,9 @@ func XCreatePrivateNetwork(params *viper.Viper, body string) (*gentleman.Respons return resp, decoded, nil } -// XListPrivateNetworks List Private Networks -func XListPrivateNetworks(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-private-networks" +// XListLoadBalancers List Load Balancers +func XListLoadBalancers(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-load-balancers" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11854,7 +11815,7 @@ func XListPrivateNetworks(params *viper.Viper) (*gentleman.Response, map[string] server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network" + url := server + "/load-balancer" req := cli.Client.Get().URL(url) @@ -11883,9 +11844,9 @@ func XListPrivateNetworks(params *viper.Viper) (*gentleman.Response, map[string] return resp, decoded, nil } -// XDeletePrivateNetwork Delete a Private Network -func XDeletePrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-private-network" +// XDeleteLoadBalancer Delete a Load Balancer +func XDeleteLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-load-balancer" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11895,7 +11856,7 @@ func XDeletePrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Resp server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network/{id}" + url := server + "/load-balancer/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Delete().URL(url) @@ -11925,9 +11886,9 @@ func XDeletePrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Resp return resp, decoded, nil } -// XGetPrivateNetwork Retrieve Private Network details -func XGetPrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-private-network" +// XGetLoadBalancer Retrieve Load Balancer details +func XGetLoadBalancer(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-load-balancer" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11937,7 +11898,7 @@ func XGetPrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Respons server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network/{id}" + url := server + "/load-balancer/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -11967,9 +11928,9 @@ func XGetPrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Respons return resp, decoded, nil } -// XUpdatePrivateNetwork Update a Private Network -func XUpdatePrivateNetwork(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-private-network" +// XUpdateLoadBalancer Update a Load Balancer +func XUpdateLoadBalancer(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-load-balancer" if xSubcommand { handlerPath = "x " + handlerPath } @@ -11979,7 +11940,7 @@ func XUpdatePrivateNetwork(paramId string, params *viper.Viper, body string) (*g server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network/{id}" + url := server + "/load-balancer/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) @@ -12013,9 +11974,9 @@ func XUpdatePrivateNetwork(paramId string, params *viper.Viper, body string) (*g return resp, decoded, nil } -// XResetPrivateNetworkField Reset Private Network field -func XResetPrivateNetworkField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "reset-private-network-field" +// XAddServiceToLoadBalancer Add a Load Balancer Service +func XAddServiceToLoadBalancer(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "add-service-to-load-balancer" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12025,11 +11986,14 @@ func XResetPrivateNetworkField(paramId string, paramField string, params *viper. server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network/{id}/{field}" + url := server + "/load-balancer/{id}/service" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{field}", paramField, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -12056,9 +12020,9 @@ func XResetPrivateNetworkField(paramId string, paramField string, params *viper. return resp, decoded, nil } -// XAttachInstanceToPrivateNetwork Attach a Compute instance to a Private Network -func XAttachInstanceToPrivateNetwork(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "attach-instance-to-private-network" +// XDeleteLoadBalancerService Delete a Load Balancer Service +func XDeleteLoadBalancerService(paramId string, paramServiceId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-load-balancer-service" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12068,14 +12032,11 @@ func XAttachInstanceToPrivateNetwork(paramId string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network/{id}:attach" + url := server + "/load-balancer/{id}/service/{service-id}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{service-id}", paramServiceId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12102,9 +12063,9 @@ func XAttachInstanceToPrivateNetwork(paramId string, params *viper.Viper, body s return resp, decoded, nil } -// XDetachInstanceFromPrivateNetwork Detach a Compute instance from a Private Network -func XDetachInstanceFromPrivateNetwork(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "detach-instance-from-private-network" +// XGetLoadBalancerService Retrieve Load Balancer Service details +func XGetLoadBalancerService(paramId string, paramServiceId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-load-balancer-service" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12114,14 +12075,11 @@ func XDetachInstanceFromPrivateNetwork(paramId string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network/{id}:detach" + url := server + "/load-balancer/{id}/service/{service-id}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{service-id}", paramServiceId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12148,9 +12106,9 @@ func XDetachInstanceFromPrivateNetwork(paramId string, params *viper.Viper, body return resp, decoded, nil } -// XUpdatePrivateNetworkInstanceIp Update the IP address of an instance attached to a managed private network -func XUpdatePrivateNetworkInstanceIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-private-network-instance-ip" +// XUpdateLoadBalancerService Update a Load Balancer Service +func XUpdateLoadBalancerService(paramId string, paramServiceId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-load-balancer-service" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12160,8 +12118,9 @@ func XUpdatePrivateNetworkInstanceIp(paramId string, params *viper.Viper, body s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/private-network/{id}:update-ip" + url := server + "/load-balancer/{id}/service/{service-id}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{service-id}", paramServiceId, 1) req := cli.Client.Put().URL(url) @@ -12194,9 +12153,9 @@ func XUpdatePrivateNetworkInstanceIp(paramId string, params *viper.Viper, body s return resp, decoded, nil } -// XListQuotas List Organization Quotas -func XListQuotas(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-quotas" +// XResetLoadBalancerServiceField Reset a Load Balancer Service field to its default value +func XResetLoadBalancerServiceField(paramId string, paramServiceId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-load-balancer-service-field" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12206,9 +12165,12 @@ func XListQuotas(params *viper.Viper) (*gentleman.Response, map[string]interface server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/quota" + url := server + "/load-balancer/{id}/service/{service-id}/{field}" + url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{service-id}", paramServiceId, 1) + url = strings.Replace(url, "{field}", paramField, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12235,9 +12197,9 @@ func XListQuotas(params *viper.Viper) (*gentleman.Response, map[string]interface return resp, decoded, nil } -// XGetQuota Retrieve Resource Quota -func XGetQuota(paramEntity string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-quota" +// XResetLoadBalancerField Reset a Load Balancer field to its default value +func XResetLoadBalancerField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-load-balancer-field" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12247,10 +12209,11 @@ func XGetQuota(paramEntity string, params *viper.Viper) (*gentleman.Response, ma server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/quota/{entity}" - url = strings.Replace(url, "{entity}", paramEntity, 1) + url := server + "/load-balancer/{id}/{field}" + url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{field}", paramField, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12277,9 +12240,9 @@ func XGetQuota(paramEntity string, params *viper.Viper) (*gentleman.Response, ma return resp, decoded, nil } -// XDeleteReverseDnsElasticIp Delete the PTR DNS record for an elastic IP -func XDeleteReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-reverse-dns-elastic-ip" +// XGetOperation Retrieve Operation details +func XGetOperation(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-operation" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12289,10 +12252,10 @@ func XDeleteReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/reverse-dns/elastic-ip/{id}" + url := server + "/operation/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12319,9 +12282,9 @@ func XDeleteReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman return resp, decoded, nil } -// XGetReverseDnsElasticIp Query the PTR DNS records for an elastic IP -func XGetReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-reverse-dns-elastic-ip" +// XGetOrganization Retrieve an organization +func XGetOrganization(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-organization" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12331,8 +12294,7 @@ func XGetReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/reverse-dns/elastic-ip/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/organization" req := cli.Client.Get().URL(url) @@ -12361,9 +12323,9 @@ func XGetReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman.Re return resp, decoded, nil } -// XUpdateReverseDnsElasticIp Update/Create the PTR DNS record for an elastic IP -func XUpdateReverseDnsElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-reverse-dns-elastic-ip" +// XCreatePrivateNetwork Create a Private Network +func XCreatePrivateNetwork(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-private-network" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12373,8 +12335,7 @@ func XUpdateReverseDnsElasticIp(paramId string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/reverse-dns/elastic-ip/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/private-network" req := cli.Client.Post().URL(url) @@ -12407,9 +12368,9 @@ func XUpdateReverseDnsElasticIp(paramId string, params *viper.Viper, body string return resp, decoded, nil } -// XDeleteReverseDnsInstance Delete the PTR DNS record for an instance -func XDeleteReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-reverse-dns-instance" +// XListPrivateNetworks List Private Networks +func XListPrivateNetworks(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-private-networks" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12419,10 +12380,9 @@ func XDeleteReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman. server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/reverse-dns/instance/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/private-network" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12449,9 +12409,9 @@ func XDeleteReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman. return resp, decoded, nil } -// XGetReverseDnsInstance Query the PTR DNS records for an instance -func XGetReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-reverse-dns-instance" +// XDeletePrivateNetwork Delete a Private Network +func XDeletePrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-private-network" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12461,10 +12421,10 @@ func XGetReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman.Res server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/reverse-dns/instance/{id}" + url := server + "/private-network/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12491,9 +12451,9 @@ func XGetReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman.Res return resp, decoded, nil } -// XUpdateReverseDnsInstance Update/Create the PTR DNS record for an instance -func XUpdateReverseDnsInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-reverse-dns-instance" +// XGetPrivateNetwork Retrieve Private Network details +func XGetPrivateNetwork(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-private-network" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12503,14 +12463,10 @@ func XUpdateReverseDnsInstance(paramId string, params *viper.Viper, body string) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/reverse-dns/instance/{id}" + url := server + "/private-network/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12537,9 +12493,9 @@ func XUpdateReverseDnsInstance(paramId string, params *viper.Viper, body string) return resp, decoded, nil } -// XCreateSecurityGroup Create a Security Group -func XCreateSecurityGroup(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-security-group" +// XUpdatePrivateNetwork Update a Private Network +func XUpdatePrivateNetwork(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-private-network" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12549,9 +12505,10 @@ func XCreateSecurityGroup(params *viper.Viper, body string) (*gentleman.Response server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group" + url := server + "/private-network/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -12582,9 +12539,9 @@ func XCreateSecurityGroup(params *viper.Viper, body string) (*gentleman.Response return resp, decoded, nil } -// XListSecurityGroups List Security Groups. -func XListSecurityGroups(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-security-groups" +// XResetPrivateNetworkField Reset Private Network field +func XResetPrivateNetworkField(paramId string, paramField string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "reset-private-network-field" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12594,14 +12551,11 @@ func XListSecurityGroups(params *viper.Viper) (*gentleman.Response, map[string]i server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group" - - req := cli.Client.Get().URL(url) + url := server + "/private-network/{id}/{field}" + url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{field}", paramField, 1) - paramVisibility := params.GetString("visibility") - if paramVisibility != "" { - req = req.AddQuery("visibility", fmt.Sprintf("%v", paramVisibility)) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12628,9 +12582,9 @@ func XListSecurityGroups(params *viper.Viper) (*gentleman.Response, map[string]i return resp, decoded, nil } -// XDeleteSecurityGroup Delete a Security Group -func XDeleteSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-security-group" +// XAttachInstanceToPrivateNetwork Attach a Compute instance to a Private Network +func XAttachInstanceToPrivateNetwork(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "attach-instance-to-private-network" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12640,10 +12594,14 @@ func XDeleteSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Respo server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}" + url := server + "/private-network/{id}:attach" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -12670,9 +12628,9 @@ func XDeleteSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Respo return resp, decoded, nil } -// XGetSecurityGroup Retrieve Security Group details -func XGetSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-security-group" +// XDetachInstanceFromPrivateNetwork Detach a Compute instance from a Private Network +func XDetachInstanceFromPrivateNetwork(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "detach-instance-from-private-network" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12682,10 +12640,14 @@ func XGetSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Response server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}" + url := server + "/private-network/{id}:detach" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -12712,9 +12674,9 @@ func XGetSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Response return resp, decoded, nil } -// XAddRuleToSecurityGroup Create a Security Group rule -func XAddRuleToSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "add-rule-to-security-group" +// XUpdatePrivateNetworkInstanceIp Update the IP address of an instance attached to a managed private network +func XUpdatePrivateNetworkInstanceIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-private-network-instance-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12724,10 +12686,10 @@ func XAddRuleToSecurityGroup(paramId string, params *viper.Viper, body string) ( server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}/rules" + url := server + "/private-network/{id}:update-ip" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -12758,9 +12720,9 @@ func XAddRuleToSecurityGroup(paramId string, params *viper.Viper, body string) ( return resp, decoded, nil } -// XDeleteRuleFromSecurityGroup Delete a Security Group rule -func XDeleteRuleFromSecurityGroup(paramId string, paramRuleId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-rule-from-security-group" +// XListQuotas List Organization Quotas +func XListQuotas(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-quotas" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12770,11 +12732,9 @@ func XDeleteRuleFromSecurityGroup(paramId string, paramRuleId string, params *vi server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}/rules/{rule-id}" - url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{rule-id}", paramRuleId, 1) + url := server + "/quota" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12801,9 +12761,9 @@ func XDeleteRuleFromSecurityGroup(paramId string, paramRuleId string, params *vi return resp, decoded, nil } -// XAddExternalSourceToSecurityGroup Add an external source as a member of a Security Group -func XAddExternalSourceToSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "add-external-source-to-security-group" +// XGetQuota Retrieve Resource Quota +func XGetQuota(paramEntity string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-quota" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12813,14 +12773,10 @@ func XAddExternalSourceToSecurityGroup(paramId string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}:add-source" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Put().URL(url) + url := server + "/quota/{entity}" + url = strings.Replace(url, "{entity}", paramEntity, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12847,9 +12803,9 @@ func XAddExternalSourceToSecurityGroup(paramId string, params *viper.Viper, body return resp, decoded, nil } -// XAttachInstanceToSecurityGroup Attach a Compute instance to a Security Group -func XAttachInstanceToSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "attach-instance-to-security-group" +// XDeleteReverseDnsElasticIp Delete the PTR DNS record for an elastic IP +func XDeleteReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-reverse-dns-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12859,14 +12815,10 @@ func XAttachInstanceToSecurityGroup(paramId string, params *viper.Viper, body st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}:attach" + url := server + "/reverse-dns/elastic-ip/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12893,9 +12845,9 @@ func XAttachInstanceToSecurityGroup(paramId string, params *viper.Viper, body st return resp, decoded, nil } -// XDetachInstanceFromSecurityGroup Detach a Compute instance from a Security Group -func XDetachInstanceFromSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "detach-instance-from-security-group" +// XGetReverseDnsElasticIp Query the PTR DNS records for an elastic IP +func XGetReverseDnsElasticIp(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-reverse-dns-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12905,14 +12857,10 @@ func XDetachInstanceFromSecurityGroup(paramId string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}:detach" + url := server + "/reverse-dns/elastic-ip/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -12939,9 +12887,9 @@ func XDetachInstanceFromSecurityGroup(paramId string, params *viper.Viper, body return resp, decoded, nil } -// XRemoveExternalSourceFromSecurityGroup Remove an external source from a Security Group -func XRemoveExternalSourceFromSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "remove-external-source-from-security-group" +// XUpdateReverseDnsElasticIp Update/Create the PTR DNS record for an elastic IP +func XUpdateReverseDnsElasticIp(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-reverse-dns-elastic-ip" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12951,10 +12899,10 @@ func XRemoveExternalSourceFromSecurityGroup(paramId string, params *viper.Viper, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/security-group/{id}:remove-source" + url := server + "/reverse-dns/elastic-ip/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -12985,9 +12933,9 @@ func XRemoveExternalSourceFromSecurityGroup(paramId string, params *viper.Viper, return resp, decoded, nil } -// XCreateSksCluster Create an SKS cluster -func XCreateSksCluster(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-sks-cluster" +// XDeleteReverseDnsInstance Delete the PTR DNS record for an instance +func XDeleteReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-reverse-dns-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -12997,13 +12945,10 @@ func XCreateSksCluster(params *viper.Viper, body string) (*gentleman.Response, m server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster" - - req := cli.Client.Post().URL(url) + url := server + "/reverse-dns/instance/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -13030,9 +12975,9 @@ func XCreateSksCluster(params *viper.Viper, body string) (*gentleman.Response, m return resp, decoded, nil } -// XListSksClusters List SKS clusters -func XListSksClusters(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-sks-clusters" +// XGetReverseDnsInstance Query the PTR DNS records for an instance +func XGetReverseDnsInstance(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-reverse-dns-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13042,7 +12987,8 @@ func XListSksClusters(params *viper.Viper) (*gentleman.Response, map[string]inte server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster" + url := server + "/reverse-dns/instance/{id}" + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -13071,9 +13017,9 @@ func XListSksClusters(params *viper.Viper) (*gentleman.Response, map[string]inte return resp, decoded, nil } -// XListSksClusterDeprecatedResources Resources that are scheduled to be removed in future kubernetes releases -func XListSksClusterDeprecatedResources(paramId string, params *viper.Viper) (*gentleman.Response, interface{}, error) { - handlerPath := "list-sks-cluster-deprecated-resources" +// XUpdateReverseDnsInstance Update/Create the PTR DNS record for an instance +func XUpdateReverseDnsInstance(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-reverse-dns-instance" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13083,10 +13029,14 @@ func XListSksClusterDeprecatedResources(paramId string, params *viper.Viper) (*g server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster-deprecated-resources/{id}" + url := server + "/reverse-dns/instance/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -13095,7 +13045,7 @@ func XListSksClusterDeprecatedResources(paramId string, params *viper.Viper) (*g return nil, nil, errors.Wrap(err, "Request failed") } - var decoded interface{} + var decoded map[string]interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { @@ -13107,15 +13057,15 @@ func XListSksClusterDeprecatedResources(paramId string, params *viper.Viper) (*g after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { - decoded = after + decoded = after.(map[string]interface{}) } return resp, decoded, nil } -// XGenerateSksClusterKubeconfig Generate a new Kubeconfig file for a SKS cluster -func XGenerateSksClusterKubeconfig(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "generate-sks-cluster-kubeconfig" +// XCreateSecurityGroup Create a Security Group +func XCreateSecurityGroup(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13125,8 +13075,7 @@ func XGenerateSksClusterKubeconfig(paramId string, params *viper.Viper, body str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster-kubeconfig/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/security-group" req := cli.Client.Post().URL(url) @@ -13159,9 +13108,9 @@ func XGenerateSksClusterKubeconfig(paramId string, params *viper.Viper, body str return resp, decoded, nil } -// XListSksClusterVersions List available versions for SKS clusters -func XListSksClusterVersions(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-sks-cluster-versions" +// XListSecurityGroups List Security Groups. +func XListSecurityGroups(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-security-groups" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13171,13 +13120,13 @@ func XListSksClusterVersions(params *viper.Viper) (*gentleman.Response, map[stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster-version" + url := server + "/security-group" req := cli.Client.Get().URL(url) - paramIncludeDeprecated := params.GetString("include-deprecated") - if paramIncludeDeprecated != "" { - req = req.AddQuery("include-deprecated", fmt.Sprintf("%v", paramIncludeDeprecated)) + paramVisibility := params.GetString("visibility") + if paramVisibility != "" { + req = req.AddQuery("visibility", fmt.Sprintf("%v", paramVisibility)) } cli.HandleBefore(handlerPath, params, req) @@ -13205,9 +13154,9 @@ func XListSksClusterVersions(params *viper.Viper) (*gentleman.Response, map[stri return resp, decoded, nil } -// XDeleteSksCluster Delete an SKS cluster -func XDeleteSksCluster(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-sks-cluster" +// XDeleteSecurityGroup Delete a Security Group +func XDeleteSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13217,7 +13166,7 @@ func XDeleteSksCluster(paramId string, params *viper.Viper) (*gentleman.Response server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}" + url := server + "/security-group/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Delete().URL(url) @@ -13247,9 +13196,9 @@ func XDeleteSksCluster(paramId string, params *viper.Viper) (*gentleman.Response return resp, decoded, nil } -// XGetSksCluster Retrieve SKS cluster details -func XGetSksCluster(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-sks-cluster" +// XGetSecurityGroup Retrieve Security Group details +func XGetSecurityGroup(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13259,7 +13208,7 @@ func XGetSksCluster(paramId string, params *viper.Viper) (*gentleman.Response, m server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}" + url := server + "/security-group/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -13289,9 +13238,9 @@ func XGetSksCluster(paramId string, params *viper.Viper) (*gentleman.Response, m return resp, decoded, nil } -// XUpdateSksCluster Update an SKS cluster -func XUpdateSksCluster(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-sks-cluster" +// XAddRuleToSecurityGroup Create a Security Group rule +func XAddRuleToSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "add-rule-to-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13301,10 +13250,10 @@ func XUpdateSksCluster(paramId string, params *viper.Viper, body string) (*gentl server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}" + url := server + "/security-group/{id}/rules" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -13335,9 +13284,9 @@ func XUpdateSksCluster(paramId string, params *viper.Viper, body string) (*gentl return resp, decoded, nil } -// XGetSksClusterAuthorityCert Get the certificate for a SKS cluster authority -func XGetSksClusterAuthorityCert(paramId string, paramAuthority string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-sks-cluster-authority-cert" +// XDeleteRuleFromSecurityGroup Delete a Security Group rule +func XDeleteRuleFromSecurityGroup(paramId string, paramRuleId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-rule-from-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13347,11 +13296,11 @@ func XGetSksClusterAuthorityCert(paramId string, paramAuthority string, params * server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/authority/{authority}/cert" + url := server + "/security-group/{id}/rules/{rule-id}" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{authority}", paramAuthority, 1) + url = strings.Replace(url, "{rule-id}", paramRuleId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -13378,9 +13327,9 @@ func XGetSksClusterAuthorityCert(paramId string, paramAuthority string, params * return resp, decoded, nil } -// XGenerateSksKarpenterExoscaleNodeclass Generate a Karpenter ExoscaleNodeClass manifest for an SKS cluster, including its default security group and feature flags if present -func XGenerateSksKarpenterExoscaleNodeclass(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "generate-sks-karpenter-exoscale-nodeclass" +// XAddExternalSourceToSecurityGroup Add an external source as a member of a Security Group +func XAddExternalSourceToSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "add-external-source-to-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13390,13 +13339,13 @@ func XGenerateSksKarpenterExoscaleNodeclass(paramId string, params *viper.Viper, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/generate-karpenter-exoscale-nodeclass" + url := server + "/security-group/{id}:add-source" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -13424,9 +13373,9 @@ func XGenerateSksKarpenterExoscaleNodeclass(paramId string, params *viper.Viper, return resp, decoded, nil } -// XGenerateSksKarpenterNodepool Generate a Karpenter NodePool manifest with minimal configuration for an SKS cluster -func XGenerateSksKarpenterNodepool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "generate-sks-karpenter-nodepool" +// XAttachInstanceToSecurityGroup Attach a Compute instance to a Security Group +func XAttachInstanceToSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "attach-instance-to-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13436,13 +13385,13 @@ func XGenerateSksKarpenterNodepool(paramId string, params *viper.Viper, body str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/generate-karpenter-nodepool" + url := server + "/security-group/{id}:attach" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -13470,9 +13419,9 @@ func XGenerateSksKarpenterNodepool(paramId string, params *viper.Viper, body str return resp, decoded, nil } -// XGetSksClusterInspection Get the latest inspection result -func XGetSksClusterInspection(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-sks-cluster-inspection" +// XDetachInstanceFromSecurityGroup Detach a Compute instance from a Security Group +func XDetachInstanceFromSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "detach-instance-from-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13482,10 +13431,14 @@ func XGetSksClusterInspection(paramId string, params *viper.Viper) (*gentleman.R server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/inspection" + url := server + "/security-group/{id}:detach" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -13512,9 +13465,9 @@ func XGetSksClusterInspection(paramId string, params *viper.Viper) (*gentleman.R return resp, decoded, nil } -// XCreateSksNodepool Create a new SKS Nodepool -func XCreateSksNodepool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-sks-nodepool" +// XRemoveExternalSourceFromSecurityGroup Remove an external source from a Security Group +func XRemoveExternalSourceFromSecurityGroup(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "remove-external-source-from-security-group" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13524,10 +13477,10 @@ func XCreateSksNodepool(paramId string, params *viper.Viper, body string) (*gent server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/nodepool" + url := server + "/security-group/{id}:remove-source" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -13558,9 +13511,9 @@ func XCreateSksNodepool(paramId string, params *viper.Viper, body string) (*gent return resp, decoded, nil } -// XDeleteSksNodepool Delete an SKS Nodepool -func XDeleteSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-sks-nodepool" +// XCreateSksCluster Create an SKS cluster +func XCreateSksCluster(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-sks-cluster" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13570,11 +13523,13 @@ func XDeleteSksNodepool(paramId string, paramSksNodepoolId string, params *viper server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}" - url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) + url := server + "/sks-cluster" - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -13601,9 +13556,9 @@ func XDeleteSksNodepool(paramId string, paramSksNodepoolId string, params *viper return resp, decoded, nil } -// XGetSksNodepool Retrieve SKS Nodepool details -func XGetSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-sks-nodepool" +// XListSksClusters List SKS clusters +func XListSksClusters(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-sks-clusters" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13613,9 +13568,7 @@ func XGetSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Vi server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}" - url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) + url := server + "/sks-cluster" req := cli.Client.Get().URL(url) @@ -13644,9 +13597,9 @@ func XGetSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Vi return resp, decoded, nil } -// XUpdateSksNodepool Update an SKS Nodepool -func XUpdateSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-sks-nodepool" +// XListSksClusterDeprecatedResources Resources that are scheduled to be removed in future kubernetes releases +func XListSksClusterDeprecatedResources(paramId string, params *viper.Viper) (*gentleman.Response, interface{}, error) { + handlerPath := "list-sks-cluster-deprecated-resources" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13656,15 +13609,10 @@ func XUpdateSksNodepool(paramId string, paramSksNodepoolId string, params *viper server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}" + url := server + "/sks-cluster-deprecated-resources/{id}" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -13673,7 +13621,7 @@ func XUpdateSksNodepool(paramId string, paramSksNodepoolId string, params *viper return nil, nil, errors.Wrap(err, "Request failed") } - var decoded map[string]interface{} + var decoded interface{} if resp.StatusCode < 400 { if err := cli.UnmarshalResponse(resp, &decoded); err != nil { @@ -13685,15 +13633,15 @@ func XUpdateSksNodepool(paramId string, paramSksNodepoolId string, params *viper after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { - decoded = after.(map[string]interface{}) + decoded = after } return resp, decoded, nil } -// XEvictSksNodepoolMembers Evict Nodepool members -func XEvictSksNodepoolMembers(paramId string, paramSksNodepoolId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "evict-sks-nodepool-members" +// XGenerateSksClusterKubeconfig Generate a new Kubeconfig file for a SKS cluster +func XGenerateSksClusterKubeconfig(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "generate-sks-cluster-kubeconfig" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13703,11 +13651,10 @@ func XEvictSksNodepoolMembers(paramId string, paramSksNodepoolId string, params server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}:evict" + url := server + "/sks-cluster-kubeconfig/{id}" url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -13738,9 +13685,9 @@ func XEvictSksNodepoolMembers(paramId string, paramSksNodepoolId string, params return resp, decoded, nil } -// XScaleSksNodepool Scale a SKS Nodepool -func XScaleSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "scale-sks-nodepool" +// XListSksClusterVersions List available versions for SKS clusters +func XListSksClusterVersions(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-sks-cluster-versions" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13750,14 +13697,13 @@ func XScaleSksNodepool(paramId string, paramSksNodepoolId string, params *viper. server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}:scale" - url = strings.Replace(url, "{id}", paramId, 1) - url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) + url := server + "/sks-cluster-version" - req := cli.Client.Put().URL(url) + req := cli.Client.Get().URL(url) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + paramIncludeDeprecated := params.GetString("include-deprecated") + if paramIncludeDeprecated != "" { + req = req.AddQuery("include-deprecated", fmt.Sprintf("%v", paramIncludeDeprecated)) } cli.HandleBefore(handlerPath, params, req) @@ -13785,9 +13731,9 @@ func XScaleSksNodepool(paramId string, paramSksNodepoolId string, params *viper. return resp, decoded, nil } -// XRotateSksCcmCredentials Rotate Exoscale CCM credentials -func XRotateSksCcmCredentials(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "rotate-sks-ccm-credentials" +// XDeleteSksCluster Delete an SKS cluster +func XDeleteSksCluster(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-sks-cluster" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13797,14 +13743,10 @@ func XRotateSksCcmCredentials(paramId string, params *viper.Viper, body string) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/rotate-ccm-credentials" + url := server + "/sks-cluster/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -13831,9 +13773,9 @@ func XRotateSksCcmCredentials(paramId string, params *viper.Viper, body string) return resp, decoded, nil } -// XRotateSksCsiCredentials Rotate Exoscale CSI credentials -func XRotateSksCsiCredentials(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "rotate-sks-csi-credentials" +// XGetSksCluster Retrieve SKS cluster details +func XGetSksCluster(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-sks-cluster" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13843,14 +13785,10 @@ func XRotateSksCsiCredentials(paramId string, params *viper.Viper, body string) server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/rotate-csi-credentials" + url := server + "/sks-cluster/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -13877,9 +13815,9 @@ func XRotateSksCsiCredentials(paramId string, params *viper.Viper, body string) return resp, decoded, nil } -// XRotateSksKarpenterCredentials Rotate Exoscale Karpenter credentials -func XRotateSksKarpenterCredentials(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "rotate-sks-karpenter-credentials" +// XUpdateSksCluster Update an SKS cluster +func XUpdateSksCluster(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-sks-cluster" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13889,13 +13827,13 @@ func XRotateSksKarpenterCredentials(paramId string, params *viper.Viper, body st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/rotate-karpenter-credentials" + url := server + "/sks-cluster/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -13923,9 +13861,9 @@ func XRotateSksKarpenterCredentials(paramId string, params *viper.Viper, body st return resp, decoded, nil } -// XRotateSksOperatorsCa Rotate operators certificate authority -func XRotateSksOperatorsCa(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "rotate-sks-operators-ca" +// XGetSksClusterAuthorityCert Get the certificate for a SKS cluster authority +func XGetSksClusterAuthorityCert(paramId string, paramAuthority string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-sks-cluster-authority-cert" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13935,14 +13873,11 @@ func XRotateSksOperatorsCa(paramId string, params *viper.Viper, body string) (*g server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/rotate-operators-ca" + url := server + "/sks-cluster/{id}/authority/{authority}/cert" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{authority}", paramAuthority, 1) - req := cli.Client.Put().URL(url) - - if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -13969,9 +13904,9 @@ func XRotateSksOperatorsCa(paramId string, params *viper.Viper, body string) (*g return resp, decoded, nil } -// XUpgradeSksCluster Upgrade an SKS cluster -func XUpgradeSksCluster(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "upgrade-sks-cluster" +// XGenerateSksKarpenterExoscaleNodeclass Generate a Karpenter ExoscaleNodeClass manifest for an SKS cluster, including its default security group and feature flags if present +func XGenerateSksKarpenterExoscaleNodeclass(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "generate-sks-karpenter-exoscale-nodeclass" if xSubcommand { handlerPath = "x " + handlerPath } @@ -13981,13 +13916,13 @@ func XUpgradeSksCluster(paramId string, params *viper.Viper, body string) (*gent server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/upgrade" + url := server + "/sks-cluster/{id}/generate-karpenter-exoscale-nodeclass" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -14015,9 +13950,9 @@ func XUpgradeSksCluster(paramId string, params *viper.Viper, body string) (*gent return resp, decoded, nil } -// XUpgradeSksClusterServiceLevel Upgrade a SKS cluster to pro -func XUpgradeSksClusterServiceLevel(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "upgrade-sks-cluster-service-level" +// XGenerateSksKarpenterNodepool Generate a Karpenter NodePool manifest with minimal configuration for an SKS cluster +func XGenerateSksKarpenterNodepool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "generate-sks-karpenter-nodepool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14027,7 +13962,7 @@ func XUpgradeSksClusterServiceLevel(paramId string, params *viper.Viper, body st server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-cluster/{id}/upgrade-service-level" + url := server + "/sks-cluster/{id}/generate-karpenter-nodepool" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) @@ -14061,9 +13996,9 @@ func XUpgradeSksClusterServiceLevel(paramId string, params *viper.Viper, body st return resp, decoded, nil } -// XGetActiveNodepoolTemplate get-active-nodepool-template -func XGetActiveNodepoolTemplate(paramKubeVersion string, paramVariant string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-active-nodepool-template" +// XGetSksClusterInspection Get the latest inspection result +func XGetSksClusterInspection(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-sks-cluster-inspection" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14073,9 +14008,8 @@ func XGetActiveNodepoolTemplate(paramKubeVersion string, paramVariant string, pa server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sks-template/{kube-version}/{variant}" - url = strings.Replace(url, "{kube-version}", paramKubeVersion, 1) - url = strings.Replace(url, "{variant}", paramVariant, 1) + url := server + "/sks-cluster/{id}/inspection" + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -14104,9 +14038,9 @@ func XGetActiveNodepoolTemplate(paramKubeVersion string, paramVariant string, pa return resp, decoded, nil } -// XListSnapshots List Snapshots -func XListSnapshots(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-snapshots" +// XCreateSksNodepool Create a new SKS Nodepool +func XCreateSksNodepool(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-sks-nodepool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14116,9 +14050,14 @@ func XListSnapshots(params *viper.Viper) (*gentleman.Response, map[string]interf server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/snapshot" + url := server + "/sks-cluster/{id}/nodepool" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -14145,9 +14084,9 @@ func XListSnapshots(params *viper.Viper) (*gentleman.Response, map[string]interf return resp, decoded, nil } -// XDeleteSnapshot Delete a Snapshot -func XDeleteSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-snapshot" +// XDeleteSksNodepool Delete an SKS Nodepool +func XDeleteSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-sks-nodepool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14157,8 +14096,9 @@ func XDeleteSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/snapshot/{id}" + url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) req := cli.Client.Delete().URL(url) @@ -14187,9 +14127,9 @@ func XDeleteSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XGetSnapshot Retrieve Snapshot details -func XGetSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-snapshot" +// XGetSksNodepool Retrieve SKS Nodepool details +func XGetSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-sks-nodepool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14199,8 +14139,9 @@ func XGetSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, map server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/snapshot/{id}" + url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) req := cli.Client.Get().URL(url) @@ -14229,9 +14170,9 @@ func XGetSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, map return resp, decoded, nil } -// XExportSnapshot Export a Snapshot -func XExportSnapshot(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "export-snapshot" +// XUpdateSksNodepool Update an SKS Nodepool +func XUpdateSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-sks-nodepool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14241,13 +14182,14 @@ func XExportSnapshot(paramId string, params *viper.Viper, body string) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/snapshot/{id}:export" + url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "").BodyString(body) + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -14275,9 +14217,9 @@ func XExportSnapshot(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XPromoteSnapshotToTemplate Promote a Snapshot to a Template -func XPromoteSnapshotToTemplate(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "promote-snapshot-to-template" +// XEvictSksNodepoolMembers Evict Nodepool members +func XEvictSksNodepoolMembers(paramId string, paramSksNodepoolId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "evict-sks-nodepool-members" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14287,10 +14229,11 @@ func XPromoteSnapshotToTemplate(paramId string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/snapshot/{id}:promote" + url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}:evict" url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -14321,9 +14264,9 @@ func XPromoteSnapshotToTemplate(paramId string, params *viper.Viper, body string return resp, decoded, nil } -// XListSosBucketsUsage List SOS Buckets Usage -func XListSosBucketsUsage(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-sos-buckets-usage" +// XScaleSksNodepool Scale a SKS Nodepool +func XScaleSksNodepool(paramId string, paramSksNodepoolId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "scale-sks-nodepool" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14333,9 +14276,15 @@ func XListSosBucketsUsage(params *viper.Viper) (*gentleman.Response, map[string] server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sos-buckets-usage" + url := server + "/sks-cluster/{id}/nodepool/{sks-nodepool-id}:scale" + url = strings.Replace(url, "{id}", paramId, 1) + url = strings.Replace(url, "{sks-nodepool-id}", paramSksNodepoolId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -14362,9 +14311,9 @@ func XListSosBucketsUsage(params *viper.Viper) (*gentleman.Response, map[string] return resp, decoded, nil } -// XGetSosPresignedUrl Retrieve Presigned Download URL for SOS object -func XGetSosPresignedUrl(paramBucket string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-sos-presigned-url" +// XRotateSksCcmCredentials Rotate Exoscale CCM credentials +func XRotateSksCcmCredentials(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "rotate-sks-ccm-credentials" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14374,14 +14323,13 @@ func XGetSosPresignedUrl(paramBucket string, params *viper.Viper) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/sos/{bucket}/presigned-url" - url = strings.Replace(url, "{bucket}", paramBucket, 1) + url := server + "/sks-cluster/{id}/rotate-ccm-credentials" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) - paramKey := params.GetString("key") - if paramKey != "" { - req = req.AddQuery("key", fmt.Sprintf("%v", paramKey)) + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -14409,9 +14357,9 @@ func XGetSosPresignedUrl(paramBucket string, params *viper.Viper) (*gentleman.Re return resp, decoded, nil } -// XListSshKeys List SSH keys -func XListSshKeys(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-ssh-keys" +// XRotateSksCsiCredentials Rotate Exoscale CSI credentials +func XRotateSksCsiCredentials(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "rotate-sks-csi-credentials" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14421,9 +14369,14 @@ func XListSshKeys(params *viper.Viper) (*gentleman.Response, map[string]interfac server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/ssh-key" + url := server + "/sks-cluster/{id}/rotate-csi-credentials" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -14450,9 +14403,9 @@ func XListSshKeys(params *viper.Viper) (*gentleman.Response, map[string]interfac return resp, decoded, nil } -// XRegisterSshKey Import SSH key -func XRegisterSshKey(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "register-ssh-key" +// XRotateSksKarpenterCredentials Rotate Exoscale Karpenter credentials +func XRotateSksKarpenterCredentials(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "rotate-sks-karpenter-credentials" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14462,12 +14415,13 @@ func XRegisterSshKey(params *viper.Viper, body string) (*gentleman.Response, map server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/ssh-key" + url := server + "/sks-cluster/{id}/rotate-karpenter-credentials" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -14495,9 +14449,9 @@ func XRegisterSshKey(params *viper.Viper, body string) (*gentleman.Response, map return resp, decoded, nil } -// XDeleteSshKey Delete a SSH key -func XDeleteSshKey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-ssh-key" +// XRotateSksOperatorsCa Rotate operators certificate authority +func XRotateSksOperatorsCa(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "rotate-sks-operators-ca" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14507,10 +14461,14 @@ func XDeleteSshKey(paramName string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/ssh-key/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/sks-cluster/{id}/rotate-operators-ca" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Delete().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -14537,9 +14495,9 @@ func XDeleteSshKey(paramName string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XGetSshKey Retrieve SSH key details -func XGetSshKey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-ssh-key" +// XUpgradeSksCluster Upgrade an SKS cluster +func XUpgradeSksCluster(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "upgrade-sks-cluster" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14549,10 +14507,14 @@ func XGetSshKey(paramName string, params *viper.Viper) (*gentleman.Response, map server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/ssh-key/{name}" - url = strings.Replace(url, "{name}", paramName, 1) + url := server + "/sks-cluster/{id}/upgrade" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -14579,9 +14541,9 @@ func XGetSshKey(paramName string, params *viper.Viper) (*gentleman.Response, map return resp, decoded, nil } -// XListTemplates List Templates -func XListTemplates(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-templates" +// XUpgradeSksClusterServiceLevel Upgrade a SKS cluster to pro +func XUpgradeSksClusterServiceLevel(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "upgrade-sks-cluster-service-level" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14591,17 +14553,13 @@ func XListTemplates(params *viper.Viper) (*gentleman.Response, map[string]interf server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/template" + url := server + "/sks-cluster/{id}/upgrade-service-level" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Put().URL(url) - paramVisibility := params.GetString("visibility") - if paramVisibility != "" { - req = req.AddQuery("visibility", fmt.Sprintf("%v", paramVisibility)) - } - paramFamily := params.GetString("family") - if paramFamily != "" { - req = req.AddQuery("family", fmt.Sprintf("%v", paramFamily)) + if body != "" { + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -14629,9 +14587,9 @@ func XListTemplates(params *viper.Viper) (*gentleman.Response, map[string]interf return resp, decoded, nil } -// XRegisterTemplate Register a Template -func XRegisterTemplate(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "register-template" +// XGetActiveNodepoolTemplate get-active-nodepool-template +func XGetActiveNodepoolTemplate(paramKubeVersion string, paramVariant string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-active-nodepool-template" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14641,13 +14599,11 @@ func XRegisterTemplate(params *viper.Viper, body string) (*gentleman.Response, m server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/template" - - req := cli.Client.Post().URL(url) + url := server + "/sks-template/{kube-version}/{variant}" + url = strings.Replace(url, "{kube-version}", paramKubeVersion, 1) + url = strings.Replace(url, "{variant}", paramVariant, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -14674,9 +14630,9 @@ func XRegisterTemplate(params *viper.Viper, body string) (*gentleman.Response, m return resp, decoded, nil } -// XCopyTemplate Copy a Template from a zone to another -func XCopyTemplate(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "copy-template" +// XListSnapshots List Snapshots +func XListSnapshots(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-snapshots" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14686,14 +14642,9 @@ func XCopyTemplate(paramId string, params *viper.Viper, body string) (*gentleman server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/template/{id}" - url = strings.Replace(url, "{id}", paramId, 1) - - req := cli.Client.Post().URL(url) + url := server + "/snapshot" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -14720,9 +14671,9 @@ func XCopyTemplate(paramId string, params *viper.Viper, body string) (*gentleman return resp, decoded, nil } -// XDeleteTemplate Delete a Template -func XDeleteTemplate(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-template" +// XDeleteSnapshot Delete a Snapshot +func XDeleteSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-snapshot" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14732,7 +14683,7 @@ func XDeleteTemplate(paramId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/template/{id}" + url := server + "/snapshot/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Delete().URL(url) @@ -14762,9 +14713,9 @@ func XDeleteTemplate(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XGetTemplate Retrieve Template details -func XGetTemplate(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-template" +// XGetSnapshot Retrieve Snapshot details +func XGetSnapshot(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-snapshot" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14774,7 +14725,7 @@ func XGetTemplate(paramId string, params *viper.Viper) (*gentleman.Response, map server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/template/{id}" + url := server + "/snapshot/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -14804,9 +14755,9 @@ func XGetTemplate(paramId string, params *viper.Viper) (*gentleman.Response, map return resp, decoded, nil } -// XUpdateTemplate Update template attributes -func XUpdateTemplate(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-template" +// XExportSnapshot Export a Snapshot +func XExportSnapshot(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "export-snapshot" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14816,13 +14767,13 @@ func XUpdateTemplate(paramId string, params *viper.Viper, body string) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/template/{id}" + url := server + "/snapshot/{id}:export" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) + req = req.AddHeader("Content-Type", "").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -14850,9 +14801,9 @@ func XUpdateTemplate(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XGetUsageReport Retrieve organization usage reports -func XGetUsageReport(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-usage-report" +// XPromoteSnapshotToTemplate Promote a Snapshot to a Template +func XPromoteSnapshotToTemplate(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "promote-snapshot-to-template" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14862,13 +14813,13 @@ func XGetUsageReport(params *viper.Viper) (*gentleman.Response, map[string]inter server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/usage-report" + url := server + "/snapshot/{id}:promote" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) - paramPeriod := params.GetString("period") - if paramPeriod != "" { - req = req.AddQuery("period", fmt.Sprintf("%v", paramPeriod)) + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) } cli.HandleBefore(handlerPath, params, req) @@ -14896,9 +14847,9 @@ func XGetUsageReport(params *viper.Viper) (*gentleman.Response, map[string]inter return resp, decoded, nil } -// XCreateUser Create a User -func XCreateUser(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-user" +// XListSosBucketsUsage List SOS Buckets Usage +func XListSosBucketsUsage(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-sos-buckets-usage" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14908,13 +14859,9 @@ func XCreateUser(params *viper.Viper, body string) (*gentleman.Response, map[str server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/user" - - req := cli.Client.Post().URL(url) + url := server + "/sos-buckets-usage" - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -14941,9 +14888,9 @@ func XCreateUser(params *viper.Viper, body string) (*gentleman.Response, map[str return resp, decoded, nil } -// XListUsers List Users -func XListUsers(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-users" +// XGetSosPresignedUrl Retrieve Presigned Download URL for SOS object +func XGetSosPresignedUrl(paramBucket string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-sos-presigned-url" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14953,10 +14900,16 @@ func XListUsers(params *viper.Viper) (*gentleman.Response, map[string]interface{ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/user" + url := server + "/sos/{bucket}/presigned-url" + url = strings.Replace(url, "{bucket}", paramBucket, 1) req := cli.Client.Get().URL(url) + paramKey := params.GetString("key") + if paramKey != "" { + req = req.AddQuery("key", fmt.Sprintf("%v", paramKey)) + } + cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() @@ -14982,9 +14935,9 @@ func XListUsers(params *viper.Viper) (*gentleman.Response, map[string]interface{ return resp, decoded, nil } -// XDeleteUser Delete User -func XDeleteUser(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-user" +// XListSshKeys List SSH keys +func XListSshKeys(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-ssh-keys" if xSubcommand { handlerPath = "x " + handlerPath } @@ -14994,10 +14947,9 @@ func XDeleteUser(paramId string, params *viper.Viper) (*gentleman.Response, map[ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/user/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/ssh-key" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -15024,9 +14976,9 @@ func XDeleteUser(paramId string, params *viper.Viper) (*gentleman.Response, map[ return resp, decoded, nil } -// XUpdateUserRole Update a User's IAM role -func XUpdateUserRole(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-user-role" +// XRegisterSshKey Import SSH key +func XRegisterSshKey(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "register-ssh-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15036,10 +14988,9 @@ func XUpdateUserRole(paramId string, params *viper.Viper, body string) (*gentlem server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/user/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/ssh-key" - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -15070,9 +15021,9 @@ func XUpdateUserRole(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XCreateVpc [BETA] Create a VPC -func XCreateVpc(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-vpc" +// XDeleteSshKey Delete a SSH key +func XDeleteSshKey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-ssh-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15082,13 +15033,10 @@ func XCreateVpc(params *viper.Viper, body string) (*gentleman.Response, map[stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc" - - req := cli.Client.Post().URL(url) + url := server + "/ssh-key/{name}" + url = strings.Replace(url, "{name}", paramName, 1) - if body != "" { - req = req.AddHeader("Content-Type", "application/json").BodyString(body) - } + req := cli.Client.Delete().URL(url) cli.HandleBefore(handlerPath, params, req) @@ -15115,9 +15063,9 @@ func XCreateVpc(params *viper.Viper, body string) (*gentleman.Response, map[stri return resp, decoded, nil } -// XListVpcs [BETA] List VPCs -func XListVpcs(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-vpcs" +// XGetSshKey Retrieve SSH key details +func XGetSshKey(paramName string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-ssh-key" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15127,7 +15075,8 @@ func XListVpcs(params *viper.Viper) (*gentleman.Response, map[string]interface{} server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc" + url := server + "/ssh-key/{name}" + url = strings.Replace(url, "{name}", paramName, 1) req := cli.Client.Get().URL(url) @@ -15156,9 +15105,9 @@ func XListVpcs(params *viper.Viper) (*gentleman.Response, map[string]interface{} return resp, decoded, nil } -// XDeleteVpc [BETA] Delete a VPC -func XDeleteVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-vpc" +// XListTemplates List Templates +func XListTemplates(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-templates" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15168,10 +15117,18 @@ func XDeleteVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[s server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/template" - req := cli.Client.Delete().URL(url) + req := cli.Client.Get().URL(url) + + paramVisibility := params.GetString("visibility") + if paramVisibility != "" { + req = req.AddQuery("visibility", fmt.Sprintf("%v", paramVisibility)) + } + paramFamily := params.GetString("family") + if paramFamily != "" { + req = req.AddQuery("family", fmt.Sprintf("%v", paramFamily)) + } cli.HandleBefore(handlerPath, params, req) @@ -15198,9 +15155,9 @@ func XDeleteVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[s return resp, decoded, nil } -// XGetVpc [BETA] Retrieve VPC details -func XGetVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-vpc" +// XRegisterTemplate Register a Template +func XRegisterTemplate(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "register-template" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15210,10 +15167,13 @@ func XGetVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[stri server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{id}" - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/template" - req := cli.Client.Get().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -15240,9 +15200,9 @@ func XGetVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[stri return resp, decoded, nil } -// XUpdateVpc [BETA] Update a VPC -func XUpdateVpc(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-vpc" +// XCopyTemplate Copy a Template from a zone to another +func XCopyTemplate(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "copy-template" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15252,10 +15212,10 @@ func XUpdateVpc(paramId string, params *viper.Viper, body string) (*gentleman.Re server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{id}" + url := server + "/template/{id}" url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Put().URL(url) + req := cli.Client.Post().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -15286,9 +15246,9 @@ func XUpdateVpc(paramId string, params *viper.Viper, body string) (*gentleman.Re return resp, decoded, nil } -// XListVpcRoutes [BETA] List VPC routes -func XListVpcRoutes(paramVpcId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-vpc-routes" +// XDeleteTemplate Delete a Template +func XDeleteTemplate(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-template" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15298,8 +15258,50 @@ func XListVpcRoutes(paramVpcId string, params *viper.Viper) (*gentleman.Response server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/route" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url := server + "/template/{id}" + url = strings.Replace(url, "{id}", paramId, 1) + + req := cli.Client.Delete().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XGetTemplate Retrieve Template details +func XGetTemplate(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-template" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/template/{id}" + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -15328,9 +15330,9 @@ func XListVpcRoutes(paramVpcId string, params *viper.Viper) (*gentleman.Response return resp, decoded, nil } -// XCreateSubnet [BETA] Create a Subnet -func XCreateSubnet(paramVpcId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-subnet" +// XUpdateTemplate Update template attributes +func XUpdateTemplate(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-template" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15340,10 +15342,10 @@ func XCreateSubnet(paramVpcId string, params *viper.Viper, body string) (*gentle server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url := server + "/template/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - req := cli.Client.Post().URL(url) + req := cli.Client.Put().URL(url) if body != "" { req = req.AddHeader("Content-Type", "application/json").BodyString(body) @@ -15374,9 +15376,9 @@ func XCreateSubnet(paramVpcId string, params *viper.Viper, body string) (*gentle return resp, decoded, nil } -// XListSubnets [BETA] List Subnets -func XListSubnets(paramVpcId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-subnets" +// XGetUsageReport Retrieve organization usage reports +func XGetUsageReport(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-usage-report" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15386,11 +15388,15 @@ func XListSubnets(paramVpcId string, params *viper.Viper) (*gentleman.Response, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url := server + "/usage-report" req := cli.Client.Get().URL(url) + paramPeriod := params.GetString("period") + if paramPeriod != "" { + req = req.AddQuery("period", fmt.Sprintf("%v", paramPeriod)) + } + cli.HandleBefore(handlerPath, params, req) resp, err := req.Do() @@ -15416,9 +15422,9 @@ func XListSubnets(paramVpcId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XDeleteSubnet [BETA] Delete a Subnet -func XDeleteSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-subnet" +// XCreateUser Create a User +func XCreateUser(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15428,11 +15434,13 @@ func XDeleteSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gen server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet/{id}" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/user" - req := cli.Client.Delete().URL(url) + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } cli.HandleBefore(handlerPath, params, req) @@ -15459,9 +15467,9 @@ func XDeleteSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gen return resp, decoded, nil } -// XGetSubnet [BETA] Retrieve Subnet details -func XGetSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "get-subnet" +// XListUsers List Users +func XListUsers(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-users" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15471,9 +15479,7 @@ func XGetSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gentle server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet/{id}" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) - url = strings.Replace(url, "{id}", paramId, 1) + url := server + "/user" req := cli.Client.Get().URL(url) @@ -15502,9 +15508,9 @@ func XGetSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gentle return resp, decoded, nil } -// XUpdateSubnet [BETA] Update a Subnet -func XUpdateSubnet(paramVpcId string, paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-subnet" +// XDeleteUser Delete User +func XDeleteUser(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-user" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15514,8 +15520,49 @@ func XUpdateSubnet(paramVpcId string, paramId string, params *viper.Viper, body server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet/{id}" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url := server + "/user/{id}" + url = strings.Replace(url, "{id}", paramId, 1) + + req := cli.Client.Delete().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XUpdateUserRole Update a User's IAM role +func XUpdateUserRole(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-user-role" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/user/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Put().URL(url) @@ -15549,9 +15596,9 @@ func XUpdateSubnet(paramVpcId string, paramId string, params *viper.Viper, body return resp, decoded, nil } -// XCreateRoute [BETA] Create a route -func XCreateRoute(paramVpcId string, paramSubnetId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "create-route" +// XCreateVpc [BETA] Create a VPC +func XCreateVpc(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-vpc" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15561,9 +15608,7 @@ func XCreateRoute(paramVpcId string, paramSubnetId string, params *viper.Viper, server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/route" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) - url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + url := server + "/vpc" req := cli.Client.Post().URL(url) @@ -15596,9 +15641,9 @@ func XCreateRoute(paramVpcId string, paramSubnetId string, params *viper.Viper, return resp, decoded, nil } -// XListRoutes [BETA] List Subnet routes -func XListRoutes(paramVpcId string, paramSubnetId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-routes" +// XListVpcs [BETA] List VPCs +func XListVpcs(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-vpcs" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15608,9 +15653,7 @@ func XListRoutes(paramVpcId string, paramSubnetId string, params *viper.Viper) ( server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/route" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) - url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + url := server + "/vpc" req := cli.Client.Get().URL(url) @@ -15639,9 +15682,9 @@ func XListRoutes(paramVpcId string, paramSubnetId string, params *viper.Viper) ( return resp, decoded, nil } -// XDeleteRoute [BETA] Delete a route -func XDeleteRoute(paramVpcId string, paramSubnetId string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "delete-route" +// XDeleteVpc [BETA] Delete a VPC +func XDeleteVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-vpc" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15651,9 +15694,7 @@ func XDeleteRoute(paramVpcId string, paramSubnetId string, paramId string, param server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/route/{id}" - url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) - url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + url := server + "/vpc/{id}" url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Delete().URL(url) @@ -15683,9 +15724,9 @@ func XDeleteRoute(paramVpcId string, paramSubnetId string, paramId string, param return resp, decoded, nil } -// XListZones List Zones -func XListZones(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-zones" +// XGetVpc [BETA] Retrieve VPC details +func XGetVpc(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-vpc" if xSubcommand { handlerPath = "x " + handlerPath } @@ -15695,7 +15736,8 @@ func XListZones(params *viper.Viper) (*gentleman.Response, map[string]interface{ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/zone" + url := server + "/vpc/{id}" + url = strings.Replace(url, "{id}", paramId, 1) req := cli.Client.Get().URL(url) @@ -15724,44 +15766,840 @@ func XListZones(params *viper.Viper) (*gentleman.Response, map[string]interface{ return resp, decoded, nil } -func xRegister(subcommand bool) { - root := cli.Root +// XUpdateVpc [BETA] Update a VPC +func XUpdateVpc(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-vpc" + if xSubcommand { + handlerPath = "x " + handlerPath + } - if subcommand { - root = &cobra.Command{ - Use: "x", - Short: "Exoscale API", - Long: cli.Markdown("Infrastructure automation API, allowing programmatic access to all Exoscale products and services."), - } - xSubcommand = true - } else { - cli.Root.Short = "Exoscale API" - cli.Root.Long = cli.Markdown("Infrastructure automation API, allowing programmatic access to all Exoscale products and services.") + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] } - func() { - params := viper.New() + url := server + "/vpc/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - var examples string + req := cli.Client.Put().URL(url) - cmd := &cobra.Command{ - Use: "create-ai-api-key", - Short: "[BETA] Create AI API Key", - Long: cli.Markdown("Create a new AI API key\n## Request Schema (application/json)\n\ndescription: Request to create a new AI API key\nproperties:\n name:\n description: Human-readable name for the AI API key\n type: string\n scope:\n description: 'Key scope: ''public'' for all deployments, or a specific deployment UUID'\n type: string\nrequired:\n- name\n- scope\ntype: object\n"), - Example: examples, - Args: cobra.MinimumNArgs(0), - Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } - _, decoded, err := XCreateAiApiKey(params, body) - if err != nil { - log.Fatal().Err(err).Msg("Error calling operation") - } + cli.HandleBefore(handlerPath, params, req) - if err := cli.Formatter.Format(decoded); err != nil { + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XListVpcRoutes [BETA] List VPC routes +func XListVpcRoutes(paramVpcId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-vpc-routes" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/route" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + + req := cli.Client.Get().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XCreateSubnet [BETA] Create a Subnet +func XCreateSubnet(paramVpcId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-subnet" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XListSubnets [BETA] List Subnets +func XListSubnets(paramVpcId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-subnets" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + + req := cli.Client.Get().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XDeleteSubnet [BETA] Delete a Subnet +func XDeleteSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-subnet" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{id}" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{id}", paramId, 1) + + req := cli.Client.Delete().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XGetSubnet [BETA] Retrieve Subnet details +func XGetSubnet(paramVpcId string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "get-subnet" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{id}" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{id}", paramId, 1) + + req := cli.Client.Get().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XUpdateSubnet [BETA] Update a Subnet +func XUpdateSubnet(paramVpcId string, paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "update-subnet" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{id}" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{id}", paramId, 1) + + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XAttachInstanceToSubnet [BETA] Attach a Compute instance to a Subnet +func XAttachInstanceToSubnet(paramVpcId string, paramSubnetId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "attach-instance-to-subnet" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/attach" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XDetachInstanceFromSubnet [BETA] Detach a Compute instance from a Subnet +func XDetachInstanceFromSubnet(paramVpcId string, paramSubnetId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "detach-instance-from-subnet" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/detach" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + + req := cli.Client.Put().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XCreateRoute [BETA] Create a route +func XCreateRoute(paramVpcId string, paramSubnetId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "create-route" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/route" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + + req := cli.Client.Post().URL(url) + + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XListRoutes [BETA] List Subnet routes +func XListRoutes(paramVpcId string, paramSubnetId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-routes" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/route" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + + req := cli.Client.Get().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XDeleteRoute [BETA] Delete a route +func XDeleteRoute(paramVpcId string, paramSubnetId string, paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "delete-route" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/vpc/{vpc-id}/subnet/{subnet-id}/route/{id}" + url = strings.Replace(url, "{vpc-id}", paramVpcId, 1) + url = strings.Replace(url, "{subnet-id}", paramSubnetId, 1) + url = strings.Replace(url, "{id}", paramId, 1) + + req := cli.Client.Delete().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +// XListZones List Zones +func XListZones(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-zones" + if xSubcommand { + handlerPath = "x " + handlerPath + } + + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } + + url := server + "/zone" + + req := cli.Client.Get().URL(url) + + cli.HandleBefore(handlerPath, params, req) + + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } + + var decoded map[string]interface{} + + if resp.StatusCode < 400 { + if err := cli.UnmarshalResponse(resp, &decoded); err != nil { + return nil, nil, errors.Wrap(err, "Unmarshalling response failed") + } + } else { + return nil, nil, errors.Errorf("HTTP %d: %s", resp.StatusCode, resp.String()) + } + + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } + + return resp, decoded, nil +} + +func xRegister(subcommand bool) { + root := cli.Root + + if subcommand { + root = &cobra.Command{ + Use: "x", + Short: "Exoscale API", + Long: cli.Markdown("Infrastructure automation API, allowing programmatic access to all Exoscale products and services."), + } + xSubcommand = true + } else { + cli.Root.Short = "Exoscale API" + cli.Root.Long = cli.Markdown("Infrastructure automation API, allowing programmatic access to all Exoscale products and services.") + } + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "create-ai-api-key", + Short: "[BETA] Create AI API Key", + Long: cli.Markdown("Create a new AI API key\n## Request Schema (application/json)\n\ndescription: Request to create a new AI API key\nproperties:\n name:\n description: Human-readable name for the AI API key\n maxLength: 50\n minLength: 1\n pattern: ^[A-Za-z0-9](?:[A-Za-z0-9 _'()-]*[A-Za-z0-9])?$\n type: string\n scope:\n description: 'Key scope: ''public'' for all deployments, or a specific deployment UUID'\n type: string\nrequired:\n- name\n- scope\ntype: object\n"), + Example: examples, + Args: cobra.MinimumNArgs(0), + Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[0:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } + + _, decoded, err := XCreateAiApiKey(params, body) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "list-ai-api-keys", + Short: "[BETA] List AI API Keys", + Long: cli.Markdown("List AI API keys for an organization"), + Example: examples, + Args: cobra.MinimumNArgs(0), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XListAiApiKeys(params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "delete-ai-api-key id", + Short: "[BETA] Delete AI API Key", + Long: cli.Markdown("Delete AI API key"), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XDeleteAiApiKey(args[0], params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "get-ai-api-key id", + Short: "[BETA] Get AI API Key", + Long: cli.Markdown("Get AI API key metadata"), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XGetAiApiKey(args[0], params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "update-ai-api-key id", + Short: "[BETA] Update AI API Key", + Long: cli.Markdown("Update AI API key name and/or scope\n## Request Schema (application/json)\n\ndescription: Request to update an AI API key (at least one property required)\nminProperties: 1\nproperties:\n name:\n description: Human-readable name for the AI API key\n maxLength: 50\n minLength: 1\n pattern: ^[A-Za-z0-9](?:[A-Za-z0-9 _'()-]*[A-Za-z0-9])?$\n type: string\n scope:\n description: 'Key scope: ''public'' for all deployments, or a specific deployment UUID'\n type: string\ntype: object\n"), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } + + _, decoded, err := XUpdateAiApiKey(args[0], params, body) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "reveal-ai-api-key id", + Short: "[BETA] Reveal AI API Key", + Long: cli.Markdown("Reveal AI API key plaintext value"), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XRevealAiApiKey(args[0], params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "rotate-ai-api-key id", + Short: "[BETA] Rotate AI API Key", + Long: cli.Markdown("Rotate AI API key value"), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } + + _, decoded, err := XRotateAiApiKey(args[0], params, body) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { log.Fatal().Err(err).Msg("Formatting failed") } @@ -15784,14 +16622,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-ai-api-keys", - Short: "[BETA] List AI API Keys", - Long: cli.Markdown("List AI API keys for an organization"), + Use: "create-deployment", + Short: "Create Deployment", + Long: cli.Markdown("Deploy a model on an inference server\n## Request Schema (application/json)\n\ndescription: Deploy an AI model onto a set of GPUs\nproperties:\n gpu-count:\n description: Number of GPUs (1-8)\n format: int64\n minimum: 1\n type: integer\n gpu-type:\n description: GPU type family (e.g., gpua5000, gpu3080ti)\n type: string\n inference-engine-parameters:\n description: Optional extra inference engine server CLI args\n items:\n type: string\n type: array\n inference-engine-version:\n $ref: '#/components/schemas/inference-engine-version'\n model:\n $ref: '#/components/schemas/model-ref'\n name:\n description: Deployment name\n minLength: 1\n type: string\n product-name:\n description: Billing identifier for this deployment. Used by the Router for usage counters and Kafka events.\n minLength: 1\n type: string\n replicas:\n description: Number of replicas (>=1)\n format: int64\n minimum: 1\n type: integer\nrequired:\n- model\n- name\n- gpu-type\n- gpu-count\n- replicas\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[0:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XListAiApiKeys(params) + _, decoded, err := XCreateDeployment(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15819,14 +16661,51 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-ai-api-key id", - Short: "[BETA] Delete AI API Key", - Long: cli.Markdown("Delete AI API key"), + Use: "list-deployments", + Short: "List Deployments", + Long: cli.Markdown("List Deployments"), + Example: examples, + Args: cobra.MinimumNArgs(0), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XListDeployments(params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cmd.Flags().String("visibility", "", "") + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "delete-deployment id", + Short: "Delete Deployment", + Long: cli.Markdown("Delete Deployment"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteAiApiKey(args[0], params) + _, decoded, err := XDeleteDeployment(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15854,14 +16733,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-ai-api-key id", - Short: "[BETA] Get AI API Key", - Long: cli.Markdown("Get AI API key metadata"), + Use: "get-deployment id", + Short: "Get Deployment", + Long: cli.Markdown("Get Deployment details"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetAiApiKey(args[0], params) + _, decoded, err := XGetDeployment(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15889,9 +16768,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-ai-api-key id", - Short: "[BETA] Update AI API Key", - Long: cli.Markdown("Update AI API key name and/or scope\n## Request Schema (application/json)\n\ndescription: Request to update an AI API key (at least one property required)\nminProperties: 1\nproperties:\n name:\n description: Human-readable name for the AI API key\n type: string\n scope:\n description: 'Key scope: ''public'' for all deployments, or a specific deployment UUID'\n type: string\ntype: object\n"), + Use: "update-deployment id", + Short: "Update Deployment", + Long: cli.Markdown("Update AI deployment\n## Request Schema (application/json)\n\ndescription: Update AI deployment\nproperties:\n inference-engine-parameters:\n description: Optional extra inference engine server CLI args\n items:\n type: string\n type: array\n inference-engine-version:\n $ref: '#/components/schemas/inference-engine-version'\n name:\n description: Deployment name\n minLength: 1\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -15900,7 +16779,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateAiApiKey(args[0], params, body) + _, decoded, err := XUpdateDeployment(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15928,14 +16807,163 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-ai-api-key id", - Short: "[BETA] Reveal AI API Key", - Long: cli.Markdown("Reveal AI API key plaintext value"), + Use: "reveal-deployment-api-key id", + Short: "Reveal Deployment API Key", + Long: cli.Markdown("Get Deployment API Key"), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XRevealDeploymentApiKey(args[0], params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "get-deployment-logs id", + Short: "Get Deployment Logs", + Long: cli.Markdown("Return logs for the vLLM deployment (deploy/--deployment-vllm). Optional ?stream=true to request streaming (may not be supported)."), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XGetDeploymentLogs(args[0], params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cmd.Flags().String("stream", "", "") + cmd.Flags().Int64("tail", 0, "") + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "scale-deployment id", + Short: "Scale Deployment", + Long: cli.Markdown("Scale Deployment\n## Request Schema (application/json)\n\ndescription: Scale AI deployment\nproperties:\n replicas:\n description: Number of replicas (>=0)\n format: int64\n minimum: 0\n type: integer\nrequired:\n- replicas\ntype: object\n"), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } + + _, decoded, err := XScaleDeployment(args[0], params, body) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "get-inference-engine-help", + Short: "Get inference-engine Help", + Long: cli.Markdown("Get list of allowed inference engine parameters with their descriptions and allowed values"), + Example: examples, + Args: cobra.MinimumNArgs(0), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XGetInferenceEngineHelp(params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cmd.Flags().String("version", "", "") + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "list-ai-instance-types", + Short: "List Instance Types", + Long: cli.Markdown("List available instance types with authorization status based on GPU availability"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealAiApiKey(args[0], params) + _, decoded, err := XListAiInstanceTypes(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15963,18 +16991,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "rotate-ai-api-key id", - Short: "[BETA] Rotate AI API Key", - Long: cli.Markdown("Rotate AI API key value"), + Use: "create-model", + Short: "Create Model", + Long: cli.Markdown("Model files will be downloaded from Huggingface.\n\nName must be the exact name of the model on huggingface (ex: openai/gpt-oss-120b or ggml-org/gpt-oss-120b-GGUF).\n\nIf the model is under a license then you must provide a Huggingface access token for an account that signed the license agreement\n## Request Schema (application/json)\n\ndescription: AI model\nproperties:\n huggingface-token:\n description: Huggingface Token\n type: string\n name:\n description: Model name\n minLength: 1\n type: string\nrequired:\n- name\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XRotateAiApiKey(args[0], params, body) + _, decoded, err := XCreateModel(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16002,18 +17030,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-deployment", - Short: "Create Deployment", - Long: cli.Markdown("Deploy a model on an inference server\n## Request Schema (application/json)\n\ndescription: Deploy an AI model onto a set of GPUs\nproperties:\n gpu-count:\n description: Number of GPUs (1-8)\n format: int64\n minimum: 1\n type: integer\n gpu-type:\n description: GPU type family (e.g., gpua5000, gpu3080ti)\n type: string\n inference-engine-parameters:\n description: Optional extra inference engine server CLI args\n items:\n type: string\n type: array\n inference-engine-version:\n $ref: '#/components/schemas/inference-engine-version'\n model:\n $ref: '#/components/schemas/model-ref'\n name:\n description: Deployment name\n minLength: 1\n type: string\n replicas:\n description: Number of replicas (>=1)\n format: int64\n minimum: 1\n type: integer\nrequired:\n- model\n- name\n- gpu-type\n- gpu-count\n- replicas\ntype: object\n"), + Use: "list-models", + Short: "List Models", + Long: cli.Markdown("List Models"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XCreateDeployment(params, body) + _, decoded, err := XListModels(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16027,6 +17051,8 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("visibility", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16041,14 +17067,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-deployments", - Short: "List Deployments", - Long: cli.Markdown("List Deployments"), + Use: "delete-model id", + Short: "Delete Model", + Long: cli.Markdown("Delete Model"), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDeployments(params) + _, decoded, err := XDeleteModel(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16062,8 +17088,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("visibility", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16078,14 +17102,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-deployment id", - Short: "Delete Deployment", - Long: cli.Markdown("Delete Deployment"), + Use: "get-model id", + Short: "Get Model", + Long: cli.Markdown("Get Model details"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDeployment(args[0], params) + _, decoded, err := XGetModel(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16113,14 +17137,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-deployment id", - Short: "Get Deployment", - Long: cli.Markdown("Get Deployment details"), + Use: "get-user-org-consumption-quota", + Short: "[BETA] Get Organization Consumption Quota", + Long: cli.Markdown("Get per-org Unit Of Measurement (UOM) consumption quota (UOM/min). Null means unlimited. UOM represents weighted units across different AI workloads (e.g., tokens for LLMs, minutes for TTS, pages for OCR)."), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDeployment(args[0], params) + _, decoded, err := XGetUserOrgConsumptionQuota(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16148,18 +17172,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-deployment id", - Short: "Update Deployment", - Long: cli.Markdown("Update AI deployment\n## Request Schema (application/json)\n\ndescription: Update AI deployment\nproperties:\n inference-engine-parameters:\n description: Optional extra inference engine server CLI args\n items:\n type: string\n type: array\n inference-engine-version:\n $ref: '#/components/schemas/inference-engine-version'\n name:\n description: Deployment name\n minLength: 1\n type: string\ntype: object\n"), + Use: "create-anti-affinity-group", + Short: "Create an Anti-affinity Group", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Anti-affinity Group description\n maxLength: 255\n type: string\n name:\n description: Anti-affinity Group name\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[1:]) + body, err := cli.GetBody("application/json", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateDeployment(args[0], params, body) + _, decoded, err := XCreateAntiAffinityGroup(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16187,14 +17211,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-deployment-api-key id", - Short: "Reveal Deployment API Key", - Long: cli.Markdown("Get Deployment API Key"), + Use: "list-anti-affinity-groups", + Short: "List Anti-affinity Groups", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealDeploymentApiKey(args[0], params) + _, decoded, err := XListAntiAffinityGroups(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16222,14 +17246,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-deployment-logs id", - Short: "Get Deployment Logs", - Long: cli.Markdown("Return logs for the vLLM deployment (deploy/--deployment-vllm). Optional ?stream=true to request streaming (may not be supported)."), + Use: "delete-anti-affinity-group id", + Short: "Delete an Anti-affinity Group", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDeploymentLogs(args[0], params) + _, decoded, err := XDeleteAntiAffinityGroup(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16243,9 +17267,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("stream", "", "") - cmd.Flags().Int64("tail", 0, "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16260,18 +17281,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "scale-deployment id", - Short: "Scale Deployment", - Long: cli.Markdown("Scale Deployment\n## Request Schema (application/json)\n\ndescription: Scale AI deployment\nproperties:\n replicas:\n description: Number of replicas (>=0)\n format: int64\n minimum: 0\n type: integer\nrequired:\n- replicas\ntype: object\n"), + Use: "get-anti-affinity-group id", + Short: "Retrieve Anti-affinity Group details", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[1:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XScaleDeployment(args[0], params, body) + _, decoded, err := XGetAntiAffinityGroup(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16299,14 +17316,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-inference-engine-help", - Short: "Get inference-engine Help", - Long: cli.Markdown("Get list of allowed inference engine parameters with their descriptions and allowed values"), + Use: "create-api-key", + Short: "Create a new API key", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n name:\n description: IAM API Key Name\n maxLength: 255\n minLength: 1\n type: string\n role-id:\n description: IAM API Key Role ID\n format: uuid\n type: string\nrequired:\n- role-id\n- name\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[0:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XGetInferenceEngineHelp(params) + _, decoded, err := XCreateApiKey(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16320,8 +17341,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("version", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16336,14 +17355,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-ai-instance-types", - Short: "List Instance Types", - Long: cli.Markdown("List available instance types with authorization status based on GPU availability"), + Use: "list-api-keys", + Short: "List API keys", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListAiInstanceTypes(params) + _, decoded, err := XListApiKeys(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16371,18 +17390,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-model", - Short: "Create Model", - Long: cli.Markdown("Model files will be downloaded from Huggingface.\n\nName must be the exact name of the model on huggingface (ex: openai/gpt-oss-120b or ggml-org/gpt-oss-120b-GGUF).\n\nIf the model is under a license then you must provide a Huggingface access token for an account that signed the license agreement\n## Request Schema (application/json)\n\ndescription: AI model\nproperties:\n huggingface-token:\n description: Huggingface Token\n type: string\n name:\n description: Model name\n minLength: 1\n type: string\nrequired:\n- name\ntype: object\n"), + Use: "delete-api-key id", + Short: "Delete an API key", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XCreateModel(params, body) + _, decoded, err := XDeleteApiKey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16410,14 +17425,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-models", - Short: "List Models", - Long: cli.Markdown("List Models"), + Use: "get-api-key id", + Short: "Get API key", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListModels(params) + _, decoded, err := XGetApiKey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16431,8 +17446,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("visibility", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16447,14 +17460,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-model id", - Short: "Delete Model", - Long: cli.Markdown("Delete Model"), + Use: "create-block-storage-volume", + Short: "Create a block storage volume", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n block-storage-snapshot:\n $ref: '#/components/schemas/block-storage-snapshot-ref'\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Volume name\n maxLength: 255\n type: string\n size:\n description: |-\n Volume size in GiB.\n When a snapshot ID is supplied, this defaults to the size of the source volume, but can be set to a larger value.\n format: int64\n minimum: 1\n type: integer\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[0:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XDeleteModel(args[0], params) + _, decoded, err := XCreateBlockStorageVolume(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16482,14 +17499,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-model id", - Short: "Get Model", - Long: cli.Markdown("Get Model details"), + Use: "list-block-storage-volumes", + Short: "List block storage volumes", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetModel(args[0], params) + _, decoded, err := XListBlockStorageVolumes(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16503,6 +17520,8 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("instance-id", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16517,14 +17536,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-user-org-consumption-quota", - Short: "[BETA] Get Organization Consumption Quota", - Long: cli.Markdown("Get per-org Unit Of Measurement (UOM) consumption quota (UOM/min). Null means unlimited. UOM represents weighted units across different AI workloads (e.g., tokens for LLMs, minutes for TTS, pages for OCR)."), + Use: "list-block-storage-snapshots", + Short: "List block storage snapshots", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetUserOrgConsumptionQuota(params) + _, decoded, err := XListBlockStorageSnapshots(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16552,18 +17571,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-anti-affinity-group", - Short: "Create an Anti-affinity Group", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Anti-affinity Group description\n maxLength: 255\n type: string\n name:\n description: Anti-affinity Group name\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\ntype: object\n"), + Use: "delete-block-storage-snapshot id", + Short: "Delete a block storage snapshot, data will be unrecoverable", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XCreateAntiAffinityGroup(params, body) + _, decoded, err := XDeleteBlockStorageSnapshot(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16591,14 +17606,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-anti-affinity-groups", - Short: "List Anti-affinity Groups", + Use: "get-block-storage-snapshot id", + Short: "Retrieve block storage snapshot details", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListAntiAffinityGroups(params) + _, decoded, err := XGetBlockStorageSnapshot(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16626,14 +17641,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-anti-affinity-group id", - Short: "Delete an Anti-affinity Group", - Long: cli.Markdown(""), + Use: "update-block-storage-snapshot id", + Short: "Update block storage volume snapshot", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Snapshot name\n maxLength: 255\n nullable: true\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XDeleteAntiAffinityGroup(args[0], params) + _, decoded, err := XUpdateBlockStorageSnapshot(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16661,14 +17680,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-anti-affinity-group id", - Short: "Retrieve Anti-affinity Group details", + Use: "delete-block-storage-volume id", + Short: "Delete a block storage volume, data will be unrecoverable", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetAntiAffinityGroup(args[0], params) + _, decoded, err := XDeleteBlockStorageVolume(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16696,18 +17715,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-api-key", - Short: "Create a new API key", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n name:\n description: IAM API Key Name\n maxLength: 255\n minLength: 1\n type: string\n role-id:\n description: IAM API Key Role ID\n format: uuid\n type: string\nrequired:\n- role-id\n- name\ntype: object\n"), + Use: "get-block-storage-volume id", + Short: "Retrieve block storage volume details", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XCreateApiKey(params, body) + _, decoded, err := XGetBlockStorageVolume(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16735,14 +17750,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-api-keys", - Short: "List API keys", - Long: cli.Markdown(""), + Use: "update-block-storage-volume id", + Short: "Update block storage volume", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Volume name\n maxLength: 255\n nullable: true\n type: string\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XListApiKeys(params) + _, decoded, err := XUpdateBlockStorageVolume(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16770,14 +17789,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-api-key id", - Short: "Delete an API key", - Long: cli.Markdown(""), + Use: "attach-block-storage-volume-to-instance id", + Short: "Attach block storage volume to an instance", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance-ref'\nrequired:\n- instance\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XDeleteApiKey(args[0], params) + _, decoded, err := XAttachBlockStorageVolumeToInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16805,14 +17828,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-api-key id", - Short: "Get API key", - Long: cli.Markdown(""), + Use: "create-block-storage-snapshot id", + Short: "Create a block storage snapshot", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Snapshot name\n maxLength: 255\n minLength: 1\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XGetApiKey(args[0], params) + _, decoded, err := XCreateBlockStorageSnapshot(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16840,18 +17867,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-block-storage-volume", - Short: "Create a block storage volume", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n block-storage-snapshot:\n $ref: '#/components/schemas/block-storage-snapshot-ref'\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Volume name\n maxLength: 255\n type: string\n size:\n description: |-\n Volume size in GiB.\n When a snapshot ID is supplied, this defaults to the size of the source volume, but can be set to a larger value.\n exclusiveMinimum: false\n format: int64\n minimum: 1\n type: integer\ntype: object\n"), + Use: "detach-block-storage-volume id", + Short: "Detach block storage volume", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) + body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateBlockStorageVolume(params, body) + _, decoded, err := XDetachBlockStorageVolume(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16879,14 +17906,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-block-storage-volumes", - Short: "List block storage volumes", - Long: cli.Markdown(""), + Use: "resize-block-storage-volume id", + Short: "Resize a block storage volume", + Long: cli.Markdown("This operation resizes a Block storage volume. Note: the volume can only grow, cannot be shrunk. Only detached volumes or volumes attached to stopped instances can be resized.\n## Request Schema (application/json)\n\nproperties:\n size:\n description: Volume size in GiB\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\nrequired:\n- size\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XListBlockStorageVolumes(params) + _, decoded, err := XResizeBlockStorageVolume(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16900,8 +17931,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("instance-id", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16916,14 +17945,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-block-storage-snapshots", - Short: "List block storage snapshots", + Use: "get-console-proxy-url id", + Short: "Retrieve signed url valid for 60 seconds to connect via console-proxy websocket to VM VNC console.", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListBlockStorageSnapshots(params) + _, decoded, err := XGetConsoleProxyUrl(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16951,14 +17980,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-block-storage-snapshot id", - Short: "Delete a block storage snapshot, data will be unrecoverable", - Long: cli.Markdown(""), + Use: "get-dbaas-ca-certificate", + Short: "Get DBaaS CA Certificate", + Long: cli.Markdown("Returns a CA Certificate required to reach a DBaaS service through a TLS-protected connection."), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteBlockStorageSnapshot(args[0], params) + _, decoded, err := XGetDbaasCaCertificate(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16986,14 +18015,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-block-storage-snapshot id", - Short: "Retrieve block storage snapshot details", - Long: cli.Markdown(""), + Use: "create-dbaas-service-clickhouse name", + Short: "[BETA] Create a DBaaS ClickHouse service", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n clickhouse-settings:\n $ref: '#/components/schemas/json-schema-clickhouse'\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-name:\n description: Name of a backup to recover from for services that support backup names\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: ClickHouse major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XGetBlockStorageSnapshot(args[0], params) + _, decoded, err := XCreateDbaasServiceClickhouse(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17021,18 +18054,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-block-storage-snapshot id", - Short: "Update block storage volume snapshot", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Snapshot name\n maxLength: 255\n nullable: true\n type: string\ntype: object\n"), + Use: "delete-dbaas-service-clickhouse name", + Short: "[BETA] Delete a ClickHouse service", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[1:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XUpdateBlockStorageSnapshot(args[0], params, body) + _, decoded, err := XDeleteDbaasServiceClickhouse(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17060,14 +18089,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-block-storage-volume id", - Short: "Delete a block storage volume, data will be unrecoverable", + Use: "get-dbaas-service-clickhouse name", + Short: "[BETA] Get a DBaaS ClickHouse service", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteBlockStorageVolume(args[0], params) + _, decoded, err := XGetDbaasServiceClickhouse(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17095,14 +18124,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-block-storage-volume id", - Short: "Retrieve block storage volume details", - Long: cli.Markdown(""), + Use: "update-dbaas-service-clickhouse name", + Short: "[BETA] Update a DBaaS ClickHouse service", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n clickhouse-settings:\n $ref: '#/components/schemas/json-schema-clickhouse'\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: ClickHouse major version\n minLength: 1\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[1:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XGetBlockStorageVolume(args[0], params) + _, decoded, err := XUpdateDbaasServiceClickhouse(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17130,18 +18163,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-block-storage-volume id", - Short: "Update block storage volume", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Volume name\n maxLength: 255\n nullable: true\n type: string\ntype: object\n"), + Use: "start-dbaas-clickhouse-maintenance name", + Short: "[BETA] Initiate ClickHouse maintenance update", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[1:]) + body, err := cli.GetBody("", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateBlockStorageVolume(args[0], params, body) + _, decoded, err := XStartDbaasClickhouseMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17169,18 +18202,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "attach-block-storage-volume-to-instance id", - Short: "Attach block storage volume to an instance", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance-ref'\nrequired:\n- instance\ntype: object\n"), + Use: "get-dbaas-clickhouse-acl-config service-name", + Short: "[BETA] Get DBaaS ClickHouse ACL configuration", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[1:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XAttachBlockStorageVolumeToInstance(args[0], params, body) + _, decoded, err := XGetDbaasClickhouseAclConfig(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17208,9 +18237,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-block-storage-snapshot id", - Short: "Create a block storage snapshot", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Snapshot name\n maxLength: 255\n minLength: 1\n type: string\ntype: object\n"), + Use: "create-dbaas-clickhouse-user service-name", + Short: "[BETA] Create a DBaaS ClickHouse user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\n roles:\n description: ClickHouse roles to grant to the user\n items:\n $ref: '#/components/schemas/dbaas-clickhouse-user-role-input'\n type: array\n username:\n $ref: '#/components/schemas/dbaas-user-username'\nrequired:\n- username\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17219,7 +18248,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateBlockStorageSnapshot(args[0], params, body) + _, decoded, err := XCreateDbaasClickhouseUser(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17247,18 +18276,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "detach-block-storage-volume id", - Short: "Detach block storage volume", + Use: "list-dbaas-clickhouse-users service-name", + Short: "[BETA] List DBaaS ClickHouse users", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XDetachBlockStorageVolume(args[0], params, body) + _, decoded, err := XListDbaasClickhouseUsers(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17286,18 +18311,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "resize-block-storage-volume id", - Short: "Resize a block storage volume", - Long: cli.Markdown("This operation resizes a Block storage volume. Note: the volume can only grow, cannot be shrunk. Only detached volumes or volumes attached to stopped instances can be resized.\n## Request Schema (application/json)\n\nproperties:\n size:\n description: Volume size in GiB\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\nrequired:\n- size\ntype: object\n"), + Use: "delete-dbaas-clickhouse-user service-name username", + Short: "[BETA] Delete a DBaaS ClickHouse user", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[1:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XResizeBlockStorageVolume(args[0], params, body) + _, decoded, err := XDeleteDbaasClickhouseUser(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17325,14 +18346,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-console-proxy-url id", - Short: "Retrieve signed url valid for 60 seconds to connect via console-proxy websocket to VM VNC console.", - Long: cli.Markdown(""), + Use: "reset-dbaas-clickhouse-user-password service-name username", + Short: "[BETA] Reset the credentials of a DBaaS ClickHouse user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[2:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } - _, decoded, err := XGetConsoleProxyUrl(args[0], params) + _, decoded, err := XResetDbaasClickhouseUserPassword(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17360,14 +18385,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-ca-certificate", - Short: "Get DBaaS CA Certificate", - Long: cli.Markdown("Returns a CA Certificate required to reach a DBaaS service through a TLS-protected connection."), + Use: "reveal-dbaas-clickhouse-user-password service-name username", + Short: "[BETA] Reveal the secrets of a DBaaS ClickHouse user", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasCaCertificate(params) + _, decoded, err := XRevealDbaasClickhouseUserPassword(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17467,7 +18492,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-external-endpoint-datadog endpoint-id", Short: "update-dbaas-external-endpoint-datadog", - Long: cli.Markdown("[BETA] Update DataDog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n datadog-api-key:\n description: Datadog API key\n maxLength: 256\n minLength: 1\n pattern: ^[A-Za-z0-9]{1,256}$\n type: string\n datadog-tags:\n description: Custom tags provided by user\n items:\n $ref: '#/components/schemas/dbaas-datadog-tag'\n type: array\n disable-consumer-stats:\n description: Disable kafka consumer group metrics. Applies only when attached to kafka services.\n type: boolean\n kafka-consumer-check-instances:\n description: Number of separate instances to fetch kafka consumer statistics with. Applies only when attached to kafka services.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 100\n minimum: 1\n type: integer\n kafka-consumer-stats-timeout:\n description: Number of seconds that datadog will wait to get consumer statistics from brokers. Applies only when attached to kafka services.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 300\n minimum: 2\n type: integer\n max-partition-contexts:\n description: Maximum number of partition contexts to send. Applies only when attached to kafka services.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 200000\n minimum: 200\n type: integer\n site:\n $ref: '#/components/schemas/enum-datadog-site'\n required:\n - datadog-api-key\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Update DataDog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n datadog-api-key:\n description: Datadog API key\n maxLength: 256\n minLength: 1\n pattern: ^[A-Za-z0-9]{1,256}$\n type: string\n datadog-tags:\n description: Custom tags provided by user\n items:\n $ref: '#/components/schemas/dbaas-datadog-tag'\n type: array\n disable-consumer-stats:\n description: Disable kafka consumer group metrics. Applies only when attached to kafka services.\n type: boolean\n kafka-consumer-check-instances:\n description: Number of separate instances to fetch kafka consumer statistics with. Applies only when attached to kafka services.\n format: int64\n maximum: 100\n minimum: 1\n type: integer\n kafka-consumer-stats-timeout:\n description: Number of seconds that datadog will wait to get consumer statistics from brokers. Applies only when attached to kafka services.\n format: int64\n maximum: 300\n minimum: 2\n type: integer\n max-partition-contexts:\n description: Maximum number of partition contexts to send. Applies only when attached to kafka services.\n format: int64\n maximum: 200000\n minimum: 200\n type: integer\n site:\n $ref: '#/components/schemas/enum-datadog-site'\n required:\n - datadog-api-key\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17506,7 +18531,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-external-endpoint-datadog name", Short: "create-dbaas-external-endpoint-datadog", - Long: cli.Markdown("[BETA] Create DataDog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n datadog-api-key:\n description: Datadog API key\n maxLength: 256\n minLength: 1\n pattern: ^[A-Za-z0-9]{1,256}$\n type: string\n datadog-tags:\n description: Custom tags provided by user\n items:\n $ref: '#/components/schemas/dbaas-datadog-tag'\n type: array\n disable-consumer-stats:\n description: Disable kafka consumer group metrics. Applies only when attached to kafka services.\n type: boolean\n kafka-consumer-check-instances:\n description: Number of separate instances to fetch kafka consumer statistics with. Applies only when attached to kafka services.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 100\n minimum: 1\n type: integer\n kafka-consumer-stats-timeout:\n description: Number of seconds that datadog will wait to get consumer statistics from brokers. Applies only when attached to kafka services.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 300\n minimum: 2\n type: integer\n max-partition-contexts:\n description: Maximum number of partition contexts to send. Applies only when attached to kafka services.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 200000\n minimum: 200\n type: integer\n site:\n $ref: '#/components/schemas/enum-datadog-site'\n required:\n - datadog-api-key\n - site\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Create DataDog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n datadog-api-key:\n description: Datadog API key\n maxLength: 256\n minLength: 1\n pattern: ^[A-Za-z0-9]{1,256}$\n type: string\n datadog-tags:\n description: Custom tags provided by user\n items:\n $ref: '#/components/schemas/dbaas-datadog-tag'\n type: array\n disable-consumer-stats:\n description: Disable kafka consumer group metrics. Applies only when attached to kafka services.\n type: boolean\n kafka-consumer-check-instances:\n description: Number of separate instances to fetch kafka consumer statistics with. Applies only when attached to kafka services.\n format: int64\n maximum: 100\n minimum: 1\n type: integer\n kafka-consumer-stats-timeout:\n description: Number of seconds that datadog will wait to get consumer statistics from brokers. Applies only when attached to kafka services.\n format: int64\n maximum: 300\n minimum: 2\n type: integer\n max-partition-contexts:\n description: Maximum number of partition contexts to send. Applies only when attached to kafka services.\n format: int64\n maximum: 200000\n minimum: 200\n type: integer\n site:\n $ref: '#/components/schemas/enum-datadog-site'\n required:\n - datadog-api-key\n - site\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17615,7 +18640,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-external-endpoint-elasticsearch endpoint-id", Short: "update-dbaas-external-endpoint-elasticsearch", - Long: cli.Markdown("[BETA] Update ElasticSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: Elasticsearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: Elasticsearch request timeout limit\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: Elasticsearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Update ElasticSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: Elasticsearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: Elasticsearch request timeout limit\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: Elasticsearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17654,7 +18679,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-external-endpoint-elasticsearch name", Short: "create-dbaas-external-endpoint-elasticsearch", - Long: cli.Markdown("[BETA] Create ElasticSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: Elasticsearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: Elasticsearch request timeout limit\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: Elasticsearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n required:\n - url\n - index-prefix\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Create ElasticSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: Elasticsearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: Elasticsearch request timeout limit\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: Elasticsearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n required:\n - url\n - index-prefix\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17763,7 +18788,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-external-endpoint-opensearch endpoint-id", Short: "update-dbaas-external-endpoint-opensearch", - Long: cli.Markdown("[BETA] Update OpenSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: OpenSearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: OpenSearch request timeout limit\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: OpenSearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Update OpenSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: OpenSearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: OpenSearch request timeout limit\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: OpenSearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17802,7 +18827,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-external-endpoint-opensearch name", Short: "create-dbaas-external-endpoint-opensearch", - Long: cli.Markdown("[BETA] Create OpenSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: OpenSearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: OpenSearch request timeout limit\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: OpenSearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n required:\n - url\n - index-prefix\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Create OpenSearch Logs external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n index-days-max:\n description: Maximum number of days of logs to keep\n format: int64\n maximum: 10000\n minimum: 1\n type: integer\n index-prefix:\n description: OpenSearch index prefix\n maxLength: 1000\n minLength: 1\n pattern: ^[a-z0-9][a-z0-9-_.]+$\n type: string\n timeout:\n description: OpenSearch request timeout limit\n format: int64\n maximum: 120\n minimum: 10\n type: integer\n url:\n description: OpenSearch connection URL\n maxLength: 2048\n minLength: 12\n type: string\n required:\n - url\n - index-prefix\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -18059,7 +19084,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-external-endpoint-rsyslog endpoint-id", Short: "update-dbaas-external-endpoint-rsyslog", - Long: cli.Markdown("[BETA] Update RSyslog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n cert:\n description: PEM encoded client certificate\n maxLength: 16384\n type: string\n format:\n $ref: '#/components/schemas/enum-rsyslog-format'\n key:\n description: PEM encoded client key\n maxLength: 16384\n type: string\n logline:\n description: Custom syslog message format\n maxLength: 512\n minLength: 1\n pattern: ^[ -~\\t]+$\n type: string\n max-message-size:\n description: Rsyslog max message size\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 2.147483647e+09\n minimum: 2048\n type: integer\n port:\n description: Rsyslog server port\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n sd:\n description: Structured data block for log message\n maxLength: 1024\n type: string\n server:\n description: Rsyslog server IP address or hostname\n maxLength: 255\n minLength: 4\n type: string\n tls:\n description: Require TLS\n type: boolean\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Update RSyslog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n cert:\n description: PEM encoded client certificate\n maxLength: 16384\n type: string\n format:\n $ref: '#/components/schemas/enum-rsyslog-format'\n key:\n description: PEM encoded client key\n maxLength: 16384\n type: string\n logline:\n description: Custom syslog message format\n maxLength: 512\n minLength: 1\n pattern: ^[ -~\\t]+$\n type: string\n max-message-size:\n description: Rsyslog max message size\n format: int64\n maximum: 2.147483647e+09\n minimum: 2048\n type: integer\n port:\n description: Rsyslog server port\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n sd:\n description: Structured data block for log message\n maxLength: 1024\n type: string\n server:\n description: Rsyslog server IP address or hostname\n maxLength: 255\n minLength: 4\n type: string\n tls:\n description: Require TLS\n type: boolean\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -18098,7 +19123,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-external-endpoint-rsyslog name", Short: "create-dbaas-external-endpoint-rsyslog", - Long: cli.Markdown("[BETA] Create RSyslog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n cert:\n description: PEM encoded client certificate\n maxLength: 16384\n type: string\n format:\n $ref: '#/components/schemas/enum-rsyslog-format'\n key:\n description: PEM encoded client key\n maxLength: 16384\n type: string\n logline:\n description: Custom syslog message format\n maxLength: 512\n minLength: 1\n pattern: ^[ -~\\t]+$\n type: string\n max-message-size:\n description: Rsyslog max message size\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 2.147483647e+09\n minimum: 2048\n type: integer\n port:\n description: Rsyslog server port\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n sd:\n description: Structured data block for log message\n maxLength: 1024\n type: string\n server:\n description: Rsyslog server IP address or hostname\n maxLength: 255\n minLength: 4\n type: string\n tls:\n description: Require TLS\n type: boolean\n required:\n - server\n - port\n - tls\n - format\n type: object\ntype: object\n"), + Long: cli.Markdown("[BETA] Create RSyslog external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n ca:\n description: PEM encoded CA certificate\n maxLength: 16384\n type: string\n cert:\n description: PEM encoded client certificate\n maxLength: 16384\n type: string\n format:\n $ref: '#/components/schemas/enum-rsyslog-format'\n key:\n description: PEM encoded client key\n maxLength: 16384\n type: string\n logline:\n description: Custom syslog message format\n maxLength: 512\n minLength: 1\n pattern: ^[ -~\\t]+$\n type: string\n max-message-size:\n description: Rsyslog max message size\n format: int64\n maximum: 2.147483647e+09\n minimum: 2048\n type: integer\n port:\n description: Rsyslog server port\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n sd:\n description: Structured data block for log message\n maxLength: 1024\n type: string\n server:\n description: Rsyslog server IP address or hostname\n maxLength: 255\n minLength: 4\n type: string\n tls:\n description: Require TLS\n type: boolean\n required:\n - server\n - port\n - tls\n - format\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -19496,7 +20521,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-service-mysql name", Short: "Create a DBaaS MySQL service", - Long: cli.Markdown("Create a DBaaS MySQL service\n## Request Schema (application/json)\n\nproperties:\n admin-password:\n $ref: '#/components/schemas/dbaas-mysql-user-password'\n admin-username:\n description: Custom username for admin user. This must be set only when a new service is being created.\n maxLength: 64\n minLength: 1\n pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$\n type: string\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n binlog-retention-period:\n description: The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 86400\n minimum: 600\n type: integer\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n integrations:\n description: Service integrations to be enabled when creating the service.\n items:\n properties:\n dest-service:\n $ref: '#/components/schemas/dbaas-service-name'\n settings:\n description: Integration settings\n type: object\n source-service:\n $ref: '#/components/schemas/dbaas-service-name'\n type:\n description: Integration type\n enum:\n - read_replica\n type: string\n required:\n - type\n type: object\n type: array\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n mysql-settings:\n $ref: '#/components/schemas/json-schema-mysql'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-time:\n description: ISO time of a backup to recover from for services that support arbitrary times\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: MySQL major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), + Long: cli.Markdown("Create a DBaaS MySQL service\n## Request Schema (application/json)\n\nproperties:\n admin-password:\n $ref: '#/components/schemas/dbaas-mysql-user-password'\n admin-username:\n description: Custom username for admin user. This must be set only when a new service is being created.\n maxLength: 64\n minLength: 1\n pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$\n type: string\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n binlog-retention-period:\n description: The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.\n format: int64\n maximum: 86400\n minimum: 600\n type: integer\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n integrations:\n description: Service integrations to be enabled when creating the service.\n items:\n properties:\n dest-service:\n $ref: '#/components/schemas/dbaas-service-name'\n settings:\n description: Integration settings\n type: object\n source-service:\n $ref: '#/components/schemas/dbaas-service-name'\n type:\n description: Integration type\n enum:\n - read_replica\n type: string\n required:\n - type\n type: object\n type: array\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n mysql-settings:\n $ref: '#/components/schemas/json-schema-mysql'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-time:\n description: ISO time of a backup to recover from for services that support arbitrary times\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: MySQL major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -19605,7 +20630,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-service-mysql name", Short: "Update a DBaaS MySQL service", - Long: cli.Markdown("Update a DBaaS MySQL service\n## Request Schema (application/json)\n\nproperties:\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n binlog-retention-period:\n description: The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 86400\n minimum: 600\n type: integer\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n mysql-settings:\n $ref: '#/components/schemas/json-schema-mysql'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: MySQL version\n type: string\ntype: object\n"), + Long: cli.Markdown("Update a DBaaS MySQL service\n## Request Schema (application/json)\n\nproperties:\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n binlog-retention-period:\n description: The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.\n format: int64\n maximum: 86400\n minimum: 600\n type: integer\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n mysql-settings:\n $ref: '#/components/schemas/json-schema-mysql'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: MySQL version\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -19983,7 +21008,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-service-opensearch name", Short: "Create a DBaaS OpenSearch service", - Long: cli.Markdown("Create a DBaaS OpenSearch service\n## Request Schema (application/json)\n\nproperties:\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n index-patterns:\n description: 'Allows you to create glob style patterns and set a max number of indexes matching this pattern you want to keep. Creating indexes exceeding this value will cause the oldest one to get deleted. You could for example create a pattern looking like ''logs.?'' and then create index logs.1, logs.2 etc, it will delete logs.1 once you create logs.6. Do note ''logs.?'' does not apply to logs.10. Note: Setting max_index_count to 0 will do nothing and the pattern gets ignored.'\n items:\n properties:\n max-index-count:\n description: Maximum number of indexes to keep\n exclusiveMinimum: false\n format: int64\n minimum: 0\n nullable: true\n type: integer\n pattern:\n description: fnmatch pattern\n maxLength: 1024\n type: string\n sorting-algorithm:\n description: Deletion sorting algorithm\n enum:\n - alphabetical\n - creation_date\n type: string\n type: object\n type: array\n index-template:\n description: Template settings for all new indexes\n properties:\n mapping-nested-objects-limit:\n description: The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 100000\n minimum: 0\n nullable: true\n type: integer\n number-of-replicas:\n description: The number of replicas each primary shard has.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 29\n minimum: 0\n nullable: true\n type: integer\n number-of-shards:\n description: The number of primary shards that an index should have.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\n type: object\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n keep-index-refresh-interval:\n description: Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true.\n type: boolean\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n max-index-count:\n description: Maximum number of indexes to keep before deleting the oldest one\n exclusiveMinimum: false\n format: int64\n minimum: 0\n nullable: true\n type: integer\n opensearch-dashboards:\n description: OpenSearch Dashboards settings\n properties:\n enabled:\n description: 'Enable or disable OpenSearch Dashboards (default: true)'\n type: boolean\n max-old-space-size:\n description: 'Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. (default: 128)'\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 1024\n minimum: 64\n type: integer\n opensearch-request-timeout:\n description: 'Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch (default: 30000)'\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 120000\n minimum: 5000\n type: integer\n type: object\n opensearch-settings:\n $ref: '#/components/schemas/json-schema-opensearch'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-name:\n description: Name of a backup to recover from for services that support backup names\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: OpenSearch major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), + Long: cli.Markdown("Create a DBaaS OpenSearch service\n## Request Schema (application/json)\n\nproperties:\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n index-patterns:\n description: 'Allows you to create glob style patterns and set a max number of indexes matching this pattern you want to keep. Creating indexes exceeding this value will cause the oldest one to get deleted. You could for example create a pattern looking like ''logs.?'' and then create index logs.1, logs.2 etc, it will delete logs.1 once you create logs.6. Do note ''logs.?'' does not apply to logs.10. Note: Setting max_index_count to 0 will do nothing and the pattern gets ignored.'\n items:\n properties:\n max-index-count:\n description: Maximum number of indexes to keep\n format: int64\n minimum: 0\n nullable: true\n type: integer\n pattern:\n description: fnmatch pattern\n maxLength: 1024\n type: string\n sorting-algorithm:\n description: Deletion sorting algorithm\n enum:\n - alphabetical\n - creation_date\n type: string\n type: object\n type: array\n index-template:\n description: Template settings for all new indexes\n properties:\n mapping-nested-objects-limit:\n description: The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000.\n format: int64\n maximum: 100000\n minimum: 0\n nullable: true\n type: integer\n number-of-replicas:\n description: The number of replicas each primary shard has.\n format: int64\n maximum: 29\n minimum: 0\n nullable: true\n type: integer\n number-of-shards:\n description: The number of primary shards that an index should have.\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\n type: object\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n keep-index-refresh-interval:\n description: Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true.\n type: boolean\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n max-index-count:\n description: Maximum number of indexes to keep before deleting the oldest one\n format: int64\n minimum: 0\n nullable: true\n type: integer\n opensearch-dashboards:\n description: OpenSearch Dashboards settings\n properties:\n enabled:\n description: 'Enable or disable OpenSearch Dashboards (default: true)'\n type: boolean\n max-old-space-size:\n description: 'Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. (default: 128)'\n format: int64\n maximum: 1024\n minimum: 64\n type: integer\n opensearch-request-timeout:\n description: 'Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch (default: 30000)'\n format: int64\n maximum: 120000\n minimum: 5000\n type: integer\n type: object\n opensearch-settings:\n $ref: '#/components/schemas/json-schema-opensearch'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-name:\n description: Name of a backup to recover from for services that support backup names\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: OpenSearch major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -20092,7 +21117,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-service-opensearch name", Short: "Update a DBaaS OpenSearch service", - Long: cli.Markdown("Update a DBaaS OpenSearch service\n## Request Schema (application/json)\n\nproperties:\n index-patterns:\n description: 'Allows you to create glob style patterns and set a max number of indexes matching this pattern you want to keep. Creating indexes exceeding this value will cause the oldest one to get deleted. You could for example create a pattern looking like ''logs.?'' and then create index logs.1, logs.2 etc, it will delete logs.1 once you create logs.6. Do note ''logs.?'' does not apply to logs.10. Note: Setting max_index_count to 0 will do nothing and the pattern gets ignored.'\n items:\n properties:\n max-index-count:\n description: Maximum number of indexes to keep\n exclusiveMinimum: false\n format: int64\n minimum: 0\n nullable: true\n type: integer\n pattern:\n description: fnmatch pattern\n maxLength: 1024\n type: string\n sorting-algorithm:\n description: Deletion sorting algorithm\n enum:\n - alphabetical\n - creation_date\n type: string\n type: object\n type: array\n index-template:\n description: Template settings for all new indexes\n properties:\n mapping-nested-objects-limit:\n description: The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 100000\n minimum: 0\n nullable: true\n type: integer\n number-of-replicas:\n description: The number of replicas each primary shard has.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 29\n minimum: 0\n nullable: true\n type: integer\n number-of-shards:\n description: The number of primary shards that an index should have.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\n type: object\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n keep-index-refresh-interval:\n description: Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true.\n type: boolean\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n max-index-count:\n description: Maximum number of indexes to keep before deleting the oldest one\n exclusiveMinimum: false\n format: int64\n minimum: 0\n nullable: true\n type: integer\n opensearch-dashboards:\n description: OpenSearch Dashboards settings\n properties:\n enabled:\n description: 'Enable or disable OpenSearch Dashboards (default: true)'\n type: boolean\n max-old-space-size:\n description: 'Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. (default: 128)'\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 1024\n minimum: 64\n type: integer\n opensearch-request-timeout:\n description: 'Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch (default: 30000)'\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 120000\n minimum: 5000\n type: integer\n type: object\n opensearch-settings:\n $ref: '#/components/schemas/json-schema-opensearch'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: Version\n type: string\ntype: object\n"), + Long: cli.Markdown("Update a DBaaS OpenSearch service\n## Request Schema (application/json)\n\nproperties:\n index-patterns:\n description: 'Allows you to create glob style patterns and set a max number of indexes matching this pattern you want to keep. Creating indexes exceeding this value will cause the oldest one to get deleted. You could for example create a pattern looking like ''logs.?'' and then create index logs.1, logs.2 etc, it will delete logs.1 once you create logs.6. Do note ''logs.?'' does not apply to logs.10. Note: Setting max_index_count to 0 will do nothing and the pattern gets ignored.'\n items:\n properties:\n max-index-count:\n description: Maximum number of indexes to keep\n format: int64\n minimum: 0\n nullable: true\n type: integer\n pattern:\n description: fnmatch pattern\n maxLength: 1024\n type: string\n sorting-algorithm:\n description: Deletion sorting algorithm\n enum:\n - alphabetical\n - creation_date\n type: string\n type: object\n type: array\n index-template:\n description: Template settings for all new indexes\n properties:\n mapping-nested-objects-limit:\n description: The maximum number of nested JSON objects that a single document can contain across all nested types. This limit helps to prevent out of memory errors when a document contains too many nested objects. Default is 10000.\n format: int64\n maximum: 100000\n minimum: 0\n nullable: true\n type: integer\n number-of-replicas:\n description: The number of replicas each primary shard has.\n format: int64\n maximum: 29\n minimum: 0\n nullable: true\n type: integer\n number-of-shards:\n description: The number of primary shards that an index should have.\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\n type: object\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n keep-index-refresh-interval:\n description: Aiven automation resets index.refresh_interval to default value for every index to be sure that indices are always visible to search. If it doesn't fit your case, you can disable this by setting up this flag to true.\n type: boolean\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n max-index-count:\n description: Maximum number of indexes to keep before deleting the oldest one\n format: int64\n minimum: 0\n nullable: true\n type: integer\n opensearch-dashboards:\n description: OpenSearch Dashboards settings\n properties:\n enabled:\n description: 'Enable or disable OpenSearch Dashboards (default: true)'\n type: boolean\n max-old-space-size:\n description: 'Limits the maximum amount of memory (in MiB) the OpenSearch Dashboards process can use. This sets the max_old_space_size option of the nodejs running the OpenSearch Dashboards. Note: the memory reserved by OpenSearch Dashboards is not available for OpenSearch. (default: 128)'\n format: int64\n maximum: 1024\n minimum: 64\n type: integer\n opensearch-request-timeout:\n description: 'Timeout in milliseconds for requests made by OpenSearch Dashboards towards OpenSearch (default: 30000)'\n format: int64\n maximum: 120000\n minimum: 5000\n type: integer\n type: object\n opensearch-settings:\n $ref: '#/components/schemas/json-schema-opensearch'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: Version\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -20392,7 +21417,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-service-pg name", Short: "Create a DBaaS PostgreSQL service", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n admin-password:\n description: Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.\n maxLength: 256\n minLength: 8\n pattern: ^[a-zA-Z0-9-_]+$\n type: string\n admin-username:\n description: Custom username for admin user. This must be set only when a new service is being created.\n maxLength: 64\n minLength: 1\n pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$\n type: string\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n integrations:\n description: Service integrations to be enabled when creating the service.\n items:\n properties:\n dest-service:\n $ref: '#/components/schemas/dbaas-service-name'\n settings:\n description: Integration settings\n type: object\n source-service:\n $ref: '#/components/schemas/dbaas-service-name'\n type:\n description: Integration type\n enum:\n - read_replica\n type: string\n required:\n - type\n type: object\n type: array\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n pg-settings:\n $ref: '#/components/schemas/json-schema-pg'\n pgaudit-settings:\n $ref: '#/components/schemas/json-schema-pgaudit'\n pgbouncer-settings:\n $ref: '#/components/schemas/json-schema-pgbouncer'\n pglookout-settings:\n $ref: '#/components/schemas/json-schema-pglookout'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-time:\n description: ISO time of a backup to recover from for services that support arbitrary times\n minLength: 1\n type: string\n shared-buffers-percentage:\n description: Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 60\n minimum: 20\n type: integer\n synchronous-replication:\n $ref: '#/components/schemas/enum-pg-synchronous-replication'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n timescaledb-settings:\n $ref: '#/components/schemas/json-schema-timescaledb'\n variant:\n $ref: '#/components/schemas/enum-pg-variant'\n version:\n $ref: '#/components/schemas/dbaas-pg-target-versions'\n work-mem:\n description: Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\nrequired:\n- plan\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n admin-password:\n description: Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.\n maxLength: 256\n minLength: 8\n pattern: ^[a-zA-Z0-9-_]+$\n type: string\n admin-username:\n description: Custom username for admin user. This must be set only when a new service is being created.\n maxLength: 64\n minLength: 1\n pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$\n type: string\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n integrations:\n description: Service integrations to be enabled when creating the service.\n items:\n properties:\n dest-service:\n $ref: '#/components/schemas/dbaas-service-name'\n settings:\n description: Integration settings\n type: object\n source-service:\n $ref: '#/components/schemas/dbaas-service-name'\n type:\n description: Integration type\n enum:\n - read_replica\n type: string\n required:\n - type\n type: object\n type: array\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n pg-settings:\n $ref: '#/components/schemas/json-schema-pg'\n pgaudit-settings:\n $ref: '#/components/schemas/json-schema-pgaudit'\n pgbouncer-settings:\n $ref: '#/components/schemas/json-schema-pgbouncer'\n pglookout-settings:\n $ref: '#/components/schemas/json-schema-pglookout'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-time:\n description: ISO time of a backup to recover from for services that support arbitrary times\n minLength: 1\n type: string\n shared-buffers-percentage:\n description: Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.\n format: int64\n maximum: 60\n minimum: 20\n type: integer\n synchronous-replication:\n $ref: '#/components/schemas/enum-pg-synchronous-replication'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n timescaledb-settings:\n $ref: '#/components/schemas/json-schema-timescaledb'\n variant:\n $ref: '#/components/schemas/enum-pg-variant'\n version:\n $ref: '#/components/schemas/dbaas-pg-target-versions'\n work-mem:\n description: Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\nrequired:\n- plan\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -20501,7 +21526,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-service-pg name", Short: "Update a DBaaS PostgreSQL service", - Long: cli.Markdown("Update a DBaaS PostgreSQL service\n## Request Schema (application/json)\n\nproperties:\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n pg-settings:\n $ref: '#/components/schemas/json-schema-pg'\n pgaudit-settings:\n $ref: '#/components/schemas/json-schema-pgaudit'\n pgbouncer-settings:\n $ref: '#/components/schemas/json-schema-pgbouncer'\n pglookout-settings:\n $ref: '#/components/schemas/json-schema-pglookout'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n shared-buffers-percentage:\n description: Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 60\n minimum: 20\n type: integer\n synchronous-replication:\n $ref: '#/components/schemas/enum-pg-synchronous-replication'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n timescaledb-settings:\n $ref: '#/components/schemas/json-schema-timescaledb'\n variant:\n $ref: '#/components/schemas/enum-pg-variant'\n version:\n description: Version\n type: string\n work-mem:\n description: Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\ntype: object\n"), + Long: cli.Markdown("Update a DBaaS PostgreSQL service\n## Request Schema (application/json)\n\nproperties:\n backup-schedule:\n properties:\n backup-hour:\n description: The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 23\n minimum: 0\n nullable: true\n type: integer\n backup-minute:\n description: The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.\n format: int64\n maximum: 59\n minimum: 0\n nullable: true\n type: integer\n type: object\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n pg-settings:\n $ref: '#/components/schemas/json-schema-pg'\n pgaudit-settings:\n $ref: '#/components/schemas/json-schema-pgaudit'\n pgbouncer-settings:\n $ref: '#/components/schemas/json-schema-pgbouncer'\n pglookout-settings:\n $ref: '#/components/schemas/json-schema-pglookout'\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n shared-buffers-percentage:\n description: Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value.\n format: int64\n maximum: 60\n minimum: 20\n type: integer\n synchronous-replication:\n $ref: '#/components/schemas/enum-pg-synchronous-replication'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n timescaledb-settings:\n $ref: '#/components/schemas/json-schema-timescaledb'\n variant:\n $ref: '#/components/schemas/enum-pg-variant'\n version:\n description: Version\n type: string\n work-mem:\n description: Sets the maximum amount of memory to be used by a query operation (such as a sort or hash table) before writing to temporary disk files, in MB. Default is 1MB + 0.075% of total RAM (up to 32MB).\n format: int64\n maximum: 1024\n minimum: 1\n type: integer\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -21066,7 +22091,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "get-dbaas-service-logs service-name", Short: "Get logs of DBaaS service", - Long: cli.Markdown("Get logs of DBaaS service\n## Request Schema (application/json)\n\nproperties:\n limit:\n description: 'How many log entries to receive at most, up to 500 (default: 100)'\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 500\n minimum: 1\n type: integer\n offset:\n description: Opaque offset identifier\n type: string\n sort-order:\n $ref: '#/components/schemas/enum-sort-order'\ntype: object\n"), + Long: cli.Markdown("Get logs of DBaaS service\n## Request Schema (application/json)\n\nproperties:\n limit:\n description: 'How many log entries to receive at most, up to 500 (default: 100)'\n format: int64\n maximum: 500\n minimum: 1\n type: integer\n offset:\n description: Opaque offset identifier\n type: string\n sort-order:\n $ref: '#/components/schemas/enum-sort-order'\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -21241,6 +22266,41 @@ func xRegister(subcommand bool) { }() + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "get-dbaas-settings-clickhouse", + Short: "[BETA] Get DBaaS ClickHouse settings", + Long: cli.Markdown(""), + Example: examples, + Args: cobra.MinimumNArgs(0), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XGetDbaasSettingsClickhouse(params) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + func() { params := viper.New() @@ -21790,7 +22850,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dbaas-service-valkey name", Short: "Create a DBaaS Valkey service", - Long: cli.Markdown("Create a DBaaS Valkey service\n## Request Schema (application/json)\n\nproperties:\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-name:\n description: Name of a backup to recover from for services that support backup names\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n valkey-settings:\n $ref: '#/components/schemas/json-schema-valkey'\n version:\n description: Valkey major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), + Long: cli.Markdown("Create a DBaaS Valkey service\n## Request Schema (application/json)\n\nproperties:\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n recovery-backup-name:\n description: Name of a backup to recover from for services that support backup names\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n valkey-settings:\n $ref: '#/components/schemas/json-schema-valkey'\n version:\n description: Valkey major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -21899,7 +22959,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-dbaas-service-valkey name", Short: "update-dbaas-service-valkey", - Long: cli.Markdown("Update a DBaaS Valkey service\n## Request Schema (application/json)\n\nproperties:\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n valkey-settings:\n $ref: '#/components/schemas/json-schema-valkey'\n version:\n description: Valkey major version\n minLength: 1\n type: string\ntype: object\n"), + Long: cli.Markdown("Update a DBaaS Valkey service\n## Request Schema (application/json)\n\nproperties:\n ip-filter:\n description: Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'\n items:\n type: string\n type: array\n maintenance:\n description: Automatic maintenance settings\n properties:\n dow:\n description: Day of week for installing updates\n enum:\n - saturday\n - tuesday\n - never\n - wednesday\n - sunday\n - friday\n - monday\n - thursday\n type: string\n time:\n description: Time for installing updates, UTC\n maxLength: 8\n minLength: 8\n type: string\n required:\n - dow\n - time\n type: object\n migration:\n description: Migrate data from existing server\n properties:\n dbname:\n description: Database name for bootstrapping the initial connection\n maxLength: 63\n minLength: 1\n type: string\n host:\n description: Hostname or IP address of the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n ignore-dbs:\n description: Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)\n maxLength: 2048\n minLength: 1\n type: string\n method:\n $ref: '#/components/schemas/enum-migration-method'\n password:\n description: Password for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port number of the server where to migrate data from\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n ssl:\n description: The server where to migrate data from is secured with SSL\n type: boolean\n username:\n description: User name for authentication with the server where to migrate data from\n maxLength: 255\n minLength: 1\n type: string\n required:\n - host\n - port\n type: object\n plan:\n description: Subscription plan\n maxLength: 128\n minLength: 1\n type: string\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n valkey-settings:\n $ref: '#/components/schemas/json-schema-valkey'\n version:\n description: Valkey major version\n minLength: 1\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -22382,7 +23442,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-dns-domain-record domain-id", Short: "Create DNS domain record", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n content:\n description: DNS domain record content\n type: string\n name:\n description: DNS domain record name\n type: string\n priority:\n description: DNS domain record priority\n exclusiveMinimum: false\n format: int64\n minimum: 0\n type: integer\n ttl:\n description: DNS domain record TTL\n exclusiveMinimum: false\n format: int64\n minimum: 0\n type: integer\n type:\n description: DNS domain record type\n enum:\n - NS\n - CAA\n - NAPTR\n - POOL\n - A\n - HINFO\n - CNAME\n - SSHFP\n - SRV\n - AAAA\n - MX\n - TXT\n - ALIAS\n - URL\n type: string\nrequired:\n- name\n- type\n- content\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n content:\n description: DNS domain record content\n type: string\n name:\n description: DNS domain record name\n type: string\n priority:\n description: DNS domain record priority\n format: int64\n minimum: 0\n type: integer\n ttl:\n description: DNS domain record TTL\n format: int64\n minimum: 0\n type: integer\n type:\n description: DNS domain record type\n enum:\n - NS\n - CAA\n - NAPTR\n - POOL\n - A\n - HINFO\n - CNAME\n - SSHFP\n - SRV\n - AAAA\n - MX\n - TXT\n - ALIAS\n - URL\n type: string\nrequired:\n- name\n- type\n- content\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23413,7 +24473,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-instance", Short: "Create a Compute instance", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Instance Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n type: array\n uniqueItems: true\n application-consistent-snapshot-enabled:\n description: Enable application-consistent snapshot for the instance\n type: boolean\n auto-start:\n description: 'Start Instance on creation (default: true)'\n type: boolean\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n disk-size:\n description: Instance disk size in GiB\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n ipv6-enabled:\n description: 'Enable IPv6. DEPRECATED: use `public-ip-assignments`.'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Instance name\n maxLength: 255\n minLength: 1\n type: string\n public-ip-assignment:\n $ref: '#/components/schemas/public-ip-assignment'\n secureboot-enabled:\n description: Enable secure boot\n type: boolean\n security-groups:\n description: Instance Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n type: array\n uniqueItems: true\n ssh-key:\n $ref: '#/components/schemas/ssh-key-ref'\n ssh-keys:\n description: Instance SSH Keys\n items:\n $ref: '#/components/schemas/ssh-key-ref'\n type: array\n uniqueItems: true\n template:\n $ref: '#/components/schemas/template-ref'\n tpm-enabled:\n description: Enable Trusted Platform Module (TPM)\n type: boolean\n user-data:\n description: Instance Cloud-init user-data (base64 encoded)\n maxLength: 32768\n minLength: 1\n type: string\nrequired:\n- disk-size\n- instance-type\n- template\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Instance Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n type: array\n uniqueItems: true\n application-consistent-snapshot-enabled:\n description: Enable application-consistent snapshot for the instance\n type: boolean\n auto-start:\n description: 'Start Instance on creation (default: true)'\n type: boolean\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n disk-size:\n description: Instance disk size in GiB\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n ipv6-enabled:\n description: 'Enable IPv6. DEPRECATED: use `public-ip-assignments`.'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Instance name\n maxLength: 255\n minLength: 1\n type: string\n public-ip-assignment:\n $ref: '#/components/schemas/public-ip-assignment'\n secureboot-enabled:\n description: Enable secure boot\n type: boolean\n security-groups:\n description: Instance Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n type: array\n uniqueItems: true\n ssh-key:\n $ref: '#/components/schemas/ssh-key-ref'\n ssh-keys:\n description: Instance SSH Keys\n items:\n $ref: '#/components/schemas/ssh-key-ref'\n type: array\n uniqueItems: true\n template:\n $ref: '#/components/schemas/template-ref'\n tpm-enabled:\n description: Enable Trusted Platform Module (TPM)\n type: boolean\n user-data:\n description: Instance Cloud-init user-data (base64 encoded)\n maxLength: 32768\n minLength: 1\n type: string\nrequired:\n- disk-size\n- instance-type\n- template\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { @@ -23492,7 +24552,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-instance-pool", Short: "Create an Instance Pool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Instance Pool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n type: array\n uniqueItems: true\n application-consistent-snapshot-enabled:\n description: Enable application consistent snapshots\n type: boolean\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Instance Pool description\n maxLength: 255\n type: string\n disk-size:\n description: Instances disk size in GiB\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n elastic-ips:\n description: Instances Elastic IPs\n items:\n $ref: '#/components/schemas/elastic-ip-ref'\n type: array\n uniqueItems: true\n instance-prefix:\n description: 'Prefix to apply to Instances names (default: pool)'\n maxLength: 30\n minLength: 1\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n ipv6-enabled:\n description: 'Enable IPv6. DEPRECATED: use `public-ip-assignments`.'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n min-available:\n description: Minimum number of running Instances\n exclusiveMinimum: false\n format: int64\n minimum: 0\n type: integer\n name:\n description: Instance Pool name\n maxLength: 255\n minLength: 1\n type: string\n private-networks:\n description: Instance Pool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: Determines public IP assignment of the Instances. Type `none` is final and can't be changed later on.\n enum:\n - inet4\n - dual\n - none\n type: string\n security-groups:\n description: Instance Pool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n type: array\n uniqueItems: true\n size:\n description: Number of Instances\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n ssh-key:\n $ref: '#/components/schemas/ssh-key-ref'\n ssh-keys:\n description: Instances SSH Keys\n items:\n $ref: '#/components/schemas/ssh-key-ref'\n type: array\n uniqueItems: true\n template:\n $ref: '#/components/schemas/template-ref'\n user-data:\n description: Instances Cloud-init user-data\n maxLength: 32768\n minLength: 1\n type: string\nrequired:\n- name\n- size\n- instance-type\n- template\n- disk-size\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Instance Pool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n type: array\n uniqueItems: true\n application-consistent-snapshot-enabled:\n description: Enable application consistent snapshots\n type: boolean\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Instance Pool description\n maxLength: 255\n type: string\n disk-size:\n description: Instances disk size in GiB\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n elastic-ips:\n description: Instances Elastic IPs\n items:\n $ref: '#/components/schemas/elastic-ip-ref'\n type: array\n uniqueItems: true\n instance-prefix:\n description: 'Prefix to apply to Instances names (default: pool)'\n maxLength: 30\n minLength: 1\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n ipv6-enabled:\n description: 'Enable IPv6. DEPRECATED: use `public-ip-assignments`.'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n min-available:\n description: Minimum number of running Instances\n format: int64\n minimum: 0\n type: integer\n name:\n description: Instance Pool name\n maxLength: 255\n minLength: 1\n type: string\n private-networks:\n description: Instance Pool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: Determines public IP assignment of the Instances. Type `none` is final and can't be changed later on.\n enum:\n - inet4\n - dual\n - none\n type: string\n security-groups:\n description: Instance Pool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n type: array\n uniqueItems: true\n size:\n description: Number of Instances\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n ssh-key:\n $ref: '#/components/schemas/ssh-key-ref'\n ssh-keys:\n description: Instances SSH Keys\n items:\n $ref: '#/components/schemas/ssh-key-ref'\n type: array\n uniqueItems: true\n template:\n $ref: '#/components/schemas/template-ref'\n user-data:\n description: Instances Cloud-init user-data\n maxLength: 32768\n minLength: 1\n type: string\nrequired:\n- name\n- size\n- instance-type\n- template\n- disk-size\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { @@ -23636,7 +24696,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-instance-pool id", Short: "Update an Instance Pool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Instance Pool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n nullable: true\n type: array\n uniqueItems: true\n application-consistent-snapshot-enabled:\n description: Enable application consistent snapshots\n type: boolean\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Instance Pool description\n maxLength: 255\n type: string\n disk-size:\n description: Instances disk size in GiB\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n elastic-ips:\n description: Instances Elastic IPs\n items:\n $ref: '#/components/schemas/elastic-ip-ref'\n nullable: true\n type: array\n instance-prefix:\n description: 'Prefix to apply to Instances names (default: pool)'\n nullable: true\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n ipv6-enabled:\n description: 'Enable IPv6. DEPRECATED: use `public-ip-assignments`.'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n min-available:\n description: Minimum number of running Instances\n exclusiveMinimum: false\n format: int64\n minimum: 0\n nullable: true\n type: integer\n name:\n description: Instance Pool name\n maxLength: 255\n minLength: 1\n type: string\n private-networks:\n description: Instance Pool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n nullable: true\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: Determines public IP assignment of the Instances.\n enum:\n - inet4\n - dual\n type: string\n security-groups:\n description: Instance Pool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n nullable: true\n type: array\n uniqueItems: true\n ssh-key:\n $ref: '#/components/schemas/ssh-key-ref'\n ssh-keys:\n description: Instances SSH keys\n items:\n $ref: '#/components/schemas/ssh-key-ref'\n nullable: true\n type: array\n uniqueItems: true\n template:\n $ref: '#/components/schemas/template-ref'\n user-data:\n description: Instances Cloud-init user-data\n minLength: 1\n nullable: true\n type: string\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Instance Pool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n nullable: true\n type: array\n uniqueItems: true\n application-consistent-snapshot-enabled:\n description: Enable application consistent snapshots\n type: boolean\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Instance Pool description\n maxLength: 255\n type: string\n disk-size:\n description: Instances disk size in GiB\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n elastic-ips:\n description: Instances Elastic IPs\n items:\n $ref: '#/components/schemas/elastic-ip-ref'\n nullable: true\n type: array\n instance-prefix:\n description: 'Prefix to apply to Instances names (default: pool)'\n nullable: true\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n ipv6-enabled:\n description: 'Enable IPv6. DEPRECATED: use `public-ip-assignments`.'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n min-available:\n description: Minimum number of running Instances\n format: int64\n minimum: 0\n nullable: true\n type: integer\n name:\n description: Instance Pool name\n maxLength: 255\n minLength: 1\n type: string\n private-networks:\n description: Instance Pool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n nullable: true\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: Determines public IP assignment of the Instances.\n enum:\n - inet4\n - dual\n type: string\n security-groups:\n description: Instance Pool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n nullable: true\n type: array\n uniqueItems: true\n ssh-key:\n $ref: '#/components/schemas/ssh-key-ref'\n ssh-keys:\n description: Instances SSH keys\n items:\n $ref: '#/components/schemas/ssh-key-ref'\n nullable: true\n type: array\n uniqueItems: true\n template:\n $ref: '#/components/schemas/template-ref'\n user-data:\n description: Instances Cloud-init user-data\n minLength: 1\n nullable: true\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23749,7 +24809,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "scale-instance-pool id", Short: "Scale an Instance Pool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n size:\n description: Number of managed Instances\n exclusiveMinimum: false\n format: int64\n minimum: 0\n type: integer\nrequired:\n- size\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n size:\n description: Number of managed Instances\n format: int64\n minimum: 0\n type: integer\nrequired:\n- size\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24232,7 +25292,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "reset-instance id", Short: "Reset a Compute instance to a base/target template", - Long: cli.Markdown("This operation re-installs a Compute instance to a base template. If target template is provided it will be used to recreated instance from. Warning: the operation wipes all data stored on the disk.\n## Request Schema (application/json)\n\nproperties:\n disk-size:\n description: Instance disk size in GiB\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n template:\n $ref: '#/components/schemas/template-ref'\ntype: object\n"), + Long: cli.Markdown("This operation re-installs a Compute instance to a base template. If target template is provided it will be used to recreated instance from. Warning: the operation wipes all data stored on the disk.\n## Request Schema (application/json)\n\nproperties:\n disk-size:\n description: Instance disk size in GiB\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\n template:\n $ref: '#/components/schemas/template-ref'\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24310,7 +25370,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "resize-instance-disk id", Short: "Resize a Compute instance disk", - Long: cli.Markdown("This operation resizes a Compute instance's disk volume. Note: the disk can only grow, cannot be shrunk.\n## Request Schema (application/json)\n\nproperties:\n disk-size:\n description: Instance disk size in GiB\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\nrequired:\n- disk-size\ntype: object\n"), + Long: cli.Markdown("This operation resizes a Compute instance's disk volume. Note: the disk can only grow, cannot be shrunk.\n## Request Schema (application/json)\n\nproperties:\n disk-size:\n description: Instance disk size in GiB\n format: int64\n maximum: 51200\n minimum: 10\n type: integer\nrequired:\n- disk-size\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24504,8 +25564,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-kms-key", - Short: "[BETA] Create KMS Key", - Long: cli.Markdown("Create a KMS Key in a given zone with a given name.\n## Request Schema (application/json)\n\nproperties:\n description:\n type: string\n multi-zone:\n default: false\n type: boolean\n name:\n type: string\n usage:\n default: encrypt-decrypt\n enum:\n - encrypt-decrypt\n type: string\nrequired:\n- name\ntype: object\n"), + Short: "Create KMS Key", + Long: cli.Markdown("Create a customer-managed unique KMS Key in your organization. A KMS Key is a logical represention of a cryptographic key material. It also includes metadata such as a UUID, a name and its state.\n## Request Schema (application/json)\n\nproperties:\n description:\n description: An optional detailed description providing additional context about the key's intended use case.\n type: string\n multi-zone:\n default: false\n description: True if this is a multi-zone key.\n type: boolean\n name:\n description: A human-readable display name uniquely identifying the KMS key within the tenant space.\n type: string\n usage:\n default: encrypt-decrypt\n enum:\n - encrypt-decrypt\n type: string\nrequired:\n- name\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { @@ -24543,8 +25603,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "list-kms-keys", - Short: "[BETA] List KMS Keys", - Long: cli.Markdown("List KMS Keys details for an organization in a given zone."), + Short: "List KMS Keys", + Long: cli.Markdown("Lists all KMS Keys in your organization in a given zone."), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { @@ -24578,7 +25638,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "get-kms-key id", - Short: "[BETA] Get KMS Key", + Short: "Get KMS Key", Long: cli.Markdown("Retrieve KMS Key details."), Example: examples, Args: cobra.MinimumNArgs(1), @@ -24613,8 +25673,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "cancel-kms-key-deletion id", - Short: "[BETA] Cancel KMS Key Deletion", - Long: cli.Markdown("Cancel the scheduled deletion of a KMS Key."), + Short: "Cancel KMS Key Deletion", + Long: cli.Markdown("Cancels the scheduled deletion of a KMS Key."), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24652,8 +25712,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "decrypt id", - Short: "[BETA] Decrypt", - Long: cli.Markdown("Decrypt a ciphertext.\n## Request Schema (application/json)\n\nproperties:\n ciphertext:\n format: byte\n type: string\n encryption-context:\n format: byte\n nullable: true\n type: string\nrequired:\n- ciphertext\ntype: object\n"), + Short: "Decrypt", + Long: cli.Markdown("Decrypts a ciphertext.\n## Request Schema (application/json)\n\nproperties:\n ciphertext:\n description: The Base64-encoded ciphertext payload to be decrypted.\n format: byte\n type: string\n encryption-context:\n description: The exact Base64-encoded Additional Authenticated Data (AAD) used during encryption to verify data integrity.\n format: byte\n nullable: true\n type: string\nrequired:\n- ciphertext\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24691,8 +25751,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "disable-kms-key id", - Short: "[BETA] Disable KMS Key", - Long: cli.Markdown("Disable a KMS Key"), + Short: "Disable KMS Key", + Long: cli.Markdown("Disables a KMS Key by setting its state to \"disabled\". This prevents the use of the KMS key for cryptographic and key lifecycle operations."), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24730,7 +25790,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "disable-kms-key-rotation id", - Short: "[BETA] Disable Key Rotation", + Short: "Disable Key Rotation", Long: cli.Markdown("Disable the periodic rotation of a KMS Key."), Example: examples, Args: cobra.MinimumNArgs(1), @@ -24769,8 +25829,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "enable-kms-key id", - Short: "[BETA] Enable KMS Key", - Long: cli.Markdown("Enable a KMS Key\""), + Short: "Enable KMS Key", + Long: cli.Markdown("Enables a KMS Key by setting its stated to \"enabled\". It restores the ability to fully use the KMS key for cryptographic operations and key lifecycle operations."), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24808,8 +25868,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "enable-kms-key-rotation id", - Short: "[BETA] Enable Key Rotation", - Long: cli.Markdown("Enable the periodic rotation of a KMS Key.\n## Request Schema (application/json)\n\nproperties:\n rotation-period:\n default: 365\n maximum: 2560\n minimum: 90\n type: integer\ntype: object\n"), + Short: "Enable Key Rotation", + Long: cli.Markdown("Enable the periodic rotation of a KMS Key.\n## Request Schema (application/json)\n\nproperties:\n rotation-period:\n default: 365\n description: The number of days between each automatic key rotation.\n maximum: 2560\n minimum: 90\n type: integer\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24847,8 +25907,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "encrypt id", - Short: "[BETA] Encrypt", - Long: cli.Markdown("Encrypt a plaintext.\n## Request Schema (application/json)\n\nproperties:\n encryption-context:\n format: byte\n nullable: true\n type: string\n plaintext:\n format: byte\n type: string\nrequired:\n- plaintext\ntype: object\n"), + Short: "Encrypt", + Long: cli.Markdown("Encrypts a plaintext.\n## Request Schema (application/json)\n\nproperties:\n encryption-context:\n description: Base64-encoded bytes to be used as the Additional Authenticated Data (AAD) for encryption integrity.\n format: byte\n nullable: true\n type: string\n plaintext:\n description: The Base64-encoded plaintext data you wish to encrypt.\n format: byte\n type: string\nrequired:\n- plaintext\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24886,8 +25946,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "generate-data-key id", - Short: "[BETA] Generate Data Key", - Long: cli.Markdown("Generate a Data Encryption Key from a given KMS Key.\n## Request Schema (application/json)\n\nproperties:\n bytes-count:\n maximum: 1024\n minimum: 1\n type: integer\n encryption-context:\n format: byte\n nullable: true\n type: string\n key-spec:\n enum:\n - AES-256\n type: string\ntype: object\n"), + Short: "Generate Data Encryption Key", + Long: cli.Markdown("Generate a Data Encryption Key from a given KMS Key.\n## Request Schema (application/json)\n\nproperties:\n bytes-count:\n maximum: 1024\n minimum: 1\n type: integer\n encryption-context:\n description: Base64-encoded Additional Authenticated Data binding key generation parameters securely to operational scope.\n format: byte\n nullable: true\n type: string\n key-spec:\n enum:\n - AES-256\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24925,7 +25985,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "list-kms-key-rotations id", - Short: "[BETA] List KMS Key Rotations", + Short: "List KMS Key Rotations", Long: cli.Markdown("List all the key material versions of a KMS Key."), Example: examples, Args: cobra.MinimumNArgs(1), @@ -24960,8 +26020,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "re-encrypt id", - Short: "[BETA] Re-encrypt", - Long: cli.Markdown("Decrypts an existing ciphertext using its original key material and re-encrypts the underlying plaintext using a specified KMS key or the latest key material of the same KMS Key.\n## Request Schema (application/json)\n\nproperties:\n destination:\n properties:\n encryption-context:\n description: Optional encryption context appended to the AAD.\n format: byte\n nullable: true\n type: string\n key:\n description: The ID of the target key.\n format: uuid\n type: string\n required:\n - key\n type: object\n source:\n properties:\n ciphertext:\n format: byte\n type: string\n encryption-context:\n description: Optional encryption context appended to the AAD.\n format: byte\n nullable: true\n type: string\n key:\n description: The ID of the source key.\n format: uuid\n type: string\n required:\n - key\n - ciphertext\n type: object\nrequired:\n- source\n- destination\ntype: object\n"), + Short: "Re-encrypt", + Long: cli.Markdown("Decrypts an existing ciphertext using its original key material and re-encrypts the underlying plaintext using a specified KMS key or the latest key material of the same KMS Key.\n## Request Schema (application/json)\n\nproperties:\n destination:\n properties:\n encryption-context:\n description: Optional new Base64-encoded encryption context to apply under the target destination envelope.\n format: byte\n nullable: true\n type: string\n key:\n description: The ID of the target key chosen to encapsulate the newly shifted data translation.\n format: uuid\n type: string\n required:\n - key\n type: object\n source:\n properties:\n ciphertext:\n description: The Base64-encoded encrypted payload package ready to undergo source-side key decryption.\n format: byte\n type: string\n encryption-context:\n description: Optional Base64-encoded encryption context originally appended to the AAD to confirm package validation rules.\n format: byte\n nullable: true\n type: string\n key:\n description: The ID of the source key currently protecting the data payload.\n format: uuid\n type: string\n required:\n - key\n - ciphertext\n type: object\nrequired:\n- source\n- destination\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24999,8 +26059,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "replicate-kms-key id", - Short: "[BETA] Replicate KMS Key", - Long: cli.Markdown("Replicate a KMS key to a target zone.\n## Request Schema (application/json)\n\nproperties:\n zone:\n type: string\nrequired:\n- zone\ntype: object\n"), + Short: "Replicate KMS Key", + Long: cli.Markdown("Replicate a KMS key to a target zone.\n## Request Schema (application/json)\n\nproperties:\n zone:\n description: The targeted cloud zone where the KMS key should be replicated.\n type: string\nrequired:\n- zone\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -25038,8 +26098,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "rotate-kms-key id", - Short: "[BETA] Rotate Key", - Long: cli.Markdown("Perform a manual rotation of the key material for a symmetric key."), + Short: "Rotate Key", + Long: cli.Markdown("Performs an immediate rotation of the key material for a symmetric key."), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -25077,8 +26137,8 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "schedule-kms-key-deletion id", - Short: "[BETA] Schedule KMS Key Deletion", - Long: cli.Markdown("Schedule a KMS key for deletion after a delay.\n## Request Schema (application/json)\n\nproperties:\n delay-days:\n default: 30\n description: Number of days to wait until deletion is final.\n maximum: 30\n minimum: 7\n type: integer\ntype: object\n"), + Short: "Schedule KMS Key Deletion", + Long: cli.Markdown("Schedules a KMS key for deletion after a delay. You can specify a delay of 7-30 days.\n## Request Schema (application/json)\n\nproperties:\n delay-days:\n default: 30\n description: Number of days to wait until deletion is final.\n maximum: 30\n minimum: 7\n type: integer\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -25335,7 +26395,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "add-service-to-load-balancer id", Short: "Add a Load Balancer Service", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer Service description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/load-balancer-service-healthcheck'\n instance-pool:\n $ref: '#/components/schemas/instance-pool'\n name:\n description: Load Balancer Service name\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port exposed on the Load Balancer's public IP\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n protocol:\n description: Network traffic protocol\n enum:\n - tcp\n - udp\n type: string\n strategy:\n description: Load balancing strategy\n enum:\n - round-robin\n - maglev-hash\n - source-hash\n type: string\n target-port:\n description: Port on which the network traffic will be forwarded to on the receiving instance\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\nrequired:\n- name\n- instance-pool\n- protocol\n- strategy\n- port\n- target-port\n- healthcheck\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer Service description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/load-balancer-service-healthcheck'\n instance-pool:\n $ref: '#/components/schemas/instance-pool'\n name:\n description: Load Balancer Service name\n maxLength: 255\n minLength: 1\n type: string\n port:\n description: Port exposed on the Load Balancer's public IP\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n protocol:\n description: Network traffic protocol\n enum:\n - tcp\n - udp\n type: string\n strategy:\n description: Load balancing strategy\n enum:\n - round-robin\n - maglev-hash\n - source-hash\n type: string\n target-port:\n description: Port on which the network traffic will be forwarded to on the receiving instance\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\nrequired:\n- name\n- instance-pool\n- protocol\n- strategy\n- port\n- target-port\n- healthcheck\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -25444,7 +26504,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-load-balancer-service id service-id", Short: "Update a Load Balancer Service", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer Service description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/load-balancer-service-healthcheck'\n name:\n description: Load Balancer Service name\n maxLength: 255\n type: string\n port:\n description: Port exposed on the Load Balancer's public IP\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n protocol:\n description: Network traffic protocol\n enum:\n - tcp\n - udp\n type: string\n strategy:\n description: Load balancing strategy\n enum:\n - round-robin\n - maglev-hash\n - source-hash\n type: string\n target-port:\n description: Port on which the network traffic will be forwarded to on the receiving instance\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer Service description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/load-balancer-service-healthcheck'\n name:\n description: Load Balancer Service name\n maxLength: 255\n type: string\n port:\n description: Port exposed on the Load Balancer's public IP\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n protocol:\n description: Network traffic protocol\n enum:\n - tcp\n - udp\n type: string\n strategy:\n description: Load balancing strategy\n enum:\n - round-robin\n - maglev-hash\n - source-hash\n type: string\n target-port:\n description: Port on which the network traffic will be forwarded to on the receiving instance\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { @@ -26392,7 +27452,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "add-rule-to-security-group id", Short: "Create a Security Group rule", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Security Group rule description\n maxLength: 255\n type: string\n end-port:\n description: End port of the range\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n flow-direction:\n description: Network flow direction to match\n enum:\n - ingress\n - egress\n type: string\n icmp:\n description: 'ICMP details (default: -1 (ANY))'\n properties:\n code:\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 254\n minimum: -1\n nullable: true\n type: integer\n type:\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 254\n minimum: -1\n nullable: true\n type: integer\n type: object\n network:\n description: CIDR-formatted network allowed\n type: string\n protocol:\n description: Network protocol\n enum:\n - tcp\n - esp\n - icmp\n - udp\n - gre\n - ah\n - ipip\n - icmpv6\n type: string\n security-group:\n $ref: '#/components/schemas/security-group-resource'\n start-port:\n description: Start port of the range\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\nrequired:\n- flow-direction\n- protocol\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Security Group rule description\n maxLength: 255\n type: string\n end-port:\n description: End port of the range\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\n flow-direction:\n description: Network flow direction to match\n enum:\n - ingress\n - egress\n type: string\n icmp:\n description: 'ICMP details (default: -1 (ANY))'\n properties:\n code:\n format: int64\n maximum: 254\n minimum: -1\n nullable: true\n type: integer\n type:\n format: int64\n maximum: 254\n minimum: -1\n nullable: true\n type: integer\n type: object\n network:\n description: CIDR-formatted network allowed\n type: string\n protocol:\n description: Network protocol\n enum:\n - tcp\n - esp\n - icmp\n - udp\n - gre\n - ah\n - ipip\n - icmpv6\n type: string\n security-group:\n $ref: '#/components/schemas/security-group-resource'\n start-port:\n description: Start port of the range\n format: int64\n maximum: 65535\n minimum: 1\n type: integer\nrequired:\n- flow-direction\n- protocol\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -27064,7 +28124,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-sks-nodepool id", Short: "Create a new SKS Nodepool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addons:\n description: Nodepool addons\n items:\n enum:\n - storage-lvm\n type: string\n type: array\n uniqueItems: true\n anti-affinity-groups:\n description: Nodepool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n maxItems: 8\n type: array\n uniqueItems: true\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Nodepool description\n maxLength: 255\n type: string\n disk-size:\n description: Nodepool instances disk size in GiB\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 51200\n minimum: 20\n type: integer\n instance-prefix:\n description: 'Prefix to apply to instances names (default: pool), lowercase only'\n maxLength: 30\n minLength: 1\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n kubelet-image-gc:\n $ref: '#/components/schemas/kubelet-image-gc'\n labels:\n $ref: '#/components/schemas/sks-nodepool-labels'\n name:\n description: Nodepool name, lowercase only\n maxLength: 255\n minLength: 1\n type: string\n nvidia-mig-profiles:\n $ref: '#/components/schemas/nvidia-mig-profiles'\n private-networks:\n description: Nodepool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: |-\n Configures public IP assignment of the Instances with:\n\n * IPv4 (`inet4`) addressing only (default);\n * both IPv4 and IPv6 (`dual`) addressing.\n enum:\n - inet4\n - dual\n type: string\n security-groups:\n description: Nodepool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n size:\n description: Number of instances\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n taints:\n $ref: '#/components/schemas/sks-nodepool-taints'\nrequired:\n- name\n- size\n- disk-size\n- instance-type\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addons:\n description: Nodepool addons\n items:\n enum:\n - storage-lvm\n type: string\n type: array\n uniqueItems: true\n anti-affinity-groups:\n description: Nodepool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n maxItems: 8\n type: array\n uniqueItems: true\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Nodepool description\n maxLength: 255\n type: string\n disk-size:\n description: Nodepool instances disk size in GiB\n format: int64\n maximum: 51200\n minimum: 20\n type: integer\n instance-prefix:\n description: 'Prefix to apply to instances names (default: pool), lowercase only'\n maxLength: 30\n minLength: 1\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n kubelet-image-gc:\n $ref: '#/components/schemas/kubelet-image-gc'\n labels:\n $ref: '#/components/schemas/sks-nodepool-labels'\n name:\n description: Nodepool name, lowercase only\n maxLength: 255\n minLength: 1\n type: string\n nvidia-mig-profiles:\n $ref: '#/components/schemas/nvidia-mig-profiles'\n private-networks:\n description: Nodepool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: |-\n Configures public IP assignment of the Instances with:\n\n * IPv4 (`inet4`) addressing only (default);\n * both IPv4 and IPv6 (`dual`) addressing.\n enum:\n - inet4\n - dual\n type: string\n security-groups:\n description: Nodepool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n size:\n description: Number of instances\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n taints:\n $ref: '#/components/schemas/sks-nodepool-taints'\nrequired:\n- name\n- size\n- disk-size\n- instance-type\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -27173,7 +28233,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "update-sks-nodepool id sks-nodepool-id", Short: "Update an SKS Nodepool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Nodepool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n maxItems: 8\n type: array\n uniqueItems: true\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Nodepool description\n maxLength: 255\n type: string\n disk-size:\n description: Nodepool instances disk size in GiB\n exclusiveMaximum: false\n exclusiveMinimum: false\n format: int64\n maximum: 51200\n minimum: 20\n type: integer\n instance-prefix:\n description: 'Prefix to apply to managed instances names (default: pool), lowercase only'\n maxLength: 30\n minLength: 1\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n kubelet-image-gc:\n $ref: '#/components/schemas/kubelet-image-gc'\n labels:\n $ref: '#/components/schemas/sks-nodepool-labels'\n name:\n description: Nodepool name, lowercase only\n maxLength: 255\n minLength: 1\n type: string\n nvidia-mig-profiles:\n $ref: '#/components/schemas/nvidia-mig-profiles'\n private-networks:\n description: Nodepool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: |-\n Configures public IP assignment of the Instances with:\n\n * IPv4 (`inet4`) addressing only;\n * both IPv4 and IPv6 (`dual`) addressing.\n enum:\n - inet4\n - dual\n type: string\n security-groups:\n description: Nodepool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n taints:\n $ref: '#/components/schemas/sks-nodepool-taints'\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n anti-affinity-groups:\n description: Nodepool Anti-affinity Groups\n items:\n $ref: '#/components/schemas/anti-affinity-group-ref'\n maxItems: 8\n type: array\n uniqueItems: true\n deploy-target:\n $ref: '#/components/schemas/deploy-target-ref'\n description:\n description: Nodepool description\n maxLength: 255\n type: string\n disk-size:\n description: Nodepool instances disk size in GiB\n format: int64\n maximum: 51200\n minimum: 20\n type: integer\n instance-prefix:\n description: 'Prefix to apply to managed instances names (default: pool), lowercase only'\n maxLength: 30\n minLength: 1\n type: string\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\n kubelet-image-gc:\n $ref: '#/components/schemas/kubelet-image-gc'\n labels:\n $ref: '#/components/schemas/sks-nodepool-labels'\n name:\n description: Nodepool name, lowercase only\n maxLength: 255\n minLength: 1\n type: string\n nvidia-mig-profiles:\n $ref: '#/components/schemas/nvidia-mig-profiles'\n private-networks:\n description: Nodepool Private Networks\n items:\n $ref: '#/components/schemas/private-network-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n public-ip-assignment:\n description: |-\n Configures public IP assignment of the Instances with:\n\n * IPv4 (`inet4`) addressing only;\n * both IPv4 and IPv6 (`dual`) addressing.\n enum:\n - inet4\n - dual\n type: string\n security-groups:\n description: Nodepool Security Groups\n items:\n $ref: '#/components/schemas/security-group-ref'\n maxItems: 16\n type: array\n uniqueItems: true\n taints:\n $ref: '#/components/schemas/sks-nodepool-taints'\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { @@ -27251,7 +28311,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "scale-sks-nodepool id sks-nodepool-id", Short: "Scale a SKS Nodepool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n size:\n description: Number of instances\n exclusiveMinimum: false\n format: int64\n minimum: 0\n type: integer\nrequired:\n- size\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n size:\n description: Number of instances\n format: int64\n minimum: 0\n type: integer\nrequired:\n- size\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { @@ -28761,6 +29821,84 @@ func xRegister(subcommand bool) { }() + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "attach-instance-to-subnet vpc-id subnet-id", + Short: "[BETA] Attach a Compute instance to a Subnet", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance-ref'\nrequired:\n- instance\ntype: object\n"), + Example: examples, + Args: cobra.MinimumNArgs(2), + Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[2:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } + + _, decoded, err := XAttachInstanceToSubnet(args[0], args[1], params, body) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + + func() { + params := viper.New() + + var examples string + + cmd := &cobra.Command{ + Use: "detach-instance-from-subnet vpc-id subnet-id", + Short: "[BETA] Detach a Compute instance from a Subnet", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance-ref'\nrequired:\n- instance\ntype: object\n"), + Example: examples, + Args: cobra.MinimumNArgs(2), + Run: func(cmd *cobra.Command, args []string) { + body, err := cli.GetBody("application/json", args[2:]) + if err != nil { + log.Fatal().Err(err).Msg("Unable to get body") + } + + _, decoded, err := XDetachInstanceFromSubnet(args[0], args[1], params, body) + if err != nil { + log.Fatal().Err(err).Msg("Error calling operation") + } + + if err := cli.Formatter.Format(decoded); err != nil { + log.Fatal().Err(err).Msg("Formatting failed") + } + + }, + } + + root.AddCommand(cmd) + + cli.SetCustomFlags(cmd) + + if cmd.Flags().HasFlags() { + params.BindPFlags(cmd.Flags()) + } + + }() + func() { params := viper.New() @@ -28769,7 +29907,7 @@ func xRegister(subcommand bool) { cmd := &cobra.Command{ Use: "create-route vpc-id subnet-id", Short: "[BETA] Create a route", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Route description\n maxLength: 4096\n type: string\n destination:\n description: Route destination CIDR\n type: string\n name:\n description: Route name\n maxLength: 255\n minLength: 1\n type: string\n target:\n description: Route target\n type: string\nrequired:\n- destination\n- target\ntype: object\n"), + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Route description\n maxLength: 4096\n type: string\n destination:\n description: Route destination CIDR\n type: string\n target:\n description: Route target\n type: string\nrequired:\n- destination\n- target\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { diff --git a/go.mod b/go.mod index 2d49c42d0..b5969ad26 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0 github.com/aws/smithy-go v1.27.3 github.com/dustin/go-humanize v1.0.1 - github.com/exoscale/egoscale/v3 v3.1.41 + github.com/exoscale/egoscale/v3 v3.1.42 github.com/exoscale/openapi-cli-generator v1.2.0 github.com/fatih/camelcase v1.0.0 github.com/hashicorp/go-multierror v1.1.1 diff --git a/go.sum b/go.sum index c09601baa..4920c9865 100644 --- a/go.sum +++ b/go.sum @@ -175,8 +175,8 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/exoscale/egoscale/v3 v3.1.41 h1:sFcGn74f5l73KCpYIWVmSPFUz6i+yrk5K7LdwTKAPbg= -github.com/exoscale/egoscale/v3 v3.1.41/go.mod h1:DUTgeubl5msPAo3SKFed04AxNhyTNOrCTJHZDRYLR10= +github.com/exoscale/egoscale/v3 v3.1.42 h1:KlFDdm2ga1RdCdKuKlzJxLmgJjWVcDbJxF0t6FDswzw= +github.com/exoscale/egoscale/v3 v3.1.42/go.mod h1:DUTgeubl5msPAo3SKFed04AxNhyTNOrCTJHZDRYLR10= github.com/exoscale/openapi-cli-generator v1.2.0 h1:xgTff1bInBP+JZCauD7Jq9GNBFoKK31Cnv5FIAcxtrk= github.com/exoscale/openapi-cli-generator v1.2.0/go.mod h1:TZBnbT7f3hJ5ImyUphJwRM+X5xF/zCQZ6o8a42gQeTs= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= diff --git a/vendor/github.com/exoscale/egoscale/v3/errors.go b/vendor/github.com/exoscale/egoscale/v3/errors.go index 2c5dcbed8..4450ebe73 100644 --- a/vendor/github.com/exoscale/egoscale/v3/errors.go +++ b/vendor/github.com/exoscale/egoscale/v3/errors.go @@ -118,7 +118,10 @@ type APIErrorEntry struct { Location string } -func (e *APIError) Error() string { return e.sentinel.Error() } +func (e *APIError) Error() string { + return fmt.Sprintf("%s: %s", e.sentinel.Error(), e.Message) +} + func (e *APIError) Unwrap() error { return e.sentinel } func handleHTTPErrorResp(resp *http.Response) error { diff --git a/vendor/github.com/exoscale/egoscale/v3/operations.go b/vendor/github.com/exoscale/egoscale/v3/operations.go index ffac3f9bb..f2cac53db 100644 --- a/vendor/github.com/exoscale/egoscale/v3/operations.go +++ b/vendor/github.com/exoscale/egoscale/v3/operations.go @@ -2783,7 +2783,7 @@ type CreateDBAASClickhouseUserRequest struct { Username DBAASUserUsername `json:"username" validate:"required,gte=1,lte=64"` } -func (c Client) CreateDBAASClickhouseUser(ctx context.Context, serviceName string, req CreateDBAASClickhouseUserRequest) (*Operation, error) { +func (c Client) CreateDBAASClickhouseUser(ctx context.Context, serviceName string, req CreateDBAASClickhouseUserRequest) (*DBAASUserClickhouseSecrets, error) { path := fmt.Sprintf("/dbaas-clickhouse/%v/user", serviceName) body, err := prepareJSONBody(req) @@ -2825,7 +2825,7 @@ func (c Client) CreateDBAASClickhouseUser(ctx context.Context, serviceName strin return nil, fmt.Errorf("CreateDBAASClickhouseUser: http response: %w", err) } - bodyresp := new(Operation) + bodyresp := new(DBAASUserClickhouseSecrets) if err := prepareJSONResponse(response, bodyresp); err != nil { return nil, fmt.Errorf("CreateDBAASClickhouseUser: prepare Json response: %w", err) } @@ -2880,7 +2880,7 @@ type ResetDBAASClickhouseUserPasswordRequest struct { Password DBAASUserPassword `json:"password,omitempty" validate:"omitempty,gte=8,lte=256"` } -func (c Client) ResetDBAASClickhouseUserPassword(ctx context.Context, serviceName string, username string, req ResetDBAASClickhouseUserPasswordRequest) (*Operation, error) { +func (c Client) ResetDBAASClickhouseUserPassword(ctx context.Context, serviceName string, username string, req ResetDBAASClickhouseUserPasswordRequest) (*DBAASUserClickhouseSecrets, error) { path := fmt.Sprintf("/dbaas-clickhouse/%v/user/%v/password/reset", serviceName, username) body, err := prepareJSONBody(req) @@ -2922,7 +2922,7 @@ func (c Client) ResetDBAASClickhouseUserPassword(ctx context.Context, serviceNam return nil, fmt.Errorf("ResetDBAASClickhouseUserPassword: http response: %w", err) } - bodyresp := new(Operation) + bodyresp := new(DBAASUserClickhouseSecrets) if err := prepareJSONResponse(response, bodyresp); err != nil { return nil, fmt.Errorf("ResetDBAASClickhouseUserPassword: prepare Json response: %w", err) } diff --git a/vendor/github.com/exoscale/egoscale/v3/schemas.go b/vendor/github.com/exoscale/egoscale/v3/schemas.go index 6723ddaa0..f0baa22c0 100644 --- a/vendor/github.com/exoscale/egoscale/v3/schemas.go +++ b/vendor/github.com/exoscale/egoscale/v3/schemas.go @@ -206,7 +206,7 @@ type BlockStorageVolumeRef struct { // Request to create a new AI API key type CreateAIAPIKeyRequest struct { // Human-readable name for the AI API key - Name string `json:"name" validate:"required"` + Name string `json:"name" validate:"required,gte=1,lte=50"` // Key scope: 'public' for all deployments, or a specific deployment UUID Scope string `json:"scope" validate:"required"` } @@ -225,6 +225,8 @@ type CreateAIAPIKeyResponse struct { Scope string `json:"scope" validate:"required"` // Last update timestamp UpdatedAT time.Time `json:"updated-at" validate:"required"` + // Plaintext AI API key value + Value string `json:"value" validate:"required"` } // Deploy an AI model onto a set of GPUs @@ -241,6 +243,8 @@ type CreateDeploymentRequest struct { Model *ModelRef `json:"model" validate:"required"` // Deployment name Name string `json:"name" validate:"required,gte=1"` + // Billing identifier for this deployment. Used by the Router for usage counters and Kafka events. + ProductName string `json:"product-name,omitempty" validate:"omitempty,gte=1"` // Number of replicas (>=1) Replicas int64 `json:"replicas" validate:"required,gte=1"` } @@ -2605,6 +2609,13 @@ const ( GetDeploymentResponseStateUpdating GetDeploymentResponseState = "updating" ) +type GetDeploymentResponseVisibility string + +const ( + GetDeploymentResponseVisibilityPublic GetDeploymentResponseVisibility = "public" + GetDeploymentResponseVisibilityPrivate GetDeploymentResponseVisibility = "private" +) + // AI deployment type GetDeploymentResponse struct { // Creation time @@ -2635,6 +2646,8 @@ type GetDeploymentResponse struct { StateDetails string `json:"state-details" validate:"required"` // Update time UpdatedAT time.Time `json:"updated-at" validate:"required"` + // Deployment visibility: private for your organization's deployments, public for Exoscale Managed Inference deployments. + Visibility GetDeploymentResponseVisibility `json:"visibility" validate:"required"` } // List of allowed inference-engine parameters @@ -2845,16 +2858,17 @@ const ( InferenceEngineVersion0221 InferenceEngineVersion = "0.22.1" InferenceEngineVersion0230 InferenceEngineVersion = "0.23.0" InferenceEngineVersion0240 InferenceEngineVersion = "0.24.0" + InferenceEngineVersion0250 InferenceEngineVersion = "0.25.0" ) // Router flush payload: the router's full in-memory usage map with flush identity fields type IngestMeteringRequest struct { - // ISO-8601 UTC timestamp when the flush snapshot was created (truncated to minute boundary for bucketing) - CreatedAT time.Time `json:"created-at" validate:"required"` // UUID identifying this flush; used for idempotent deduplication FlushID UUID `json:"flush-id" validate:"required"` // Router instance identifier that produced this flush RouterID string `json:"router-id" validate:"required,gte=1"` + // ISO-8601 UTC timestamp when the flush snapshot was created (truncated to minute boundary for bucketing) + Timestamp time.Time `json:"timestamp" validate:"required"` // Map of api-key-uuid to usage entry. Keys are API key UUIDs. Mirrors the router's in-memory accumulator structure directly. Usage map[string]APIKeyUsageEntry `json:"usage" validate:"required"` } @@ -4396,6 +4410,13 @@ const ( ListDeploymentsResponseEntryStateUpdating ListDeploymentsResponseEntryState = "updating" ) +type ListDeploymentsResponseEntryVisibility string + +const ( + ListDeploymentsResponseEntryVisibilityPublic ListDeploymentsResponseEntryVisibility = "public" + ListDeploymentsResponseEntryVisibilityPrivate ListDeploymentsResponseEntryVisibility = "private" +) + // AI deployment type ListDeploymentsResponseEntry struct { // Creation time @@ -4420,6 +4441,8 @@ type ListDeploymentsResponseEntry struct { State ListDeploymentsResponseEntryState `json:"state" validate:"required"` // Update time UpdatedAT time.Time `json:"updated-at" validate:"required"` + // Deployment visibility: private for your organization's deployments, public for Exoscale Managed Inference deployments. + Visibility ListDeploymentsResponseEntryVisibility `json:"visibility" validate:"required"` } type ListKmsKeyRotationsResponse struct { @@ -5588,7 +5611,7 @@ type TemplateRef struct { // Request to update an AI API key (at least one property required) type UpdateAIAPIKeyRequest struct { // Human-readable name for the AI API key - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty" validate:"omitempty,gte=1,lte=50"` // Key scope: 'public' for all deployments, or a specific deployment UUID Scope string `json:"scope,omitempty"` } diff --git a/vendor/github.com/exoscale/egoscale/v3/version.go b/vendor/github.com/exoscale/egoscale/v3/version.go index 0a35d3852..2d44348f7 100644 --- a/vendor/github.com/exoscale/egoscale/v3/version.go +++ b/vendor/github.com/exoscale/egoscale/v3/version.go @@ -1,4 +1,4 @@ package v3 // Version represents the current egoscale v3 version. -const Version = "v3.1.41" +const Version = "v3.1.42" diff --git a/vendor/modules.txt b/vendor/modules.txt index a33562898..4480c228f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -202,7 +202,7 @@ github.com/dlclark/regexp2/syntax # github.com/dustin/go-humanize v1.0.1 ## explicit; go 1.16 github.com/dustin/go-humanize -# github.com/exoscale/egoscale/v3 v3.1.41 +# github.com/exoscale/egoscale/v3 v3.1.42 ## explicit; go 1.25 github.com/exoscale/egoscale/v3 github.com/exoscale/egoscale/v3/credentials