@@ -3,22 +3,23 @@ package escape
33import (
44 "context"
55 "fmt"
6+ "strings"
67
78 v3 "github.com/Escape-Technologies/cli/pkg/api/v3"
89 "github.com/Escape-Technologies/cli/pkg/log"
910)
1011
1112// ListKubernetesIntegrationsFilters holds optional filters for listing Kubernetes integrations
1213type ListKubernetesIntegrationsFilters struct {
13- ProjectIDs []string
14- LocationID string
15- Search string
14+ ProjectIDs []string
15+ LocationIDs string
16+ Search string
1617}
1718
1819// UpsertKubernetesIntegration creates a Kubernetes integration if it doesn't exist
1920func UpsertKubernetesIntegration (ctx context.Context , req v3.CreatekubernetesIntegrationRequest ) (* v3.CreatekubernetesIntegration200Response , error ) {
2021 list , _ , err := listKubernetesIntegrations (ctx , "" , & ListKubernetesIntegrationsFilters {
21- LocationID : * req .ProxyId ,
22+ LocationIDs : strings . Join ([] string { * req .ProxyId }, "," ) ,
2223 })
2324 if err != nil {
2425 return nil , fmt .Errorf ("api error: %w" , err )
@@ -69,8 +70,8 @@ func listKubernetesIntegrations(ctx context.Context, next string, filters *ListK
6970 if len (filters .ProjectIDs ) > 0 {
7071 req = req .ProjectIds (filters .ProjectIDs )
7172 }
72- if len (filters .LocationID ) > 0 {
73- req = req .LocationId ( filters .LocationID )
73+ if len (filters .LocationIDs ) > 0 {
74+ req = req .LocationIds ([] string { filters .LocationIDs } )
7475 }
7576 if filters .Search != "" {
7677 req = req .Search (filters .Search )
0 commit comments