Skip to content

Commit cc2df6d

Browse files
committed
Updated examples and fixed more comments
1 parent 0371f22 commit cc2df6d

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

internal/cmd/beta/logs/access_token/create/create.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ func outputResult(p *print.Printer, outputFormat, instanceLabel string, accessTo
154154
return fmt.Errorf("access token cannot be nil")
155155
}
156156
return p.OutputResult(outputFormat, accessToken, func() error {
157-
operationState := "Created"
158-
p.Outputf("%s access token for log instance %q.\n\nID: %s\nToken: %s\n", operationState, instanceLabel, *accessToken.Id, *accessToken.AccessToken)
157+
p.Outputf("Created access token for log instance %q.\n\nID: %s\nToken: %s\n", instanceLabel, *accessToken.Id, *accessToken.AccessToken)
159158
return nil
160159
})
161160
}

internal/cmd/beta/logs/access_token/delete/delete.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3939
Args: args.SingleArg(accessTokenIdArg, utils.ValidateUUID),
4040
Example: examples.Build(
4141
examples.NewExample(
42-
`Delete access token with ID "xxx"`,
43-
"$ stackit logs access-token delete xxx",
42+
`Delete access token with ID "xxx" in instance "yyy"`,
43+
"$ stackit logs access-token delete xxx --instance-id yyy",
4444
),
4545
),
4646
RunE: func(cmd *cobra.Command, args []string) error {

internal/cmd/beta/logs/access_token/delete_all/delete_all.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3737
Example: examples.Build(
3838
examples.NewExample(
3939
`Delete all access tokens in instance "xxx"`,
40-
"$ stackit logs access-token delete --instance-id xxx",
40+
"$ stackit logs access-token delete-all --instance-id xxx",
4141
),
4242
),
4343
RunE: func(cmd *cobra.Command, args []string) error {
@@ -59,7 +59,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
5959
instanceLabel = model.InstanceId
6060
}
6161

62-
prompt := fmt.Sprintf("Are you sure you want to delete all access tokens in instance %q?", instanceLabel)
62+
prompt := fmt.Sprintf("Are you sure you want to delete all access tokens for instance %q?", instanceLabel)
6363
err = params.Printer.PromptForConfirmation(prompt)
6464
if err != nil {
6565
return err

internal/cmd/beta/logs/access_token/delete_all_expired/delete_all_expired.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
3737
Example: examples.Build(
3838
examples.NewExample(
3939
`Delete all expired access tokens in instance "xxx"`,
40-
"$ stackit logs access-token delete --instance-id xxx",
40+
"$ stackit logs access-token delete-all-expired --instance-id xxx",
4141
),
4242
),
4343
RunE: func(cmd *cobra.Command, args []string) error {

internal/cmd/beta/logs/access_token/update/update.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
4444
Example: examples.Build(
4545
examples.NewExample(
4646
`Update access token with ID "xxx" with new name "access-token-1"`,
47-
`$ stackit logs access-token update xxx --display-name access-token-1`,
47+
`$ stackit logs access-token update xxx --instance-id yyy --display-name access-token-1`,
4848
),
4949
examples.NewExample(
5050
`Update access token with ID "xxx" with new description "Access token for Service XY"`,
51-
`$ stackit logs access-token update xxx --description "Access token for Service XY"`,
51+
`$ stackit logs access-token update xxx --instance-id yyy --description "Access token for Service XY"`,
5252
),
5353
),
5454
RunE: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)