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️️ 🟥🟥🟥️
Retrieve detailed impact data for your Scaleway projects within a specified date range. Filter by project ID, region, zone, service category, and/or product category.

USAGE:
scw environmental-footprint data get [arg=value ...]

ARGS:
start-date Start date (inclusive) of the period for which you want to retrieve impact data (ISO 8601 format, e.g. 2025-05-01T00:00:00Z).
[end-date] End date (exclusive) of the period for which you want to retrieve impact data (ISO 8601 format, with time in UTC, `YYYY-MM-DDTHH:MM:SSZ`). Defaults to today's date.
[regions.{index}] List of regions to filter by (e.g. `fr-par`). Defaults to all regions.
[zones.{index}] List of zones to filter by (e.g. `fr-par-1`). Defaults to all zones.
[project-ids.{index}] List of Project IDs to filter by. Defaults to all Projects in the Organization.
[service-categories.{index}] List of service categories to filter by. Defaults to all service categories. (unknown_service_category | baremetal | compute | storage | network | containers | databases)
[product-categories.{index}] List of product categories to filter by. Defaults to all product categories. (unknown_product_category | apple_silicon | block_storage | dedibox | elastic_metal | instances | object_storage | load_balancer | kubernetes | managed_relational_databases | managed_mongodb | managed_redis)
[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,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Environmental impact data management commands.

USAGE:
scw environmental-footprint data <command>

AVAILABLE COMMANDS:
get Retrieve detailed impact data

FLAGS:
-h, --help help for data
--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 environmental-footprint data [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Download a Scaleway impact PDF report with detailed impact data for your Scaleway projects.

USAGE:
scw environmental-footprint report get [arg=value ...]

ARGS:
date The start date of the period for which you want to download a report (ISO 8601 format, e.g. 2025-05-01T00:00:00Z).
[type] Type of report to download (e.g. `monthly`). (unknown_report_type | monthly | yearly)
[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,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Returns a list of dates of available impact reports.

USAGE:
scw environmental-footprint report list [arg=value ...]

ARGS:
start-date Start date of the search period (ISO 8601 format, with time in UTC, `YYYY-MM-DDTHH:MM:SSZ`). The date is inclusive.
[end-date] End date of the search period (ISO 8601 format, with time in UTC, `YYYY-MM-DDTHH:MM:SSZ`). The date is inclusive. Defaults to today's date.
[organization-id] Organization ID to use. If none is passed the default organization ID will be used

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,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Environmental impact report management commands.

USAGE:
scw environmental-footprint report <command>

AVAILABLE COMMANDS:
get Download PDF impact report
list Get available impact reports

FLAGS:
-h, --help help for report
--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 environmental-footprint report [command] --help" for more information about a command.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Access and download impact reports and impact data for your Scaleway projects. Our API provides key metrics such as estimated carbon emissions and water usage to help monitor your environmental footprint.

USAGE:
scw environmental-footprint <command>

AVAILABLE COMMANDS:
data Environmental impact data management commands
report Environmental impact report management commands

FLAGS:
-h, --help help for environmental-footprint
--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 environmental-footprint [command] --help" for more information about a command.
109 changes: 55 additions & 54 deletions cmd/scw/testdata/test-main-usage-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,90 +4,91 @@ USAGE:
scw <command>

AI COMMANDS:
inference This API allows you to handle your Managed Inference services
inference This API allows you to handle your Managed Inference services

AVAILABLE COMMANDS:
datalab Data Lab API for Apache Spark™
domain Domains and DNS - Registrar API
datalab Data Lab API for Apache Spark™
domain Domains and DNS - Registrar API
environmental-footprint Access and download impact reports and impact data for your Scaleway projects. Our API provides key metrics such as estimated carbon emissions and water usage to help monitor your environmental footprint.

BAREMETAL COMMANDS:
apple-silicon Apple silicon API
baremetal Elastic Metal API
fip This API allows you to manage your Elastic Metal servers' flexible public IP addresses
apple-silicon Apple silicon API
baremetal Elastic Metal API
fip This API allows you to manage your Elastic Metal servers' flexible public IP addresses

COMPUTE COMMANDS:
instance This API allows you to manage your CPU and GPU Instances
marketplace This API allows you to find available images for use when launching a Scaleway Instance
instance This API allows you to manage your CPU and GPU Instances
marketplace This API allows you to find available images for use when launching a Scaleway Instance

CONFIGURATION COMMANDS:
alias Alias related commands
config Config file management
info Get info about current settings
init Initialize the config
login Login to scaleway
alias Alias related commands
config Config file management
info Get info about current settings
init Initialize the config
login Login to scaleway

CONTAINER COMMANDS:
k8s This API allows you to manage Kubernetes Kapsule and Kosmos clusters
registry This API allows you to manage your Container Registry resources
k8s This API allows you to manage Kubernetes Kapsule and Kosmos clusters
registry This API allows you to manage your Container Registry resources

COST COMMANDS:
billing This API allows you to manage and query your Scaleway billing and consumption
billing This API allows you to manage and query your Scaleway billing and consumption

DATABASE COMMANDS:
datawarehouse This API allows you to manage your Data Warehouse
mongodb This API allows you to manage your Managed Databases for MongoDB®
rdb This API allows you to manage your Managed Databases for PostgreSQL and MySQL
redis This API allows you to manage your Managed Databases for Redis™
sdb-sql This API allows you to manage your Serverless SQL Databases
searchdb Cloud Essentials for Opensearch API
datawarehouse This API allows you to manage your Data Warehouse
mongodb This API allows you to manage your Managed Databases for MongoDB®
rdb This API allows you to manage your Managed Databases for PostgreSQL and MySQL
redis This API allows you to manage your Managed Databases for Redis™
sdb-sql This API allows you to manage your Serverless SQL Databases
searchdb Cloud Essentials for Opensearch API

DOMAIN & WEBHOSTING COMMANDS:
dns This API allows you to manage your domains, DNS zones and records
tem This API allows you to manage your Transactional Email services
webhosting This API allows you to list and restore backups for your cPanel and WordPress Web Hosting service.
dns This API allows you to manage your domains, DNS zones and records
tem This API allows you to manage your Transactional Email services
webhosting This API allows you to list and restore backups for your cPanel and WordPress Web Hosting service.

INTEGRATION COMMANDS:
iot This API allows you to manage your IoT hubs and devices
mnq These APIs allow you to manage your Messaging and Queuing NATS, Queues and Topics and Events services
iot This API allows you to manage your IoT hubs and devices
mnq These APIs allow you to manage your Messaging and Queuing NATS, Queues and Topics and Events services

MONITORING COMMANDS:
audit-trail This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
cockpit This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs
audit-trail This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
cockpit This API allows you to manage your Scaleway Cockpit, for storing and visualizing metrics and logs

NETWORK COMMANDS:
edge-services Edge Services API
interlink This API allows you to manage your InterLink services
ipam This API allows you to manage your Scaleway IP addresses with our IP Address Management tool
lb This API allows you to manage your Scaleway Load Balancer services
s2s-vpn This API allows you to manage your Site-to-Site VPN
vpc This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks
vpc-gw This API allows you to manage your Public Gateways
edge-services Edge Services API
interlink This API allows you to manage your InterLink services
ipam This API allows you to manage your Scaleway IP addresses with our IP Address Management tool
lb This API allows you to manage your Scaleway Load Balancer services
s2s-vpn This API allows you to manage your Site-to-Site VPN
vpc This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks
vpc-gw This API allows you to manage your Public Gateways

SECURITY COMMANDS:
account This API allows you to manage your Scaleway Projects
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
account This API allows you to manage your Scaleway Projects
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:
container This API allows you to manage your Serverless Containers
function Function as a Service API
jobs This API allows you to manage your Serverless Jobs
container This API allows you to manage your Serverless Containers
function Function as a Service API
jobs This API allows you to manage your Serverless Jobs

STORAGE COMMANDS:
block This API allows you to manage your Block Storage volumes
file This API allows you to manage your File Storage resources
object Object-storage utils
registry This API allows you to manage your Container Registry resources
block This API allows you to manage your Block Storage volumes
file This API allows you to manage your File Storage resources
object Object-storage utils
registry This API allows you to manage your Container Registry resources

UTILITY COMMANDS:
autocomplete Autocomplete related commands
feedback Send feedback to the Scaleway CLI Team!
help Get help about how specific topics inside the CLI work
shell Start shell mode
version Display cli version
autocomplete Autocomplete related commands
feedback Send feedback to the Scaleway CLI Team!
help Get help about how specific topics inside the CLI work
shell Start shell mode
version Display cli version

FLAGS:
-c, --config string The path to the config file
Expand Down
2 changes: 2 additions & 0 deletions commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/dedibox/v1"
domain "github.com/scaleway/scaleway-cli/v2/internal/namespaces/domain/v2beta1"
edgeservices "github.com/scaleway/scaleway-cli/v2/internal/namespaces/edge_services/v1beta1"
environmental_footprint "github.com/scaleway/scaleway-cli/v2/internal/namespaces/environmental_footprint/v1alpha1"
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/feedback"
file "github.com/scaleway/scaleway-cli/v2/internal/namespaces/file/v1alpha1"
flexibleip "github.com/scaleway/scaleway-cli/v2/internal/namespaces/flexibleip/v1alpha1"
Expand Down Expand Up @@ -120,6 +121,7 @@ func GetCommands() *core.Commands {
datalab.GetCommands(),
datawarehouse.GetCommands(),
partner.GetCommands(),
environmental_footprint.GetCommands(),
)

if beta {
Expand Down
Loading
Loading