diff --git a/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden new file mode 100644 index 0000000000..d000ed69d2 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-account-project-create-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden new file mode 100644 index 0000000000..13bffbff9e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-account-project-delete-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden new file mode 100644 index 0000000000..c63e207218 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-account-project-get-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden new file mode 100644 index 0000000000..0dd6617b70 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-account-project-list-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden new file mode 100644 index 0000000000..1c279bac6e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-account-project-update-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-account-project-usage.golden b/cmd/scw/testdata/test-all-usage-account-project-usage.golden new file mode 100644 index 0000000000..2f0d6a2a41 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-account-project-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Project management commands. + +USAGE: + scw account project + +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. diff --git a/cmd/scw/testdata/test-all-usage-account-usage#01.golden b/cmd/scw/testdata/test-all-usage-account-usage#01.golden new file mode 100644 index 0000000000..6b06ca109e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-account-usage#01.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +This API allows you to manage projects. + +USAGE: + scw account + +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. diff --git a/cmd/scw/testdata/test-all-usage-account-usage.golden b/cmd/scw/testdata/test-all-usage-account-usage.golden index adc62e0ea3..6b06ca109e 100644 --- a/cmd/scw/testdata/test-all-usage-account-usage.golden +++ b/cmd/scw/testdata/test-all-usage-account-usage.golden @@ -1,11 +1,12 @@ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ -Account API +This API allows you to manage projects. USAGE: scw account AVAILABLE COMMANDS: + project Project management commands ssh-key SSH keys management commands FLAGS: diff --git a/cmd/scw/testdata/test-all-usage-iam-api-key-create-usage.golden b/cmd/scw/testdata/test-all-usage-iam-api-key-create-usage.golden new file mode 100644 index 0000000000..2f8b1d87fe --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-api-key-create-usage.golden @@ -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 diff --git a/cmd/scw/testdata/test-all-usage-iam-api-key-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-api-key-delete-usage.golden new file mode 100644 index 0000000000..80bc936b66 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-api-key-delete-usage.golden @@ -0,0 +1,29 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete an API key. + +USAGE: + scw iam api-key delete [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 diff --git a/cmd/scw/testdata/test-all-usage-iam-api-key-get-usage.golden b/cmd/scw/testdata/test-all-usage-iam-api-key-get-usage.golden new file mode 100644 index 0000000000..e4e199542f --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-api-key-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get an API key. + +USAGE: + scw iam api-key get [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 diff --git a/cmd/scw/testdata/test-all-usage-iam-api-key-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-api-key-list-usage.golden new file mode 100644 index 0000000000..b7938702a0 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-api-key-list-usage.golden @@ -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= 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-api-key-update-usage.golden b/cmd/scw/testdata/test-all-usage-iam-api-key-update-usage.golden new file mode 100644 index 0000000000..b4a1a9a6a1 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-api-key-update-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update an API key. + +USAGE: + scw iam api-key update [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 diff --git a/cmd/scw/testdata/test-all-usage-iam-api-key-usage.golden b/cmd/scw/testdata/test-all-usage-iam-api-key-usage.golden new file mode 100644 index 0000000000..253077c20d --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-api-key-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +API keys management commands. + +USAGE: + scw iam api-key + +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. diff --git a/cmd/scw/testdata/test-all-usage-iam-application-create-usage.golden b/cmd/scw/testdata/test-all-usage-iam-application-create-usage.golden new file mode 100644 index 0000000000..ac80669596 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-application-create-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create a new application. + +USAGE: + scw iam application create [arg=value ...] + +ARGS: + name= 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-application-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-application-delete-usage.golden new file mode 100644 index 0000000000..6200aecf94 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-application-delete-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete an application. + +USAGE: + scw iam application delete [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 diff --git a/cmd/scw/testdata/test-all-usage-iam-application-get-usage.golden b/cmd/scw/testdata/test-all-usage-iam-application-get-usage.golden new file mode 100644 index 0000000000..d37c2a9fdb --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-application-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get an existing application. + +USAGE: + scw iam application get [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 diff --git a/cmd/scw/testdata/test-all-usage-iam-application-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-application-list-usage.golden new file mode 100644 index 0000000000..2d49c02457 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-application-list-usage.golden @@ -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= 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-application-update-usage.golden b/cmd/scw/testdata/test-all-usage-iam-application-update-usage.golden new file mode 100644 index 0000000000..75557e4ec7 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-application-update-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update an existing application. + +USAGE: + scw iam application update [arg=value ...] + +ARGS: + application-id ID of application to update + [name] New name of application (max length is 64 chars) + [description] New description of application (max length is 200 chars) + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-application-usage.golden b/cmd/scw/testdata/test-all-usage-iam-application-usage.golden new file mode 100644 index 0000000000..cfdf6cf489 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-application-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Applications management commands. + +USAGE: + scw iam application + +AVAILABLE COMMANDS: + create Create a new application + delete Delete an application + get Get an existing application + list List applications of an organization + update Update an existing application + +FLAGS: + -h, --help help for application + +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 application [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-group-add-member-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-add-member-usage.golden new file mode 100644 index 0000000000..3fd069bb52 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-add-member-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Add a user of an application to a group. + +USAGE: + scw iam group add-member [arg=value ...] + +ARGS: + group-id ID of group + [user-id] ID of the user to add + [application-id] ID of the application to add + +FLAGS: + -h, --help help for add-member + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-group-create-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-create-usage.golden new file mode 100644 index 0000000000..ebb41d8d55 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-create-usage.golden @@ -0,0 +1,34 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create a new group. + +USAGE: + scw iam group create [arg=value ...] + +EXAMPLES: + Create a group + scw iam group create name=foobar + +ARGS: + name= Name of the group to create (max length is 64 chars). MUST be unique inside an organization + [description] Description of the group to create (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 + +SEE ALSO: + # Add a group member + scw iam group add-member + + # Delete a group + scw iam group delete + + # Create a policy for a group + scw iam policy create diff --git a/cmd/scw/testdata/test-all-usage-iam-group-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-delete-usage.golden new file mode 100644 index 0000000000..fe2f32c785 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-delete-usage.golden @@ -0,0 +1,29 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete a group. + +USAGE: + scw iam group delete [arg=value ...] + +EXAMPLES: + Delete a given group + scw iam group delete 11111111-1111-1111-1111-111111111111 + +ARGS: + group-id ID of group 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 groups + scw iam group list + + # Delete a group + scw iam group delete diff --git a/cmd/scw/testdata/test-all-usage-iam-group-get-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-get-usage.golden new file mode 100644 index 0000000000..dd9964eb40 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get a group. + +USAGE: + scw iam group get [arg=value ...] + +ARGS: + group-id ID of group + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-group-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-list-usage.golden new file mode 100644 index 0000000000..448cc44b55 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-list-usage.golden @@ -0,0 +1,23 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List groups. + +USAGE: + scw iam group list [arg=value ...] + +ARGS: + [order-by=created_at_asc] Sort order of groups (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc) + [name] Name of group to find + [application-ids.{index}] Filter out by a list of application ID + [user-ids.{index}] Filter out by a list of user ID + [group-ids.{index}] Filter out by a list of group ID + [organization-id=] Filter by organization ID + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-group-remove-member-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-remove-member-usage.golden new file mode 100644 index 0000000000..3c6e4b4306 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-remove-member-usage.golden @@ -0,0 +1,27 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Remove a user or an application from a group. + +USAGE: + scw iam group remove-member [arg=value ...] + +ARGS: + group-id ID of group + [user-id] ID of the user to remove + [application-id] ID of the application to remove + +FLAGS: + -h, --help help for remove-member + +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: + # Remove a group member + scw iam group remove-member + + # Create a group + scw iam group create diff --git a/cmd/scw/testdata/test-all-usage-iam-group-update-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-update-usage.golden new file mode 100644 index 0000000000..d5f910787a --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-update-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update a group. + +USAGE: + scw iam group update [arg=value ...] + +ARGS: + group-id ID of group to update + [name] New name for the group (max length is 64 chars). MUST be unique inside an organization + [description] New description for the group (max length is 200 chars) + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-group-usage.golden b/cmd/scw/testdata/test-all-usage-iam-group-usage.golden new file mode 100644 index 0000000000..e694ef5c71 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-group-usage.golden @@ -0,0 +1,26 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Groups management commands. + +USAGE: + scw iam group + +AVAILABLE COMMANDS: + add-member Add a user of an application to a group + create Create a new group + delete Delete a group + get Get a group + list List groups + remove-member Remove a user or an application from a group + update Update a group + +FLAGS: + -h, --help help for group + +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 group [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-permission-set-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-permission-set-list-usage.golden new file mode 100644 index 0000000000..a433300654 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-permission-set-list-usage.golden @@ -0,0 +1,19 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List permission sets. + +USAGE: + scw iam permission-set list [arg=value ...] + +ARGS: + [order-by=created_at_asc] Criteria for sorting results (name_asc | name_desc | created_at_asc | created_at_desc) + [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 diff --git a/cmd/scw/testdata/test-all-usage-iam-permission-set-usage.golden b/cmd/scw/testdata/test-all-usage-iam-permission-set-usage.golden new file mode 100644 index 0000000000..caaab6a90b --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-permission-set-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Permission sets management commands. + +USAGE: + scw iam permission-set + +AVAILABLE COMMANDS: + list List permission sets + +FLAGS: + -h, --help help for permission-set + +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 permission-set [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-policy-create-usage.golden b/cmd/scw/testdata/test-all-usage-iam-policy-create-usage.golden new file mode 100644 index 0000000000..3bdd14acc9 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-policy-create-usage.golden @@ -0,0 +1,31 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create a new policy. + +USAGE: + scw iam policy create [arg=value ...] + +EXAMPLES: + Add a policy for a group that gives InstanceFullAccess on all projects + scw iam policy create group-id=11111111-1111-1111-1111-111111111111 rules.0.organization-id=11111111-1111-1111-1111-111111111111 rules.0.permission-set-names.0=InstanceFullAccess + +ARGS: + name= Name of policy to create (max length is 64 chars) + [description] Description of policy to create (max length is 200 chars) + [rules.{index}.permission-set-names.{index}] Names of permission sets bound to the rule + [rules.{index}.project-ids.{index}] List of project IDs scoped to the rule + [rules.{index}.organization-id] ID of organization scoped to the rule + [user-id] ID of user, owner of the policy + [group-id] ID of group, owner of the policy + [application-id] ID of application, owner of the policy + [no-principal] True when the policy do not belong to any principal + [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 diff --git a/cmd/scw/testdata/test-all-usage-iam-policy-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-policy-delete-usage.golden new file mode 100644 index 0000000000..5cbea3a638 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-policy-delete-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete a policy. + +USAGE: + scw iam policy delete [arg=value ...] + +ARGS: + policy-id Id of policy 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-policy-get-usage.golden b/cmd/scw/testdata/test-all-usage-iam-policy-get-usage.golden new file mode 100644 index 0000000000..a7e44927ed --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-policy-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get an existing policy. + +USAGE: + scw iam policy get [arg=value ...] + +ARGS: + policy-id Id of policy to search + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-policy-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-policy-list-usage.golden new file mode 100644 index 0000000000..2ca71ee787 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-policy-list-usage.golden @@ -0,0 +1,25 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List policies of an organization. + +USAGE: + scw iam policy list [arg=value ...] + +ARGS: + [order-by=created_at_asc] Criteria for sorting results (policy_name_asc | policy_name_desc | created_at_asc | created_at_desc) + [editable] Filter out editable policies or not + [user-ids.{index}] Filter out by a list of user ID + [group-ids.{index}] Filter out by a list of group ID + [application-ids.{index}] Filter out by a list of application ID + [no-principal] True when the policy do not belong to any principal + [policy-name] Name of policy to fetch + organization-id= 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-policy-update-usage.golden b/cmd/scw/testdata/test-all-usage-iam-policy-update-usage.golden new file mode 100644 index 0000000000..0fc1704a8e --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-policy-update-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update an existing policy. + +USAGE: + scw iam policy update [arg=value ...] + +ARGS: + policy-id Id of policy to update + [name] New name of policy (max length is 64 chars) + [description] New description of policy (max length is 200 chars) + [user-id] New ID of user, owner of the policy + [group-id] New ID of group, owner of the policy + [application-id] New ID of application, owner of the policy + [no-principal] True when the policy do not belong to any principal + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-policy-usage.golden b/cmd/scw/testdata/test-all-usage-iam-policy-usage.golden new file mode 100644 index 0000000000..8f2ab22203 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-policy-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Policies management commands. + +USAGE: + scw iam policy + +AVAILABLE COMMANDS: + create Create a new policy + delete Delete a policy + get Get an existing policy + list List policies of an organization + update Update an existing policy + +FLAGS: + -h, --help help for policy + +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 policy [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-rule-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-rule-list-usage.golden new file mode 100644 index 0000000000..cfbbfd9705 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-rule-list-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List rules of an existing policy. + +USAGE: + scw iam rule list [arg=value ...] + +ARGS: + policy-id Id of policy to search + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-rule-update-usage.golden b/cmd/scw/testdata/test-all-usage-iam-rule-update-usage.golden new file mode 100644 index 0000000000..471498fac9 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-rule-update-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Set rules of an existing policy. + +USAGE: + scw iam rule update [arg=value ...] + +ARGS: + policy-id Id of policy to update + [rules.{index}.permission-set-names.{index}] Names of permission sets bound to the rule + [rules.{index}.project-ids.{index}] List of project IDs scoped to the rule + [rules.{index}.organization-id] ID of organization scoped to the rule + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-rule-usage.golden b/cmd/scw/testdata/test-all-usage-iam-rule-usage.golden new file mode 100644 index 0000000000..19e7e20b40 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-rule-usage.golden @@ -0,0 +1,21 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Rules management commands. + +USAGE: + scw iam rule + +AVAILABLE COMMANDS: + list List rules of an existing policy + update Set rules of an existing policy + +FLAGS: + -h, --help help for rule + +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 rule [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-ssh-key-create-usage.golden b/cmd/scw/testdata/test-all-usage-iam-ssh-key-create-usage.golden new file mode 100644 index 0000000000..036bddbbab --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-ssh-key-create-usage.golden @@ -0,0 +1,31 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Create an SSH key. + +USAGE: + scw iam ssh-key create [arg=value ...] + +EXAMPLES: + Add a given ssh key + scw iam ssh-key create name=foobar public-key="$(cat )" + +ARGS: + name= The name of the SSH key. Max length is 1000 + public-key SSH public key. Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported. Max length is 65000 + [project-id] Project ID to use. If none is passed the default project 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 + +SEE ALSO: + # List all SSH keys + scw iam ssh-key list + + # Delete an SSH key + scw iam ssh-key delete diff --git a/cmd/scw/testdata/test-all-usage-iam-ssh-key-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-ssh-key-delete-usage.golden new file mode 100644 index 0000000000..106519a235 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-ssh-key-delete-usage.golden @@ -0,0 +1,29 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete an SSH key. + +USAGE: + scw iam ssh-key delete [arg=value ...] + +EXAMPLES: + Delete a given SSH key + scw iam ssh-key delete 11111111-1111-1111-1111-111111111111 + +ARGS: + ssh-key-id + +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 SSH keys + scw iam ssh-key list + + # Add a SSH key + scw iam ssh-key create diff --git a/cmd/scw/testdata/test-all-usage-iam-ssh-key-get-usage.golden b/cmd/scw/testdata/test-all-usage-iam-ssh-key-get-usage.golden new file mode 100644 index 0000000000..d590f8e110 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-ssh-key-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Get an SSH key. + +USAGE: + scw iam ssh-key get [arg=value ...] + +ARGS: + ssh-key-id The ID of the SSH key + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-ssh-key-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-ssh-key-list-usage.golden new file mode 100644 index 0000000000..8ebf6ec623 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-ssh-key-list-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List SSH keys. + +USAGE: + scw iam ssh-key list [arg=value ...] + +ARGS: + [order-by=created_at_asc] Sort order of SSH keys (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc) + [name] Name of group to find + [project-id] Filter by project ID + [disabled] Filter out disabled SSH keys or not + [organization-id=] Filter by organization ID + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-ssh-key-update-usage.golden b/cmd/scw/testdata/test-all-usage-iam-ssh-key-update-usage.golden new file mode 100644 index 0000000000..9e5e41f9d4 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-ssh-key-update-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Update an SSH key. + +USAGE: + scw iam ssh-key update [arg=value ...] + +ARGS: + ssh-key-id + [name] Name of the SSH key. Max length is 1000 + [disabled] Enable or disable the SSH key + +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 diff --git a/cmd/scw/testdata/test-all-usage-iam-ssh-key-usage.golden b/cmd/scw/testdata/test-all-usage-iam-ssh-key-usage.golden new file mode 100644 index 0000000000..b222389690 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-ssh-key-usage.golden @@ -0,0 +1,24 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +SSH keys management commands. + +USAGE: + scw iam ssh-key + +AVAILABLE COMMANDS: + create Create an SSH key + delete Delete an SSH key + get Get an SSH key + list List SSH keys + update Update an SSH key + +FLAGS: + -h, --help help for ssh-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 ssh-key [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-usage.golden b/cmd/scw/testdata/test-all-usage-iam-usage.golden new file mode 100644 index 0000000000..a8c3751327 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-usage.golden @@ -0,0 +1,27 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +IAM API + +USAGE: + scw iam + +AVAILABLE COMMANDS: + api-key API keys management commands + application Applications management commands + group Groups management commands + permission-set Permission sets management commands + policy Policies management commands + rule Rules management commands + ssh-key SSH keys management commands + user Users management commands + +FLAGS: + -h, --help help for iam + +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 [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-all-usage-iam-user-delete-usage.golden b/cmd/scw/testdata/test-all-usage-iam-user-delete-usage.golden new file mode 100644 index 0000000000..40a53617a6 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-user-delete-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Delete a guest user from an organization. + +USAGE: + scw iam user delete [arg=value ...] + +ARGS: + user-id ID of user 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-user-get-usage.golden b/cmd/scw/testdata/test-all-usage-iam-user-get-usage.golden new file mode 100644 index 0000000000..61505fa634 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-user-get-usage.golden @@ -0,0 +1,18 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Retrieve a user from its ID. + +USAGE: + scw iam user get [arg=value ...] + +ARGS: + user-id ID of user 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden b/cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden new file mode 100644 index 0000000000..e8df8d223c --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden @@ -0,0 +1,20 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +List users of an organization. + +USAGE: + scw iam user 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 | email_asc | email_desc | last_login_asc | last_login_desc) + [user-ids.{index}] Filter out by a list of ID + organization-id= 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 diff --git a/cmd/scw/testdata/test-all-usage-iam-user-usage.golden b/cmd/scw/testdata/test-all-usage-iam-user-usage.golden new file mode 100644 index 0000000000..3d6bcca258 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-iam-user-usage.golden @@ -0,0 +1,22 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +πŸŸ₯πŸŸ₯πŸŸ₯ STDERR️️ πŸŸ₯πŸŸ₯πŸŸ₯️ +Users management commands. + +USAGE: + scw iam user + +AVAILABLE COMMANDS: + delete Delete a guest user from an organization + get Retrieve a user from its ID + list List users of an organization + +FLAGS: + -h, --help help for user + +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 user [command] --help" for more information about a command. diff --git a/cmd/scw/testdata/test-main-usage-usage.golden b/cmd/scw/testdata/test-main-usage-usage.golden index bd16bdc7ca..5d93386c0a 100644 --- a/cmd/scw/testdata/test-main-usage-usage.golden +++ b/cmd/scw/testdata/test-main-usage-usage.golden @@ -4,7 +4,7 @@ USAGE: scw AVAILABLE COMMANDS: - account Account API + account User related data apple-silicon Apple silicon API autocomplete Autocomplete related commands baremetal Elastic metal API @@ -15,6 +15,7 @@ AVAILABLE COMMANDS: fip Flexible IP API function Function as a Service API help Get help about how the CLI works + iam IAM API info Get info about current settings init Initialize the config instance Instance API diff --git a/docs/commands/account.md b/docs/commands/account.md index 0b1c15379c..d3d96b4d1e 100644 --- a/docs/commands/account.md +++ b/docs/commands/account.md @@ -1,7 +1,13 @@ # Documentation for `scw account` -Account API +This API allows you to manage projects. +- [Project management commands](#project-management-commands) + - [Create project](#create-project) + - [Delete project](#delete-project) + - [Get project](#get-project) + - [List projects](#list-projects) + - [Update project](#update-project) - [SSH keys management commands](#ssh-keys-management-commands) - [Add an SSH key to your project](#add-an-ssh-key-to-your-project) - [Get an SSH key from your project](#get-an-ssh-key-from-your-project) @@ -11,6 +17,113 @@ Account API - [Update an SSH key on your project](#update-an-ssh-key-on-your-project) +## Project management commands + +Project management commands. + + +### Create project + +Create project. + +**Usage:** + +``` +scw account project create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| 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 | + + + +### Delete project + +Delete project. + +**Usage:** + +``` +scw account project delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | + + + +### Get project + +Get project. + +**Usage:** + +``` +scw account project get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| project-id | | Project ID to use. If none is passed the default project ID will be used | + + + +### List projects + +List projects. + +**Usage:** + +``` +scw account project list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | | The name of the project | +| order-by | One of: `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc` | The sort order of the returned projects | +| 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 | + + + +### Update project + +Update project. + +**Usage:** + +``` +scw account project update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| 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 | + + + ## SSH keys management commands SSH keys management commands. diff --git a/docs/commands/iam.md b/docs/commands/iam.md new file mode 100644 index 0000000000..319749b370 --- /dev/null +++ b/docs/commands/iam.md @@ -0,0 +1,841 @@ + +# Documentation for `scw iam` +IAM API + +- [API keys management commands](#api-keys-management-commands) + - [Create an API key](#create-an-api-key) + - [Delete an API key](#delete-an-api-key) + - [Get an API key](#get-an-api-key) + - [List API keys](#list-api-keys) + - [Update an API key](#update-an-api-key) +- [Applications management commands](#applications-management-commands) + - [Create a new application](#create-a-new-application) + - [Delete an application](#delete-an-application) + - [Get an existing application](#get-an-existing-application) + - [List applications of an organization](#list-applications-of-an-organization) + - [Update an existing application](#update-an-existing-application) +- [Groups management commands](#groups-management-commands) + - [Add a user of an application to a group](#add-a-user-of-an-application-to-a-group) + - [Create a new group](#create-a-new-group) + - [Delete a group](#delete-a-group) + - [Get a group](#get-a-group) + - [List groups](#list-groups) + - [Remove a user or an application from a group](#remove-a-user-or-an-application-from-a-group) + - [Update a group](#update-a-group) +- [Permission sets management commands](#permission-sets-management-commands) + - [List permission sets](#list-permission-sets) +- [Policies management commands](#policies-management-commands) + - [Create a new policy](#create-a-new-policy) + - [Delete a policy](#delete-a-policy) + - [Get an existing policy](#get-an-existing-policy) + - [List policies of an organization](#list-policies-of-an-organization) + - [Update an existing policy](#update-an-existing-policy) +- [Rules management commands](#rules-management-commands) + - [List rules of an existing policy](#list-rules-of-an-existing-policy) + - [Set rules of an existing policy](#set-rules-of-an-existing-policy) +- [SSH keys management commands](#ssh-keys-management-commands) + - [Create an SSH key](#create-an-ssh-key) + - [Delete an SSH key](#delete-an-ssh-key) + - [Get an SSH key](#get-an-ssh-key) + - [List SSH keys](#list-ssh-keys) + - [Update an SSH key](#update-an-ssh-key) +- [Users management commands](#users-management-commands) + - [Delete a guest user from an organization](#delete-a-guest-user-from-an-organization) + - [Retrieve a user from its ID](#retrieve-a-user-from-its-id) + - [List users of an organization](#list-users-of-an-organization) + + +## API keys management commands + +API keys management commands. + + +### Create an API key + +Create an API key. + +**Usage:** + +``` +scw iam api-key create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| 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) | + + + +### Delete an API key + +Delete an API key. + +**Usage:** + +``` +scw iam api-key delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| access-key | Required | Access key to delete | + + +**Examples:** + + +Delete a given API key +``` +scw iam api-key delete SCW00000000000 +``` + + + + +### Get an API key + +Get an API key. + +**Usage:** + +``` +scw iam api-key get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| access-key | Required | Access key to search for | + + + +### List API keys + +List API keys. + +**Usage:** + +``` +scw iam api-key list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | Default: `created_at_asc`
One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `expires_at_asc`, `expires_at_desc`, `access_key_asc`, `access_key_desc` | Criteria for sorting results | +| application-id | | ID of an application bearer | +| user-id | | ID of a user bearer | +| editable | | Filter out editable API keys or not | +| organization-id | Required
Default: `` | ID of organization | + + + +### Update an API key + +Update an API key. + +**Usage:** + +``` +scw iam api-key update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| access-key | Required | Access key to update | +| default-project-id | | The new default project ID to set | +| description | | The new description to update | + + + +## Applications management commands + +Applications management commands. + + +### Create a new application + +Create a new application. + +**Usage:** + +``` +scw iam application create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | Required
Default: `` | 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 | + + + +### Delete an application + +Delete an application. + +**Usage:** + +``` +scw iam application delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| application-id | Required | ID of application to delete | + + + +### Get an existing application + +Get an existing application. + +**Usage:** + +``` +scw iam application get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| application-id | Required | ID of application to find | + + + +### List applications of an organization + +List applications of an organization. + +**Usage:** + +``` +scw iam application list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | Default: `created_at_asc`
One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `name_asc`, `name_desc` | Criteria for sorting results | +| 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 | Required
Default: `` | ID of organization to filter | + + + +### Update an existing application + +Update an existing application. + +**Usage:** + +``` +scw iam application update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| application-id | Required | ID of application to update | +| name | | New name of application (max length is 64 chars) | +| description | | New description of application (max length is 200 chars) | + + + +## Groups management commands + +Groups management commands. + + +### Add a user of an application to a group + +Add a user of an application to a group. + +**Usage:** + +``` +scw iam group add-member [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| group-id | Required | ID of group | +| user-id | | ID of the user to add | +| application-id | | ID of the application to add | + + + +### Create a new group + +Create a new group. + +**Usage:** + +``` +scw iam group create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | Required
Default: `` | Name of the group to create (max length is 64 chars). MUST be unique inside an organization | +| description | | Description of the group to create (max length is 200 chars) | +| organization-id | | Organization ID to use. If none is passed the default organization ID will be used | + + +**Examples:** + + +Create a group +``` +scw iam group create name=foobar +``` + + + + +### Delete a group + +Delete a group. + +**Usage:** + +``` +scw iam group delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| group-id | Required | ID of group to delete | + + +**Examples:** + + +Delete a given group +``` +scw iam group delete 11111111-1111-1111-1111-111111111111 +``` + + + + +### Get a group + +Get a group. + +**Usage:** + +``` +scw iam group get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| group-id | Required | ID of group | + + + +### List groups + +List groups. + +**Usage:** + +``` +scw iam group list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | Default: `created_at_asc`
One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `name_asc`, `name_desc` | Sort order of groups | +| name | | Name of group to find | +| application-ids.{index} | | Filter out by a list of application ID | +| user-ids.{index} | | Filter out by a list of user ID | +| group-ids.{index} | | Filter out by a list of group ID | +| organization-id | Default: `` | Filter by organization ID | + + + +### Remove a user or an application from a group + +Remove a user or an application from a group. + +**Usage:** + +``` +scw iam group remove-member [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| group-id | Required | ID of group | +| user-id | | ID of the user to remove | +| application-id | | ID of the application to remove | + + + +### Update a group + +Update a group. + +**Usage:** + +``` +scw iam group update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| group-id | Required | ID of group to update | +| name | | New name for the group (max length is 64 chars). MUST be unique inside an organization | +| description | | New description for the group (max length is 200 chars) | + + + +## Permission sets management commands + +Permission sets management commands. + + +### List permission sets + +List permission sets. + +**Usage:** + +``` +scw iam permission-set list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | Default: `created_at_asc`
One of: `name_asc`, `name_desc`, `created_at_asc`, `created_at_desc` | Criteria for sorting results | +| organization-id | | Organization ID to use. If none is passed the default organization ID will be used | + + + +## Policies management commands + +Policies management commands. + + +### Create a new policy + +Create a new policy. + +**Usage:** + +``` +scw iam policy create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | Required
Default: `` | Name of policy to create (max length is 64 chars) | +| description | | Description of policy to create (max length is 200 chars) | +| rules.{index}.permission-set-names.{index} | | Names of permission sets bound to the rule | +| rules.{index}.project-ids.{index} | | List of project IDs scoped to the rule | +| rules.{index}.organization-id | | ID of organization scoped to the rule | +| user-id | | ID of user, owner of the policy | +| group-id | | ID of group, owner of the policy | +| application-id | | ID of application, owner of the policy | +| no-principal | | True when the policy do not belong to any principal | +| organization-id | | Organization ID to use. If none is passed the default organization ID will be used | + + +**Examples:** + + +Add a policy for a group that gives InstanceFullAccess on all projects +``` +scw iam policy create group-id=11111111-1111-1111-1111-111111111111 rules.0.organization-id=11111111-1111-1111-1111-111111111111 rules.0.permission-set-names.0=InstanceFullAccess +``` + + + + +### Delete a policy + +Delete a policy. + +**Usage:** + +``` +scw iam policy delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| policy-id | Required | Id of policy to delete | + + + +### Get an existing policy + +Get an existing policy. + +**Usage:** + +``` +scw iam policy get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| policy-id | Required | Id of policy to search | + + + +### List policies of an organization + +List policies of an organization. + +**Usage:** + +``` +scw iam policy list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | Default: `created_at_asc`
One of: `policy_name_asc`, `policy_name_desc`, `created_at_asc`, `created_at_desc` | Criteria for sorting results | +| editable | | Filter out editable policies or not | +| user-ids.{index} | | Filter out by a list of user ID | +| group-ids.{index} | | Filter out by a list of group ID | +| application-ids.{index} | | Filter out by a list of application ID | +| no-principal | | True when the policy do not belong to any principal | +| policy-name | | Name of policy to fetch | +| organization-id | Required
Default: `` | ID of organization to filter | + + + +### Update an existing policy + +Update an existing policy. + +**Usage:** + +``` +scw iam policy update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| policy-id | Required | Id of policy to update | +| name | | New name of policy (max length is 64 chars) | +| description | | New description of policy (max length is 200 chars) | +| user-id | | New ID of user, owner of the policy | +| group-id | | New ID of group, owner of the policy | +| application-id | | New ID of application, owner of the policy | +| no-principal | | True when the policy do not belong to any principal | + + + +## Rules management commands + +Rules management commands. + + +### List rules of an existing policy + +List rules of an existing policy. + +**Usage:** + +``` +scw iam rule list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| policy-id | Required | Id of policy to search | + + + +### Set rules of an existing policy + +Set rules of an existing policy. + +**Usage:** + +``` +scw iam rule update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| policy-id | Required | Id of policy to update | +| rules.{index}.permission-set-names.{index} | | Names of permission sets bound to the rule | +| rules.{index}.project-ids.{index} | | List of project IDs scoped to the rule | +| rules.{index}.organization-id | | ID of organization scoped to the rule | + + + +## SSH keys management commands + +SSH keys management commands. + + +### Create an SSH key + +Create an SSH key. + +**Usage:** + +``` +scw iam ssh-key create [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| name | Required
Default: `` | The name of the SSH key. Max length is 1000 | +| public-key | Required | SSH public key. Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported. Max length is 65000 | +| project-id | | Project ID to use. If none is passed the default project ID will be used | + + +**Examples:** + + +Add a given ssh key +``` +scw iam ssh-key create name=foobar public-key="$(cat )" +``` + + + + +### Delete an SSH key + +Delete an SSH key. + +**Usage:** + +``` +scw iam ssh-key delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| ssh-key-id | Required | | + + +**Examples:** + + +Delete a given SSH key +``` +scw iam ssh-key delete 11111111-1111-1111-1111-111111111111 +``` + + + + +### Get an SSH key + +Get an SSH key. + +**Usage:** + +``` +scw iam ssh-key get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| ssh-key-id | Required | The ID of the SSH key | + + + +### List SSH keys + +List SSH keys. + +**Usage:** + +``` +scw iam ssh-key list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | Default: `created_at_asc`
One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `name_asc`, `name_desc` | Sort order of SSH keys | +| name | | Name of group to find | +| project-id | | Filter by project ID | +| disabled | | Filter out disabled SSH keys or not | +| organization-id | Default: `` | Filter by organization ID | + + + +### Update an SSH key + +Update an SSH key. + +**Usage:** + +``` +scw iam ssh-key update [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| ssh-key-id | Required | | +| name | | Name of the SSH key. Max length is 1000 | +| disabled | | Enable or disable the SSH key | + + + +## Users management commands + +Users management commands. + + +### Delete a guest user from an organization + +Delete a guest user from an organization. + +**Usage:** + +``` +scw iam user delete [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| user-id | Required | ID of user to delete | + + + +### Retrieve a user from its ID + +Retrieve a user from its ID. + +**Usage:** + +``` +scw iam user get [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| user-id | Required | ID of user to find | + + + +### List users of an organization + +List users of an organization. + +**Usage:** + +``` +scw iam user list [arg=value ...] +``` + + +**Args:** + +| Name | | Description | +|------|---|-------------| +| order-by | Default: `created_at_asc`
One of: `created_at_asc`, `created_at_desc`, `updated_at_asc`, `updated_at_desc`, `email_asc`, `email_desc`, `last_login_asc`, `last_login_desc` | Criteria for sorting results | +| user-ids.{index} | | Filter out by a list of ID | +| organization-id | Required
Default: `` | ID of organization to filter | + + + diff --git a/internal/namespaces/get_commands.go b/internal/namespaces/get_commands.go index 5be07d3092..dd7c28cef9 100644 --- a/internal/namespaces/get_commands.go +++ b/internal/namespaces/get_commands.go @@ -41,6 +41,7 @@ func GetCommands(beta ...bool) *core.Commands { // Import all commands available in CLI from various packages. // NB: Merge order impacts scw usage sort. commands := core.NewCommands() + commands.Merge(iam.GetCommands()) commands.Merge(instance.GetCommands()) commands.Merge(baremetal.GetCommands()) commands.Merge(k8s.GetCommands()) @@ -48,6 +49,7 @@ func GetCommands(beta ...bool) *core.Commands { commands.Merge(initNamespace.GetCommands()) commands.Merge(configNamespace.GetCommands()) commands.Merge(account.GetCommands()) + commands.Merge(accountv2.GetCommands()) commands.Merge(autocompleteNamespace.GetCommands()) commands.Merge(object.GetCommands()) commands.Merge(versionNamespace.GetCommands()) @@ -70,9 +72,5 @@ func GetCommands(beta ...bool) *core.Commands { commands.Merge(tem.GetCommands()) commands.Merge(mnq.GetCommands()) - if len(beta) == 1 && beta[0] { - commands.Merge(iam.GetCommands()) - commands.Merge(accountv2.GetCommands()) - } return commands }