@@ -7,16 +7,14 @@ import (
77 logs "github.com/stackitcloud/stackit-sdk-go/services/logs/v1api"
88
99 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
10- "github.com/stackitcloud/stackit-cli/internal/pkg/flags"
11- "github.com/stackitcloud/stackit-cli/internal/pkg/types"
12- "github.com/stackitcloud/stackit-cli/internal/pkg/utils"
13-
1410 "github.com/stackitcloud/stackit-cli/internal/pkg/errors"
1511 "github.com/stackitcloud/stackit-cli/internal/pkg/examples"
12+ "github.com/stackitcloud/stackit-cli/internal/pkg/flags"
1613 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1714 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
1815 "github.com/stackitcloud/stackit-cli/internal/pkg/services/logs/client"
1916 logUtils "github.com/stackitcloud/stackit-cli/internal/pkg/services/logs/utils"
17+ "github.com/stackitcloud/stackit-cli/internal/pkg/types"
2018
2119 "github.com/spf13/cobra"
2220)
@@ -55,7 +53,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
5553 return err
5654 }
5755
58- instanceLabel , err := logUtils .GetInstanceName (ctx , apiClient , model .ProjectId , model .Region , model .InstanceId )
56+ instanceLabel , err := logUtils .GetInstanceName (ctx , apiClient . DefaultAPI , model .ProjectId , model .Region , model .InstanceId )
5957 if err != nil {
6058 params .Printer .Debug (print .ErrorLevel , "get instance name: %v" , err )
6159 instanceLabel = model .InstanceId
@@ -77,7 +75,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7775 return fmt .Errorf ("delete all access token: nil result" )
7876 }
7977
80- params .Printer .Outputf ("Deleted %d access token(s)\n " , len (utils . PtrValue ( items .Tokens ) ))
78+ params .Printer .Outputf ("Deleted %d access token(s)\n " , len (items .Tokens ))
8179 return nil
8280 },
8381 }
@@ -108,5 +106,5 @@ func parseInput(p *print.Printer, cmd *cobra.Command, _ []string) (*inputModel,
108106}
109107
110108func buildRequest (ctx context.Context , model * inputModel , apiClient * logs.APIClient ) logs.ApiDeleteAllAccessTokensRequest {
111- return apiClient .DeleteAllAccessTokens (ctx , model .ProjectId , model .Region , model .InstanceId )
109+ return apiClient .DefaultAPI . DeleteAllAccessTokens (ctx , model .ProjectId , model .Region , model .InstanceId )
112110}
0 commit comments