Skip to content

Commit 4e56a1e

Browse files
feat(environmental_footprint): add environmental_footprint to cmds, add doc
1 parent 8b4d658 commit 4e56a1e

9 files changed

+233
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
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.
4+
5+
USAGE:
6+
scw environmental-footprint data get [arg=value ...]
7+
8+
ARGS:
9+
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).
10+
[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.
11+
[regions.{index}] List of regions to filter by (e.g. `fr-par`). Defaults to all regions.
12+
[zones.{index}] List of zones to filter by (e.g. `fr-par-1`). Defaults to all zones.
13+
[project-ids.{index}] List of Project IDs to filter by. Defaults to all Projects in the Organization.
14+
[service-categories.{index}] List of service categories to filter by. Defaults to all service categories. (unknown_service_category | baremetal | compute | storage | network | containers | databases)
15+
[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)
16+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
17+
18+
FLAGS:
19+
-h, --help help for get
20+
--list-sub-commands List all subcommands
21+
22+
GLOBAL FLAGS:
23+
-c, --config string The path to the config file
24+
-D, --debug Enable debug mode
25+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
26+
-p, --profile string The config profile to use
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Environmental impact data management commands.
4+
5+
USAGE:
6+
scw environmental-footprint data <command>
7+
8+
AVAILABLE COMMANDS:
9+
get Retrieve detailed impact data
10+
11+
FLAGS:
12+
-h, --help help for data
13+
--list-sub-commands List all subcommands
14+
15+
GLOBAL FLAGS:
16+
-c, --config string The path to the config file
17+
-D, --debug Enable debug mode
18+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19+
-p, --profile string The config profile to use
20+
21+
Use "scw environmental-footprint data [command] --help" for more information about a command.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Download a Scaleway impact PDF report with detailed impact data for your Scaleway projects.
4+
5+
USAGE:
6+
scw environmental-footprint report get [arg=value ...]
7+
8+
ARGS:
9+
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).
10+
[type] Type of report to download (e.g. `monthly`). (unknown_report_type | monthly | yearly)
11+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
12+
13+
FLAGS:
14+
-h, --help help for get
15+
--list-sub-commands List all subcommands
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Returns a list of dates of available impact reports.
4+
5+
USAGE:
6+
scw environmental-footprint report list [arg=value ...]
7+
8+
ARGS:
9+
start-date Start date of the search period (ISO 8601 format, with time in UTC, `YYYY-MM-DDTHH:MM:SSZ`). The date is inclusive.
10+
[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.
11+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
12+
13+
FLAGS:
14+
-h, --help help for list
15+
--list-sub-commands List all subcommands
16+
17+
GLOBAL FLAGS:
18+
-c, --config string The path to the config file
19+
-D, --debug Enable debug mode
20+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
21+
-p, --profile string The config profile to use
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Environmental impact report management commands.
4+
5+
USAGE:
6+
scw environmental-footprint report <command>
7+
8+
AVAILABLE COMMANDS:
9+
get Download PDF impact report
10+
list Get available impact reports
11+
12+
FLAGS:
13+
-h, --help help for report
14+
--list-sub-commands List all subcommands
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
21+
22+
Use "scw environmental-footprint report [command] --help" for more information about a command.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
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.
4+
5+
USAGE:
6+
scw environmental-footprint <command>
7+
8+
AVAILABLE COMMANDS:
9+
data Environmental impact data management commands
10+
report Environmental impact report management commands
11+
12+
FLAGS:
13+
-h, --help help for environmental-footprint
14+
--list-sub-commands List all subcommands
15+
16+
GLOBAL FLAGS:
17+
-c, --config string The path to the config file
18+
-D, --debug Enable debug mode
19+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
20+
-p, --profile string The config profile to use
21+
22+
Use "scw environmental-footprint [command] --help" for more information about a command.

commands/commands.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/dedibox/v1"
2121
domain "github.com/scaleway/scaleway-cli/v2/internal/namespaces/domain/v2beta1"
2222
edgeservices "github.com/scaleway/scaleway-cli/v2/internal/namespaces/edge_services/v1beta1"
23+
environmental_footprint "github.com/scaleway/scaleway-cli/v2/internal/namespaces/environmental_footprint/v1alpha1"
2324
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/feedback"
2425
file "github.com/scaleway/scaleway-cli/v2/internal/namespaces/file/v1alpha1"
2526
flexibleip "github.com/scaleway/scaleway-cli/v2/internal/namespaces/flexibleip/v1alpha1"
@@ -120,6 +121,7 @@ func GetCommands() *core.Commands {
120121
datalab.GetCommands(),
121122
datawarehouse.GetCommands(),
122123
partner.GetCommands(),
124+
environmental_footprint.GetCommands(),
123125
)
124126

125127
if beta {
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
2+
# Documentation for `scw environmental-footprint`
3+
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.
4+
5+
- [Environmental impact data management commands](#environmental-impact-data-management-commands)
6+
- [Retrieve detailed impact data](#retrieve-detailed-impact-data)
7+
- [Environmental impact report management commands](#environmental-impact-report-management-commands)
8+
- [Download PDF impact report](#download-pdf-impact-report)
9+
- [Get available impact reports](#get-available-impact-reports)
10+
11+
12+
## Environmental impact data management commands
13+
14+
Environmental impact data management commands.
15+
16+
17+
### Retrieve detailed impact data
18+
19+
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.
20+
21+
**Usage:**
22+
23+
```
24+
scw environmental-footprint data get [arg=value ...]
25+
```
26+
27+
28+
**Args:**
29+
30+
| Name | | Description |
31+
|------|---|-------------|
32+
| start-date | Required | Start date (inclusive) of the period for which you want to retrieve impact data (ISO 8601 format, e.g. 2025-05-01T00:00:00Z). |
33+
| 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. |
34+
| regions.{index} | | List of regions to filter by (e.g. `fr-par`). Defaults to all regions. |
35+
| zones.{index} | | List of zones to filter by (e.g. `fr-par-1`). Defaults to all zones. |
36+
| project-ids.{index} | | List of Project IDs to filter by. Defaults to all Projects in the Organization. |
37+
| service-categories.{index} | One of: `unknown_service_category`, `baremetal`, `compute`, `storage`, `network`, `containers`, `databases` | List of service categories to filter by. Defaults to all service categories. |
38+
| product-categories.{index} | One of: `unknown_product_category`, `apple_silicon`, `block_storage`, `dedibox`, `elastic_metal`, `instances`, `object_storage`, `load_balancer`, `kubernetes`, `managed_relational_databases`, `managed_mongodb`, `managed_redis` | List of product categories to filter by. Defaults to all product categories. |
39+
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
40+
41+
42+
43+
## Environmental impact report management commands
44+
45+
Environmental impact report management commands.
46+
47+
48+
### Download PDF impact report
49+
50+
Download a Scaleway impact PDF report with detailed impact data for your Scaleway projects.
51+
52+
**Usage:**
53+
54+
```
55+
scw environmental-footprint report get [arg=value ...]
56+
```
57+
58+
59+
**Args:**
60+
61+
| Name | | Description |
62+
|------|---|-------------|
63+
| date | Required | The start date of the period for which you want to download a report (ISO 8601 format, e.g. 2025-05-01T00:00:00Z). |
64+
| type | One of: `unknown_report_type`, `monthly`, `yearly` | Type of report to download (e.g. `monthly`). |
65+
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
66+
67+
68+
69+
### Get available impact reports
70+
71+
Returns a list of dates of available impact reports.
72+
73+
**Usage:**
74+
75+
```
76+
scw environmental-footprint report list [arg=value ...]
77+
```
78+
79+
80+
**Args:**
81+
82+
| Name | | Description |
83+
|------|---|-------------|
84+
| start-date | Required | Start date of the search period (ISO 8601 format, with time in UTC, `YYYY-MM-DDTHH:MM:SSZ`). The date is inclusive. |
85+
| 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. |
86+
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
87+
88+
89+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package environmental_footprint
2+
3+
import "github.com/scaleway/scaleway-cli/v2/core"
4+
5+
func GetCommands() *core.Commands {
6+
cmds := GetGeneratedCommands()
7+
8+
return cmds
9+
}

0 commit comments

Comments
 (0)