@@ -56,6 +56,12 @@ type CreateInstanceResult struct {
5656 Password string `json:"password"`
5757}
5858
59+ type rdbCreateInstanceRequestCustom struct {
60+ * rdbSDK.CreateInstanceRequest
61+ InitEndpoints []* rdbEndpointSpecCustom `json:"init-endpoints"`
62+ GeneratePassword bool
63+ }
64+
5965func createInstanceResultMarshalerFunc (i interface {}, opt * human.MarshalOpt ) (string , error ) {
6066 instanceResult := i .(CreateInstanceResult )
6167
@@ -203,7 +209,7 @@ func autoCompleteNodeType(ctx context.Context, prefix string, request any) core.
203209}
204210
205211func autoCompleteDatabaseEngines (ctx context.Context , prefix string , request any ) core.AutocompleteSuggestions {
206- req := request .(* rdbSDK. CreateInstanceRequest )
212+ req := request .(rdbCreateInstanceRequestCustom )
207213 suggestion := core .AutocompleteSuggestions (nil )
208214 client := core .ExtractClient (ctx )
209215 api := rdbSDK .NewAPI (client )
@@ -228,12 +234,6 @@ func autoCompleteDatabaseEngines(ctx context.Context, prefix string, request any
228234}
229235
230236func instanceCreateBuilder (c * core.Command ) * core.Command {
231- type rdbCreateInstanceRequestCustom struct {
232- * rdbSDK.CreateInstanceRequest
233- InitEndpoints []* rdbEndpointSpecCustom `json:"init-endpoints"`
234- GeneratePassword bool
235- }
236-
237237 c .ArgSpecs .AddBefore ("init-endpoints.{index}.private-network.private-network-id" , & core.ArgSpec {
238238 Name : "init-endpoints.{index}.load-balancer" ,
239239 Short : "Will configure a load-balancer endpoint along with your private network endpoint if true" ,
0 commit comments