Skip to content

Commit

Permalink
Merge branch 'master' into feat/create-cli-doc-website-poc
Browse files Browse the repository at this point in the history
  • Loading branch information
jremy42 authored Dec 10, 2024
2 parents 3b65e8b + a59cd36 commit be159e4
Show file tree
Hide file tree
Showing 56 changed files with 683 additions and 263 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Run coverage
run: go test -coverprofile=coverage.out -covermode=count ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- rdb
- redis
- registry
- sdb
- serverless_sqldb
- secret
- tem
- vpc
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the `organization_id` and optionally, the `project_id`.

USAGE:
scw audit-trail event list [arg=value ...]

ARGS:
[project-id] (Optional) ID of the Project containing the Audit Trail events
[resource-type] (Optional) Returns a paginated list of Scaleway resources' features (unknown_type | secm_secret | secm_secret_version | kube_cluster | kube_pool | kube_node | kube_acl)
[method-name] (Optional) Name of the method or the API call performed
[status] (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied
[recorded-after] (Optional) The `recorded_after` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default
[recorded-before] (Optional) The `recorded_before` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns `now` by default
[order-by] (recorded_at_desc | recorded_at_asc)
[page-size]
[page-token]
[product-name] (Optional) Name of the Scaleway resource in a hyphenated format
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)

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-audit-trail-event-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Represent an entry in the Audit Trail.

USAGE:
scw audit-trail event <command>

AVAILABLE COMMANDS:
list List events

FLAGS:
-h, --help help for event

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 audit-trail event [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve the list of Scaleway resources for which you have Audit Trail events.

USAGE:
scw audit-trail product list [arg=value ...]

ARGS:
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)

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-audit-trail-product-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Product integrated with Audit Trail.

USAGE:
scw audit-trail product <command>

AVAILABLE COMMANDS:
list Retrieve the list of Scaleway resources for which you have Audit Trail events

FLAGS:
-h, --help help for product

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 audit-trail product [command] --help" for more information about a command.
21 changes: 21 additions & 0 deletions cmd/scw/testdata/test-all-usage-audit-trail-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.

USAGE:
scw audit-trail <command>

AVAILABLE COMMANDS:
event Represent an entry in the Audit Trail
product Product integrated with Audit Trail

FLAGS:
-h, --help help for audit-trail

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 audit-trail [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USAGE:
scw billing discount list [arg=value ...]

ARGS:
[order-by] Order discounts in the response by their description (creation_date_desc | creation_date_asc)
[order-by] Order discounts in the response by their description (creation_date_desc | creation_date_asc | start_date_desc | start_date_asc | stop_date_desc | stop_date_asc)
[organization-id] ID of the organization

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create an API key. You must specify the `application_id` or the `user_id` and the description. You can also specify the `default_project_id` which is the Project ID of your preferred Project, to use with Object Storage. The `access_key` and `secret_key` values are returned in the response. Note that he secret key is only showed once. Make sure that you copy and store both keys somewhere safe.
Create an API key. You must specify the `application_id` or the `user_id` and the description. You can also specify the `default_project_id`, which is the Project ID of your preferred Project, to use with Object Storage. The `access_key` and `secret_key` values are returned in the response. Note that the secret key is only shown once. Make sure that you copy and store both keys somewhere safe.

USAGE:
scw iam api-key create [arg=value ...]
Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-iam-user-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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)
[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 | username_asc | username_desc)
[user-ids.{index}] Filter by list of IDs
[mfa] Filter by MFA status
[tag] Filter by tags containing a given string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update an user's password.
Update an user's password. Private Beta feature.

USAGE:
scw iam user update-password <user-id ...> [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USAGE:
ARGS:
user-id ID of the user to update
[tags.{index}] New tags for the user (maximum of 10 tags)
[email] New email for the user (only available on Members)
[email] IAM member email

FLAGS:
-h, --help help for update
Expand Down
2 changes: 1 addition & 1 deletion cmd/scw/testdata/test-all-usage-iam-user-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AVAILABLE COMMANDS:
get Get a given user
list List users of an Organization
update Update a user
update-password Update an user's password
update-password Update an user's password. Private Beta feature.

FLAGS:
-h, --help help for user
Expand Down
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-ipam-ip-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ARGS:
[vpc-id] VPC ID to filter for.
[attached] Defines whether to filter only for IPs which are attached to a resource
[resource-id] Resource ID to filter for. Only IPs attached to this resource will be returned
[resource-ids.{index}] Resource IDs to filter for. Only IPs attached to at least one of these resources will be returned
[resource-type] Resource type to filter for. Only IPs attached to this type of resource will be returned (unknown_type | custom | instance_server | instance_ip | instance_private_nic | lb_server | fip_ip | vpc_gateway | vpc_gateway_network | k8s_node | k8s_cluster | rdb_instance | redis_cluster | baremetal_server | baremetal_private_nic | llm_deployment | mgdb_instance | apple_silicon_server | apple_silicon_private_nic)
[mac-address] MAC address to filter for. Only IPs attached to a resource with this MAC address will be returned
[tags.{index}] Tags to filter for, only IPs with one or more matching tags will be returned
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ USAGE:
scw mnq nats list-credentials [arg=value ...]

ARGS:
nats-account-id Include only credentials for this NATS account
[order-by] Order in which to return results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | all)
[project-id] Include only NATS accounts in this Project
[nats-account-id] Include only credentials for this NATS account
[order-by] Order in which to return results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | all)

FLAGS:
-h, --help help for list-credentials
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Activate SNS for the specified Project ID. SNS must be activated before any usage. Activating SNS does not trigger any billing, and you can deactivate at any time.
Activate Topics and Events for the specified Project ID. Topics and Events must be activated before any usage. Activating Topics and Events does not trigger any billing, and you can deactivate at any time.

USAGE:
scw mnq sns activate [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a set of credentials for SNS, specified by a Project ID. Credentials give the bearer access to topics, and the level of permissions can be defined granularly.
Create a set of credentials for Topics and Events, specified by a Project ID. Credentials give the bearer access to topics, and the level of permissions can be defined granularly.

USAGE:
scw mnq sns create-credentials [arg=value ...]

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name=<generated>] Name of the credentials
[permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (publish to SNS topics)
[permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (publish to Topics and Events topics)
[permissions.can-receive] Defines whether the credentials bearer can receive messages from the service (configure subscriptions)
[permissions.can-manage] Defines whether the credentials bearer can manage the associated SNS topics or subscriptions
[permissions.can-manage] Defines whether the credentials bearer can manage the associated Topics and Events topics or subscriptions
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Deactivate SNS for the specified Project ID.You must delete all topics and credentials before this call or you need to set the force_delete parameter.
Deactivate Topics and Events for the specified Project ID. You must delete all topics and credentials before this call or you need to set the force_delete parameter.

USAGE:
scw mnq sns deactivate [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a set of SNS credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can then no longer be used to access SNS.
Delete a set of Topics and Events credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can then no longer be used to access Topics and Events.

USAGE:
scw mnq sns delete-credentials <sns-credentials-id ...> [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USAGE:
scw mnq sns get-credentials <sns-credentials-id ...> [arg=value ...]

ARGS:
sns-credentials-id ID of the SNS credentials to get
sns-credentials-id ID of the Topics and Events credentials to get
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Retrieve the SNS information of the specified Project ID. Informations include the activation status and the SNS API endpoint URL.
Retrieve the Topics and Events information of the specified Project ID. Informations include the activation status and the Topics and Events API endpoint URL.

USAGE:
scw mnq sns get-info [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List existing SNS credentials in the specified region. The response contains only the metadata for the credentials, not the credentials themselves.
List existing Topics and Events credentials in the specified region. The response contains only the metadata for the credentials, not the credentials themselves.

USAGE:
scw mnq sns list-credentials [arg=value ...]

ARGS:
[project-id] Include only SNS credentials in this Project
[project-id] Include only Topics and Events credentials in this Project
[order-by] Order in which to return results (created_at_asc | created_at_desc | updated_at_asc | updated_at_desc | name_asc | name_desc)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | all)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update a set of SNS credentials. You can update the credentials' name, or their permissions.
Update a set of Topics and Events credentials. You can update the credentials' name, or their permissions.

USAGE:
scw mnq sns update-credentials <sns-credentials-id ...> [arg=value ...]

ARGS:
sns-credentials-id ID of the SNS credentials to update
sns-credentials-id ID of the Topics and Events credentials to update
[name] Name of the credentials
[permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (publish to SNS topics)
[permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (publish to Topics and Events topics)
[permissions.can-receive] Defines whether the credentials bearer can receive messages from the service (configure subscriptions)
[permissions.can-manage] Defines whether the credentials bearer can manage the associated SNS topics or subscriptions
[permissions.can-manage] Defines whether the credentials bearer can manage the associated Topics and Events topics or subscriptions
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)

FLAGS:
Expand Down
18 changes: 9 additions & 9 deletions cmd/scw/testdata/test-all-usage-mnq-sns-usage.golden
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
MnQ SNS commands.
MnQ Topics and Events commands.

USAGE:
scw mnq sns <command>

AVAILABLE COMMANDS:
activate Activate SNS
create-credentials Create SNS credentials
deactivate Deactivate SNS
delete-credentials Delete SNS credentials
get-credentials Get SNS credentials
get-info Get SNS info
list-credentials List SNS credentials
update-credentials Update SNS credentials
activate Activate Topics and Events
create-credentials Create Topics and Events credentials
deactivate Deactivate Topics and Events
delete-credentials Delete Topics and Events credentials
get-credentials Get Topics and Events credentials
get-info Get Topics and Events info
list-credentials List Topics and Events credentials
update-credentials Update Topics and Events credentials

FLAGS:
-h, --help help for sns
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Activate SQS for the specified Project ID. SQS must be activated before any usage such as creating credentials and queues. Activating SQS does not trigger any billing, and you can deactivate at any time.
Activate Queues for the specified Project ID. Queues must be activated before any usage such as creating credentials and queues. Activating Queues does not trigger any billing, and you can deactivate at any time.

USAGE:
scw mnq sqs activate [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a set of credentials for SQS, specified by a Project ID. Credentials give the bearer access to queues, and the level of permissions can be defined granularly.
Create a set of credentials for Queues, specified by a Project ID. Credentials give the bearer access to queues, and the level of permissions can be defined granularly.

USAGE:
scw mnq sqs create-credentials [arg=value ...]

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name=<generated>] Name of the credentials
[permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (send messages to SQS queues)
[permissions.can-receive] Defines whether the credentials bearer can receive messages from SQS queues
[permissions.can-manage] Defines whether the credentials bearer can manage the associated SQS queues
[permissions.can-publish] Defines whether the credentials bearer can publish messages to the service (send messages to Queues queues)
[permissions.can-receive] Defines whether the credentials bearer can receive messages from Queues queues
[permissions.can-manage] Defines whether the credentials bearer can manage the associated Queues queues
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Deactivate SQS for the specified Project ID. You must delete all queues and credentials before this call or you need to set the force_delete parameter.
Deactivate Queues for the specified Project ID. You must delete all queues and credentials before this call or you need to set the force_delete parameter.

USAGE:
scw mnq sqs deactivate [arg=value ...]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete a set of SQS credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can then no longer be used to access SQS.
Delete a set of Queues credentials, specified by their credentials ID. Deleting credentials is irreversible and cannot be undone. The credentials can then no longer be used to access Queues.

USAGE:
scw mnq sqs delete-credentials <sqs-credentials-id ...> [arg=value ...]
Expand Down
Loading

0 comments on commit be159e4

Please sign in to comment.