Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a new organization.

USAGE:
scw partner organization create [arg=value ...]

ARGS:
partner-id Your personal `partner_id`. This is the same as your Organization ID.
email The email of the new organization owner
organization-name The name of the organization you want to create. Usually the company name
owner-firstname The first name of the new organization owner
owner-lastname The last name of the new organization owner
[phone-number] The phone number of the new organization owner
customer-id A custom ID for the customer in your own infrastructure
[siren-number] A SIREN number for the customer

FLAGS:
-h, --help help for create
--list-sub-commands List all subcommands

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get an organization.

USAGE:
scw partner organization get [arg=value ...]

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

FLAGS:
-h, --help help for get
--list-sub-commands List all subcommands

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,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List Organizations.

USAGE:
scw partner organization list [arg=value ...]

ARGS:
[order-by] (created_at_asc | created_at_desc)
[status] Only list organizations with this status (unknown_status | opened | locked | closed)
[email] Only list organizations created with this email
[customer-id] Only list organizations attached to this Customer ID
[locked-by] Only list organizations locked by a certain entity (unknown_locked_by | partner | scaleway)

FLAGS:
-h, --help help for list
--list-sub-commands List all subcommands

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Lock an organization.

USAGE:
scw partner organization lock [arg=value ...]

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

FLAGS:
-h, --help help for lock
--list-sub-commands List all subcommands

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,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Unlock an organization.

USAGE:
scw partner organization unlock [arg=value ...]

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

FLAGS:
-h, --help help for unlock
--list-sub-commands List all subcommands

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,26 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update an organization.

USAGE:
scw partner organization update [arg=value ...]

ARGS:
[email] The new email
[name] The new name
[owner-firstname] The first name of the new owner
[owner-lastname] The last name of the new owner
[phone-number] The phone number of the new owner
[customer-id] Customer ID associated with this organization
[comment] A comment about the organization
[organization-id] Organization ID to use. If none is passed the default organization ID will be used

FLAGS:
-h, --help help for update
--list-sub-commands List all subcommands

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,26 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Organization management commands.

USAGE:
scw partner organization <command>

AVAILABLE COMMANDS:
create Create a new organization
get Get an organization
list List Organizations
lock Lock an organization
unlock Unlock an organization
update Update an organization

FLAGS:
-h, --help help for organization
--list-sub-commands List all subcommands

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 partner organization [command] --help" for more information about a command.
21 changes: 21 additions & 0 deletions cmd/scw/testdata/test-all-usage-partner-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Scaleway Partner API ( for partner only ).

USAGE:
scw partner <command>

AVAILABLE COMMANDS:
organization Organization management commands

FLAGS:
-h, --help help for partner
--list-sub-commands List all subcommands

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 partner [command] --help" for more information about a command.
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-main-usage-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ SECURITY COMMANDS:
audit-trail This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
iam This API allows you to manage Identity and Access Management (IAM) across your Scaleway Organizations, Projects and resources
keymanager Key Manager API
partner Scaleway Partner API ( for partner only )
secret Secret Manager API

SERVERLESS COMMANDS:
Expand Down
2 changes: 2 additions & 0 deletions commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
mnq "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mnq/v1beta1"
mongodb "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mongodb/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/partner/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/registry/v1"
Expand Down Expand Up @@ -118,6 +119,7 @@ func GetCommands() *core.Commands {
searchdb.GetCommands(),
datalab.GetCommands(),
datawarehouse.GetCommands(),
partner.GetCommands(),
)

if beta {
Expand Down
150 changes: 150 additions & 0 deletions docs/commands/partner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
# Documentation for `scw partner`
Scaleway Partner API ( for partner only ).

- [Organization management commands](#organization-management-commands)
- [Create a new organization](#create-a-new-organization)
- [Get an organization](#get-an-organization)
- [List Organizations](#list-organizations)
- [Lock an organization](#lock-an-organization)
- [Unlock an organization](#unlock-an-organization)
- [Update an organization](#update-an-organization)


## Organization management commands

Organization management commands.


### Create a new organization

Create a new organization.

**Usage:**

```
scw partner organization create [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| partner-id | Required | Your personal `partner_id`. This is the same as your Organization ID. |
| email | Required | The email of the new organization owner |
| organization-name | Required | The name of the organization you want to create. Usually the company name |
| owner-firstname | Required | The first name of the new organization owner |
| owner-lastname | Required | The last name of the new organization owner |
| phone-number | | The phone number of the new organization owner |
| customer-id | Required | A custom ID for the customer in your own infrastructure |
| siren-number | | A SIREN number for the customer |



### Get an organization

Get an organization.

**Usage:**

```
scw partner organization get [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |



### List Organizations

List Organizations.

**Usage:**

```
scw partner organization list [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| order-by | One of: `created_at_asc`, `created_at_desc` | |
| status | One of: `unknown_status`, `opened`, `locked`, `closed` | Only list organizations with this status |
| email | | Only list organizations created with this email |
| customer-id | | Only list organizations attached to this Customer ID |
| locked-by | One of: `unknown_locked_by`, `partner`, `scaleway` | Only list organizations locked by a certain entity |



### Lock an organization

Lock an organization.

**Usage:**

```
scw partner organization lock [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |



### Unlock an organization

Unlock an organization.

**Usage:**

```
scw partner organization unlock [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |



### Update an organization

Update an organization.

**Usage:**

```
scw partner organization update [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| email | | The new email |
| name | | The new name |
| owner-firstname | | The first name of the new owner |
| owner-lastname | | The last name of the new owner |
| phone-number | | The phone number of the new owner |
| customer-id | | Customer ID associated with this organization |
| comment | | A comment about the organization |
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |



13 changes: 13 additions & 0 deletions internal/namespaces/partner/v1/custom.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package partner

import (
"github.com/scaleway/scaleway-cli/v2/core"
)

func GetCommands() *core.Commands {
cmds := GetGeneratedCommands()

cmds.MustFind("partner").Groups = []string{"security"}

return cmds
}
Loading
Loading