Skip to content

Commit 7536e3e

Browse files
authored
feat(vpcgw) support v2 (#4615)
1 parent 030ab65 commit 7536e3e

File tree

45 files changed

+967
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+967
-82
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Create a new Public Gateway in the specified Scaleway Project, defining its **name**, **type** and other configuration details such as whether to enable SSH bastion.
4+
5+
USAGE:
6+
scw vpc-gw gateway create [arg=value ...]
7+
8+
ARGS:
9+
[project-id] Project ID to use. If none is passed the default project ID will be used
10+
[name=<generated>] Name for the gateway
11+
[tags.{index}] Tags for the gateway
12+
[type=VPC-GW-S] Gateway type (commercial offer type)
13+
[upstream-dns-servers.{index}] Array of DNS server IP addresses to override the gateway's default recursive DNS servers
14+
[ip-id] Existing IP address to attach to the gateway
15+
[enable-smtp] Defines whether SMTP traffic should be allowed pass through the gateway
16+
[enable-bastion] Defines whether SSH bastion should be enabled the gateway
17+
[bastion-port] Port of the SSH bastion
18+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
19+
20+
FLAGS:
21+
-h, --help help for create
22+
-w, --wait wait until the gateway is ready
23+
24+
GLOBAL FLAGS:
25+
-c, --config string The path to the config file
26+
-D, --debug Enable debug mode
27+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
28+
-p, --profile string The config profile to use
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Delete an existing Public Gateway, specified by its gateway ID. This action is irreversible.
4+
5+
USAGE:
6+
scw vpc-gw gateway delete <gateway-id ...> [arg=value ...]
7+
8+
ARGS:
9+
gateway-id ID of the gateway to delete
10+
[cleanup-dhcp] Defines whether to clean up attached DHCP configurations (if any, and if not attached to another Gateway Network)
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
12+
13+
FLAGS:
14+
-h, --help help for delete
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
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get details of a Public Gateway, specified by its gateway ID. The response object contains full details of the gateway, including its **name**, **type**, **status** and more.
4+
5+
USAGE:
6+
scw vpc-gw gateway get <gateway-id ...> [arg=value ...]
7+
8+
ARGS:
9+
gateway-id ID of the gateway to fetch
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
11+
12+
FLAGS:
13+
-h, --help help for get
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
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+
List Public Gateways in a given Scaleway Organization or Project. By default, results are displayed in ascending order of creation date.
4+
5+
USAGE:
6+
scw vpc-gw gateway list [arg=value ...]
7+
8+
ARGS:
9+
[order-by] Order in which to return results (created_at_asc | created_at_desc | name_asc | name_desc | type_asc | type_desc | status_asc | status_desc)
10+
[project-id] Include only gateways in this Project
11+
[name] Filter for gateways which have this search term in their name
12+
[tags.{index}] Filter for gateways with these tags
13+
[type] Filter for gateways of this type
14+
[status] Filter for gateways with this current status. Use `unknown` to include all statuses (unknown | stopped | allocating | configuring | running | stopping | failed | deleting | deleted | locked)
15+
[private-network-id] Filter for gateways attached to this Private nNetwork
16+
[organization-id] Include only gateways in this Organization
17+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)
18+
19+
FLAGS:
20+
-h, --help help for list
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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including DHCP settings, whether to enable masquerade (dynamic NAT), and more.
4+
5+
USAGE:
6+
scw vpc-gw gateway-network create [arg=value ...]
7+
8+
ARGS:
9+
[gateway-id] Public Gateway to connect
10+
[private-network-id] Private Network to connect
11+
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
12+
[enable-dhcp] Defines whether to enable DHCP on this Private Network.
13+
[dhcp-id] ID of an existing DHCP configuration object to use for this GatewayNetwork
14+
[address] Static IP address in CIDR format to to use without DHCP
15+
[ipam-config.push-default-route] Enabling the default route also enables masquerading
16+
[ipam-config.ipam-ip-id] Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
17+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
18+
19+
FLAGS:
20+
-h, --help help for create
21+
-w, --wait wait until the gateway-network is ready
22+
23+
GLOBAL FLAGS:
24+
-c, --config string The path to the config file
25+
-D, --debug Enable debug mode
26+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
27+
-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+
Detach a given Public Gateway from a given Private Network, i.e. delete a GatewayNetwork specified by a gateway_network_id.
4+
5+
USAGE:
6+
scw vpc-gw gateway-network delete <gateway-network-id ...> [arg=value ...]
7+
8+
ARGS:
9+
gateway-network-id ID of the GatewayNetwork to delete
10+
[cleanup-dhcp] Defines whether to clean up attached DHCP configurations (if any, and if not attached to another Gateway Network)
11+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
12+
13+
FLAGS:
14+
-h, --help help for delete
15+
-w, --wait wait until the gateway-network is ready
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Get details of a given connection between a Public Gateway and a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`. The response object contains details of the connection including the IDs of the Public Gateway and Private Network, the dates the connection was created/updated and its configuration settings.
4+
5+
USAGE:
6+
scw vpc-gw gateway-network get <gateway-network-id ...> [arg=value ...]
7+
8+
ARGS:
9+
gateway-network-id ID of the GatewayNetwork to fetch
10+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
11+
12+
FLAGS:
13+
-h, --help help for get
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
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
List the connections between Public Gateways and Private Networks (a connection = a GatewayNetwork). You can choose to filter by `gateway-id` to list all Private Networks attached to the specified Public Gateway, or by `private_network_id` to list all Public Gateways attached to the specified Private Network. Other query parameters are also available. The result is an array of GatewayNetwork objects, each giving details of the connection between a given Public Gateway and a given Private Network.
4+
5+
USAGE:
6+
scw vpc-gw gateway-network list [arg=value ...]
7+
8+
ARGS:
9+
[order-by] Order in which to return results (created_at_asc | created_at_desc | status_asc | status_desc)
10+
[gateway-id] Filter for GatewayNetworks connected to this gateway
11+
[private-network-id] Filter for GatewayNetworks connected to this Private Network
12+
[enable-masquerade] Filter for GatewayNetworks with this `enable_masquerade` setting
13+
[dhcp-id] Filter for GatewayNetworks using this DHCP configuration
14+
[status] Filter for GatewayNetworks with this current status this status. Use `unknown` to include all statuses (unknown | created | attaching | configuring | ready | detaching | deleted)
15+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3 | all)
16+
17+
FLAGS:
18+
-h, --help help for list
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
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
version: 1
3+
interactions:
4+
- request:
5+
body: '{"access_key":"SCWBDFF054RNNE8204AJ","secret_key":null,"description":"my-key","created_at":"2022-06-10T08:39:27.845066Z","updated_at":"2022-07-05T15:12:12.987880Z","expires_at":null,"default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","editable":true,"creation_ip":"51.159.46.153","application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
6+
form: {}
7+
headers:
8+
User-Agent:
9+
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.4; darwin; amd64) cli-e2e-test
10+
url: https://api.scaleway.com/iam/v1alpha1/api-keys/SCWXXXXXXXXXXXXXXXXX
11+
method: GET
12+
response:
13+
body: '{"access_key":"SCWBDFF054RNNE8204AJ","secret_key":null,"description":"my-key","created_at":"2022-06-10T08:39:27.845066Z","updated_at":"2022-07-05T15:12:12.987880Z","expires_at":null,"default_project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","editable":true,"creation_ip":"51.159.46.153","application_id":"531f5518-a0a5-44c2-b790-a9975505c89d"}'
14+
headers:
15+
Content-Length:
16+
- "344"
17+
Content-Security-Policy:
18+
- default-src 'none'; frame-ancestors 'none'
19+
Content-Type:
20+
- application/json
21+
Date:
22+
- Wed, 14 Jun 2023 13:56:47 GMT
23+
Server:
24+
- Scaleway API-Gateway
25+
Strict-Transport-Security:
26+
- max-age=63072000
27+
X-Content-Type-Options:
28+
- nosniff
29+
X-Frame-Options:
30+
- DENY
31+
X-Request-Id:
32+
- 8dedeae5-ec2d-4679-95c6-bc9e7089d96a
33+
status: 200 OK
34+
code: 200
35+
duration: ""
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Update the configuration parameters of a connection between a given Public Gateway and Private Network (the connection = a GatewayNetwork). Updatable parameters include DHCP settings and whether to enable traffic masquerade (dynamic NAT).
4+
5+
USAGE:
6+
scw vpc-gw gateway-network update <gateway-network-id ...> [arg=value ...]
7+
8+
ARGS:
9+
gateway-network-id ID of the GatewayNetwork to update
10+
[enable-masquerade] Defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
11+
[enable-dhcp] Defines whether to enable DHCP on this Private Network.
12+
[dhcp-id] ID of the new DHCP configuration object to use with this GatewayNetwork
13+
[address] New static IP address
14+
[ipam-config.push-default-route] Enabling the default route also enables masquerading
15+
[ipam-config.ipam-ip-id] Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
16+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
17+
18+
FLAGS:
19+
-h, --help help for update
20+
21+
GLOBAL FLAGS:
22+
-c, --config string The path to the config file
23+
-D, --debug Enable debug mode
24+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
25+
-p, --profile string The config profile to use

0 commit comments

Comments
 (0)