Skip to content

Commit 34a932e

Browse files
authored
feat(edge-services): enable v1beta1 (#4659)
1 parent 5f367ad commit 34a932e

File tree

40 files changed

+821
-1500
lines changed

40 files changed

+821
-1500
lines changed

cmd/scw/testdata/test-all-usage-edge-services-backend-stage-create-usage.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ USAGE:
66
scw edge-services backend-stage create [arg=value ...]
77

88
ARGS:
9-
[project-id] Project ID to use. If none is passed the default project ID will be used
109
[scaleway-s3.bucket-name] Name of the Bucket
1110
[scaleway-s3.bucket-region] Region of the Bucket
1211
[scaleway-s3.is-website] Defines whether the bucket website feature is enabled
@@ -15,6 +14,7 @@ ARGS:
1514
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
1615
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
1716
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
17+
pipeline-id Pipeline ID the Backend stage belongs to
1818

1919
FLAGS:
2020
-h, --help help for create
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: '{"access_key":"SCWBDFF054RNNE8204AJ", "secret_key":null, "description":"my-key",
6+
"created_at":"2022-06-10T08:39:27.845066Z", "updated_at":"2022-07-05T15:12:12.987880Z",
7+
"expires_at":null, "default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
8+
"editable":true, "deletable":true, "managed":false, "creation_ip":"51.159.46.153",
9+
"application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
10+
form: {}
11+
headers:
12+
User-Agent:
13+
- scaleway-sdk-go/v1.0.0-beta.33.0.20250402123125-11d6084394b9 (go1.24.0; darwin;
14+
amd64) cli-e2e-test
15+
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWBDFF054RNNE8204AJ
16+
method: GET
17+
response:
18+
body: '{"access_key":"SCWBDFF054RNNE8204AJ", "secret_key":null, "description":"my-key",
19+
"created_at":"2022-06-10T08:39:27.845066Z", "updated_at":"2022-07-05T15:12:12.987880Z",
20+
"expires_at":null, "default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
21+
"editable":true, "deletable":true, "managed":false, "creation_ip":"51.159.46.153",
22+
"application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
23+
headers:
24+
Content-Length:
25+
- "388"
26+
Content-Security-Policy:
27+
- default-src 'none'; frame-ancestors 'none'
28+
Content-Type:
29+
- application/json
30+
Date:
31+
- Tue, 08 Apr 2025 12:59:43 GMT
32+
Server:
33+
- Scaleway API Gateway (fr-par-1;edge01)
34+
Strict-Transport-Security:
35+
- max-age=63072000
36+
X-Content-Type-Options:
37+
- nosniff
38+
X-Frame-Options:
39+
- DENY
40+
X-Request-Id:
41+
- 129d6879-2522-484a-bcac-e1bb2aeabb78
42+
status: 200 OK
43+
code: 200
44+
duration: ""

cmd/scw/testdata/test-all-usage-edge-services-backend-stage-list-usage.golden

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ USAGE:
77

88
ARGS:
99
[order-by] Sort order of backend stages in the response (created_at_asc | created_at_desc)
10-
[pipeline-id] Pipeline ID to filter for, only backend stages from this pipeline will be returned
11-
[project-id] Project ID to filter for, only backend stages from this Project will be returned
12-
[bucket-name] Bucket name to filter for, only backend stages from this Bucket will be returned
13-
[bucket-region] Bucket region to filter for, only backend stages with buckets in this region will be returned
14-
[lb-id] Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned
10+
pipeline-id Pipeline ID to filter for. Only backend stages from this pipeline will be returned
11+
[bucket-name] Bucket name to filter for. Only backend stages from this Bucket will be returned
12+
[bucket-region] Bucket region to filter for. Only backend stages with buckets in this region will be returned
13+
[lb-id] Load Balancer ID to filter for. Only backend stages with this Load Balancer will be returned
1514

1615
FLAGS:
1716
-h, --help help for list

cmd/scw/testdata/test-all-usage-edge-services-backend-stage-update-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ARGS:
1515
[scaleway-lb.lbs.{index}.frontend-id] ID of the frontend linked to the Load Balancer
1616
[scaleway-lb.lbs.{index}.is-ssl] Defines whether the Load Balancer's frontend handles SSL connections
1717
[scaleway-lb.lbs.{index}.domain-name] Fully Qualified Domain Name (in the format subdomain.example.com) to use in HTTP requests sent towards your Load Balancer
18+
[pipeline-id] Pipeline ID the Backend stage belongs to
1819

1920
FLAGS:
2021
-h, --help help for update
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: '{"access_key":"SCWBDFF054RNNE8204AJ", "secret_key":null, "description":"my-key",
6+
"created_at":"2022-06-10T08:39:27.845066Z", "updated_at":"2022-07-05T15:12:12.987880Z",
7+
"expires_at":null, "default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
8+
"editable":true, "creation_ip":"51.159.46.153", "application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
9+
form: {}
10+
headers:
11+
User-Agent:
12+
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.2; darwin; amd64) cli-e2e-test
13+
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX
14+
method: GET
15+
response:
16+
body: '{"access_key":"SCWBDFF054RNNE8204AJ", "secret_key":null, "description":"my-key",
17+
"created_at":"2022-06-10T08:39:27.845066Z", "updated_at":"2022-07-05T15:12:12.987880Z",
18+
"expires_at":null, "default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
19+
"editable":true, "creation_ip":"51.159.46.153", "application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
20+
headers:
21+
Content-Length:
22+
- "353"
23+
Content-Security-Policy:
24+
- default-src 'none'; frame-ancestors 'none'
25+
Content-Type:
26+
- application/json
27+
Date:
28+
- Tue, 09 Jul 2024 14:44:28 GMT
29+
Server:
30+
- Scaleway API Gateway (fr-par-3;edge02)
31+
Strict-Transport-Security:
32+
- max-age=63072000
33+
X-Content-Type-Options:
34+
- nosniff
35+
X-Frame-Options:
36+
- DENY
37+
X-Request-Id:
38+
- 5f4acf0c-34ef-4783-a893-3bcd63f3b1eb
39+
status: 200 OK
40+
code: 200
41+
duration: ""

cmd/scw/testdata/test-all-usage-edge-services-cache-stage-create-usage.golden

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ USAGE:
66
scw edge-services cache-stage create [arg=value ...]
77

88
ARGS:
9-
[project-id] Project ID to use. If none is passed the default project ID will be used
109
[fallback-ttl=3600s] Time To Live (TTL) in seconds. Defines how long content is cached
1110
[backend-stage-id] Backend stage ID the cache stage will be linked to
11+
pipeline-id Pipeline ID the Cache stage belongs to
12+
[waf-stage-id]
13+
[route-stage-id]
1214

1315
FLAGS:
1416
-h, --help help for create

cmd/scw/testdata/test-all-usage-edge-services-cache-stage-list-usage.golden

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ USAGE:
66
scw edge-services cache-stage list [arg=value ...]
77

88
ARGS:
9-
[order-by] Sort order of cache stages in the response (created_at_asc | created_at_desc)
10-
[pipeline-id] Pipeline ID to filter for, only cache stages from this pipeline will be returned
11-
[project-id] Project ID to filter for, only cache stages from this Project will be returned
9+
[order-by] Sort order of cache stages in the response (created_at_asc | created_at_desc)
10+
pipeline-id Pipeline ID to filter for. Only cache stages from this pipeline will be returned
1211

1312
FLAGS:
1413
-h, --help help for list

cmd/scw/testdata/test-all-usage-edge-services-cache-stage-update-usage.golden

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ARGS:
99
cache-stage-id ID of the cache stage to update
1010
[fallback-ttl] Time To Live (TTL) in seconds. Defines how long content is cached
1111
[backend-stage-id] Backend stage ID the cache stage will be linked to
12+
[waf-stage-id]
13+
[route-stage-id]
1214

1315
FLAGS:
1416
-h, --help help for update

cmd/scw/testdata/test-all-usage-edge-services-dns-stage-create-usage.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ USAGE:
66
scw edge-services dns-stage create [arg=value ...]
77

88
ARGS:
9-
[project-id] Project ID to use. If none is passed the default project ID will be used
109
[fqdns.{index}] Fully Qualified Domain Name (in the format subdomain.example.com) to attach to the stage
1110
[tls-stage-id] TLS stage ID the DNS stage will be linked to
1211
[cache-stage-id] Cache stage ID the DNS stage will be linked to
1312
[backend-stage-id] Backend stage ID the DNS stage will be linked to
13+
pipeline-id Pipeline ID the DNS stage belongs to
1414

1515
FLAGS:
1616
-h, --help help for create

cmd/scw/testdata/test-all-usage-edge-services-dns-stage-list-usage.golden

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ USAGE:
66
scw edge-services dns-stage list [arg=value ...]
77

88
ARGS:
9-
[order-by] Sort order of DNS stages in the response (created_at_asc | created_at_desc)
10-
[pipeline-id] Pipeline ID to filter for, only DNS stages from this pipeline will be returned
11-
[project-id] Project ID to filter for, only DNS stages from this Project will be returned
12-
[fqdn] Fully Qualified Domain Name to filter for (in the format subdomain.example.com), only DNS stages with this FQDN will be returned
9+
[order-by] Sort order of DNS stages in the response (created_at_asc | created_at_desc)
10+
pipeline-id Pipeline ID to filter for. Only DNS stages from this pipeline will be returned
11+
[fqdn] Fully Qualified Domain Name to filter for (in the format subdomain.example.com). Only DNS stages with this FQDN will be returned
1312

1413
FLAGS:
1514
-h, --help help for list

cmd/scw/testdata/test-all-usage-edge-services-pipeline-create-usage.golden

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ USAGE:
66
scw edge-services pipeline create [arg=value ...]
77

88
ARGS:
9-
[project-id] Project ID to use. If none is passed the default project ID will be used
10-
name Name of the pipeline
11-
description Description of the pipeline
12-
[dns-stage-id] DNS stage ID the pipeline will be attached to
9+
[project-id] Project ID to use. If none is passed the default project ID will be used
10+
name Name of the pipeline
11+
description Description of the pipeline
1312

1413
FLAGS:
1514
-h, --help help for create

cmd/scw/testdata/test-all-usage-edge-services-pipeline-list-usage.golden

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ USAGE:
77

88
ARGS:
99
[order-by] Sort order of pipelines in the response (created_at_asc | created_at_desc | name_asc | name_desc)
10-
[name] Pipeline name to filter for, only pipelines with this string within their name will be returned
11-
[project-id] Project ID to filter for, only pipelines from this Project will be returned
12-
[has-backend-stage-lb] Filter on backend stage, only pipelines with a Load Balancer origin will be returned
13-
[organization-id] Organization ID to filter for, only pipelines from this Organization will be returned
10+
[name] Pipeline name to filter for. Only pipelines with this string within their name will be returned
11+
[project-id] Project ID to filter for. Only pipelines from this Project will be returned
12+
[has-backend-stage-lb] Filter on backend stage. Only pipelines with a Load Balancer origin will be returned
13+
[organization-id] Organization ID to filter for. Only pipelines from this Organization will be returned
1414

1515
FLAGS:
1616
-h, --help help for list

cmd/scw/testdata/test-all-usage-edge-services-pipeline-update-usage.golden

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ USAGE:
66
scw edge-services pipeline update <pipeline-id ...> [arg=value ...]
77

88
ARGS:
9-
pipeline-id ID of the pipeline to update
10-
[name] Name of the pipeline
11-
[description] Description of the pipeline
12-
[dns-stage-id] DNS stage ID the pipeline will be attached to
9+
pipeline-id ID of the pipeline to update
10+
[name] Name of the pipeline
11+
[description] Description of the pipeline
1312

1413
FLAGS:
1514
-h, --help help for update
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: '{"access_key":"SCWBDFF054RNNE8204AJ", "secret_key":null, "description":"my-key",
6+
"created_at":"2022-06-10T08:39:27.845066Z", "updated_at":"2022-07-05T15:12:12.987880Z",
7+
"expires_at":null, "default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
8+
"editable":true, "creation_ip":"51.159.46.153", "application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
9+
form: {}
10+
headers:
11+
User-Agent:
12+
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.2; darwin; amd64) cli-e2e-test
13+
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX
14+
method: GET
15+
response:
16+
body: '{"access_key":"SCWBDFF054RNNE8204AJ", "secret_key":null, "description":"my-key",
17+
"created_at":"2022-06-10T08:39:27.845066Z", "updated_at":"2022-07-05T15:12:12.987880Z",
18+
"expires_at":null, "default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5",
19+
"editable":true, "creation_ip":"51.159.46.153", "application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
20+
headers:
21+
Content-Length:
22+
- "353"
23+
Content-Security-Policy:
24+
- default-src 'none'; frame-ancestors 'none'
25+
Content-Type:
26+
- application/json
27+
Date:
28+
- Tue, 09 Jul 2024 14:44:28 GMT
29+
Server:
30+
- Scaleway API Gateway (fr-par-3;edge02)
31+
Strict-Transport-Security:
32+
- max-age=63072000
33+
X-Content-Type-Options:
34+
- nosniff
35+
X-Frame-Options:
36+
- DENY
37+
X-Request-Id:
38+
- 1ab4042b-f80f-4f44-a25c-fdc41d0173ff
39+
status: 200 OK
40+
code: 200
41+
duration: ""

cmd/scw/testdata/test-all-usage-edge-services-purge-request-list-usage.golden

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ USAGE:
77

88
ARGS:
99
[order-by] Sort order of purge requests in the response (created_at_asc | created_at_desc)
10-
[project-id] Project ID to filter for, only purge requests from this Project will be returned
11-
[pipeline-id] Pipeline ID to filter for, only purge requests from this pipeline will be returned
12-
[organization-id] Organization ID to filter for, only purge requests from this Project will be returned
10+
[project-id] Project ID to filter for. Only purge requests from this Project will be returned
11+
[pipeline-id] Pipeline ID to filter for. Only purge requests from this pipeline will be returned
12+
[organization-id] Organization ID to filter for. Only purge requests from this Project will be returned
1313

1414
FLAGS:
1515
-h, --help help for list
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Add route rules to an existing route stage, specified by its `route_stage_id`.
4+
5+
USAGE:
6+
scw edge-services route-rules add <route-stage-id ...> [arg=value ...]
7+
8+
ARGS:
9+
route-stage-id ID of the route stage to update
10+
[route-rules.{index}.rule-http-match.method-filters.{index}] HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are `get`, `post`, `put`, `patch`, `delete`, `head`, `options`. All methods will match if none is provided (unknown_method_filter | get | post | put | patch | delete | head | options)
11+
[route-rules.{index}.rule-http-match.path-filter.path-filter-type] Type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the `regex` type (unknown_path_filter | regex)
12+
[route-rules.{index}.rule-http-match.path-filter.value] Value to be matched for the HTTP URL path
13+
[route-rules.{index}.backend-stage-id] ID of the backend stage that requests matching the rule should be forwarded to
14+
[after-position] Add rules after the given position
15+
[before-position] Add rules before the given position
16+
17+
FLAGS:
18+
-h, --help help for add
19+
20+
GLOBAL FLAGS:
21+
-c, --config string The path to the config file
22+
-D, --debug Enable debug mode
23+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
24+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List all route rules of an existing route stage, specified by its `route_stage_id`.
4+
5+
USAGE:
6+
scw edge-services route-rules list [arg=value ...]
7+
8+
ARGS:
9+
route-stage-id Route stage ID to filter for. Only route rules from this route stage will be returned
10+
11+
FLAGS:
12+
-h, --help help for list
13+
14+
GLOBAL FLAGS:
15+
-c, --config string The path to the config file
16+
-D, --debug Enable debug mode
17+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
18+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Set the rules of an existing route stage, specified by its `route_stage_id`.
4+
5+
USAGE:
6+
scw edge-services route-rules set <route-stage-id ...> [arg=value ...]
7+
8+
ARGS:
9+
route-stage-id ID of the route stage to update
10+
[route-rules.{index}.rule-http-match.method-filters.{index}] HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are `get`, `post`, `put`, `patch`, `delete`, `head`, `options`. All methods will match if none is provided (unknown_method_filter | get | post | put | patch | delete | head | options)
11+
[route-rules.{index}.rule-http-match.path-filter.path-filter-type] Type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the `regex` type (unknown_path_filter | regex)
12+
[route-rules.{index}.rule-http-match.path-filter.value] Value to be matched for the HTTP URL path
13+
[route-rules.{index}.backend-stage-id] ID of the backend stage that requests matching the rule should be forwarded to
14+
15+
FLAGS:
16+
-h, --help help for set
17+
18+
GLOBAL FLAGS:
19+
-c, --config string The path to the config file
20+
-D, --debug Enable debug mode
21+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
22+
-p, --profile string The config profile to use
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Route-rules management commands.
4+
5+
USAGE:
6+
scw edge-services route-rules <command>
7+
8+
AVAILABLE COMMANDS:
9+
add Add route rules
10+
list List route rules
11+
set Set route rules
12+
13+
FLAGS:
14+
-h, --help help for route-rules
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 edge-services route-rules [command] --help" for more information about a command.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new route stage. You must specify the `waf_stage_id` field to customize the route.
4+
5+
USAGE:
6+
scw edge-services route-stage create [arg=value ...]
7+
8+
ARGS:
9+
pipeline-id Pipeline ID the route stage belongs to
10+
[waf-stage-id] ID of the WAF stage HTTP requests should be forwarded to when no rules are matched
11+
12+
FLAGS:
13+
-h, --help help for create
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

0 commit comments

Comments
 (0)