Skip to content

Commit ce6bc67

Browse files
Auth, organization and service account fixes (#77)
* Replace auth error with custom error * Fix example * Fix messages and examples for servie account§ * Revert "Replace auth error with custom error" This reverts commit 26e4b5a.
1 parent cefddda commit ce6bc67

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

docs/stackit_organization_member_list.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ stackit organization member list [flags]
1414

1515
```
1616
List all members of an organization
17-
$ stackit organization role list --organization-id xxx
17+
$ stackit organization member list --organization-id xxx
1818
1919
List all members of an organization in JSON format
20-
$ stackit organization role list --organization-id xxx --output-format json
20+
$ stackit organization member list --organization-id xxx --output-format json
2121
2222
List up to 10 members of an organization
23-
$ stackit organization role list --organization-id xxx --limit 10
23+
$ stackit organization member list --organization-id xxx --limit 10
2424
```
2525

2626
### Options

docs/stackit_service-account_token_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ stackit service-account token create [flags]
1616

1717
```
1818
Create an access token for the service account with email "[email protected]" with a default time to live
19-
$ stackit service-account token create --sa-email [email protected]
19+
$ stackit service-account token create --email [email protected]
2020
2121
Create an access token for the service account with email "[email protected]" with a time to live of 10 days
2222
$ stackit service-account token create --email [email protected] --ttl-days 10

internal/cmd/organization/member/list/list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ func NewCmd() *cobra.Command {
4545
Example: examples.Build(
4646
examples.NewExample(
4747
`List all members of an organization`,
48-
"$ stackit organization role list --organization-id xxx"),
48+
"$ stackit organization member list --organization-id xxx"),
4949
examples.NewExample(
5050
`List all members of an organization in JSON format`,
51-
"$ stackit organization role list --organization-id xxx --output-format json"),
51+
"$ stackit organization member list --organization-id xxx --output-format json"),
5252
examples.NewExample(
5353
`List up to 10 members of an organization`,
54-
"$ stackit organization role list --organization-id xxx --limit 10"),
54+
"$ stackit organization member list --organization-id xxx --limit 10"),
5555
),
5656
RunE: func(cmd *cobra.Command, args []string) error {
5757
ctx := context.Background()

internal/cmd/service-account/delete/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func NewCmd() *cobra.Command {
6666
return fmt.Errorf("delete service account: %w", err)
6767
}
6868

69-
cmd.Printf("Service account %s deleted", model.Email)
69+
cmd.Printf("Service account %s deleted\n", model.Email)
7070
return nil
7171
},
7272
}

internal/cmd/service-account/key/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func NewCmd() *cobra.Command {
8686
return fmt.Errorf("create service account key: %w", err)
8787
}
8888

89-
cmd.PrintErrf("Created key for service account %s\n", model.ServiceAccountEmail)
89+
cmd.PrintErrf("Created key for service account %s with id %s\n", model.ServiceAccountEmail, *resp.Id)
9090

9191
key, err := json.MarshalIndent(resp, "", " ")
9292
if err != nil {

internal/cmd/service-account/token/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func NewCmd() *cobra.Command {
4343
Example: examples.Build(
4444
examples.NewExample(
4545
`Create an access token for the service account with email "[email protected]" with a default time to live`,
46-
"$ stackit service-account token create --sa-email [email protected]"),
46+
"$ stackit service-account token create --email [email protected]"),
4747
examples.NewExample(
4848
`Create an access token for the service account with email "[email protected]" with a time to live of 10 days`,
4949
"$ stackit service-account token create --email [email protected] --ttl-days 10"),

0 commit comments

Comments
 (0)