From a1f2503c145b84f0f07d10d09ff6e37cfc96487f Mon Sep 17 00:00:00 2001 From: Philipp Sauter Date: Fri, 26 Jun 2026 15:14:11 +0000 Subject: [PATCH] api: regenerate api commands --- CHANGELOG.md | 4 + cmd/internal/x/x.gen.go | 5062 +++++++++++++++++++++++---------------- 2 files changed, 3054 insertions(+), 2012 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf3848e1..a6c94c88e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Improvements + +- api: regenerate api commands #851 + ## 1.95.3 ### Features diff --git a/cmd/internal/x/x.gen.go b/cmd/internal/x/x.gen.go index 34f4b8754..22d1f3533 100644 --- a/cmd/internal/x/x.gen.go +++ b/cmd/internal/x/x.gen.go @@ -27,7 +27,7 @@ func xServers() []map[string]string { } } -// XCreateAiApiKey Create AI API Key +// XCreateAiApiKey [BETA] Create AI API Key func XCreateAiApiKey(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "create-ai-api-key" if xSubcommand { @@ -72,7 +72,7 @@ func XCreateAiApiKey(params *viper.Viper, body string) (*gentleman.Response, map return resp, decoded, nil } -// XListAiApiKeys List AI API Keys +// XListAiApiKeys [BETA] List AI API Keys func XListAiApiKeys(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "list-ai-api-keys" if xSubcommand { @@ -113,8 +113,8 @@ func XListAiApiKeys(params *viper.Viper) (*gentleman.Response, map[string]interf return resp, decoded, nil } -// XDeleteAiApiKey Delete AI API Key -func XDeleteAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, interface{}, error) { +// XDeleteAiApiKey [BETA] Delete AI API Key +func XDeleteAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "delete-ai-api-key" if xSubcommand { handlerPath = "x " + handlerPath @@ -137,7 +137,7 @@ func XDeleteAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, 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 { @@ -149,13 +149,13 @@ func XDeleteAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, after := cli.HandleAfter(handlerPath, params, resp, decoded) if after != nil { - decoded = after + decoded = after.(map[string]interface{}) } return resp, decoded, nil } -// XGetAiApiKey Get AI API Key +// XGetAiApiKey [BETA] Get AI API Key func XGetAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-ai-api-key" if xSubcommand { @@ -197,7 +197,7 @@ func XGetAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, map return resp, decoded, nil } -// XUpdateAiApiKey Update AI API Key +// XUpdateAiApiKey [BETA] Update AI API Key func XUpdateAiApiKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "update-ai-api-key" if xSubcommand { @@ -243,7 +243,7 @@ func XUpdateAiApiKey(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XRevealAiApiKey Reveal AI API Key +// XRevealAiApiKey [BETA] Reveal AI API Key func XRevealAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "reveal-ai-api-key" if xSubcommand { @@ -285,7 +285,7 @@ func XRevealAiApiKey(paramId string, params *viper.Viper) (*gentleman.Response, return resp, decoded, nil } -// XRotateAiApiKey Rotate AI API Key +// XRotateAiApiKey [BETA] Rotate AI API Key func XRotateAiApiKey(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "rotate-ai-api-key" if xSubcommand { @@ -953,7 +953,7 @@ func XGetModel(paramId string, params *viper.Viper) (*gentleman.Response, map[st return resp, decoded, nil } -// XGetUserOrgConsumptionQuota Get Organization Consumption Quota +// XGetUserOrgConsumptionQuota [BETA] Get Organization Consumption Quota func XGetUserOrgConsumptionQuota(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "get-user-org-consumption-quota" if xSubcommand { @@ -9073,9 +9073,9 @@ func XUpdateIamRole(paramId string, params *viper.Viper, body string) (*gentlema return resp, decoded, nil } -// XUpdateIamRoleAssumePolicy Update IAM Assume role Policy -func XUpdateIamRoleAssumePolicy(paramId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "update-iam-role-assume-policy" +// 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 } @@ -9085,10 +9085,10 @@ func XUpdateIamRoleAssumePolicy(paramId string, params *viper.Viper, body string server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/iam-role/{id}:assume-role-policy" + url := server + "/iam-role/{id}/assume" 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) @@ -9165,52 +9165,6 @@ func XUpdateIamRolePolicy(paramId string, params *viper.Viper, body string) (*ge return resp, decoded, nil } -// XAssumeIamRole [BETA] Request generation of key/secret that allow caller to assume target role -func XAssumeIamRole(paramTargetRoleId string, params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "assume-iam-role" - if xSubcommand { - handlerPath = "x " + handlerPath - } - - server := viper.GetString("server") - if server == "" { - server = xServers()[viper.GetInt("server-index")]["url"] - } - - url := server + "/iam-role/{target-role-id}/assume" - url = strings.Replace(url, "{target-role-id}", paramTargetRoleId, 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 -} - // XCreateInstance Create a Compute instance func XCreateInstance(params *viper.Viper, body string) (*gentleman.Response, map[string]interface{}, error) { handlerPath := "create-instance" @@ -15116,9 +15070,9 @@ func XUpdateUserRole(paramId string, params *viper.Viper, body string) (*gentlem return resp, decoded, nil } -// XListZones List Zones -func XListZones(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { - handlerPath := "list-zones" +// 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 } @@ -15128,9 +15082,13 @@ func XListZones(params *viper.Viper) (*gentleman.Response, map[string]interface{ server = xServers()[viper.GetInt("server-index")]["url"] } - url := server + "/zone" + url := server + "/vpc" - 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) @@ -15157,153 +15115,1021 @@ func XListZones(params *viper.Viper) (*gentleman.Response, map[string]interface{ return resp, decoded, nil } -func xRegister(subcommand bool) { - root := cli.Root +// XListVpcs [BETA] List VPCs +func XListVpcs(params *viper.Viper) (*gentleman.Response, map[string]interface{}, error) { + handlerPath := "list-vpcs" + 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" - var examples string + req := cli.Client.Get().URL(url) - cmd := &cobra.Command{ - Use: "create-ai-api-key", - Short: "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") - } + cli.HandleBefore(handlerPath, params, req) - _, decoded, err := XCreateAiApiKey(params, body) - if err != nil { - log.Fatal().Err(err).Msg("Error calling operation") - } + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } - if err := cli.Formatter.Format(decoded); err != nil { - log.Fatal().Err(err).Msg("Formatting 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()) + } - root.AddCommand(cmd) + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } - cli.SetCustomFlags(cmd) + return resp, decoded, nil +} - if cmd.Flags().HasFlags() { - params.BindPFlags(cmd.Flags()) - } +// 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 + } - }() + 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.Delete().URL(url) - cmd := &cobra.Command{ - Use: "list-ai-api-keys", - Short: "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) { + cli.HandleBefore(handlerPath, params, req) - _, decoded, err := XListAiApiKeys(params) - if err != nil { - log.Fatal().Err(err).Msg("Error calling operation") - } + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } - if err := cli.Formatter.Format(decoded); err != nil { - log.Fatal().Err(err).Msg("Formatting 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()) + } - root.AddCommand(cmd) + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } - cli.SetCustomFlags(cmd) + return resp, decoded, nil +} - if cmd.Flags().HasFlags() { - params.BindPFlags(cmd.Flags()) - } +// 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 + } - }() + 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.Get().URL(url) - cmd := &cobra.Command{ - Use: "delete-ai-api-key id", - Short: "Delete AI API Key", - Long: cli.Markdown("Delete AI API key"), - Example: examples, - Args: cobra.MinimumNArgs(1), - Run: func(cmd *cobra.Command, args []string) { + cli.HandleBefore(handlerPath, params, req) - _, decoded, err := XDeleteAiApiKey(args[0], params) - if err != nil { - log.Fatal().Err(err).Msg("Error calling operation") - } + resp, err := req.Do() + if err != nil { + return nil, nil, errors.Wrap(err, "Request failed") + } - if err := cli.Formatter.Format(decoded); err != nil { - log.Fatal().Err(err).Msg("Formatting 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()) + } - root.AddCommand(cmd) - - cli.SetCustomFlags(cmd) + after := cli.HandleAfter(handlerPath, params, resp, decoded) + if after != nil { + decoded = after.(map[string]interface{}) + } - if cmd.Flags().HasFlags() { - params.BindPFlags(cmd.Flags()) - } + 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" + if xSubcommand { + handlerPath = "x " + handlerPath + } - func() { - params := viper.New() + server := viper.GetString("server") + if server == "" { + server = xServers()[viper.GetInt("server-index")]["url"] + } - var examples string + url := server + "/vpc/{id}" + url = strings.Replace(url, "{id}", paramId, 1) - cmd := &cobra.Command{ - Use: "get-ai-api-key id", - Short: "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) { + req := cli.Client.Put().URL(url) - _, decoded, err := XGetAiApiKey(args[0], params) - if err != nil { - log.Fatal().Err(err).Msg("Error calling operation") - } + if body != "" { + req = req.AddHeader("Content-Type", "application/json").BodyString(body) + } - if err := cli.Formatter.Format(decoded); err != nil { - log.Fatal().Err(err).Msg("Formatting failed") - } + 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 +} + +// 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 +} + +// 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 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 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") + } + + }, + } + + 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: "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"), + 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) + 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-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 := XDeleteDeployment(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 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 := XGetDeployment(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) @@ -15322,9 +16148,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-ai-api-key id", - Short: "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) { @@ -15333,7 +16159,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") } @@ -15361,14 +16187,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-ai-api-key id", - Short: "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 := XRevealAiApiKey(args[0], params) + _, decoded, err := XRevealDeploymentApiKey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15396,18 +16222,56 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "rotate-ai-api-key id", - Short: "Rotate AI API Key", - Long: cli.Markdown("Rotate AI API key value"), + 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) { - body, err := cli.GetBody("", args[1:]) + + _, 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 := XRotateAiApiKey(args[0], params, body) + _, decoded, err := XScaleDeployment(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15435,9 +16299,81 @@ 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: "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(0), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XListAiInstanceTypes(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: "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(0), Run: func(cmd *cobra.Command, args []string) { @@ -15446,7 +16382,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDeployment(params, body) + _, decoded, err := XCreateModel(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15474,14 +16410,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-deployments", - Short: "List Deployments", - Long: cli.Markdown("List Deployments"), + Use: "list-models", + Short: "List Models", + Long: cli.Markdown("List Models"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDeployments(params) + _, decoded, err := XListModels(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15511,14 +16447,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-deployment id", - Short: "Delete Deployment", - Long: cli.Markdown("Delete Deployment"), + Use: "delete-model id", + Short: "Delete Model", + Long: cli.Markdown("Delete Model"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDeployment(args[0], params) + _, decoded, err := XDeleteModel(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15546,14 +16482,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-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 := XGetDeployment(args[0], params) + _, decoded, err := XGetModel(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15581,18 +16517,53 @@ 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: "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) { - body, err := cli.GetBody("application/json", args[1:]) + + _, decoded, err := XGetUserOrgConsumptionQuota(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: "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(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 := XUpdateDeployment(args[0], params, body) + _, decoded, err := XCreateAntiAffinityGroup(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -15620,14 +16591,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") } @@ -15655,14 +16626,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") } @@ -15676,9 +16647,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("stream", "", "") - cmd.Flags().Int64("tail", 0, "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -15693,18 +16661,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") } @@ -15732,14 +16696,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") } @@ -15753,8 +16721,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("version", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -15769,14 +16735,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") } @@ -15804,18 +16770,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") } @@ -15843,14 +16805,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") } @@ -15864,8 +16826,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("visibility", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -15880,14 +16840,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 exclusiveMinimum: false\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") } @@ -15915,14 +16879,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") } @@ -15936,6 +16900,8 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("instance-id", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -15950,14 +16916,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-user-org-consumption-quota", - Short: "Get Organization Consumption Quota", - Long: cli.Markdown("Get per-org token consumption quota (tokens/min). Null means unlimited."), + 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") } @@ -15985,18 +16951,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") } @@ -16024,14 +16986,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") } @@ -16059,14 +17021,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") } @@ -16094,14 +17060,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") } @@ -16129,18 +17095,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") } @@ -16168,14 +17130,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") } @@ -16203,14 +17169,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") } @@ -16238,14 +17208,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") } @@ -16273,18 +17247,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") } @@ -16312,14 +17286,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") } @@ -16333,8 +17311,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("instance-id", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -16349,14 +17325,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") } @@ -16384,14 +17360,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") } @@ -16419,14 +17395,14 @@ 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: "delete-dbaas-external-endpoint-datadog endpoint-id", + Short: "delete-dbaas-external-endpoint-datadog", + Long: cli.Markdown("[BETA] Delete DataDog external integration endpoint"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetBlockStorageSnapshot(args[0], params) + _, decoded, err := XDeleteDbaasExternalEndpointDatadog(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16454,18 +17430,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: "get-dbaas-external-endpoint-datadog endpoint-id", + Short: "get-dbaas-external-endpoint-datadog", + Long: cli.Markdown("[BETA] Get DataDog external endpoint settings"), 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 := XGetDbaasExternalEndpointDatadog(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16493,14 +17465,18 @@ 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", - Long: cli.Markdown(""), + 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"), 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 := XDeleteBlockStorageVolume(args[0], params) + _, decoded, err := XUpdateDbaasExternalEndpointDatadog(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16528,14 +17504,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: "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"), 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 := XCreateDbaasExternalEndpointDatadog(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16563,18 +17543,14 @@ 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: "delete-dbaas-external-endpoint-elasticsearch endpoint-id", + Short: "delete-dbaas-external-endpoint-elasticsearch", + Long: cli.Markdown("[BETA] Delete ElasticSearch logs external integration endpoint"), 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 := XUpdateBlockStorageVolume(args[0], params, body) + _, decoded, err := XDeleteDbaasExternalEndpointElasticsearch(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16602,18 +17578,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-external-endpoint-elasticsearch endpoint-id", + Short: "get-dbaas-external-endpoint-elasticsearch", + Long: cli.Markdown("[BETA] Get ElasticSearch Logs external integration endpoint settings"), 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 := XGetDbaasExternalEndpointElasticsearch(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16641,9 +17613,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: "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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -16652,7 +17624,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateBlockStorageSnapshot(args[0], params, body) + _, decoded, err := XUpdateDbaasExternalEndpointElasticsearch(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16680,18 +17652,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "detach-block-storage-volume id", - Short: "Detach block storage volume", - Long: cli.Markdown(""), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XDetachBlockStorageVolume(args[0], params, body) + _, decoded, err := XCreateDbaasExternalEndpointElasticsearch(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16719,18 +17691,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-external-endpoint-opensearch endpoint-id", + Short: "delete-dbaas-external-endpoint-opensearch", + Long: cli.Markdown("[BETA] Delete OpenSearch logs external integration endpoint"), 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 := XResizeBlockStorageVolume(args[0], params, body) + _, decoded, err := XDeleteDbaasExternalEndpointOpensearch(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16758,14 +17726,14 @@ 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: "get-dbaas-external-endpoint-opensearch endpoint-id", + Short: "get-dbaas-external-endpoint-opensearch", + Long: cli.Markdown("[BETA] Get OpenSearch Logs external integration endpoint settings"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetConsoleProxyUrl(args[0], params) + _, decoded, err := XGetDbaasExternalEndpointOpensearch(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16793,14 +17761,18 @@ 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: "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"), 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 := XGetDbaasCaCertificate(params) + _, decoded, err := XUpdateDbaasExternalEndpointOpensearch(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16828,14 +17800,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-external-endpoint-datadog endpoint-id", - Short: "delete-dbaas-external-endpoint-datadog", - Long: cli.Markdown("[BETA] Delete DataDog external integration endpoint"), + 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"), 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 := XDeleteDbaasExternalEndpointDatadog(args[0], params) + _, decoded, err := XCreateDbaasExternalEndpointOpensearch(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16863,14 +17839,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-external-endpoint-datadog endpoint-id", - Short: "get-dbaas-external-endpoint-datadog", - Long: cli.Markdown("[BETA] Get DataDog external endpoint settings"), + Use: "delete-dbaas-external-endpoint-prometheus endpoint-id", + Short: "delete-dbaas-external-endpoint-prometheus", + Long: cli.Markdown("[BETA] Delete Prometheus external integration endpoint"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasExternalEndpointDatadog(args[0], params) + _, decoded, err := XDeleteDbaasExternalEndpointPrometheus(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16898,18 +17874,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "get-dbaas-external-endpoint-prometheus endpoint-id", + Short: "get-dbaas-external-endpoint-prometheus", + Long: cli.Markdown("[BETA] Get Prometheus external integration endpoint settings"), 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 := XUpdateDbaasExternalEndpointDatadog(args[0], params, body) + _, decoded, err := XGetDbaasExternalEndpointPrometheus(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16937,9 +17909,9 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "update-dbaas-external-endpoint-prometheus endpoint-id", + Short: "update-dbaas-external-endpoint-prometheus", + Long: cli.Markdown("[BETA] Update Prometheus external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n basic-auth-password:\n description: Prometheus basic authentication password\n maxLength: 64\n minLength: 8\n type: string\n basic-auth-username:\n description: Prometheus basic authentication username\n maxLength: 32\n minLength: 5\n pattern: ^[a-z0-9\\-@_]{5,32}$\n type: string\n type: object\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -16948,7 +17920,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasExternalEndpointDatadog(args[0], params, body) + _, decoded, err := XUpdateDbaasExternalEndpointPrometheus(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -16976,14 +17948,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-external-endpoint-elasticsearch endpoint-id", - Short: "delete-dbaas-external-endpoint-elasticsearch", - Long: cli.Markdown("[BETA] Delete ElasticSearch logs external integration endpoint"), + Use: "create-dbaas-external-endpoint-prometheus name", + Short: "create-dbaas-external-endpoint-prometheus", + Long: cli.Markdown("[BETA] Create Prometheus external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n basic-auth-password:\n description: Prometheus basic authentication password\n maxLength: 64\n minLength: 8\n type: string\n basic-auth-username:\n description: Prometheus basic authentication username\n maxLength: 32\n minLength: 5\n pattern: ^[a-z0-9\\-@_]{5,32}$\n type: string\n type: object\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 := XDeleteDbaasExternalEndpointElasticsearch(args[0], params) + _, decoded, err := XCreateDbaasExternalEndpointPrometheus(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17011,14 +17987,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-external-endpoint-elasticsearch endpoint-id", - Short: "get-dbaas-external-endpoint-elasticsearch", - Long: cli.Markdown("[BETA] Get ElasticSearch Logs external integration endpoint settings"), + Use: "delete-dbaas-external-endpoint-rsyslog endpoint-id", + Short: "delete-dbaas-external-endpoint-rsyslog", + Long: cli.Markdown("[BETA] Delete RSyslog external integration endpoint"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasExternalEndpointElasticsearch(args[0], params) + _, decoded, err := XDeleteDbaasExternalEndpointRsyslog(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17046,18 +18022,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "get-dbaas-external-endpoint-rsyslog endpoint-id", + Short: "get-dbaas-external-endpoint-rsyslog", + Long: cli.Markdown("[BETA] Get RSyslog external integration endpoint settings"), 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 := XUpdateDbaasExternalEndpointElasticsearch(args[0], params, body) + _, decoded, err := XGetDbaasExternalEndpointRsyslog(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17085,9 +18057,9 @@ func xRegister(subcommand bool) { var examples string 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"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17096,7 +18068,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasExternalEndpointElasticsearch(args[0], params, body) + _, decoded, err := XUpdateDbaasExternalEndpointRsyslog(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17124,14 +18096,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-external-endpoint-opensearch endpoint-id", - Short: "delete-dbaas-external-endpoint-opensearch", - Long: cli.Markdown("[BETA] Delete OpenSearch logs external integration endpoint"), + 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"), 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 := XDeleteDbaasExternalEndpointOpensearch(args[0], params) + _, decoded, err := XCreateDbaasExternalEndpointRsyslog(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17159,14 +18135,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-external-endpoint-opensearch endpoint-id", - Short: "get-dbaas-external-endpoint-opensearch", - Long: cli.Markdown("[BETA] Get OpenSearch Logs external integration endpoint settings"), + Use: "list-dbaas-external-endpoint-types", + Short: "list-dbaas-external-endpoint-types", + Long: cli.Markdown("[BETA] List available external endpoint types and their schemas for DBaaS external integrations"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasExternalEndpointOpensearch(args[0], params) + _, decoded, err := XListDbaasExternalEndpointTypes(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17194,9 +18170,9 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "attach-dbaas-service-to-endpoint source-service-name", + Short: "attach-dbaas-service-to-endpoint", + Long: cli.Markdown("[BETA] Create a new DBaaS connection between a DBaaS service and an external service\n## Request Schema (application/json)\n\nproperties:\n dest-endpoint-id:\n description: External endpoint id\n format: uuid\n type: string\n type:\n $ref: '#/components/schemas/enum-external-endpoint-types'\nrequired:\n- dest-endpoint-id\n- type\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17205,7 +18181,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateDbaasExternalEndpointOpensearch(args[0], params, body) + _, decoded, err := XAttachDbaasServiceToEndpoint(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17233,9 +18209,9 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "detach-dbaas-service-from-endpoint source-service-name", + Short: "detach-dbaas-service-from-endpoint", + Long: cli.Markdown("[BETA] Detach a DBaaS external integration from a service\n## Request Schema (application/json)\n\nproperties:\n integration-id:\n description: External Integration ID\n format: uuid\n type: string\nrequired:\n- integration-id\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17244,7 +18220,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasExternalEndpointOpensearch(args[0], params, body) + _, decoded, err := XDetachDbaasServiceFromEndpoint(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17272,14 +18248,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-external-endpoint-prometheus endpoint-id", - Short: "delete-dbaas-external-endpoint-prometheus", - Long: cli.Markdown("[BETA] Delete Prometheus external integration endpoint"), + Use: "list-dbaas-external-endpoints", + Short: "list-dbaas-external-endpoints", + Long: cli.Markdown("[BETA] List available external endpoints for integrations"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasExternalEndpointPrometheus(args[0], params) + _, decoded, err := XListDbaasExternalEndpoints(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17307,14 +18283,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-external-endpoint-prometheus endpoint-id", - Short: "get-dbaas-external-endpoint-prometheus", - Long: cli.Markdown("[BETA] Get Prometheus external integration endpoint settings"), + Use: "get-dbaas-external-integration-settings-datadog integration-id", + Short: "get-dbaas-external-integration-settings-datadog", + Long: cli.Markdown("[BETA] Get Datadog integration settings"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasExternalEndpointPrometheus(args[0], params) + _, decoded, err := XGetDbaasExternalIntegrationSettingsDatadog(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17342,9 +18318,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-external-endpoint-prometheus endpoint-id", - Short: "update-dbaas-external-endpoint-prometheus", - Long: cli.Markdown("[BETA] Update Prometheus external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n basic-auth-password:\n description: Prometheus basic authentication password\n maxLength: 64\n minLength: 8\n type: string\n basic-auth-username:\n description: Prometheus basic authentication username\n maxLength: 32\n minLength: 5\n pattern: ^[a-z0-9\\-@_]{5,32}$\n type: string\n type: object\ntype: object\n"), + Use: "update-dbaas-external-integration-settings-datadog integration-id", + Short: "update-dbaas-external-integration-settings-datadog", + Long: cli.Markdown("[BETA] Manage Datadog integration settings\n## Request Schema (application/json)\n\nproperties:\n settings:\n $ref: '#/components/schemas/dbaas-integration-settings-datadog'\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -17353,7 +18329,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateDbaasExternalEndpointPrometheus(args[0], params, body) + _, decoded, err := XUpdateDbaasExternalIntegrationSettingsDatadog(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17381,18 +18357,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-external-endpoint-prometheus name", - Short: "create-dbaas-external-endpoint-prometheus", - Long: cli.Markdown("[BETA] Create Prometheus external integration endpoint\n## Request Schema (application/json)\n\nproperties:\n settings:\n properties:\n basic-auth-password:\n description: Prometheus basic authentication password\n maxLength: 64\n minLength: 8\n type: string\n basic-auth-username:\n description: Prometheus basic authentication username\n maxLength: 32\n minLength: 5\n pattern: ^[a-z0-9\\-@_]{5,32}$\n type: string\n type: object\ntype: object\n"), + Use: "get-dbaas-external-integration integration-id", + Short: "get-dbaas-external-integration", + Long: cli.Markdown("[BETA] Get a DBaaS external integration"), 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 := XCreateDbaasExternalEndpointPrometheus(args[0], params, body) + _, decoded, err := XGetDbaasExternalIntegration(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17420,14 +18392,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-external-endpoint-rsyslog endpoint-id", - Short: "delete-dbaas-external-endpoint-rsyslog", - Long: cli.Markdown("[BETA] Delete RSyslog external integration endpoint"), + Use: "list-dbaas-external-integrations service-name", + Short: "list-dbaas-external-integrations", + Long: cli.Markdown("[BETA] List all DBaaS connections between services and external endpoints"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasExternalEndpointRsyslog(args[0], params) + _, decoded, err := XListDbaasExternalIntegrations(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17455,14 +18427,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-external-endpoint-rsyslog endpoint-id", - Short: "get-dbaas-external-endpoint-rsyslog", - Long: cli.Markdown("[BETA] Get RSyslog external integration endpoint settings"), + Use: "create-dbaas-service-grafana name", + Short: "create-dbaas-service-grafana", + Long: cli.Markdown("Create a DBaaS Grafana service\n## Request Schema (application/json)\n\nproperties:\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n grafana-settings:\n $ref: '#/components/schemas/json-schema-grafana'\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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\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 := XGetDbaasExternalEndpointRsyslog(args[0], params) + _, decoded, err := XCreateDbaasServiceGrafana(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17490,18 +18466,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "delete-dbaas-service-grafana name", + Short: "Delete a Grafana 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 := XUpdateDbaasExternalEndpointRsyslog(args[0], params, body) + _, decoded, err := XDeleteDbaasServiceGrafana(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17529,18 +18501,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "get-dbaas-service-grafana name", + Short: "Get a DBaaS Grafana 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 := XCreateDbaasExternalEndpointRsyslog(args[0], params, body) + _, decoded, err := XGetDbaasServiceGrafana(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17568,14 +18536,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-external-endpoint-types", - Short: "list-dbaas-external-endpoint-types", - Long: cli.Markdown("[BETA] List available external endpoint types and their schemas for DBaaS external integrations"), + Use: "update-dbaas-service-grafana name", + Short: "Update a DBaaS Grafana service", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n grafana-settings:\n $ref: '#/components/schemas/json-schema-grafana'\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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\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 := XListDbaasExternalEndpointTypes(params) + _, decoded, err := XUpdateDbaasServiceGrafana(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17603,18 +18575,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "attach-dbaas-service-to-endpoint source-service-name", - Short: "attach-dbaas-service-to-endpoint", - Long: cli.Markdown("[BETA] Create a new DBaaS connection between a DBaaS service and an external service\n## Request Schema (application/json)\n\nproperties:\n dest-endpoint-id:\n description: External endpoint id\n format: uuid\n type: string\n type:\n $ref: '#/components/schemas/enum-external-endpoint-types'\nrequired:\n- dest-endpoint-id\n- type\ntype: object\n"), + Use: "start-dbaas-grafana-maintenance name", + Short: "Initiate Grafana 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 := XAttachDbaasServiceToEndpoint(args[0], params, body) + _, decoded, err := XStartDbaasGrafanaMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17642,18 +18614,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "detach-dbaas-service-from-endpoint source-service-name", - Short: "detach-dbaas-service-from-endpoint", - Long: cli.Markdown("[BETA] Detach a DBaaS external integration from a service\n## Request Schema (application/json)\n\nproperties:\n integration-id:\n description: External Integration ID\n format: uuid\n type: string\nrequired:\n- integration-id\ntype: object\n"), + Use: "reset-dbaas-grafana-user-password service-name username", + Short: "Reset the credentials of a DBaaS Grafana user", + Long: cli.Markdown("If no password is provided one will be generated automatically.\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[1:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XDetachDbaasServiceFromEndpoint(args[0], params, body) + _, decoded, err := XResetDbaasGrafanaUserPassword(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17681,14 +18653,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-external-endpoints", - Short: "list-dbaas-external-endpoints", - Long: cli.Markdown("[BETA] List available external endpoints for integrations"), + Use: "reveal-dbaas-grafana-user-password service-name username", + Short: "Reveal the secrets of a DBaaS Grafana user", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDbaasExternalEndpoints(params) + _, decoded, err := XRevealDbaasGrafanaUserPassword(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17716,14 +18688,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-external-integration-settings-datadog integration-id", - Short: "get-dbaas-external-integration-settings-datadog", - Long: cli.Markdown("[BETA] Get Datadog integration settings"), + Use: "create-dbaas-integration", + Short: "create-dbaas-integration", + Long: cli.Markdown("[BETA] Create a new DBaaS integration between two services\n## Request Schema (application/json)\n\nproperties:\n dest-service:\n $ref: '#/components/schemas/dbaas-service-name'\n integration-type:\n $ref: '#/components/schemas/enum-integration-types'\n settings:\n description: Integration settings\n type: object\n source-service:\n $ref: '#/components/schemas/dbaas-service-name'\nrequired:\n- integration-type\n- source-service\n- dest-service\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 := XGetDbaasExternalIntegrationSettingsDatadog(args[0], params) + _, decoded, err := XCreateDbaasIntegration(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17751,18 +18727,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-external-integration-settings-datadog integration-id", - Short: "update-dbaas-external-integration-settings-datadog", - Long: cli.Markdown("[BETA] Manage Datadog integration settings\n## Request Schema (application/json)\n\nproperties:\n settings:\n $ref: '#/components/schemas/dbaas-integration-settings-datadog'\ntype: object\n"), + Use: "list-dbaas-integration-settings integration-type source-type dest-type", + Short: "list-dbaas-integration-settings", + Long: cli.Markdown("[BETA] Get DBaaS integration settings"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(3), 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 := XUpdateDbaasExternalIntegrationSettingsDatadog(args[0], params, body) + _, decoded, err := XListDbaasIntegrationSettings(args[0], args[1], args[2], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17790,14 +18762,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-external-integration integration-id", - Short: "get-dbaas-external-integration", - Long: cli.Markdown("[BETA] Get a DBaaS external integration"), + Use: "list-dbaas-integration-types", + Short: "list-dbaas-integration-types", + Long: cli.Markdown("[BETA] Get DBaaS integration types"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasExternalIntegration(args[0], params) + _, decoded, err := XListDbaasIntegrationTypes(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17825,14 +18797,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-external-integrations service-name", - Short: "list-dbaas-external-integrations", - Long: cli.Markdown("[BETA] List all DBaaS connections between services and external endpoints"), + Use: "delete-dbaas-integration id", + Short: "delete-dbaas-integration", + Long: cli.Markdown("[BETA] Delete a DBaaS Integration"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDbaasExternalIntegrations(args[0], params) + _, decoded, err := XDeleteDbaasIntegration(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17860,18 +18832,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-service-grafana name", - Short: "create-dbaas-service-grafana", - Long: cli.Markdown("Create a DBaaS Grafana service\n## Request Schema (application/json)\n\nproperties:\n fork-from-service:\n $ref: '#/components/schemas/dbaas-service-name'\n grafana-settings:\n $ref: '#/components/schemas/json-schema-grafana'\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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\nrequired:\n- plan\ntype: object\n"), + Use: "get-dbaas-integration id", + Short: "get-dbaas-integration", + Long: cli.Markdown("[BETA] Get a DBaaS Integration"), 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 := XCreateDbaasServiceGrafana(args[0], params, body) + _, decoded, err := XGetDbaasIntegration(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17899,14 +18867,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service-grafana name", - Short: "Delete a Grafana service", - Long: cli.Markdown(""), + Use: "update-dbaas-integration id", + Short: "update-dbaas-integration", + Long: cli.Markdown("[BETA] Update a existing DBaaS integration\n## Request Schema (application/json)\n\nproperties:\n settings:\n description: Integration settings\n type: object\nrequired:\n- settings\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 := XDeleteDbaasServiceGrafana(args[0], params) + _, decoded, err := XUpdateDbaasIntegration(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17934,14 +18906,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-grafana name", - Short: "Get a DBaaS Grafana service", - Long: cli.Markdown(""), + Use: "create-dbaas-service-kafka name", + Short: "Create a DBaaS Kafka service", + Long: cli.Markdown("Create a DBaaS Kafka service\n## Request Schema (application/json)\n\nproperties:\n authentication-methods:\n description: Kafka authentication methods\n properties:\n certificate:\n description: Enable certificate/SSL authentication\n type: boolean\n sasl:\n description: Enable SASL authentication\n type: boolean\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 kafka-connect-enabled:\n description: Allow clients to connect to kafka_connect from the public internet for service nodes that are in a project VPC or another type of private network\n type: boolean\n kafka-connect-settings:\n $ref: '#/components/schemas/json-schema-kafka-connect'\n kafka-rest-enabled:\n description: Enable Kafka-REST service\n type: boolean\n kafka-rest-settings:\n $ref: '#/components/schemas/json-schema-kafka-rest'\n kafka-settings:\n $ref: '#/components/schemas/json-schema-kafka'\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 schema-registry-enabled:\n description: Enable Schema-Registry service\n type: boolean\n schema-registry-settings:\n $ref: '#/components/schemas/json-schema-schema-registry'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: Kafka 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 := XGetDbaasServiceGrafana(args[0], params) + _, decoded, err := XCreateDbaasServiceKafka(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -17969,18 +18945,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-service-grafana name", - Short: "Update a DBaaS Grafana service", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n grafana-settings:\n $ref: '#/components/schemas/json-schema-grafana'\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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\ntype: object\n"), + Use: "delete-dbaas-service-kafka name", + Short: "Delete a Kafka 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 := XUpdateDbaasServiceGrafana(args[0], params, body) + _, decoded, err := XDeleteDbaasServiceKafka(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18008,18 +18980,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-dbaas-grafana-maintenance name", - Short: "Initiate Grafana maintenance update", + Use: "get-dbaas-service-kafka name", + Short: "Get a DBaaS Kafka service", 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 := XStartDbaasGrafanaMaintenance(args[0], params, body) + _, decoded, err := XGetDbaasServiceKafka(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18047,18 +19015,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-dbaas-grafana-user-password service-name username", - Short: "Reset the credentials of a DBaaS Grafana user", - Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\ntype: object\n"), + Use: "update-dbaas-service-kafka name", + Short: "Update a DBaaS Kafka service", + Long: cli.Markdown("Update a DBaaS Kafka service\n## Request Schema (application/json)\n\nproperties:\n authentication-methods:\n description: Kafka authentication methods\n properties:\n certificate:\n description: Enable certificate/SSL authentication\n type: boolean\n sasl:\n description: Enable SASL authentication\n type: boolean\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 kafka-connect-enabled:\n description: Allow clients to connect to kafka_connect from the public internet for service nodes that are in a project VPC or another type of private network\n type: boolean\n kafka-connect-settings:\n $ref: '#/components/schemas/json-schema-kafka-connect'\n kafka-rest-enabled:\n description: Enable Kafka-REST service\n type: boolean\n kafka-rest-settings:\n $ref: '#/components/schemas/json-schema-kafka-rest'\n kafka-settings:\n $ref: '#/components/schemas/json-schema-kafka'\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 schema-registry-enabled:\n description: Enable Schema-Registry service\n type: boolean\n schema-registry-settings:\n $ref: '#/components/schemas/json-schema-schema-registry'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: Kafka major version\n minLength: 1\n type: string\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[2:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XResetDbaasGrafanaUserPassword(args[0], args[1], params, body) + _, decoded, err := XUpdateDbaasServiceKafka(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18086,14 +19054,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-grafana-user-password service-name username", - Short: "Reveal the secrets of a DBaaS Grafana user", + Use: "get-dbaas-kafka-acl-config name", + Short: "Get DBaaS kafka ACL configuration", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealDbaasGrafanaUserPassword(args[0], args[1], params) + _, decoded, err := XGetDbaasKafkaAclConfig(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18121,18 +19089,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-integration", - Short: "create-dbaas-integration", - Long: cli.Markdown("[BETA] Create a new DBaaS integration between two services\n## Request Schema (application/json)\n\nproperties:\n dest-service:\n $ref: '#/components/schemas/dbaas-service-name'\n integration-type:\n $ref: '#/components/schemas/enum-integration-types'\n settings:\n description: Integration settings\n type: object\n source-service:\n $ref: '#/components/schemas/dbaas-service-name'\nrequired:\n- integration-type\n- source-service\n- dest-service\ntype: object\n"), + Use: "start-dbaas-kafka-maintenance name", + Short: "Initiate Kafka maintenance update", + 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 := XCreateDbaasIntegration(params, body) + _, decoded, err := XStartDbaasKafkaMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18160,14 +19128,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-integration-settings integration-type source-type dest-type", - Short: "list-dbaas-integration-settings", - Long: cli.Markdown("[BETA] Get DBaaS integration settings"), + Use: "create-dbaas-kafka-schema-registry-acl-config name", + Short: "Add a Kafka Schema Registry ACL entry", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n id:\n $ref: '#/components/schemas/dbaas-kafka-acl-id'\n permission:\n description: Kafka Schema Registry permission\n enum:\n - schema_registry_read\n - schema_registry_write\n type: string\n resource:\n description: Kafka Schema Registry name or pattern\n maxLength: 249\n minLength: 1\n type: string\n username:\n description: Kafka username or username pattern\n maxLength: 64\n minLength: 1\n type: string\nrequired:\n- username\n- resource\n- permission\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(3), + 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 := XListDbaasIntegrationSettings(args[0], args[1], args[2], params) + _, decoded, err := XCreateDbaasKafkaSchemaRegistryAclConfig(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18195,14 +19167,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-integration-types", - Short: "list-dbaas-integration-types", - Long: cli.Markdown("[BETA] Get DBaaS integration types"), + Use: "delete-dbaas-kafka-schema-registry-acl-config name acl-id", + Short: "Delete a Kafka ACL entry", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDbaasIntegrationTypes(params) + _, decoded, err := XDeleteDbaasKafkaSchemaRegistryAclConfig(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18230,14 +19202,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-integration id", - Short: "delete-dbaas-integration", - Long: cli.Markdown("[BETA] Delete a DBaaS Integration"), + Use: "create-dbaas-kafka-topic-acl-config name", + Short: "Add a Kafka topic ACL entry", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n id:\n $ref: '#/components/schemas/dbaas-kafka-acl-id'\n permission:\n description: Kafka permission\n enum:\n - admin\n - read\n - readwrite\n - write\n type: string\n topic:\n description: Kafka topic name or pattern\n maxLength: 249\n minLength: 1\n type: string\n username:\n description: Kafka username or username pattern\n maxLength: 64\n minLength: 1\n type: string\nrequired:\n- username\n- topic\n- permission\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 := XDeleteDbaasIntegration(args[0], params) + _, decoded, err := XCreateDbaasKafkaTopicAclConfig(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18265,14 +19241,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-integration id", - Short: "get-dbaas-integration", - Long: cli.Markdown("[BETA] Get a DBaaS Integration"), + Use: "delete-dbaas-kafka-topic-acl-config name acl-id", + Short: "Delete a Kafka ACL entry", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasIntegration(args[0], params) + _, decoded, err := XDeleteDbaasKafkaTopicAclConfig(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18300,18 +19276,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-integration id", - Short: "update-dbaas-integration", - Long: cli.Markdown("[BETA] Update a existing DBaaS integration\n## Request Schema (application/json)\n\nproperties:\n settings:\n description: Integration settings\n type: object\nrequired:\n- settings\ntype: object\n"), + Use: "reveal-dbaas-kafka-connect-password service-name", + Short: "Reveal the secrets for DBaaS Kafka Connect", + 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 := XUpdateDbaasIntegration(args[0], params, body) + _, decoded, err := XRevealDbaasKafkaConnectPassword(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18339,9 +19311,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-service-kafka name", - Short: "Create a DBaaS Kafka service", - Long: cli.Markdown("Create a DBaaS Kafka service\n## Request Schema (application/json)\n\nproperties:\n authentication-methods:\n description: Kafka authentication methods\n properties:\n certificate:\n description: Enable certificate/SSL authentication\n type: boolean\n sasl:\n description: Enable SASL authentication\n type: boolean\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 kafka-connect-enabled:\n description: Allow clients to connect to kafka_connect from the public internet for service nodes that are in a project VPC or another type of private network\n type: boolean\n kafka-connect-settings:\n $ref: '#/components/schemas/json-schema-kafka-connect'\n kafka-rest-enabled:\n description: Enable Kafka-REST service\n type: boolean\n kafka-rest-settings:\n $ref: '#/components/schemas/json-schema-kafka-rest'\n kafka-settings:\n $ref: '#/components/schemas/json-schema-kafka'\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 schema-registry-enabled:\n description: Enable Schema-Registry service\n type: boolean\n schema-registry-settings:\n $ref: '#/components/schemas/json-schema-schema-registry'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: Kafka major version\n minLength: 1\n type: string\nrequired:\n- plan\ntype: object\n"), + Use: "create-dbaas-kafka-user service-name", + Short: "Create a DBaaS Kafka user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\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) { @@ -18350,7 +19322,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasServiceKafka(args[0], params, body) + _, decoded, err := XCreateDbaasKafkaUser(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18378,14 +19350,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service-kafka name", - Short: "Delete a Kafka service", + Use: "delete-dbaas-kafka-user service-name username", + Short: "Delete a DBaaS kafka user", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasServiceKafka(args[0], params) + _, decoded, err := XDeleteDbaasKafkaUser(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18413,14 +19385,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-kafka name", - Short: "Get a DBaaS Kafka service", - Long: cli.Markdown(""), + Use: "reset-dbaas-kafka-user-password service-name username", + Short: "Reset the credentials of a DBaaS Kafka user", + Long: cli.Markdown("If no password is provided one will be generated automatically.\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 := XGetDbaasServiceKafka(args[0], params) + _, decoded, err := XResetDbaasKafkaUserPassword(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18448,18 +19424,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-service-kafka name", - Short: "Update a DBaaS Kafka service", - Long: cli.Markdown("Update a DBaaS Kafka service\n## Request Schema (application/json)\n\nproperties:\n authentication-methods:\n description: Kafka authentication methods\n properties:\n certificate:\n description: Enable certificate/SSL authentication\n type: boolean\n sasl:\n description: Enable SASL authentication\n type: boolean\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 kafka-connect-enabled:\n description: Allow clients to connect to kafka_connect from the public internet for service nodes that are in a project VPC or another type of private network\n type: boolean\n kafka-connect-settings:\n $ref: '#/components/schemas/json-schema-kafka-connect'\n kafka-rest-enabled:\n description: Enable Kafka-REST service\n type: boolean\n kafka-rest-settings:\n $ref: '#/components/schemas/json-schema-kafka-rest'\n kafka-settings:\n $ref: '#/components/schemas/json-schema-kafka'\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 schema-registry-enabled:\n description: Enable Schema-Registry service\n type: boolean\n schema-registry-settings:\n $ref: '#/components/schemas/json-schema-schema-registry'\n termination-protection:\n description: Service is protected against termination and powering off\n type: boolean\n version:\n description: Kafka major version\n minLength: 1\n type: string\ntype: object\n"), + Use: "reveal-dbaas-kafka-user-password service-name username", + Short: "Reveal the secrets of a DBaaS Kafka 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 := XUpdateDbaasServiceKafka(args[0], params, body) + _, decoded, err := XRevealDbaasKafkaUserPassword(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18487,14 +19459,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-kafka-acl-config name", - Short: "Get DBaaS kafka ACL configuration", - Long: cli.Markdown(""), + Use: "get-dbaas-migration-status name", + Short: "Get a DBaaS migration status", + Long: cli.Markdown("Get a DBaaS migration status"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasKafkaAclConfig(args[0], params) + _, decoded, err := XGetDbaasMigrationStatus(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18522,18 +19494,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-dbaas-kafka-maintenance name", - Short: "Initiate Kafka maintenance update", - Long: cli.Markdown(""), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XStartDbaasKafkaMaintenance(args[0], params, body) + _, decoded, err := XCreateDbaasServiceMysql(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18561,18 +19533,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-kafka-schema-registry-acl-config name", - Short: "Add a Kafka Schema Registry ACL entry", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n id:\n $ref: '#/components/schemas/dbaas-kafka-acl-id'\n permission:\n description: Kafka Schema Registry permission\n enum:\n - schema_registry_read\n - schema_registry_write\n type: string\n resource:\n description: Kafka Schema Registry name or pattern\n maxLength: 249\n minLength: 1\n type: string\n username:\n description: Kafka username or username pattern\n maxLength: 64\n minLength: 1\n type: string\nrequired:\n- username\n- resource\n- permission\ntype: object\n"), + Use: "delete-dbaas-service-mysql name", + Short: "Delete a MySQL 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 := XCreateDbaasKafkaSchemaRegistryAclConfig(args[0], params, body) + _, decoded, err := XDeleteDbaasServiceMysql(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18600,14 +19568,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-kafka-schema-registry-acl-config name acl-id", - Short: "Delete a Kafka ACL entry", - Long: cli.Markdown(""), + Use: "get-dbaas-service-mysql name", + Short: "Get a DBaaS MySQL service", + Long: cli.Markdown("Get a DBaaS MySQL service"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasKafkaSchemaRegistryAclConfig(args[0], args[1], params) + _, decoded, err := XGetDbaasServiceMysql(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18635,9 +19603,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-kafka-topic-acl-config name", - Short: "Add a Kafka topic ACL entry", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n id:\n $ref: '#/components/schemas/dbaas-kafka-acl-id'\n permission:\n description: Kafka permission\n enum:\n - admin\n - read\n - readwrite\n - write\n type: string\n topic:\n description: Kafka topic name or pattern\n maxLength: 249\n minLength: 1\n type: string\n username:\n description: Kafka username or username pattern\n maxLength: 64\n minLength: 1\n type: string\nrequired:\n- username\n- topic\n- permission\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -18646,7 +19614,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasKafkaTopicAclConfig(args[0], params, body) + _, decoded, err := XUpdateDbaasServiceMysql(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18674,14 +19642,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-kafka-topic-acl-config name acl-id", - Short: "Delete a Kafka ACL entry", + Use: "enable-dbaas-mysql-writes name", + Short: "Temporarily enable writes for MySQL services in read-only mode due to filled up storage", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XDeleteDbaasKafkaTopicAclConfig(args[0], args[1], params) + _, decoded, err := XEnableDbaasMysqlWrites(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18709,14 +19681,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-kafka-connect-password service-name", - Short: "Reveal the secrets for DBaaS Kafka Connect", + Use: "start-dbaas-mysql-maintenance name", + Short: "Initiate MySQL maintenance update", 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 := XRevealDbaasKafkaConnectPassword(args[0], params) + _, decoded, err := XStartDbaasMysqlMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18744,18 +19720,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-kafka-user service-name", - Short: "Create a DBaaS Kafka user", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n username:\n $ref: '#/components/schemas/dbaas-user-username'\nrequired:\n- username\ntype: object\n"), + Use: "stop-dbaas-mysql-migration name", + Short: "Stop a DBaaS MySQL migration", + 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 := XCreateDbaasKafkaUser(args[0], params, body) + _, decoded, err := XStopDbaasMysqlMigration(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18783,14 +19759,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-kafka-user service-name username", - Short: "Delete a DBaaS kafka user", - Long: cli.Markdown(""), + Use: "create-dbaas-mysql-database service-name", + Short: "Create a DBaaS MySQL database", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\nrequired:\n- database-name\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XDeleteDbaasKafkaUser(args[0], args[1], params) + _, decoded, err := XCreateDbaasMysqlDatabase(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18818,18 +19798,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-dbaas-kafka-user-password service-name username", - Short: "Reset the credentials of a DBaaS Kafka user", - Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\ntype: object\n"), + Use: "delete-dbaas-mysql-database service-name database-name", + Short: "Delete a DBaaS MySQL database", + Long: cli.Markdown(""), 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 := XResetDbaasKafkaUserPassword(args[0], args[1], params, body) + _, decoded, err := XDeleteDbaasMysqlDatabase(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18857,14 +19833,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-kafka-user-password service-name username", - Short: "Reveal the secrets of a DBaaS Kafka user", - Long: cli.Markdown(""), + Use: "create-dbaas-mysql-user service-name", + Short: "Create a DBaaS MySQL user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n authentication:\n $ref: '#/components/schemas/enum-mysql-authentication-plugin'\n username:\n $ref: '#/components/schemas/dbaas-user-username'\nrequired:\n- username\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XRevealDbaasKafkaUserPassword(args[0], args[1], params) + _, decoded, err := XCreateDbaasMysqlUser(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18892,14 +19872,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-migration-status name", - Short: "Get a DBaaS migration status", - Long: cli.Markdown("Get a DBaaS migration status"), + Use: "delete-dbaas-mysql-user service-name username", + Short: "Delete a DBaaS MySQL user", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasMigrationStatus(args[0], params) + _, decoded, err := XDeleteDbaasMysqlUser(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18927,18 +19907,18 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "reset-dbaas-mysql-user-password service-name username", + Short: "Reset the credentials of a DBaaS mysql user", + Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n authentication:\n $ref: '#/components/schemas/enum-mysql-authentication-plugin'\n password:\n $ref: '#/components/schemas/dbaas-mysql-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[1:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasServiceMysql(args[0], params, body) + _, decoded, err := XResetDbaasMysqlUserPassword(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -18966,14 +19946,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service-mysql name", - Short: "Delete a MySQL service", + Use: "reveal-dbaas-mysql-user-password service-name username", + Short: "Reveal the secrets of a DBaaS MySQL user", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasServiceMysql(args[0], params) + _, decoded, err := XRevealDbaasMysqlUserPassword(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19001,14 +19981,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-mysql name", - Short: "Get a DBaaS MySQL service", - Long: cli.Markdown("Get a DBaaS MySQL service"), + 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"), 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 := XGetDbaasServiceMysql(args[0], params) + _, decoded, err := XCreateDbaasServiceOpensearch(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19036,18 +20020,14 @@ func xRegister(subcommand bool) { var examples string 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\ntype: object\n"), + Use: "delete-dbaas-service-opensearch name", + Short: "Delete a OpenSearch 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 := XUpdateDbaasServiceMysql(args[0], params, body) + _, decoded, err := XDeleteDbaasServiceOpensearch(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19075,18 +20055,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "enable-dbaas-mysql-writes name", - Short: "Temporarily enable writes for MySQL services in read-only mode due to filled up storage", - Long: cli.Markdown(""), + Use: "get-dbaas-service-opensearch name", + Short: "Get a DBaaS OpenSearch service", + Long: cli.Markdown("Get a DBaaS OpenSearch service"), 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") - } + Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XEnableDbaasMysqlWrites(args[0], params, body) + _, decoded, err := XGetDbaasServiceOpensearch(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19114,18 +20090,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-dbaas-mysql-maintenance name", - Short: "Initiate MySQL maintenance update", - Long: cli.Markdown(""), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XStartDbaasMysqlMaintenance(args[0], params, body) + _, decoded, err := XUpdateDbaasServiceOpensearch(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19153,18 +20129,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "stop-dbaas-mysql-migration name", - Short: "Stop a DBaaS MySQL migration", + Use: "get-dbaas-opensearch-acl-config name", + Short: "Get DBaaS OpenSearch ACL configuration", 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 := XStopDbaasMysqlMigration(args[0], params, body) + _, decoded, err := XGetDbaasOpensearchAclConfig(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19192,9 +20164,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-mysql-database service-name", - Short: "Create a DBaaS MySQL database", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\nrequired:\n- database-name\ntype: object\n"), + Use: "update-dbaas-opensearch-acl-config name", + Short: "Create a DBaaS OpenSearch ACL configuration", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n acl-enabled:\n description: Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access.\n type: boolean\n acls:\n description: List of OpenSearch ACLs\n items:\n properties:\n rules:\n items:\n properties:\n index:\n description: OpenSearch index pattern\n maxLength: 249\n type: string\n permission:\n $ref: '#/components/schemas/enum-opensearch-rule-permission'\n required:\n - index\n type: object\n type: array\n username:\n $ref: '#/components/schemas/dbaas-user-username'\n type: object\n type: array\n extended-acl-enabled:\n description: Enable to enforce index rules in a limited fashion for requests that use the _mget, _msearch, and _bulk APIs\n type: boolean\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -19203,7 +20175,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasMysqlDatabase(args[0], params, body) + _, decoded, err := XUpdateDbaasOpensearchAclConfig(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19231,14 +20203,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-mysql-database service-name database-name", - Short: "Delete a DBaaS MySQL database", + Use: "start-dbaas-opensearch-maintenance name", + Short: "Initiate OpenSearch maintenance update", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XDeleteDbaasMysqlDatabase(args[0], args[1], params) + _, decoded, err := XStartDbaasOpensearchMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19266,9 +20242,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-mysql-user service-name", - Short: "Create a DBaaS MySQL user", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n authentication:\n $ref: '#/components/schemas/enum-mysql-authentication-plugin'\n username:\n $ref: '#/components/schemas/dbaas-user-username'\nrequired:\n- username\ntype: object\n"), + Use: "create-dbaas-opensearch-user service-name", + Short: "Create a DBaaS OpenSearch user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\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) { @@ -19277,7 +20253,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasMysqlUser(args[0], params, body) + _, decoded, err := XCreateDbaasOpensearchUser(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19305,14 +20281,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-mysql-user service-name username", - Short: "Delete a DBaaS MySQL user", + Use: "delete-dbaas-opensearch-user service-name username", + Short: "Delete a DBaaS OpenSearch user", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasMysqlUser(args[0], args[1], params) + _, decoded, err := XDeleteDbaasOpensearchUser(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19340,9 +20316,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-dbaas-mysql-user-password service-name username", - Short: "Reset the credentials of a DBaaS mysql user", - Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n authentication:\n $ref: '#/components/schemas/enum-mysql-authentication-plugin'\n password:\n $ref: '#/components/schemas/dbaas-mysql-user-password'\ntype: object\n"), + Use: "reset-dbaas-opensearch-user-password service-name username", + Short: "Reset the credentials of a DBaaS OpenSearch user", + Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { @@ -19351,7 +20327,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XResetDbaasMysqlUserPassword(args[0], args[1], params, body) + _, decoded, err := XResetDbaasOpensearchUserPassword(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19379,14 +20355,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-mysql-user-password service-name username", - Short: "Reveal the secrets of a DBaaS MySQL user", + Use: "reveal-dbaas-opensearch-user-password service-name username", + Short: "Reveal the secrets of a DBaaS OpenSearch user", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealDbaasMysqlUserPassword(args[0], args[1], params) + _, decoded, err := XRevealDbaasOpensearchUserPassword(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19414,9 +20390,9 @@ func xRegister(subcommand bool) { var examples string 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"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -19425,7 +20401,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasServiceOpensearch(args[0], params, body) + _, decoded, err := XCreateDbaasServicePg(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19453,14 +20429,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service-opensearch name", - Short: "Delete a OpenSearch service", + Use: "delete-dbaas-service-pg name", + Short: "Delete a Postgres service", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasServiceOpensearch(args[0], params) + _, decoded, err := XDeleteDbaasServicePg(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19488,14 +20464,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-opensearch name", - Short: "Get a DBaaS OpenSearch service", - Long: cli.Markdown("Get a DBaaS OpenSearch service"), + Use: "get-dbaas-service-pg name", + Short: "Get a DBaaS PostgreSQL service", + Long: cli.Markdown("Get a DBaaS PostgreSQL service"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasServiceOpensearch(args[0], params) + _, decoded, err := XGetDbaasServicePg(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19523,9 +20499,9 @@ func xRegister(subcommand bool) { var examples string 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"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -19534,7 +20510,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateDbaasServiceOpensearch(args[0], params, body) + _, decoded, err := XUpdateDbaasServicePg(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19562,14 +20538,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-opensearch-acl-config name", - Short: "Get DBaaS OpenSearch ACL configuration", + Use: "start-dbaas-pg-maintenance name", + Short: "Initiate PostgreSQL maintenance update", 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 := XGetDbaasOpensearchAclConfig(args[0], params) + _, decoded, err := XStartDbaasPgMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19597,18 +20577,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-opensearch-acl-config name", - Short: "Create a DBaaS OpenSearch ACL configuration", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n acl-enabled:\n description: Enable OpenSearch ACLs. When disabled authenticated service users have unrestricted access.\n type: boolean\n acls:\n description: List of OpenSearch ACLs\n items:\n properties:\n rules:\n items:\n properties:\n index:\n description: OpenSearch index pattern\n maxLength: 249\n type: string\n permission:\n $ref: '#/components/schemas/enum-opensearch-rule-permission'\n required:\n - index\n type: object\n type: array\n username:\n $ref: '#/components/schemas/dbaas-user-username'\n type: object\n type: array\n extended-acl-enabled:\n description: Enable to enforce index rules in a limited fashion for requests that use the _mget, _msearch, and _bulk APIs\n type: boolean\ntype: object\n"), + Use: "stop-dbaas-pg-migration name", + Short: "Stop a DBaaS PostgreSQL migration", + 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 := XUpdateDbaasOpensearchAclConfig(args[0], params, body) + _, decoded, err := XStopDbaasPgMigration(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19636,18 +20616,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-dbaas-opensearch-maintenance name", - Short: "Initiate OpenSearch maintenance update", - Long: cli.Markdown(""), + Use: "create-dbaas-pg-connection-pool service-name", + Short: "Create a DBaaS PostgreSQL connection pool", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\n mode:\n $ref: '#/components/schemas/enum-pg-pool-mode'\n name:\n $ref: '#/components/schemas/dbaas-pg-pool-name'\n size:\n $ref: '#/components/schemas/dbaas-pg-pool-size'\n username:\n $ref: '#/components/schemas/dbaas-pg-pool-username'\nrequired:\n- name\n- database-name\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XStartDbaasOpensearchMaintenance(args[0], params, body) + _, decoded, err := XCreateDbaasPgConnectionPool(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19675,18 +20655,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-opensearch-user service-name", - Short: "Create a DBaaS OpenSearch user", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n username:\n $ref: '#/components/schemas/dbaas-user-username'\nrequired:\n- username\ntype: object\n"), + Use: "delete-dbaas-pg-connection-pool service-name connection-pool-name", + Short: "Delete a DBaaS PostgreSQL connection pool", + 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 := XCreateDbaasOpensearchUser(args[0], params, body) + _, decoded, err := XDeleteDbaasPgConnectionPool(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19714,14 +20690,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-opensearch-user service-name username", - Short: "Delete a DBaaS OpenSearch user", - Long: cli.Markdown(""), + Use: "update-dbaas-pg-connection-pool service-name connection-pool-name", + Short: "Update a DBaaS PostgreSQL connection pool", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\n mode:\n $ref: '#/components/schemas/enum-pg-pool-mode'\n size:\n $ref: '#/components/schemas/dbaas-pg-pool-size'\n username:\n $ref: '#/components/schemas/dbaas-pg-pool-username'\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 := XDeleteDbaasOpensearchUser(args[0], args[1], params) + _, decoded, err := XUpdateDbaasPgConnectionPool(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19749,18 +20729,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-dbaas-opensearch-user-password service-name username", - Short: "Reset the credentials of a DBaaS OpenSearch user", - Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\ntype: object\n"), + Use: "create-dbaas-pg-database service-name", + Short: "Create a DBaaS Postgres database", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\n lc-collate:\n description: Default string sort order (LC_COLLATE) for PostgreSQL database\n maxLength: 128\n type: string\n lc-ctype:\n description: Default character classification (LC_CTYPE) for PostgreSQL database\n maxLength: 128\n type: string\nrequired:\n- database-name\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[2:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XResetDbaasOpensearchUserPassword(args[0], args[1], params, body) + _, decoded, err := XCreateDbaasPgDatabase(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19788,14 +20768,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-opensearch-user-password service-name username", - Short: "Reveal the secrets of a DBaaS OpenSearch user", + Use: "delete-dbaas-pg-database service-name database-name", + Short: "Delete a DBaaS Postgres database", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealDbaasOpensearchUserPassword(args[0], args[1], params) + _, decoded, err := XDeleteDbaasPgDatabase(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19823,9 +20803,9 @@ func xRegister(subcommand bool) { var examples string 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 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"), + Use: "create-dbaas-postgres-user service-name", + Short: "Create a DBaaS Postgres user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n allow-replication:\n type: boolean\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) { @@ -19834,7 +20814,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasServicePg(args[0], params, body) + _, decoded, err := XCreateDbaasPostgresUser(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19862,14 +20842,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service-pg name", - Short: "Delete a Postgres service", + Use: "delete-dbaas-postgres-user service-name username", + Short: "Delete a DBaaS Postgres user", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasServicePg(args[0], params) + _, decoded, err := XDeleteDbaasPostgresUser(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19897,14 +20877,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-pg name", - Short: "Get a DBaaS PostgreSQL service", - Long: cli.Markdown("Get a DBaaS PostgreSQL service"), + Use: "update-dbaas-postgres-allow-replication service-name username", + Short: "Update access control for one service user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n allow-replication:\n type: boolean\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 := XGetDbaasServicePg(args[0], params) + _, decoded, err := XUpdateDbaasPostgresAllowReplication(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19932,18 +20916,18 @@ func xRegister(subcommand bool) { var examples string 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 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"), + Use: "reset-dbaas-postgres-user-password service-name username", + Short: "Reset the credentials of a DBaaS Postgres user", + Long: cli.Markdown("If no password is provided one will be generated automatically.\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[1:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateDbaasServicePg(args[0], params, body) + _, decoded, err := XResetDbaasPostgresUserPassword(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -19971,18 +20955,53 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-dbaas-pg-maintenance name", - Short: "Initiate PostgreSQL maintenance update", + Use: "reveal-dbaas-postgres-user-password service-name username", + Short: "Reveal the secrets of a DBaaS Postgres user", Long: cli.Markdown(""), Example: examples, + Args: cobra.MinimumNArgs(2), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XRevealDbaasPostgresUserPassword(args[0], args[1], 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: "create-dbaas-pg-upgrade-check service", + Short: "create-dbaas-pg-upgrade-check", + Long: cli.Markdown("Check whether you can upgrade Postgres service to a newer version\n## Request Schema (application/json)\n\nproperties:\n target-version:\n $ref: '#/components/schemas/dbaas-pg-target-versions'\nrequired:\n- target-version\ntype: object\n"), + Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XStartDbaasPgMaintenance(args[0], params, body) + _, decoded, err := XCreateDbaasPgUpgradeCheck(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20010,18 +21029,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "stop-dbaas-pg-migration name", - Short: "Stop a DBaaS PostgreSQL migration", - Long: cli.Markdown(""), + Use: "list-dbaas-services", + Short: "List DBaaS services", + Long: cli.Markdown("List DBaaS services"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), 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 := XStopDbaasPgMigration(args[0], params, body) + _, decoded, err := XListDbaasServices(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20049,9 +21064,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-pg-connection-pool service-name", - Short: "Create a DBaaS PostgreSQL connection pool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\n mode:\n $ref: '#/components/schemas/enum-pg-pool-mode'\n name:\n $ref: '#/components/schemas/dbaas-pg-pool-name'\n size:\n $ref: '#/components/schemas/dbaas-pg-pool-size'\n username:\n $ref: '#/components/schemas/dbaas-pg-pool-username'\nrequired:\n- name\n- database-name\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -20060,7 +21075,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasPgConnectionPool(args[0], params, body) + _, decoded, err := XGetDbaasServiceLogs(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20088,14 +21103,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-pg-connection-pool service-name connection-pool-name", - Short: "Delete a DBaaS PostgreSQL connection pool", - Long: cli.Markdown(""), + Use: "get-dbaas-service-metrics service-name", + Short: "Get metrics of DBaaS service", + Long: cli.Markdown("Get metrics of DBaaS service\n## Request Schema (application/json)\n\nproperties:\n period:\n description: 'Metrics time period (default: hour)'\n enum:\n - hour\n - week\n - year\n - month\n - day\n type: string\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XDeleteDbaasPgConnectionPool(args[0], args[1], params) + _, decoded, err := XGetDbaasServiceMetrics(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20123,18 +21142,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-pg-connection-pool service-name connection-pool-name", - Short: "Update a DBaaS PostgreSQL connection pool", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\n mode:\n $ref: '#/components/schemas/enum-pg-pool-mode'\n size:\n $ref: '#/components/schemas/dbaas-pg-pool-size'\n username:\n $ref: '#/components/schemas/dbaas-pg-pool-username'\ntype: object\n"), + Use: "list-dbaas-service-types", + Short: "DBaaS Service Types", + Long: cli.Markdown("List available service types for DBaaS"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(0), 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 := XUpdateDbaasPgConnectionPool(args[0], args[1], params, body) + _, decoded, err := XListDbaasServiceTypes(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20162,18 +21177,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-pg-database service-name", - Short: "Create a DBaaS Postgres database", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n database-name:\n $ref: '#/components/schemas/dbaas-database-name'\n lc-collate:\n description: Default string sort order (LC_COLLATE) for PostgreSQL database\n maxLength: 128\n type: string\n lc-ctype:\n description: Default character classification (LC_CTYPE) for PostgreSQL database\n maxLength: 128\n type: string\nrequired:\n- database-name\ntype: object\n"), + Use: "get-dbaas-service-type service-type-name", + Short: "Get a DBaaS service type", + Long: cli.Markdown("Get a DBaaS service type"), 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 := XCreateDbaasPgDatabase(args[0], params, body) + _, decoded, err := XGetDbaasServiceType(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20201,14 +21212,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-pg-database service-name database-name", - Short: "Delete a DBaaS Postgres database", - Long: cli.Markdown(""), + Use: "delete-dbaas-service name", + Short: "Delete a DBaaS service", + Long: cli.Markdown("Delete a DBaaS service"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasPgDatabase(args[0], args[1], params) + _, decoded, err := XDeleteDbaasService(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20236,18 +21247,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-postgres-user service-name", - Short: "Create a DBaaS Postgres user", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n allow-replication:\n type: boolean\n username:\n $ref: '#/components/schemas/dbaas-user-username'\nrequired:\n- username\ntype: object\n"), + Use: "get-dbaas-settings-grafana", + Short: "Get DBaaS Grafana settings", + Long: cli.Markdown("Get DBaaS Grafana settings"), 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:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XCreateDbaasPostgresUser(args[0], params, body) + _, decoded, err := XGetDbaasSettingsGrafana(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20275,14 +21282,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-postgres-user service-name username", - Short: "Delete a DBaaS Postgres user", - Long: cli.Markdown(""), + Use: "get-dbaas-settings-kafka", + Short: "Get DBaaS Kafka settings", + Long: cli.Markdown("Get DBaaS Kafka settings"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasPostgresUser(args[0], args[1], params) + _, decoded, err := XGetDbaasSettingsKafka(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20310,18 +21317,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-postgres-allow-replication service-name username", - Short: "Update access control for one service user", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n allow-replication:\n type: boolean\ntype: object\n"), + Use: "get-dbaas-settings-mysql", + Short: "Get DBaaS MySQL settings", + Long: cli.Markdown("Get DBaaS MySQL settings"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(0), 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 := XUpdateDbaasPostgresAllowReplication(args[0], args[1], params, body) + _, decoded, err := XGetDbaasSettingsMysql(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20349,18 +21352,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-dbaas-postgres-user-password service-name username", - Short: "Reset the credentials of a DBaaS Postgres user", - Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\ntype: object\n"), + Use: "get-dbaas-settings-opensearch", + Short: "Get DBaaS OpenSearch settings", + Long: cli.Markdown("Get DBaaS OpenSearch settings"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(0), 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 := XResetDbaasPostgresUserPassword(args[0], args[1], params, body) + _, decoded, err := XGetDbaasSettingsOpensearch(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20388,14 +21387,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-postgres-user-password service-name username", - Short: "Reveal the secrets of a DBaaS Postgres user", - Long: cli.Markdown(""), + Use: "get-dbaas-settings-pg", + Short: "Get DBaaS PostgreSQL settings", + Long: cli.Markdown("Get DBaaS PostgreSQL settings"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealDbaasPostgresUserPassword(args[0], args[1], params) + _, decoded, err := XGetDbaasSettingsPg(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20423,18 +21422,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-pg-upgrade-check service", - Short: "create-dbaas-pg-upgrade-check", - Long: cli.Markdown("Check whether you can upgrade Postgres service to a newer version\n## Request Schema (application/json)\n\nproperties:\n target-version:\n $ref: '#/components/schemas/dbaas-pg-target-versions'\nrequired:\n- target-version\ntype: object\n"), + Use: "get-dbaas-settings-thanos", + Short: "Get DBaaS Thanos settings", + Long: cli.Markdown("Get DBaaS Thanos settings"), 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:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XCreateDbaasPgUpgradeCheck(args[0], params, body) + _, decoded, err := XGetDbaasSettingsThanos(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20462,14 +21457,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-services", - Short: "List DBaaS services", - Long: cli.Markdown("List DBaaS services"), + Use: "get-dbaas-settings-valkey", + Short: "Get DBaaS Valkey settings", + Long: cli.Markdown("Returns the default settings for Valkey."), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDbaasServices(params) + _, decoded, err := XGetDbaasSettingsValkey(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20497,9 +21492,9 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "create-dbaas-task-migration-check service", + Short: "create-dbaas-task-migration-check", + Long: cli.Markdown("Create a DBaaS task to check migration\n## Request Schema (application/json)\n\nproperties:\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 source-service-uri:\n description: Service URI of the source MySQL or PostgreSQL database with admin credentials.\n maxLength: 512\n minLength: 1\n type: string\nrequired:\n- source-service-uri\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -20508,7 +21503,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XGetDbaasServiceLogs(args[0], params, body) + _, decoded, err := XCreateDbaasTaskMigrationCheck(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20536,18 +21531,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-metrics service-name", - Short: "Get metrics of DBaaS service", - Long: cli.Markdown("Get metrics of DBaaS service\n## Request Schema (application/json)\n\nproperties:\n period:\n description: 'Metrics time period (default: hour)'\n enum:\n - hour\n - week\n - year\n - month\n - day\n type: string\ntype: object\n"), + Use: "get-dbaas-task service id", + Short: "Get a DBaaS task", + Long: cli.Markdown("Get a DBaaS task"), 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 := XGetDbaasServiceMetrics(args[0], params, body) + _, decoded, err := XGetDbaasTask(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20575,14 +21566,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-service-types", - Short: "DBaaS Service Types", - Long: cli.Markdown("List available service types for DBaaS"), + Use: "create-dbaas-service-thanos name", + Short: "Create a DBaaS Thanos service", + Long: cli.Markdown("Create a DBaaS Thanos service\n## Request Schema (application/json)\n\nproperties:\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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 thanos-settings:\n $ref: '#/components/schemas/json-schema-thanos'\nrequired:\n- plan\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 := XListDbaasServiceTypes(params) + _, decoded, err := XCreateDbaasServiceThanos(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20610,14 +21605,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-type service-type-name", - Short: "Get a DBaaS service type", - Long: cli.Markdown("Get a DBaaS service type"), + Use: "delete-dbaas-service-thanos name", + Short: "Delete a Thanos service", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasServiceType(args[0], params) + _, decoded, err := XDeleteDbaasServiceThanos(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20645,14 +21640,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service name", - Short: "Delete a DBaaS service", - Long: cli.Markdown("Delete a DBaaS service"), + Use: "get-dbaas-service-thanos name", + Short: "get-dbaas-service-thanos", + Long: cli.Markdown("Get a DBaaS Thanos service"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasService(args[0], params) + _, decoded, err := XGetDbaasServiceThanos(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20680,14 +21675,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-settings-grafana", - Short: "Get DBaaS Grafana settings", - Long: cli.Markdown("Get DBaaS Grafana settings"), + Use: "update-dbaas-service-thanos name", + Short: "update-dbaas-service-thanos", + Long: cli.Markdown("Update a DBaaS Thanos service\n## Request Schema (application/json)\n\nproperties:\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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 thanos-settings:\n $ref: '#/components/schemas/json-schema-thanos'\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 := XGetDbaasSettingsGrafana(params) + _, decoded, err := XUpdateDbaasServiceThanos(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20715,14 +21714,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-settings-kafka", - Short: "Get DBaaS Kafka settings", - Long: cli.Markdown("Get DBaaS Kafka settings"), + Use: "start-dbaas-thanos-maintenance name", + Short: "Initiate Thanos maintenance update", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + 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 := XGetDbaasSettingsKafka(params) + _, decoded, err := XStartDbaasThanosMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20750,14 +21753,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-settings-mysql", - Short: "Get DBaaS MySQL settings", - Long: cli.Markdown("Get DBaaS MySQL settings"), + Use: "reveal-dbaas-thanos-user-password service-name username", + Short: "Reveal the secrets of a DBaaS Thanos user", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasSettingsMysql(params) + _, decoded, err := XRevealDbaasThanosUserPassword(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20785,14 +21788,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-settings-opensearch", - Short: "Get DBaaS OpenSearch settings", - Long: cli.Markdown("Get DBaaS OpenSearch settings"), + 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"), 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 := XGetDbaasSettingsOpensearch(params) + _, decoded, err := XCreateDbaasServiceValkey(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20820,14 +21827,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-settings-pg", - Short: "Get DBaaS PostgreSQL settings", - Long: cli.Markdown("Get DBaaS PostgreSQL settings"), + Use: "delete-dbaas-service-valkey name", + Short: "Delete a Valkey service", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasSettingsPg(params) + _, decoded, err := XDeleteDbaasServiceValkey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20855,14 +21862,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-settings-thanos", - Short: "Get DBaaS Thanos settings", - Long: cli.Markdown("Get DBaaS Thanos settings"), + Use: "get-dbaas-service-valkey name", + Short: "get-dbaas-service-valkey", + Long: cli.Markdown("Get a DBaaS Valkey service"), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasSettingsThanos(params) + _, decoded, err := XGetDbaasServiceValkey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20890,14 +21897,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-settings-valkey", - Short: "Get DBaaS Valkey settings", - Long: cli.Markdown("Returns the default settings for Valkey."), + 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"), 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 := XGetDbaasSettingsValkey(params) + _, decoded, err := XUpdateDbaasServiceValkey(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20925,18 +21936,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-task-migration-check service", - Short: "create-dbaas-task-migration-check", - Long: cli.Markdown("Create a DBaaS task to check migration\n## Request Schema (application/json)\n\nproperties:\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 source-service-uri:\n description: Service URI of the source MySQL or PostgreSQL database with admin credentials.\n maxLength: 512\n minLength: 1\n type: string\nrequired:\n- source-service-uri\ntype: object\n"), + Use: "start-dbaas-valkey-maintenance name", + Short: "Initiate Valkey 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 := XCreateDbaasTaskMigrationCheck(args[0], params, body) + _, decoded, err := XStartDbaasValkeyMaintenance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20964,14 +21975,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-task service id", - Short: "Get a DBaaS task", - Long: cli.Markdown("Get a DBaaS task"), + Use: "stop-dbaas-valkey-migration name", + Short: "Stop a DBaaS Valkey migration", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XGetDbaasTask(args[0], args[1], params) + _, decoded, err := XStopDbaasValkeyMigration(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -20999,9 +22014,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-service-thanos name", - Short: "Create a DBaaS Thanos service", - Long: cli.Markdown("Create a DBaaS Thanos service\n## Request Schema (application/json)\n\nproperties:\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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 thanos-settings:\n $ref: '#/components/schemas/json-schema-thanos'\nrequired:\n- plan\ntype: object\n"), + Use: "create-dbaas-valkey-user service-name", + Short: "Create a DBaaS Valkey user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n access-control:\n $ref: '#/components/schemas/dbaas-valkey-user-access-control'\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) { @@ -21010,7 +22025,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDbaasServiceThanos(args[0], params, body) + _, decoded, err := XCreateDbaasValkeyUser(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21038,14 +22053,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service-thanos name", - Short: "Delete a Thanos service", + Use: "list-dbaas-valkey-users service-name", + Short: "List DBaaS Valkey users with ACL configuration", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasServiceThanos(args[0], params) + _, decoded, err := XListDbaasValkeyUsers(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21073,14 +22088,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-thanos name", - Short: "get-dbaas-service-thanos", - Long: cli.Markdown("Get a DBaaS Thanos service"), + Use: "delete-dbaas-valkey-user service-name username", + Short: "Delete a DBaaS Valkey user", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDbaasServiceThanos(args[0], params) + _, decoded, err := XDeleteDbaasValkeyUser(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21108,18 +22123,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-service-thanos name", - Short: "update-dbaas-service-thanos", - Long: cli.Markdown("Update a DBaaS Thanos service\n## Request Schema (application/json)\n\nproperties:\n ip-filter:\n description: Allowed CIDR address blocks for incoming connections\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 thanos-settings:\n $ref: '#/components/schemas/json-schema-thanos'\ntype: object\n"), + Use: "update-dbaas-valkey-user-access-control service-name username", + Short: "Update access control for one DBaaS Valkey service user", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n access-control:\n $ref: '#/components/schemas/dbaas-valkey-user-access-control'\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[1:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateDbaasServiceThanos(args[0], params, body) + _, decoded, err := XUpdateDbaasValkeyUserAccessControl(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21147,18 +22162,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-dbaas-thanos-maintenance name", - Short: "Initiate Thanos maintenance update", - Long: cli.Markdown(""), + Use: "reset-dbaas-valkey-user-password service-name username", + Short: "Reset the credentials of a DBaaS Valkey user", + Long: cli.Markdown("If no password is provided one will be generated automatically.\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("", args[1:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XStartDbaasThanosMaintenance(args[0], params, body) + _, decoded, err := XResetDbaasValkeyUserPassword(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21186,14 +22201,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-thanos-user-password service-name username", - Short: "Reveal the secrets of a DBaaS Thanos user", + Use: "reveal-dbaas-valkey-user-password service-name username", + Short: "Reveal the secrets of a DBaaS Valkey user", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealDbaasThanosUserPassword(args[0], args[1], params) + _, decoded, err := XRevealDbaasValkeyUserPassword(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21221,18 +22236,14 @@ func xRegister(subcommand bool) { var examples string 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'\nrequired:\n- plan\ntype: object\n"), + Use: "list-deploy-targets", + Short: "List Deploy Targets", + Long: cli.Markdown(""), 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:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XCreateDbaasServiceValkey(args[0], params, body) + _, decoded, err := XListDeployTargets(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21260,14 +22271,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-service-valkey name", - Short: "Delete a Valkey service", + Use: "get-deploy-target id", + Short: "Retrieve Deploy Target details", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDbaasServiceValkey(args[0], params) + _, decoded, err := XGetDeployTarget(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21295,14 +22306,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dbaas-service-valkey name", - Short: "get-dbaas-service-valkey", - Long: cli.Markdown("Get a DBaaS Valkey service"), + Use: "create-dns-domain", + Short: "Create DNS domain", + Long: cli.Markdown("\n## Request Schema (application/json)\n\ndescription: DNS Domain\nproperties:\n unicode-name:\n description: Domain name\n type: string\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 := XGetDbaasServiceValkey(args[0], params) + _, decoded, err := XCreateDnsDomain(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21330,18 +22345,14 @@ func xRegister(subcommand bool) { var examples string 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'\ntype: object\n"), + Use: "list-dns-domains", + Short: "List DNS domains", + Long: cli.Markdown(""), 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:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XUpdateDbaasServiceValkey(args[0], params, body) + _, decoded, err := XListDnsDomains(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21369,18 +22380,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-dbaas-valkey-maintenance name", - Short: "Initiate Valkey maintenance update", - Long: cli.Markdown(""), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XStartDbaasValkeyMaintenance(args[0], params, body) + _, decoded, err := XCreateDnsDomainRecord(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21408,18 +22419,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "stop-dbaas-valkey-migration name", - Short: "Stop a DBaaS Valkey migration", + Use: "list-dns-domain-records domain-id", + Short: "List DNS domain records", 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 := XStopDbaasValkeyMigration(args[0], params, body) + _, decoded, err := XListDnsDomainRecords(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21447,18 +22454,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dbaas-valkey-user service-name", - Short: "Create a DBaaS Valkey user", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n access-control:\n $ref: '#/components/schemas/dbaas-valkey-user-access-control'\n username:\n $ref: '#/components/schemas/dbaas-user-username'\nrequired:\n- username\ntype: object\n"), + Use: "delete-dns-domain-record domain-id record-id", + Short: "Delete DNS domain record", + 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 := XCreateDbaasValkeyUser(args[0], params, body) + _, decoded, err := XDeleteDnsDomainRecord(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21486,14 +22489,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dbaas-valkey-users service-name", - Short: "List DBaaS Valkey users with ACL configuration", + Use: "get-dns-domain-record domain-id record-id", + Short: "Retrieve DNS domain record details", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDbaasValkeyUsers(args[0], params) + _, decoded, err := XGetDnsDomainRecord(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21521,14 +22524,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dbaas-valkey-user service-name username", - Short: "Delete a DBaaS Valkey user", - Long: cli.Markdown(""), + Use: "update-dns-domain-record domain-id record-id", + Short: "Update 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: true\n format: int64\n minimum: 0\n type: integer\n ttl:\n description: DNS domain record TTL\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\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 := XDeleteDbaasValkeyUser(args[0], args[1], params) + _, decoded, err := XUpdateDnsDomainRecord(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21556,18 +22563,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dbaas-valkey-user-access-control service-name username", - Short: "Update access control for one DBaaS Valkey service user", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n access-control:\n $ref: '#/components/schemas/dbaas-valkey-user-access-control'\ntype: object\n"), + Use: "delete-dns-domain id", + Short: "Delete DNS Domain", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), 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 := XUpdateDbaasValkeyUserAccessControl(args[0], args[1], params, body) + _, decoded, err := XDeleteDnsDomain(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21595,18 +22598,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-dbaas-valkey-user-password service-name username", - Short: "Reset the credentials of a DBaaS Valkey user", - Long: cli.Markdown("If no password is provided one will be generated automatically.\n## Request Schema (application/json)\n\nproperties:\n password:\n $ref: '#/components/schemas/dbaas-user-password'\ntype: object\n"), + Use: "get-dns-domain id", + Short: "Retrieve DNS domain details", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), 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 := XResetDbaasValkeyUserPassword(args[0], args[1], params, body) + _, decoded, err := XGetDnsDomain(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21634,14 +22633,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-dbaas-valkey-user-password service-name username", - Short: "Reveal the secrets of a DBaaS Valkey user", + Use: "get-dns-domain-zone-file id", + Short: "Retrieve DNS domain zone file", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XRevealDbaasValkeyUserPassword(args[0], args[1], params) + _, decoded, err := XGetDnsDomainZoneFile(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21669,14 +22668,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-deploy-targets", - Short: "List Deploy Targets", - Long: cli.Markdown(""), + Use: "create-elastic-ip", + Short: "Create an Elastic IP", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addressfamily:\n description: 'Elastic IP address family (default: :inet4)'\n enum:\n - inet4\n - inet6\n type: string\n description:\n description: Elastic IP description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/elastic-ip-healthcheck'\n labels:\n $ref: '#/components/schemas/labels'\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 := XListDeployTargets(params) + _, decoded, err := XCreateElasticIp(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21704,14 +22707,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-deploy-target id", - Short: "Retrieve Deploy Target details", + Use: "list-elastic-ips", + Short: "List Elastic IPs", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDeployTarget(args[0], params) + _, decoded, err := XListElasticIps(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21739,18 +22742,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-dns-domain", - Short: "Create DNS domain", - Long: cli.Markdown("\n## Request Schema (application/json)\n\ndescription: DNS Domain\nproperties:\n unicode-name:\n description: Domain name\n type: string\ntype: object\n"), + Use: "delete-elastic-ip id", + Short: "Delete an Elastic IP", + 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 := XCreateDnsDomain(params, body) + _, decoded, err := XDeleteElasticIp(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21778,14 +22777,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dns-domains", - Short: "List DNS domains", + Use: "get-elastic-ip id", + Short: "Retrieve Elastic IP details", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDnsDomains(params) + _, decoded, err := XGetElasticIp(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21813,9 +22812,9 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "update-elastic-ip id", + Short: "Update an Elastic IP", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Elastic IP description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/elastic-ip-healthcheck'\n labels:\n $ref: '#/components/schemas/labels'\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -21824,7 +22823,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateDnsDomainRecord(args[0], params, body) + _, decoded, err := XUpdateElasticIp(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21852,14 +22851,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-dns-domain-records domain-id", - Short: "List DNS domain records", + Use: "reset-elastic-ip-field id field", + Short: "Reset an Elastic IP field to its default value", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListDnsDomainRecords(args[0], params) + _, decoded, err := XResetElasticIpField(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21887,14 +22886,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dns-domain-record domain-id record-id", - Short: "Delete DNS domain record", - Long: cli.Markdown(""), + Use: "attach-instance-to-elastic-ip id", + Short: "Attach a Compute instance to an Elastic IP", + 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), + 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 := XDeleteDnsDomainRecord(args[0], args[1], params) + _, decoded, err := XAttachInstanceToElasticIp(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21922,14 +22925,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dns-domain-record domain-id record-id", - Short: "Retrieve DNS domain record details", - Long: cli.Markdown(""), + Use: "detach-instance-from-elastic-ip id", + Short: "Detach a Compute instance from an Elastic IP", + 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), + 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 := XGetDnsDomainRecord(args[0], args[1], params) + _, decoded, err := XDetachInstanceFromElasticIp(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21957,18 +22964,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-dns-domain-record domain-id record-id", - Short: "Update 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: true\n format: int64\n minimum: 0\n type: integer\n ttl:\n description: DNS domain record TTL\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\ntype: object\n"), + Use: "get-env-impact period", + Short: "[BETA] Retrieve organization environmental impact reports", + Long: cli.Markdown("[BETA] Returns environmental impact reports for an organization"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), 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 := XUpdateDnsDomainRecord(args[0], args[1], params, body) + _, decoded, err := XGetEnvImpact(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -21996,14 +22999,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-dns-domain id", - Short: "Delete DNS Domain", - Long: cli.Markdown(""), + Use: "list-events", + Short: "List Events", + Long: cli.Markdown("Retrieve Mutation Events for a given date range. Defaults to retrieving Events for the past 24 hours.\n Both a `from` and `to` arguments can be specified to filter Events over a specific period.\n Events will be the the most descriptive possible but not all fields are mandatory"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteDnsDomain(args[0], params) + _, decoded, err := XListEvents(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22017,6 +23020,9 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("from", "", "") + cmd.Flags().String("to", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -22031,14 +23037,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dns-domain id", - Short: "Retrieve DNS domain details", + Use: "get-iam-organization-policy", + Short: "Retrieve IAM Organization Policy", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetDnsDomain(args[0], params) + _, decoded, err := XGetIamOrganizationPolicy(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22066,14 +23072,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-dns-domain-zone-file id", - Short: "Retrieve DNS domain zone file", - Long: cli.Markdown(""), + Use: "update-iam-organization-policy", + Short: "Update IAM Organization Policy", + Long: cli.Markdown("\n## Request Schema (application/json)\n\ndescription: Policy\nproperties:\n default-service-strategy:\n description: IAM default service strategy\n enum:\n - allow\n - deny\n type: string\n services:\n additionalProperties:\n $ref: '#/components/schemas/iam-service-policy'\n description: IAM services\n type: object\nrequired:\n- default-service-strategy\n- services\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 := XGetDnsDomainZoneFile(args[0], params) + _, decoded, err := XUpdateIamOrganizationPolicy(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22101,18 +23111,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-elastic-ip", - Short: "Create an Elastic IP", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addressfamily:\n description: 'Elastic IP address family (default: :inet4)'\n enum:\n - inet4\n - inet6\n type: string\n description:\n description: Elastic IP description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/elastic-ip-healthcheck'\n labels:\n $ref: '#/components/schemas/labels'\ntype: object\n"), + Use: "reset-iam-organization-policy", + Short: "Reset IAM Organization Policy", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) + body, err := cli.GetBody("", args[0:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateElasticIp(params, body) + _, decoded, err := XResetIamOrganizationPolicy(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22140,14 +23150,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-elastic-ips", - Short: "List Elastic IPs", - Long: cli.Markdown(""), + Use: "create-iam-role", + Short: "Create IAM Role", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n assume-role-policy:\n $ref: '#/components/schemas/iam-assume-role-policy'\n description:\n description: IAM Role description\n maxLength: 255\n minLength: 1\n type: string\n editable:\n description: 'Sets if the IAM Role Policy is editable or not (default: true). This setting cannot be changed after creation'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n max-session-ttl:\n description: Maximum TTL requester is allowed to ask for when assuming a role\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n name:\n description: IAM Role name\n maxLength: 191\n minLength: 1\n type: string\n permissions:\n description: IAM Role permissions\n items:\n enum:\n - bypass-governance-retention\n - reset-iam-organization-policy\n type: string\n type: array\n uniqueItems: true\n policy:\n $ref: '#/components/schemas/iam-policy'\nrequired:\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 := XListElasticIps(params) + _, decoded, err := XCreateIamRole(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22175,14 +23189,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-elastic-ip id", - Short: "Delete an Elastic IP", + Use: "list-iam-roles", + Short: "List IAM Roles", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteElasticIp(args[0], params) + _, decoded, err := XListIamRoles(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22210,14 +23224,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-elastic-ip id", - Short: "Retrieve Elastic IP details", + Use: "delete-iam-role id", + Short: "Delete IAM Role", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetElasticIp(args[0], params) + _, decoded, err := XDeleteIamRole(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22245,18 +23259,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-elastic-ip id", - Short: "Update an Elastic IP", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Elastic IP description\n maxLength: 255\n type: string\n healthcheck:\n $ref: '#/components/schemas/elastic-ip-healthcheck'\n labels:\n $ref: '#/components/schemas/labels'\ntype: object\n"), + Use: "get-iam-role id", + Short: "Retrieve IAM Role", + 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 := XUpdateElasticIp(args[0], params, body) + _, decoded, err := XGetIamRole(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22284,14 +23294,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-elastic-ip-field id field", - Short: "Reset an Elastic IP field to its default value", - Long: cli.Markdown(""), + Use: "update-iam-role id", + Short: "Update IAM Role", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n assume-role-policy:\n $ref: '#/components/schemas/iam-assume-role-policy'\n description:\n description: IAM Role description\n maxLength: 255\n minLength: 1\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n max-session-ttl:\n description: Maximum TTL requester is allowed to ask for when assuming a role\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n permissions:\n description: IAM Role permissions\n items:\n enum:\n - bypass-governance-retention\n - reset-iam-organization-policy\n type: string\n type: array\n uniqueItems: true\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XResetElasticIpField(args[0], args[1], params) + _, decoded, err := XUpdateIamRole(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22319,9 +23333,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "attach-instance-to-elastic-ip id", - Short: "Attach a Compute instance to an Elastic IP", - 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: "assume-iam-role id", + Short: "[BETA] Request generation of key/secret that allow caller to assume target role", + Long: cli.Markdown("[BETA] Request generation of key/secret that allow caller to assume target role\n## Request Schema (application/json)\n\nproperties:\n ttl:\n description: TTL in seconds for the generated access key (cannot exceed the max TTL defined in the targeted assume role)\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\nrequired:\n- ttl\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -22330,7 +23344,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XAttachInstanceToElasticIp(args[0], params, body) + _, decoded, err := XAssumeIamRole(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22358,9 +23372,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "detach-instance-from-elastic-ip id", - Short: "Detach a Compute instance from an Elastic IP", - 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: "update-iam-role-policy id", + Short: "Update IAM Role Policy", + Long: cli.Markdown("\n## Request Schema (application/json)\n\ndescription: Policy\nproperties:\n default-service-strategy:\n description: IAM default service strategy\n enum:\n - allow\n - deny\n type: string\n services:\n additionalProperties:\n $ref: '#/components/schemas/iam-service-policy'\n description: IAM services\n type: object\nrequired:\n- default-service-strategy\n- services\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -22369,7 +23383,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XDetachInstanceFromElasticIp(args[0], params, body) + _, decoded, err := XUpdateIamRolePolicy(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22397,14 +23411,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-env-impact period", - Short: "[BETA] Retrieve organization environmental impact reports", - Long: cli.Markdown("[BETA] Returns environmental impact reports for an organization"), + 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"), 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 := XGetEnvImpact(args[0], params) + _, decoded, err := XCreateInstance(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22432,14 +23450,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-events", - Short: "List Events", - Long: cli.Markdown("Retrieve Mutation Events for a given date range. Defaults to retrieving Events for the past 24 hours.\n Both a `from` and `to` arguments can be specified to filter Events over a specific period.\n Events will be the the most descriptive possible but not all fields are mandatory"), + Use: "list-instances", + Short: "List Compute instances", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListEvents(params) + _, decoded, err := XListInstances(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22453,8 +23471,10 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("from", "", "") - cmd.Flags().String("to", "", "") + cmd.Flags().String("manager-id", "", "") + cmd.Flags().String("manager-type", "", "") + cmd.Flags().String("ip-address", "", "") + cmd.Flags().String("labels", "", "") cli.SetCustomFlags(cmd) @@ -22470,14 +23490,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-iam-organization-policy", - Short: "Retrieve IAM Organization Policy", - Long: cli.Markdown(""), + 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"), 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 := XGetIamOrganizationPolicy(params) + _, decoded, err := XCreateInstancePool(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22505,18 +23529,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-iam-organization-policy", - Short: "Update IAM Organization Policy", - Long: cli.Markdown("\n## Request Schema (application/json)\n\ndescription: Policy\nproperties:\n default-service-strategy:\n description: IAM default service strategy\n enum:\n - allow\n - deny\n type: string\n services:\n additionalProperties:\n $ref: '#/components/schemas/iam-service-policy'\n description: IAM services\n type: object\nrequired:\n- default-service-strategy\n- services\ntype: object\n"), + Use: "list-instance-pools", + Short: "List Instance Pools", + Long: cli.Markdown(""), 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") - } + Args: cobra.MinimumNArgs(0), + Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XUpdateIamOrganizationPolicy(params, body) + _, decoded, err := XListInstancePools(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22544,18 +23564,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-iam-organization-policy", - Short: "Reset IAM Organization Policy", + Use: "delete-instance-pool id", + Short: "Delete an Instance Pool", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[0:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XResetIamOrganizationPolicy(params, body) + _, decoded, err := XDeleteInstancePool(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22583,18 +23599,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-iam-role", - Short: "Create IAM Role", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n assume-role-policy:\n $ref: '#/components/schemas/iam-policy'\n description:\n description: IAM Role description\n maxLength: 255\n minLength: 1\n type: string\n editable:\n description: 'Sets if the IAM Role Policy is editable or not (default: true). This setting cannot be changed after creation'\n type: boolean\n labels:\n $ref: '#/components/schemas/labels'\n max-session-ttl:\n description: Maximum TTL requester is allowed to ask for when assuming a role\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n name:\n description: IAM Role name\n maxLength: 191\n minLength: 1\n type: string\n permissions:\n description: IAM Role permissions\n items:\n enum:\n - bypass-governance-retention\n - reset-iam-organization-policy\n type: string\n type: array\n uniqueItems: true\n policy:\n $ref: '#/components/schemas/iam-policy'\nrequired:\n- name\ntype: object\n"), + Use: "get-instance-pool id", + Short: "Retrieve Instance Pool 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 := XCreateIamRole(params, body) + _, decoded, err := XGetInstancePool(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22622,14 +23634,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-iam-roles", - Short: "List IAM Roles", - Long: cli.Markdown(""), + 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"), 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 := XListIamRoles(params) + _, decoded, err := XUpdateInstancePool(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22657,14 +23673,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-iam-role id", - Short: "Delete IAM Role", + Use: "reset-instance-pool-field id field", + Short: "Reset an Instance Pool field to its default value", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteIamRole(args[0], params) + _, decoded, err := XResetInstancePoolField(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22692,14 +23708,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-iam-role id", - Short: "Retrieve IAM Role", - Long: cli.Markdown(""), + Use: "evict-instance-pool-members id", + Short: "Evict Instance Pool members", + Long: cli.Markdown("This operation evicts the specified Compute instances member from the Instance Pool, shrinking it to `<current pool size> - <# evicted members>`.\n## Request Schema (application/json)\n\nproperties:\n instances:\n items:\n format: uuid\n type: string\n type: array\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 := XGetIamRole(args[0], params) + _, decoded, err := XEvictInstancePoolMembers(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22727,9 +23747,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-iam-role id", - Short: "Update IAM Role", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: IAM Role description\n maxLength: 255\n minLength: 1\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n max-session-ttl:\n description: Maximum TTL requester is allowed to ask for when assuming a role\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n permissions:\n description: IAM Role permissions\n items:\n enum:\n - bypass-governance-retention\n - reset-iam-organization-policy\n type: string\n type: array\n uniqueItems: true\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -22738,7 +23758,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateIamRole(args[0], params, body) + _, decoded, err := XScaleInstancePool(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22766,18 +23786,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-iam-role-assume-policy id", - Short: "Update IAM Assume role Policy", - Long: cli.Markdown("Update IAM Assume role Policy\n## Request Schema (application/json)\n\ndescription: Policy\nproperties:\n default-service-strategy:\n description: IAM default service strategy\n enum:\n - allow\n - deny\n type: string\n services:\n additionalProperties:\n $ref: '#/components/schemas/iam-service-policy'\n description: IAM services\n type: object\nrequired:\n- default-service-strategy\n- services\ntype: object\n"), + Use: "list-instance-types", + Short: "List Compute instance Types", + Long: cli.Markdown(""), 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:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XUpdateIamRoleAssumePolicy(args[0], params, body) + _, decoded, err := XListInstanceTypes(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22805,18 +23821,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-iam-role-policy id", - Short: "Update IAM Role Policy", - Long: cli.Markdown("\n## Request Schema (application/json)\n\ndescription: Policy\nproperties:\n default-service-strategy:\n description: IAM default service strategy\n enum:\n - allow\n - deny\n type: string\n services:\n additionalProperties:\n $ref: '#/components/schemas/iam-service-policy'\n description: IAM services\n type: object\nrequired:\n- default-service-strategy\n- services\ntype: object\n"), + Use: "get-instance-type id", + Short: "Retrieve Instance Type 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 := XUpdateIamRolePolicy(args[0], params, body) + _, decoded, err := XGetInstanceType(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22844,18 +23856,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "assume-iam-role target-role-id", - Short: "[BETA] Request generation of key/secret that allow caller to assume target role", - Long: cli.Markdown("[BETA] Request generation of key/secret that allow caller to assume target role\n## Request Schema (application/json)\n\nproperties:\n ttl:\n description: TTL in seconds for the generated access key (cannot exceed the max TTL defined in the targeted assume role)\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\nrequired:\n- ttl\ntype: object\n"), + Use: "delete-instance id", + Short: "Delete a Compute instance", + 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 := XAssumeIamRole(args[0], params, body) + _, decoded, err := XDeleteInstance(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22883,18 +23891,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "get-instance id", + Short: "Retrieve Compute instance 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 := XCreateInstance(params, body) + _, decoded, err := XGetInstance(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22922,14 +23926,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-instances", - Short: "List Compute instances", - Long: cli.Markdown(""), + Use: "update-instance id", + Short: "Update a Compute instance", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n application-consistent-snapshot-enabled:\n description: Enable/Disable Application Consistent Snapshot for Instance\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 user-data:\n description: Instance Cloud-init user-data (base64 encoded)\n maxLength: 32768\n minLength: 1\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 := XListInstances(params) + _, decoded, err := XUpdateInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -22943,11 +23951,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("manager-id", "", "") - cmd.Flags().String("manager-type", "", "") - cmd.Flags().String("ip-address", "", "") - cmd.Flags().String("labels", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -22962,18 +23965,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "reset-instance-field id field", + Short: "Reset Instance field", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), 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 := XCreateInstancePool(params, body) + _, decoded, err := XResetInstanceField(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23001,14 +24000,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-instance-pools", - Short: "List Instance Pools", + Use: "add-instance-protection id", + Short: "Set instance destruction protection", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + 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 := XListInstancePools(params) + _, decoded, err := XAddInstanceProtection(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23036,14 +24039,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-instance-pool id", - Short: "Delete an Instance Pool", + Use: "create-snapshot id", + Short: "Create a Snapshot of a Compute instance", 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 := XDeleteInstancePool(args[0], params) + _, decoded, err := XCreateSnapshot(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23071,14 +24078,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-instance-pool id", - Short: "Retrieve Instance Pool details", + Use: "enable-tpm id", + Short: "Enable tpm for the instance.", 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 := XGetInstancePool(args[0], params) + _, decoded, err := XEnableTpm(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23106,18 +24117,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "reveal-instance-password id", + Short: "Reveal the password used during instance creation or the latest password reset.", + Long: cli.Markdown("Reveal the password used during instance creation or the latest password reset.\n This is only available for VMs created against templates having the `password-enabled`\n property set to `true`.\n\n Passwords are transiently stored for at most 24 hours and intended to be retrieved shortly after\n creation or resets."), 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 := XUpdateInstancePool(args[0], params, body) + _, decoded, err := XRevealInstancePassword(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23145,14 +24152,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-instance-pool-field id field", - Short: "Reset an Instance Pool field to its default value", + Use: "reboot-instance id", + Short: "Reboot a Compute instance", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XResetInstancePoolField(args[0], args[1], params) + _, decoded, err := XRebootInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23180,18 +24191,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "evict-instance-pool-members id", - Short: "Evict Instance Pool members", - Long: cli.Markdown("This operation evicts the specified Compute instances member from the Instance Pool, shrinking it to `<current pool size> - <# evicted members>`.\n## Request Schema (application/json)\n\nproperties:\n instances:\n items:\n format: uuid\n type: string\n type: array\ntype: object\n"), + Use: "remove-instance-protection id", + Short: "Remove instance destruction protection", + 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 := XEvictInstancePoolMembers(args[0], params, body) + _, decoded, err := XRemoveInstanceProtection(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23219,9 +24230,9 @@ func xRegister(subcommand bool) { var examples string 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"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23230,7 +24241,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XScaleInstancePool(args[0], params, body) + _, decoded, err := XResetInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23258,14 +24269,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-instance-types", - Short: "List Compute instance Types", + Use: "reset-instance-password id", + Short: "Reset a compute instance password", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + 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 := XListInstanceTypes(params) + _, decoded, err := XResetInstancePassword(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23293,14 +24308,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-instance-type id", - Short: "Retrieve Instance Type details", - Long: cli.Markdown(""), + 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"), 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 := XGetInstanceType(args[0], params) + _, decoded, err := XResizeInstanceDisk(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23328,14 +24347,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-instance id", - Short: "Delete a Compute instance", - Long: cli.Markdown(""), + Use: "scale-instance id", + Short: "Scale a Compute instance to a new Instance Type", + Long: cli.Markdown("This operation changes the Compute instance's type. Note: the new Instance Type must be within the same family (e.g. a standard instance cannot be scaled to gpu2 or storage).\n## Request Schema (application/json)\n\nproperties:\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\nrequired:\n- instance-type\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 := XDeleteInstance(args[0], params) + _, decoded, err := XScaleInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23363,14 +24386,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-instance id", - Short: "Retrieve Compute instance details", - Long: cli.Markdown(""), + Use: "start-instance id", + Short: "Start a Compute instance", + Long: cli.Markdown("This operation starts a virtual machine, potentially using a rescue profile if specified\n## Request Schema (application/json)\n\nproperties:\n rescue-profile:\n description: 'Boot in Rescue Mode, using named profile (supported: netboot, netboot-efi)'\n enum:\n - netboot-efi\n - netboot\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 := XGetInstance(args[0], params) + _, decoded, err := XStartInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23398,18 +24425,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-instance id", - Short: "Update a Compute instance", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n application-consistent-snapshot-enabled:\n description: Enable/Disable Application Consistent Snapshot for Instance\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 user-data:\n description: Instance Cloud-init user-data (base64 encoded)\n maxLength: 32768\n minLength: 1\n type: string\ntype: object\n"), + Use: "stop-instance id", + Short: "Stop a Compute instance", + 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 := XUpdateInstance(args[0], params, body) + _, decoded, err := XStopInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23437,14 +24464,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-instance-field id field", - Short: "Reset Instance field", - Long: cli.Markdown(""), + Use: "revert-instance-to-snapshot instance-id", + Short: "Revert a snapshot for an instance", + Long: cli.Markdown("This operation reverts the snapshot to the Compute instance volume, restoring stored data as it was at the time of the snapshot.\nThe Compute instance must be previously stopped.\n## Request Schema (application/json)\n\nproperties:\n id:\n description: Snapshot ID\n format: uuid\n type: string\nrequired:\n- id\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XResetInstanceField(args[0], args[1], params) + _, decoded, err := XRevertInstanceToSnapshot(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23472,18 +24503,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "add-instance-protection id", - Short: "Set instance destruction protection", - Long: cli.Markdown(""), + 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"), 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 := XAddInstanceProtection(args[0], params, body) + _, decoded, err := XCreateKmsKey(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23511,18 +24542,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-snapshot id", - Short: "Create a Snapshot of a Compute instance", - Long: cli.Markdown(""), + Use: "list-kms-keys", + Short: "[BETA] List KMS Keys", + Long: cli.Markdown("List KMS Keys details for an organization in a given zone."), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), 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 := XCreateSnapshot(args[0], params, body) + _, decoded, err := XListKmsKeys(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23550,18 +24577,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "enable-tpm id", - Short: "Enable tpm for the instance.", - Long: cli.Markdown(""), + Use: "get-kms-key id", + Short: "[BETA] Get KMS Key", + Long: cli.Markdown("Retrieve KMS Key details."), 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 := XEnableTpm(args[0], params, body) + _, decoded, err := XGetKmsKey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23589,14 +24612,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reveal-instance-password id", - Short: "Reveal the password used during instance creation or the latest password reset.", - Long: cli.Markdown("Reveal the password used during instance creation or the latest password reset.\n This is only available for VMs created against templates having the `password-enabled`\n property set to `true`.\n\n Passwords are transiently stored for at most 24 hours and intended to be retrieved shortly after\n creation or resets."), + Use: "cancel-kms-key-deletion id", + Short: "[BETA] Cancel KMS Key Deletion", + Long: cli.Markdown("Cancel the scheduled deletion of a KMS Key."), 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 := XRevealInstancePassword(args[0], params) + _, decoded, err := XCancelKmsKeyDeletion(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23624,18 +24651,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reboot-instance id", - Short: "Reboot a Compute instance", - Long: cli.Markdown(""), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("", args[1:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XRebootInstance(args[0], params, body) + _, decoded, err := XDecrypt(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23663,9 +24690,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "remove-instance-protection id", - Short: "Remove instance destruction protection", - Long: cli.Markdown(""), + Use: "disable-kms-key id", + Short: "[BETA] Disable KMS Key", + Long: cli.Markdown("Disable a KMS Key"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23674,7 +24701,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XRemoveInstanceProtection(args[0], params, body) + _, decoded, err := XDisableKmsKey(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23702,18 +24729,18 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "disable-kms-key-rotation id", + Short: "[BETA] Disable Key Rotation", + Long: cli.Markdown("Disable the periodic rotation of a KMS Key."), 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 := XResetInstance(args[0], params, body) + _, decoded, err := XDisableKmsKeyRotation(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23741,9 +24768,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-instance-password id", - Short: "Reset a compute instance password", - Long: cli.Markdown(""), + Use: "enable-kms-key id", + Short: "[BETA] Enable KMS Key", + Long: cli.Markdown("Enable a KMS Key\""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23752,7 +24779,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XResetInstancePassword(args[0], params, body) + _, decoded, err := XEnableKmsKey(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23780,9 +24807,9 @@ func xRegister(subcommand bool) { var examples string 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"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23791,7 +24818,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XResizeInstanceDisk(args[0], params, body) + _, decoded, err := XEnableKmsKeyRotation(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23819,9 +24846,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "scale-instance id", - Short: "Scale a Compute instance to a new Instance Type", - Long: cli.Markdown("This operation changes the Compute instance's type. Note: the new Instance Type must be within the same family (e.g. a standard instance cannot be scaled to gpu2 or storage).\n## Request Schema (application/json)\n\nproperties:\n instance-type:\n $ref: '#/components/schemas/instance-type-ref'\nrequired:\n- instance-type\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23830,7 +24857,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XScaleInstance(args[0], params, body) + _, decoded, err := XEncrypt(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23858,9 +24885,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "start-instance id", - Short: "Start a Compute instance", - Long: cli.Markdown("This operation starts a virtual machine, potentially using a rescue profile if specified\n## Request Schema (application/json)\n\nproperties:\n rescue-profile:\n description: 'Boot in Rescue Mode, using named profile (supported: netboot, netboot-efi)'\n enum:\n - netboot-efi\n - netboot\n type: string\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23869,7 +24896,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XStartInstance(args[0], params, body) + _, decoded, err := XGenerateDataKey(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23897,18 +24924,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "stop-instance id", - Short: "Stop a Compute instance", - Long: cli.Markdown(""), + Use: "list-kms-key-rotations id", + Short: "[BETA] List KMS Key Rotations", + Long: cli.Markdown("List all the key material versions of a KMS Key."), 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 := XStopInstance(args[0], params, body) + _, decoded, err := XListKmsKeyRotations(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23936,9 +24959,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "revert-instance-to-snapshot instance-id", - Short: "Revert a snapshot for an instance", - Long: cli.Markdown("This operation reverts the snapshot to the Compute instance volume, restoring stored data as it was at the time of the snapshot.\nThe Compute instance must be previously stopped.\n## Request Schema (application/json)\n\nproperties:\n id:\n description: Snapshot ID\n format: uuid\n type: string\nrequired:\n- id\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -23947,7 +24970,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XRevertInstanceToSnapshot(args[0], params, body) + _, decoded, err := XReEncrypt(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -23975,18 +24998,18 @@ func xRegister(subcommand bool) { var examples string 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 type: boolean\n name:\n type: string\n usage:\n enum:\n - encrypt-decrypt\n type: string\nrequired:\n- name\n- description\n- usage\n- multi-zone\ntype: object\n"), + 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"), 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("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateKmsKey(params, body) + _, decoded, err := XReplicateKmsKey(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24014,14 +25037,18 @@ func xRegister(subcommand bool) { var examples string 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."), + Use: "rotate-kms-key id", + Short: "[BETA] Rotate Key", + Long: cli.Markdown("Perform a manual rotation of the key material for a symmetric key."), Example: examples, - Args: cobra.MinimumNArgs(0), + 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 := XListKmsKeys(params) + _, decoded, err := XRotateKmsKey(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24049,14 +25076,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-kms-key id", - Short: "[BETA] Get KMS Key", - Long: cli.Markdown("Retrieve KMS Key details."), + 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"), 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 := XGetKmsKey(args[0], params) + _, decoded, err := XScheduleKmsKeyDeletion(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24084,18 +25115,14 @@ func xRegister(subcommand bool) { var examples string 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."), + Use: "get-live-balance", + Short: "[BETA] Retrieve the live-balance", + Long: cli.Markdown("[BETA] Returns the live-balance of the current organization."), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), 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 := XCancelKmsKeyDeletion(args[0], params, body) + _, decoded, err := XGetLiveBalance(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24123,18 +25150,18 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "create-load-balancer", + Short: "Create a Load Balancer", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer description\n maxLength: 255\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Load Balancer 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 := XDecrypt(args[0], params, body) + _, decoded, err := XCreateLoadBalancer(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24162,18 +25189,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "disable-kms-key id", - Short: "[BETA] Disable KMS Key", - Long: cli.Markdown("Disable a KMS Key"), + Use: "list-load-balancers", + Short: "List Load Balancers", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), 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 := XDisableKmsKey(args[0], params, body) + _, decoded, err := XListLoadBalancers(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24201,18 +25224,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "disable-kms-key-rotation id", - Short: "[BETA] Disable Key Rotation", - Long: cli.Markdown("Disable the periodic rotation of a KMS Key."), + Use: "delete-load-balancer id", + Short: "Delete a Load Balancer", + 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 := XDisableKmsKeyRotation(args[0], params, body) + _, decoded, err := XDeleteLoadBalancer(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24240,18 +25259,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "enable-kms-key id", - Short: "[BETA] Enable KMS Key", - Long: cli.Markdown("Enable a KMS Key\""), + Use: "get-load-balancer id", + Short: "Retrieve Load Balancer details", + 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 := XEnableKmsKey(args[0], params, body) + _, decoded, err := XGetLoadBalancer(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24279,9 +25294,9 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "update-load-balancer id", + Short: "Update a Load Balancer", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer description\n maxLength: 255\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Load Balancer 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) { @@ -24290,7 +25305,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XEnableKmsKeyRotation(args[0], params, body) + _, decoded, err := XUpdateLoadBalancer(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24318,9 +25333,9 @@ func xRegister(subcommand bool) { var examples string 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"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24329,7 +25344,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XEncrypt(args[0], params, body) + _, decoded, err := XAddServiceToLoadBalancer(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24357,18 +25372,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "delete-load-balancer-service id service-id", + Short: "Delete a Load Balancer Service", + 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 := XGenerateDataKey(args[0], params, body) + _, decoded, err := XDeleteLoadBalancerService(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24396,14 +25407,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-kms-key-rotations id", - Short: "[BETA] List KMS Key Rotations", - Long: cli.Markdown("List all the key material versions of a KMS Key."), + Use: "get-load-balancer-service id service-id", + Short: "Retrieve Load Balancer Service details", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListKmsKeyRotations(args[0], params) + _, decoded, err := XGetLoadBalancerService(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24431,18 +25442,18 @@ func xRegister(subcommand bool) { var examples string 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"), + 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"), 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:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XReEncrypt(args[0], params, body) + _, decoded, err := XUpdateLoadBalancerService(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24470,18 +25481,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "reset-load-balancer-service-field id service-id field", + Short: "Reset a Load Balancer Service field to its default value", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(3), 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 := XReplicateKmsKey(args[0], params, body) + _, decoded, err := XResetLoadBalancerServiceField(args[0], args[1], args[2], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24509,18 +25516,14 @@ func xRegister(subcommand bool) { var examples string 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."), + Use: "reset-load-balancer-field id field", + Short: "Reset a Load Balancer field to its default value", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), 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 := XRotateKmsKey(args[0], params, body) + _, decoded, err := XResetLoadBalancerField(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24548,18 +25551,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "get-operation id", + Short: "Retrieve Operation 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 := XScheduleKmsKeyDeletion(args[0], params, body) + _, decoded, err := XGetOperation(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24587,14 +25586,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-live-balance", - Short: "[BETA] Retrieve the live-balance", - Long: cli.Markdown("[BETA] Returns the live-balance of the current organization."), + Use: "get-organization", + Short: "Retrieve an organization", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetLiveBalance(params) + _, decoded, err := XGetOrganization(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24622,9 +25621,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-load-balancer", - Short: "Create a Load Balancer", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer description\n maxLength: 255\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Load Balancer name\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\ntype: object\n"), + Use: "create-private-network", + Short: "Create a Private Network", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Private Network description\n maxLength: 255\n type: string\n end-ip:\n description: Private Network end IP address\n format: ipv4\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Private Network name\n maxLength: 255\n minLength: 1\n type: string\n netmask:\n description: Private Network netmask\n format: ipv4\n type: string\n options:\n $ref: '#/components/schemas/private-network-options'\n start-ip:\n description: Private Network start IP address\n format: ipv4\n type: string\nrequired:\n- name\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { @@ -24633,7 +25632,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateLoadBalancer(params, body) + _, decoded, err := XCreatePrivateNetwork(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24661,14 +25660,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-load-balancers", - Short: "List Load Balancers", + Use: "list-private-networks", + Short: "List Private Networks", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListLoadBalancers(params) + _, decoded, err := XListPrivateNetworks(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24696,14 +25695,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-load-balancer id", - Short: "Delete a Load Balancer", + Use: "delete-private-network id", + Short: "Delete a Private Network", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteLoadBalancer(args[0], params) + _, decoded, err := XDeletePrivateNetwork(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24731,14 +25730,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-load-balancer id", - Short: "Retrieve Load Balancer details", + Use: "get-private-network id", + Short: "Retrieve Private Network details", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetLoadBalancer(args[0], params) + _, decoded, err := XGetPrivateNetwork(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24766,9 +25765,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-load-balancer id", - Short: "Update a Load Balancer", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Load Balancer description\n maxLength: 255\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Load Balancer name\n maxLength: 255\n minLength: 1\n type: string\ntype: object\n"), + Use: "update-private-network id", + Short: "Update a Private Network", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Private Network description\n maxLength: 255\n type: string\n end-ip:\n description: Private Network end IP address\n format: ipv4\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Private Network name\n maxLength: 255\n minLength: 1\n type: string\n netmask:\n description: Private Network netmask\n format: ipv4\n type: string\n options:\n $ref: '#/components/schemas/private-network-options'\n start-ip:\n description: Private Network start IP address\n format: ipv4\n type: string\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -24777,7 +25776,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateLoadBalancer(args[0], params, body) + _, decoded, err := XUpdatePrivateNetwork(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24805,18 +25804,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "reset-private-network-field id field", + Short: "Reset Private Network field", + 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 := XAddServiceToLoadBalancer(args[0], params, body) + _, decoded, err := XResetPrivateNetworkField(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24844,14 +25839,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-load-balancer-service id service-id", - Short: "Delete a Load Balancer Service", - Long: cli.Markdown(""), + Use: "attach-instance-to-private-network id", + Short: "Attach a Compute instance to a Private Network", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n description: Compute instance\n properties:\n id:\n description: Instance ID\n format: uuid\n type: string\n type: object\n ip:\n description: Static IP address lease for the corresponding network interface\n format: ipv4\n type: string\nrequired:\n- instance\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XDeleteLoadBalancerService(args[0], args[1], params) + _, decoded, err := XAttachInstanceToPrivateNetwork(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24879,14 +25878,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-load-balancer-service id service-id", - Short: "Retrieve Load Balancer Service details", - Long: cli.Markdown(""), + Use: "detach-instance-from-private-network id", + Short: "Detach a Compute instance from a Private Network", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance'\nrequired:\n- instance\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XGetLoadBalancerService(args[0], args[1], params) + _, decoded, err := XDetachInstanceFromPrivateNetwork(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24914,18 +25917,18 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "update-private-network-instance-ip id", + Short: "Update the IP address of an instance attached to a managed private network", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n properties:\n id:\n description: Instance ID\n format: uuid\n type: string\n required:\n - id\n type: object\n ip:\n description: Static IP address lease for the corresponding network interface\n format: ipv4\n type: string\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[2:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateLoadBalancerService(args[0], args[1], params, body) + _, decoded, err := XUpdatePrivateNetworkInstanceIp(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24953,14 +25956,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-load-balancer-service-field id service-id field", - Short: "Reset a Load Balancer Service field to its default value", + Use: "list-quotas", + Short: "List Organization Quotas", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(3), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XResetLoadBalancerServiceField(args[0], args[1], args[2], params) + _, decoded, err := XListQuotas(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -24988,14 +25991,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-load-balancer-field id field", - Short: "Reset a Load Balancer field to its default value", + Use: "get-quota entity", + Short: "Retrieve Resource Quota", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XResetLoadBalancerField(args[0], args[1], params) + _, decoded, err := XGetQuota(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25023,14 +26026,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-operation id", - Short: "Retrieve Operation details", + Use: "delete-reverse-dns-elastic-ip id", + Short: "Delete the PTR DNS record for an elastic IP", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetOperation(args[0], params) + _, decoded, err := XDeleteReverseDnsElasticIp(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25058,14 +26061,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-organization", - Short: "Retrieve an organization", + Use: "get-reverse-dns-elastic-ip id", + Short: "Query the PTR DNS records for an elastic IP", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetOrganization(params) + _, decoded, err := XGetReverseDnsElasticIp(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25093,18 +26096,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-private-network", - Short: "Create a Private Network", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Private Network description\n maxLength: 255\n type: string\n end-ip:\n description: Private Network end IP address\n format: ipv4\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Private Network name\n maxLength: 255\n minLength: 1\n type: string\n netmask:\n description: Private Network netmask\n format: ipv4\n type: string\n options:\n $ref: '#/components/schemas/private-network-options'\n start-ip:\n description: Private Network start IP address\n format: ipv4\n type: string\nrequired:\n- name\ntype: object\n"), + Use: "update-reverse-dns-elastic-ip id", + Short: "Update/Create the PTR DNS record for an elastic IP", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n domain-name:\n maxLength: 253\n minLength: 1\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[0:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreatePrivateNetwork(params, body) + _, decoded, err := XUpdateReverseDnsElasticIp(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25132,14 +26135,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-private-networks", - Short: "List Private Networks", + Use: "delete-reverse-dns-instance id", + Short: "Delete the PTR DNS record for an instance", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListPrivateNetworks(params) + _, decoded, err := XDeleteReverseDnsInstance(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25167,14 +26170,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-private-network id", - Short: "Delete a Private Network", + Use: "get-reverse-dns-instance id", + Short: "Query the PTR DNS records for an instance", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeletePrivateNetwork(args[0], params) + _, decoded, err := XGetReverseDnsInstance(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25202,14 +26205,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-private-network id", - Short: "Retrieve Private Network details", - Long: cli.Markdown(""), + Use: "update-reverse-dns-instance id", + Short: "Update/Create the PTR DNS record for an instance", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n domain-name:\n maxLength: 253\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 := XGetPrivateNetwork(args[0], params) + _, decoded, err := XUpdateReverseDnsInstance(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25237,18 +26244,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-private-network id", - Short: "Update a Private Network", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Private Network description\n maxLength: 255\n type: string\n end-ip:\n description: Private Network end IP address\n format: ipv4\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Private Network name\n maxLength: 255\n minLength: 1\n type: string\n netmask:\n description: Private Network netmask\n format: ipv4\n type: string\n options:\n $ref: '#/components/schemas/private-network-options'\n start-ip:\n description: Private Network start IP address\n format: ipv4\n type: string\ntype: object\n"), + Use: "create-security-group", + Short: "Create a Security Group", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Security Group description\n maxLength: 255\n type: string\n name:\n description: Security 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 := XUpdatePrivateNetwork(args[0], params, body) + _, decoded, err := XCreateSecurityGroup(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25276,14 +26283,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "reset-private-network-field id field", - Short: "Reset Private Network field", - Long: cli.Markdown(""), + Use: "list-security-groups", + Short: "List Security Groups.", + Long: cli.Markdown("Lists security groups. When visibility is set to public, lists public security groups.\nPublic security groups are objects maintained by Exoscale which contain source addresses for\nrelevant services hosted by Exoscale. They can be used a source in ingress rules and as a destination\nin egress rules."), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XResetPrivateNetworkField(args[0], args[1], params) + _, decoded, err := XListSecurityGroups(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25297,6 +26304,8 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("visibility", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -25311,18 +26320,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "attach-instance-to-private-network id", - Short: "Attach a Compute instance to a Private Network", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n description: Compute instance\n properties:\n id:\n description: Instance ID\n format: uuid\n type: string\n type: object\n ip:\n description: Static IP address lease for the corresponding network interface\n format: ipv4\n type: string\nrequired:\n- instance\ntype: object\n"), + Use: "delete-security-group id", + Short: "Delete a Security Group", + 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 := XAttachInstanceToPrivateNetwork(args[0], params, body) + _, decoded, err := XDeleteSecurityGroup(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25350,18 +26355,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "detach-instance-from-private-network id", - Short: "Detach a Compute instance from a Private Network", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance'\nrequired:\n- instance\ntype: object\n"), + Use: "get-security-group id", + Short: "Retrieve Security 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 := XDetachInstanceFromPrivateNetwork(args[0], params, body) + _, decoded, err := XGetSecurityGroup(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25389,9 +26390,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-private-network-instance-ip id", - Short: "Update the IP address of an instance attached to a managed private network", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n properties:\n id:\n description: Instance ID\n format: uuid\n type: string\n required:\n - id\n type: object\n ip:\n description: Static IP address lease for the corresponding network interface\n format: ipv4\n type: string\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -25400,7 +26401,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdatePrivateNetworkInstanceIp(args[0], params, body) + _, decoded, err := XAddRuleToSecurityGroup(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25428,14 +26429,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-quotas", - Short: "List Organization Quotas", + Use: "delete-rule-from-security-group id rule-id", + Short: "Delete a Security Group rule", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListQuotas(params) + _, decoded, err := XDeleteRuleFromSecurityGroup(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25463,14 +26464,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-quota entity", - Short: "Retrieve Resource Quota", - Long: cli.Markdown(""), + Use: "add-external-source-to-security-group id", + Short: "Add an external source as a member of a Security Group", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n cidr:\n description: CIDR-formatted network to add\n type: string\nrequired:\n- cidr\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 := XGetQuota(args[0], params) + _, decoded, err := XAddExternalSourceToSecurityGroup(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25498,14 +26503,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-reverse-dns-elastic-ip id", - Short: "Delete the PTR DNS record for an elastic IP", - Long: cli.Markdown(""), + Use: "attach-instance-to-security-group id", + Short: "Attach a Compute instance to a Security Group", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance'\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 := XDeleteReverseDnsElasticIp(args[0], params) + _, decoded, err := XAttachInstanceToSecurityGroup(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25533,14 +26542,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-reverse-dns-elastic-ip id", - Short: "Query the PTR DNS records for an elastic IP", - Long: cli.Markdown(""), + Use: "detach-instance-from-security-group id", + Short: "Detach a Compute instance from a Security Group", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance'\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 := XGetReverseDnsElasticIp(args[0], params) + _, decoded, err := XDetachInstanceFromSecurityGroup(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25568,9 +26581,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-reverse-dns-elastic-ip id", - Short: "Update/Create the PTR DNS record for an elastic IP", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n domain-name:\n maxLength: 253\n minLength: 1\n type: string\ntype: object\n"), + Use: "remove-external-source-from-security-group id", + Short: "Remove an external source from a Security Group", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n cidr:\n description: CIDR-formatted network to remove\n type: string\nrequired:\n- cidr\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -25579,7 +26592,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateReverseDnsElasticIp(args[0], params, body) + _, decoded, err := XRemoveExternalSourceFromSecurityGroup(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25607,14 +26620,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-reverse-dns-instance id", - Short: "Delete the PTR DNS record for an instance", - Long: cli.Markdown(""), + Use: "create-sks-cluster", + Short: "Create an SKS cluster", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addons:\n description: Cluster addons\n items:\n enum:\n - exoscale-cloud-controller\n - exoscale-container-storage-interface\n - metrics-server\n - karpenter\n type: string\n type: array\n uniqueItems: true\n audit:\n $ref: '#/components/schemas/sks-audit-create'\n auto-upgrade:\n description: Enable auto upgrade of the control plane to the latest patch version available\n type: boolean\n cni:\n description: Cluster CNI\n enum:\n - calico\n - cilium\n type: string\n create-default-security-group:\n description: Creates an ad-hoc security group based on the choice of the selected CNI\n nullable: true\n type: boolean\n description:\n description: Cluster description\n maxLength: 255\n nullable: true\n type: string\n enable-kube-proxy:\n description: Indicates whether to deploy the Kubernetes network proxy. When unspecified, defaults to `true` unless Cilium CNI is selected\n type: boolean\n feature-gates:\n description: A list of Kubernetes-only Alpha features to enable for API server component\n items:\n type: string\n type: array\n uniqueItems: true\n labels:\n $ref: '#/components/schemas/sks-cluster-labels'\n level:\n description: Cluster service level\n enum:\n - starter\n - pro\n type: string\n name:\n description: Cluster name\n maxLength: 255\n minLength: 1\n type: string\n networking:\n $ref: '#/components/schemas/networking'\n oidc:\n $ref: '#/components/schemas/sks-oidc'\n version:\n description: Control plane Kubernetes version\n type: string\nrequired:\n- name\n- level\n- version\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 := XDeleteReverseDnsInstance(args[0], params) + _, decoded, err := XCreateSksCluster(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25642,14 +26659,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-reverse-dns-instance id", - Short: "Query the PTR DNS records for an instance", + Use: "list-sks-clusters", + Short: "List SKS clusters", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetReverseDnsInstance(args[0], params) + _, decoded, err := XListSksClusters(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25677,18 +26694,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-reverse-dns-instance id", - Short: "Update/Create the PTR DNS record for an instance", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n domain-name:\n maxLength: 253\n minLength: 1\n type: string\ntype: object\n"), + Use: "list-sks-cluster-deprecated-resources id", + Short: "Resources that are scheduled to be removed in future kubernetes releases", + Long: cli.Markdown("This operation returns the deprecated resources for a given cluster"), 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 := XUpdateReverseDnsInstance(args[0], params, body) + _, decoded, err := XListSksClusterDeprecatedResources(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25716,18 +26729,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-security-group", - Short: "Create a Security Group", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Security Group description\n maxLength: 255\n type: string\n name:\n description: Security Group name\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\ntype: object\n"), + Use: "generate-sks-cluster-kubeconfig id", + Short: "Generate a new Kubeconfig file for a SKS cluster", + Long: cli.Markdown("This operation returns a Kubeconfig file encoded in base64.\n## Request Schema (application/json)\n\ndescription: Kubeconfig request for a SKS cluster\nproperties:\n groups:\n description: List of roles. The certificate present in the Kubeconfig will have these roles set in the Org field.\n items:\n type: string\n type: array\n ttl:\n description: 'Validity in seconds of the Kubeconfig user certificate (default: 30 days)'\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n user:\n description: User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.\n type: string\nrequired:\n- user\n- groups\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[0:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateSecurityGroup(params, body) + _, decoded, err := XGenerateSksClusterKubeconfig(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25755,14 +26768,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-security-groups", - Short: "List Security Groups.", - Long: cli.Markdown("Lists security groups. When visibility is set to public, lists public security groups.\nPublic security groups are objects maintained by Exoscale which contain source addresses for\nrelevant services hosted by Exoscale. They can be used a source in ingress rules and as a destination\nin egress rules."), + Use: "list-sks-cluster-versions", + Short: "List available versions for SKS clusters", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListSecurityGroups(params) + _, decoded, err := XListSksClusterVersions(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25776,7 +26789,7 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("visibility", "", "") + cmd.Flags().String("include-deprecated", "", "") cli.SetCustomFlags(cmd) @@ -25792,14 +26805,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-security-group id", - Short: "Delete a Security Group", + Use: "delete-sks-cluster id", + Short: "Delete an SKS cluster", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteSecurityGroup(args[0], params) + _, decoded, err := XDeleteSksCluster(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25827,14 +26840,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-security-group id", - Short: "Retrieve Security Group details", + Use: "get-sks-cluster id", + Short: "Retrieve SKS cluster details", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetSecurityGroup(args[0], params) + _, decoded, err := XGetSksCluster(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25862,9 +26875,9 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "update-sks-cluster id", + Short: "Update an SKS cluster", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addons:\n description: Cluster addons\n items:\n enum:\n - exoscale-cloud-controller\n - exoscale-container-storage-interface\n - metrics-server\n - karpenter\n type: string\n type: array\n uniqueItems: true\n audit:\n $ref: '#/components/schemas/sks-audit-update'\n auto-upgrade:\n description: Enable auto upgrade of the control plane to the latest patch version available\n type: boolean\n description:\n description: Cluster description\n maxLength: 255\n nullable: true\n type: string\n enable-operators-ca:\n description: Add or remove the operators certificate authority (CA) from the list of trusted CAs of the api server. The default value is true\n type: boolean\n feature-gates:\n description: A list of Kubernetes-only Alpha features to enable for API server component\n items:\n type: string\n nullable: true\n type: array\n uniqueItems: true\n labels:\n $ref: '#/components/schemas/sks-cluster-labels'\n name:\n description: Cluster name\n maxLength: 255\n minLength: 1\n type: string\n oidc:\n $ref: '#/components/schemas/sks-oidc'\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -25873,7 +26886,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XAddRuleToSecurityGroup(args[0], params, body) + _, decoded, err := XUpdateSksCluster(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25901,14 +26914,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-rule-from-security-group id rule-id", - Short: "Delete a Security Group rule", - Long: cli.Markdown(""), + Use: "get-sks-cluster-authority-cert id authority", + Short: "Get the certificate for a SKS cluster authority", + Long: cli.Markdown("This operation returns the certificate for the given SKS cluster authority encoded in base64."), Example: examples, Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteRuleFromSecurityGroup(args[0], args[1], params) + _, decoded, err := XGetSksClusterAuthorityCert(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25936,18 +26949,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "add-external-source-to-security-group id", - Short: "Add an external source as a member of a Security Group", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n cidr:\n description: CIDR-formatted network to add\n type: string\nrequired:\n- cidr\ntype: object\n"), + Use: "generate-sks-karpenter-exoscale-nodeclass id", + Short: "Generate a Karpenter ExoscaleNodeClass manifest for an SKS cluster, including its default security group and feature flags if present", + 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 := XAddExternalSourceToSecurityGroup(args[0], params, body) + _, decoded, err := XGenerateSksKarpenterExoscaleNodeclass(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -25975,18 +26988,53 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "attach-instance-to-security-group id", - Short: "Attach a Compute instance to a Security Group", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance'\nrequired:\n- instance\ntype: object\n"), + Use: "generate-sks-karpenter-nodepool id", + Short: "Generate a Karpenter NodePool manifest with minimal configuration for an SKS cluster", + 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 := XAttachInstanceToSecurityGroup(args[0], params, body) + _, decoded, err := XGenerateSksKarpenterNodepool(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-sks-cluster-inspection id", + Short: "Get the latest inspection result", + Long: cli.Markdown("Helps troubleshoot common problems when deploying a kubernetes cluster. Inspections run every couple of minutes."), + Example: examples, + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + _, decoded, err := XGetSksClusterInspection(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26014,9 +27062,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "detach-instance-from-security-group id", - Short: "Detach a Compute instance from a Security Group", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n instance:\n $ref: '#/components/schemas/instance'\nrequired:\n- instance\ntype: object\n"), + 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"), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { @@ -26025,7 +27073,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XDetachInstanceFromSecurityGroup(args[0], params, body) + _, decoded, err := XCreateSksNodepool(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26053,18 +27101,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "remove-external-source-from-security-group id", - Short: "Remove an external source from a Security Group", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n cidr:\n description: CIDR-formatted network to remove\n type: string\nrequired:\n- cidr\ntype: object\n"), + Use: "delete-sks-nodepool id sks-nodepool-id", + Short: "Delete an SKS Nodepool", + 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 := XRemoveExternalSourceFromSecurityGroup(args[0], params, body) + _, decoded, err := XDeleteSksNodepool(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26092,18 +27136,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-sks-cluster", - Short: "Create an SKS cluster", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addons:\n description: Cluster addons\n items:\n enum:\n - exoscale-cloud-controller\n - exoscale-container-storage-interface\n - metrics-server\n - karpenter\n type: string\n type: array\n uniqueItems: true\n audit:\n $ref: '#/components/schemas/sks-audit-create'\n auto-upgrade:\n description: Enable auto upgrade of the control plane to the latest patch version available\n type: boolean\n cni:\n description: Cluster CNI\n enum:\n - calico\n - cilium\n type: string\n create-default-security-group:\n description: Creates an ad-hoc security group based on the choice of the selected CNI\n nullable: true\n type: boolean\n description:\n description: Cluster description\n maxLength: 255\n nullable: true\n type: string\n enable-kube-proxy:\n description: Indicates whether to deploy the Kubernetes network proxy. When unspecified, defaults to `true` unless Cilium CNI is selected\n type: boolean\n feature-gates:\n description: A list of Kubernetes-only Alpha features to enable for API server component\n items:\n type: string\n type: array\n uniqueItems: true\n labels:\n $ref: '#/components/schemas/sks-cluster-labels'\n level:\n description: Cluster service level\n enum:\n - starter\n - pro\n type: string\n name:\n description: Cluster name\n maxLength: 255\n minLength: 1\n type: string\n networking:\n $ref: '#/components/schemas/networking'\n oidc:\n $ref: '#/components/schemas/sks-oidc'\n version:\n description: Control plane Kubernetes version\n type: string\nrequired:\n- name\n- level\n- version\ntype: object\n"), + Use: "get-sks-nodepool id sks-nodepool-id", + Short: "Retrieve SKS Nodepool details", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), 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 := XCreateSksCluster(params, body) + _, decoded, err := XGetSksNodepool(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26131,14 +27171,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-sks-clusters", - Short: "List SKS clusters", - Long: cli.Markdown(""), + 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"), Example: examples, - Args: cobra.MinimumNArgs(0), + 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 := XListSksClusters(params) + _, decoded, err := XUpdateSksNodepool(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26166,14 +27210,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-sks-cluster-deprecated-resources id", - Short: "Resources that are scheduled to be removed in future kubernetes releases", - Long: cli.Markdown("This operation returns the deprecated resources for a given cluster"), + Use: "evict-sks-nodepool-members id sks-nodepool-id", + Short: "Evict Nodepool members", + Long: cli.Markdown("This operation evicts the specified Compute instances member from the Nodepool, shrinking it to `<current nodepool size> - <# evicted members>`.\n## Request Schema (application/json)\n\nproperties:\n instances:\n items:\n format: uuid\n type: string\n type: array\n uniqueItems: true\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 := XListSksClusterDeprecatedResources(args[0], params) + _, decoded, err := XEvictSksNodepoolMembers(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26201,18 +27249,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "generate-sks-cluster-kubeconfig id", - Short: "Generate a new Kubeconfig file for a SKS cluster", - Long: cli.Markdown("This operation returns a Kubeconfig file encoded in base64.\n## Request Schema (application/json)\n\ndescription: Kubeconfig request for a SKS cluster\nproperties:\n groups:\n description: List of roles. The certificate present in the Kubeconfig will have these roles set in the Org field.\n items:\n type: string\n type: array\n ttl:\n description: 'Validity in seconds of the Kubeconfig user certificate (default: 30 days)'\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n user:\n description: User name in the generated Kubeconfig. The certificate present in the Kubeconfig will also have this name set for the CN field.\n type: string\nrequired:\n- user\n- groups\ntype: object\n"), + 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"), 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:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XGenerateSksClusterKubeconfig(args[0], params, body) + _, decoded, err := XScaleSksNodepool(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26240,14 +27288,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-sks-cluster-versions", - Short: "List available versions for SKS clusters", + Use: "rotate-sks-ccm-credentials id", + Short: "Rotate Exoscale CCM credentials", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + 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 := XListSksClusterVersions(params) + _, decoded, err := XRotateSksCcmCredentials(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26261,8 +27313,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("include-deprecated", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -26277,14 +27327,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-sks-cluster id", - Short: "Delete an SKS cluster", + Use: "rotate-sks-csi-credentials id", + Short: "Rotate Exoscale CSI credentials", 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 := XDeleteSksCluster(args[0], params) + _, decoded, err := XRotateSksCsiCredentials(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26312,14 +27366,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-sks-cluster id", - Short: "Retrieve SKS cluster details", + Use: "rotate-sks-karpenter-credentials id", + Short: "Rotate Exoscale Karpenter credentials", 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 := XGetSksCluster(args[0], params) + _, decoded, err := XRotateSksKarpenterCredentials(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26347,18 +27405,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-sks-cluster id", - Short: "Update an SKS cluster", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n addons:\n description: Cluster addons\n items:\n enum:\n - exoscale-cloud-controller\n - exoscale-container-storage-interface\n - metrics-server\n - karpenter\n type: string\n type: array\n uniqueItems: true\n audit:\n $ref: '#/components/schemas/sks-audit-update'\n auto-upgrade:\n description: Enable auto upgrade of the control plane to the latest patch version available\n type: boolean\n description:\n description: Cluster description\n maxLength: 255\n nullable: true\n type: string\n enable-operators-ca:\n description: Add or remove the operators certificate authority (CA) from the list of trusted CAs of the api server. The default value is true\n type: boolean\n feature-gates:\n description: A list of Kubernetes-only Alpha features to enable for API server component\n items:\n type: string\n nullable: true\n type: array\n uniqueItems: true\n labels:\n $ref: '#/components/schemas/sks-cluster-labels'\n name:\n description: Cluster name\n maxLength: 255\n minLength: 1\n type: string\n oidc:\n $ref: '#/components/schemas/sks-oidc'\ntype: object\n"), + Use: "rotate-sks-operators-ca id", + Short: "Rotate operators certificate authority", + 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 := XUpdateSksCluster(args[0], params, body) + _, decoded, err := XRotateSksOperatorsCa(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26386,14 +27444,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-sks-cluster-authority-cert id authority", - Short: "Get the certificate for a SKS cluster authority", - Long: cli.Markdown("This operation returns the certificate for the given SKS cluster authority encoded in base64."), + Use: "upgrade-sks-cluster id", + Short: "Upgrade an SKS cluster", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n version:\n description: Control plane Kubernetes version\n type: string\nrequired:\n- version\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XGetSksClusterAuthorityCert(args[0], args[1], params) + _, decoded, err := XUpgradeSksCluster(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26421,8 +27483,8 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "generate-sks-karpenter-exoscale-nodeclass id", - Short: "Generate a Karpenter ExoscaleNodeClass manifest for an SKS cluster, including its default security group and feature flags if present", + Use: "upgrade-sks-cluster-service-level id", + Short: "Upgrade a SKS cluster to pro", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), @@ -26432,7 +27494,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XGenerateSksKarpenterExoscaleNodeclass(args[0], params, body) + _, decoded, err := XUpgradeSksClusterServiceLevel(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26460,18 +27522,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "generate-sks-karpenter-nodepool id", - Short: "Generate a Karpenter NodePool manifest with minimal configuration for an SKS cluster", - Long: cli.Markdown(""), + Use: "get-active-nodepool-template kube-version variant", + Short: "get-active-nodepool-template", + Long: cli.Markdown("Get the active template for a given kube version and variant (standard | nvidia)"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), 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 := XGenerateSksKarpenterNodepool(args[0], params, body) + _, decoded, err := XGetActiveNodepoolTemplate(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26499,14 +27557,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-sks-cluster-inspection id", - Short: "Get the latest inspection result", - Long: cli.Markdown("Helps troubleshoot common problems when deploying a kubernetes cluster. Inspections run every couple of minutes."), + Use: "list-snapshots", + Short: "List Snapshots", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetSksClusterInspection(args[0], params) + _, decoded, err := XListSnapshots(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26534,18 +27592,14 @@ func xRegister(subcommand bool) { var examples string 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 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"), + Use: "delete-snapshot id", + Short: "Delete a Snapshot", + 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 := XCreateSksNodepool(args[0], params, body) + _, decoded, err := XDeleteSnapshot(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26573,14 +27627,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-sks-nodepool id sks-nodepool-id", - Short: "Delete an SKS Nodepool", + Use: "get-snapshot id", + Short: "Retrieve Snapshot details", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteSksNodepool(args[0], args[1], params) + _, decoded, err := XGetSnapshot(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26608,14 +27662,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-sks-nodepool id sks-nodepool-id", - Short: "Retrieve SKS Nodepool details", + Use: "export-snapshot id", + Short: "Export a Snapshot", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XGetSksNodepool(args[0], args[1], params) + _, decoded, err := XExportSnapshot(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26643,18 +27701,18 @@ func xRegister(subcommand bool) { var examples string 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 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"), + Use: "promote-snapshot-to-template id", + Short: "Promote a Snapshot to a Template", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n default-user:\n description: Template default user\n maxLength: 255\n minLength: 1\n type: string\n description:\n description: Template description\n maxLength: 4096\n type: string\n name:\n description: Template name\n maxLength: 255\n minLength: 1\n type: string\n password-enabled:\n description: Enable password-based login in the template\n type: boolean\n ssh-key-enabled:\n description: Enable SSH key-based login in the template\n type: boolean\nrequired:\n- name\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[2:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XUpdateSksNodepool(args[0], args[1], params, body) + _, decoded, err := XPromoteSnapshotToTemplate(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26682,18 +27740,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "evict-sks-nodepool-members id sks-nodepool-id", - Short: "Evict Nodepool members", - Long: cli.Markdown("This operation evicts the specified Compute instances member from the Nodepool, shrinking it to `<current nodepool size> - <# evicted members>`.\n## Request Schema (application/json)\n\nproperties:\n instances:\n items:\n format: uuid\n type: string\n type: array\n uniqueItems: true\ntype: object\n"), + Use: "list-sos-buckets-usage", + Short: "List SOS Buckets Usage", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(0), 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 := XEvictSksNodepoolMembers(args[0], args[1], params, body) + _, decoded, err := XListSosBucketsUsage(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26721,18 +27775,14 @@ func xRegister(subcommand bool) { var examples string 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"), + Use: "get-sos-presigned-url bucket", + Short: "Retrieve Presigned Download URL for SOS object", + Long: cli.Markdown("Generates Presigned Download URL for SOS object"), Example: examples, - Args: cobra.MinimumNArgs(2), + Args: cobra.MinimumNArgs(1), 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 := XScaleSksNodepool(args[0], args[1], params, body) + _, decoded, err := XGetSosPresignedUrl(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26746,6 +27796,8 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("key", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -26760,18 +27812,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "rotate-sks-ccm-credentials id", - Short: "Rotate Exoscale CCM credentials", + Use: "list-ssh-keys", + Short: "List SSH keys", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), 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 := XRotateSksCcmCredentials(args[0], params, body) + _, decoded, err := XListSshKeys(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26799,18 +27847,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "rotate-sks-csi-credentials id", - Short: "Rotate Exoscale CSI credentials", - Long: cli.Markdown(""), + Use: "register-ssh-key", + Short: "Import SSH key", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n name:\n description: SSH key name\n pattern: ^[a-zA-Z0-9]{1}[a-zA-Z0-9._-]{0,254}$\n type: string\n public-key:\n description: Public key value\n type: string\nrequired:\n- name\n- public-key\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 := XRotateSksCsiCredentials(args[0], params, body) + _, decoded, err := XRegisterSshKey(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26838,18 +27886,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "rotate-sks-karpenter-credentials id", - Short: "Rotate Exoscale Karpenter credentials", + Use: "delete-ssh-key name", + Short: "Delete a SSH key", 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 := XRotateSksKarpenterCredentials(args[0], params, body) + _, decoded, err := XDeleteSshKey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26877,18 +27921,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "rotate-sks-operators-ca id", - Short: "Rotate operators certificate authority", + Use: "get-ssh-key name", + Short: "Retrieve SSH key details", 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 := XRotateSksOperatorsCa(args[0], params, body) + _, decoded, err := XGetSshKey(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26916,18 +27956,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "upgrade-sks-cluster id", - Short: "Upgrade an SKS cluster", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n version:\n description: Control plane Kubernetes version\n type: string\nrequired:\n- version\ntype: object\n"), + Use: "list-templates", + Short: "List Templates", + Long: cli.Markdown(""), 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:]) - if err != nil { - log.Fatal().Err(err).Msg("Unable to get body") - } - _, decoded, err := XUpgradeSksCluster(args[0], params, body) + _, decoded, err := XListTemplates(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26941,6 +27977,9 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("visibility", "", "") + cmd.Flags().String("family", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -26955,18 +27994,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "upgrade-sks-cluster-service-level id", - Short: "Upgrade a SKS cluster to pro", - Long: cli.Markdown(""), + Use: "register-template", + Short: "Register a Template", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n application-consistent-snapshot-enabled:\n description: Template with support for Application Consistent Snapshots\n type: boolean\n boot-mode:\n description: 'Boot mode (default: legacy)'\n enum:\n - legacy\n - uefi\n type: string\n build:\n description: Template build\n maxLength: 255\n minLength: 1\n type: string\n checksum:\n description: Template MD5 checksum\n minLength: 1\n type: string\n default-user:\n description: Template default user\n maxLength: 255\n minLength: 1\n type: string\n description:\n description: Template description\n maxLength: 255\n type: string\n maintainer:\n description: Template maintainer\n maxLength: 255\n minLength: 1\n type: string\n name:\n description: Template name\n maxLength: 255\n minLength: 1\n type: string\n password-enabled:\n description: Enable password-based login\n type: boolean\n size:\n description: Template size\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n ssh-key-enabled:\n description: Enable SSH key-based login\n type: boolean\n url:\n description: Template source URL\n minLength: 1\n type: string\n version:\n description: Template version\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\n- url\n- checksum\n- ssh-key-enabled\n- password-enabled\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 := XUpgradeSksClusterServiceLevel(args[0], params, body) + _, decoded, err := XRegisterTemplate(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -26994,14 +28033,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-active-nodepool-template kube-version variant", - Short: "get-active-nodepool-template", - Long: cli.Markdown("Get the active template for a given kube version and variant (standard | nvidia)"), + Use: "copy-template id", + Short: "Copy a Template from a zone to another", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n target-zone:\n $ref: '#/components/schemas/zone'\nrequired:\n- target-zone\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(2), + 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 := XGetActiveNodepoolTemplate(args[0], args[1], params) + _, decoded, err := XCopyTemplate(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27029,14 +28072,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-snapshots", - Short: "List Snapshots", + Use: "delete-template id", + Short: "Delete a Template", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListSnapshots(params) + _, decoded, err := XDeleteTemplate(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27064,14 +28107,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-snapshot id", - Short: "Delete a Snapshot", + Use: "get-template id", + Short: "Retrieve Template details", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteSnapshot(args[0], params) + _, decoded, err := XGetTemplate(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27099,14 +28142,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-snapshot id", - Short: "Retrieve Snapshot details", - Long: cli.Markdown(""), + Use: "update-template id", + Short: "Update template attributes", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Template Description\n maxLength: 255\n type: string\n name:\n description: Template 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 := XGetSnapshot(args[0], params) + _, decoded, err := XUpdateTemplate(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27134,18 +28181,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "export-snapshot id", - Short: "Export a Snapshot", - Long: cli.Markdown(""), + Use: "get-usage-report", + Short: "Retrieve organization usage reports", + Long: cli.Markdown("Returns aggregated usage reports for an organization"), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), 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 := XExportSnapshot(args[0], params, body) + _, decoded, err := XGetUsageReport(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27159,6 +28202,8 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) + cmd.Flags().String("period", "", "") + cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -27173,18 +28218,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "promote-snapshot-to-template id", - Short: "Promote a Snapshot to a Template", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n default-user:\n description: Template default user\n maxLength: 255\n minLength: 1\n type: string\n description:\n description: Template description\n maxLength: 4096\n type: string\n name:\n description: Template name\n maxLength: 255\n minLength: 1\n type: string\n password-enabled:\n description: Enable password-based login in the template\n type: boolean\n ssh-key-enabled:\n description: Enable SSH key-based login in the template\n type: boolean\nrequired:\n- name\ntype: object\n"), + Use: "create-user", + Short: "Create a User", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n email:\n description: User Email\n type: string\n role:\n $ref: '#/components/schemas/iam-role'\nrequired:\n- email\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 := XPromoteSnapshotToTemplate(args[0], params, body) + _, decoded, err := XCreateUser(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27212,14 +28257,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-sos-buckets-usage", - Short: "List SOS Buckets Usage", + Use: "list-users", + Short: "List Users", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListSosBucketsUsage(params) + _, decoded, err := XListUsers(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27247,14 +28292,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-sos-presigned-url bucket", - Short: "Retrieve Presigned Download URL for SOS object", - Long: cli.Markdown("Generates Presigned Download URL for SOS object"), + Use: "delete-user id", + Short: "Delete User", + Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetSosPresignedUrl(args[0], params) + _, decoded, err := XDeleteUser(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27268,8 +28313,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("key", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -27284,14 +28327,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-ssh-keys", - Short: "List SSH keys", - Long: cli.Markdown(""), + Use: "update-user-role id", + Short: "Update a User's IAM role", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n role:\n $ref: '#/components/schemas/iam-role'\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 := XListSshKeys(params) + _, decoded, err := XUpdateUserRole(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27319,9 +28366,9 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "register-ssh-key", - Short: "Import SSH key", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n name:\n description: SSH key name\n pattern: ^[a-zA-Z0-9]{1}[a-zA-Z0-9._-]{0,254}$\n type: string\n public-key:\n description: Public key value\n type: string\nrequired:\n- name\n- public-key\ntype: object\n"), + Use: "create-vpc", + Short: "[BETA] Create a VPC", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: VPC description\n maxLength: 4096\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: VPC name\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\ntype: object\n"), Example: examples, Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { @@ -27330,7 +28377,7 @@ func xRegister(subcommand bool) { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XRegisterSshKey(params, body) + _, decoded, err := XCreateVpc(params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27358,14 +28405,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-ssh-key name", - Short: "Delete a SSH key", + Use: "list-vpcs", + Short: "[BETA] List VPCs", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteSshKey(args[0], params) + _, decoded, err := XListVpcs(params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27393,14 +28440,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-ssh-key name", - Short: "Retrieve SSH key details", + Use: "delete-vpc id", + Short: "[BETA] Delete a VPC", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetSshKey(args[0], params) + _, decoded, err := XDeleteVpc(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27428,14 +28475,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-templates", - Short: "List Templates", + Use: "get-vpc id", + Short: "[BETA] Retrieve VPC details", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XListTemplates(params) + _, decoded, err := XGetVpc(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27449,9 +28496,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("visibility", "", "") - cmd.Flags().String("family", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -27466,18 +28510,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "register-template", - Short: "Register a Template", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n application-consistent-snapshot-enabled:\n description: Template with support for Application Consistent Snapshots\n type: boolean\n boot-mode:\n description: 'Boot mode (default: legacy)'\n enum:\n - legacy\n - uefi\n type: string\n build:\n description: Template build\n maxLength: 255\n minLength: 1\n type: string\n checksum:\n description: Template MD5 checksum\n minLength: 1\n type: string\n default-user:\n description: Template default user\n maxLength: 255\n minLength: 1\n type: string\n description:\n description: Template description\n maxLength: 255\n type: string\n maintainer:\n description: Template maintainer\n maxLength: 255\n minLength: 1\n type: string\n name:\n description: Template name\n maxLength: 255\n minLength: 1\n type: string\n password-enabled:\n description: Enable password-based login\n type: boolean\n size:\n description: Template size\n exclusiveMinimum: true\n format: int64\n minimum: 0\n type: integer\n ssh-key-enabled:\n description: Enable SSH key-based login\n type: boolean\n url:\n description: Template source URL\n minLength: 1\n type: string\n version:\n description: Template version\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\n- url\n- checksum\n- ssh-key-enabled\n- password-enabled\ntype: object\n"), + Use: "update-vpc id", + Short: "[BETA] Update a VPC", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: VPC description\n maxLength: 4096\n nullable: true\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: VPC name\n maxLength: 255\n minLength: 1\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[0:]) + body, err := cli.GetBody("application/json", args[1:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XRegisterTemplate(params, body) + _, decoded, err := XUpdateVpc(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27505,18 +28549,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "copy-template id", - Short: "Copy a Template from a zone to another", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n target-zone:\n $ref: '#/components/schemas/zone'\nrequired:\n- target-zone\ntype: object\n"), + Use: "list-vpc-routes vpc-id", + Short: "[BETA] List VPC routes", + 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 := XCopyTemplate(args[0], params, body) + _, decoded, err := XListVpcRoutes(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27544,14 +28584,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-template id", - Short: "Delete a Template", - Long: cli.Markdown(""), + Use: "create-subnet vpc-id", + Short: "[BETA] Create a Subnet", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n address-space:\n description: Subnet address space\n enum:\n - private\n type: string\n addressfamily:\n description: Subnet address family\n enum:\n - inet4\n type: string\n description:\n description: Subnet description\n maxLength: 4096\n type: string\n ipv4-block:\n description: Subnet ipv4 CIDR\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Subnet name\n maxLength: 255\n minLength: 1\n type: string\nrequired:\n- name\n- addressfamily\n- address-space\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 := XDeleteTemplate(args[0], params) + _, decoded, err := XCreateSubnet(args[0], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27579,14 +28623,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-template id", - Short: "Retrieve Template details", + Use: "list-subnets vpc-id", + Short: "[BETA] List Subnets", Long: cli.Markdown(""), Example: examples, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetTemplate(args[0], params) + _, decoded, err := XListSubnets(args[0], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27614,18 +28658,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-template id", - Short: "Update template attributes", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Template Description\n maxLength: 255\n type: string\n name:\n description: Template name\n maxLength: 255\n minLength: 1\n type: string\ntype: object\n"), + Use: "delete-subnet vpc-id id", + Short: "[BETA] Delete a Subnet", + 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 := XUpdateTemplate(args[0], params, body) + _, decoded, err := XDeleteSubnet(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27653,14 +28693,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "get-usage-report", - Short: "Retrieve organization usage reports", - Long: cli.Markdown("Returns aggregated usage reports for an organization"), + Use: "get-subnet vpc-id id", + Short: "[BETA] Retrieve Subnet details", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XGetUsageReport(params) + _, decoded, err := XGetSubnet(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27674,8 +28714,6 @@ func xRegister(subcommand bool) { root.AddCommand(cmd) - cmd.Flags().String("period", "", "") - cli.SetCustomFlags(cmd) if cmd.Flags().HasFlags() { @@ -27690,18 +28728,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "create-user", - Short: "Create a User", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n email:\n description: User Email\n type: string\n role:\n $ref: '#/components/schemas/iam-role'\nrequired:\n- email\ntype: object\n"), + Use: "update-subnet vpc-id id", + Short: "[BETA] Update a Subnet", + Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n description:\n description: Subnet description\n maxLength: 4096\n nullable: true\n type: string\n ipv4-block:\n description: Subnet CIDR\n nullable: true\n type: string\n labels:\n $ref: '#/components/schemas/labels'\n name:\n description: Subnet name\n maxLength: 255\n minLength: 1\n nullable: true\n type: string\ntype: object\n"), Example: examples, - Args: cobra.MinimumNArgs(0), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - body, err := cli.GetBody("application/json", args[0:]) + body, err := cli.GetBody("application/json", args[2:]) if err != nil { log.Fatal().Err(err).Msg("Unable to get body") } - _, decoded, err := XCreateUser(params, body) + _, decoded, err := XUpdateSubnet(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27729,14 +28767,18 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "list-users", - Short: "List Users", - Long: cli.Markdown(""), + 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"), Example: examples, - Args: cobra.MinimumNArgs(0), + 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 := XListUsers(params) + _, decoded, err := XCreateRoute(args[0], args[1], params, body) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27764,14 +28806,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "delete-user id", - Short: "Delete User", + Use: "list-routes vpc-id subnet-id", + Short: "[BETA] List Subnet routes", Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(2), Run: func(cmd *cobra.Command, args []string) { - _, decoded, err := XDeleteUser(args[0], params) + _, decoded, err := XListRoutes(args[0], args[1], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") } @@ -27799,18 +28841,14 @@ func xRegister(subcommand bool) { var examples string cmd := &cobra.Command{ - Use: "update-user-role id", - Short: "Update a User's IAM role", - Long: cli.Markdown("\n## Request Schema (application/json)\n\nproperties:\n role:\n $ref: '#/components/schemas/iam-role'\ntype: object\n"), + Use: "delete-route vpc-id subnet-id id", + Short: "[BETA] Delete a route", + Long: cli.Markdown(""), Example: examples, - Args: cobra.MinimumNArgs(1), + Args: cobra.MinimumNArgs(3), 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 := XUpdateUserRole(args[0], params, body) + _, decoded, err := XDeleteRoute(args[0], args[1], args[2], params) if err != nil { log.Fatal().Err(err).Msg("Error calling operation") }