Skip to content

Commit

Permalink
feat(iam): enable iam v1alpha1 by default (#2668)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémy Léone <[email protected]>
  • Loading branch information
Monitob and remyleone authored Dec 6, 2022
1 parent f9eaf86 commit 03dad56
Show file tree
Hide file tree
Showing 54 changed files with 2,052 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create project.

USAGE:
scw account project create [arg=value ...]

ARGS:
[name] The name of the project
[description] The description of the project
[organization-id] Organization ID to use. If none is passed the default organization ID will be used

FLAGS:
-h, --help help for create

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete project.

USAGE:
scw account project delete [arg=value ...]

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used

FLAGS:
-h, --help help for delete

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
18 changes: 18 additions & 0 deletions cmd/scw/testdata/test-all-usage-account-project-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get project.

USAGE:
scw account project get [arg=value ...]

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used

FLAGS:
-h, --help help for get

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
21 changes: 21 additions & 0 deletions cmd/scw/testdata/test-all-usage-account-project-list-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List projects.

USAGE:
scw account project list [arg=value ...]

ARGS:
[name] The name of the project
[order-by] The sort order of the returned projects (created_at_asc | created_at_desc | name_asc | name_desc)
[project-ids.{index}] Filter out by a list of project ID
[organization-id] Organization ID to use. If none is passed the default organization ID will be used

FLAGS:
-h, --help help for list

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update project.

USAGE:
scw account project update [arg=value ...]

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name] The name of the project
[description] The description of the project

FLAGS:
-h, --help help for update

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
24 changes: 24 additions & 0 deletions cmd/scw/testdata/test-all-usage-account-project-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Project management commands.

USAGE:
scw account project <command>

AVAILABLE COMMANDS:
create Create project
delete Delete project
get Get project
list List projects
update Update project

FLAGS:
-h, --help help for project

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw account project [command] --help" for more information about a command.
21 changes: 21 additions & 0 deletions cmd/scw/testdata/test-all-usage-account-usage#01.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
This API allows you to manage projects.

USAGE:
scw account <command>

AVAILABLE COMMANDS:
project Project management commands
ssh-key SSH keys management commands

FLAGS:
-h, --help help for account

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw account [command] --help" for more information about a command.
3 changes: 2 additions & 1 deletion cmd/scw/testdata/test-all-usage-account-usage.golden
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Account API
This API allows you to manage projects.

USAGE:
scw account <command>

AVAILABLE COMMANDS:
project Project management commands
ssh-key SSH keys management commands

FLAGS:
Expand Down
29 changes: 29 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-api-key-create-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create an API key.

USAGE:
scw iam api-key create [arg=value ...]

ARGS:
[application-id] ID of application principal
[user-id] ID of user principal
[expires-at] Expiration date of the API key
[default-project-id] The default project ID to use with object storage
[description] The description of the API key (max length is 200 chars)

FLAGS:
-h, --help help for create

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

SEE ALSO:
# List all API keys
scw iam api-key list

# Delete an API key
scw iam api-key delete
29 changes: 29 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-api-key-delete-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete an API key.

USAGE:
scw iam api-key delete <access-key ...> [arg=value ...]

EXAMPLES:
Delete a given API key
scw iam api-key delete SCW00000000000

ARGS:
access-key Access key to delete

FLAGS:
-h, --help help for delete

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

SEE ALSO:
# List all API keys
scw iam api-key list

# Create an API key
scw iam api-key create
18 changes: 18 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-api-key-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get an API key.

USAGE:
scw iam api-key get <access-key ...> [arg=value ...]

ARGS:
access-key Access key to search for

FLAGS:
-h, --help help for get

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
22 changes: 22 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-api-key-list-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List API keys.

USAGE:
scw iam api-key list [arg=value ...]

ARGS:
[order-by=created_at_asc] Criteria for sorting results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | expires_at_asc | expires_at_desc | access_key_asc | access_key_desc)
[application-id] ID of an application bearer
[user-id] ID of a user bearer
[editable] Filter out editable API keys or not
organization-id=<retrieved from config> ID of organization

FLAGS:
-h, --help help for list

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
20 changes: 20 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-api-key-update-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update an API key.

USAGE:
scw iam api-key update <access-key ...> [arg=value ...]

ARGS:
access-key Access key to update
[default-project-id] The new default project ID to set
[description] The new description to update

FLAGS:
-h, --help help for update

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
24 changes: 24 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-api-key-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
API keys management commands.

USAGE:
scw iam api-key <command>

AVAILABLE COMMANDS:
create Create an API key
delete Delete an API key
get Get an API key
list List API keys
update Update an API key

FLAGS:
-h, --help help for api-key

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw iam api-key [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a new application.

USAGE:
scw iam application create [arg=value ...]

ARGS:
name=<generated> Name of application to create (max length is 64 chars)
[description] Description of application (max length is 200 chars)
[organization-id] Organization ID to use. If none is passed the default organization ID will be used

FLAGS:
-h, --help help for create

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete an application.

USAGE:
scw iam application delete <application-id ...> [arg=value ...]

ARGS:
application-id ID of application to delete

FLAGS:
-h, --help help for delete

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
18 changes: 18 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-application-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get an existing application.

USAGE:
scw iam application get <application-id ...> [arg=value ...]

ARGS:
application-id ID of application to find

FLAGS:
-h, --help help for get

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
22 changes: 22 additions & 0 deletions cmd/scw/testdata/test-all-usage-iam-application-list-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List applications of an organization.

USAGE:
scw iam application list [arg=value ...]

ARGS:
[order-by=created_at_asc] Criteria for sorting results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc)
[name] Name of application to filter
[editable] Filter out editable applications or not
[application-ids.{index}] Filter out by a list of ID
organization-id=<retrieved from config> ID of organization to filter

FLAGS:
-h, --help help for list

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Loading

0 comments on commit 03dad56

Please sign in to comment.