File tree 6 files changed +82
-0
lines changed
scaleway/scaleway/vpcgw/v1
scaleway-async/scaleway_async/vpcgw/v1 6 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 57
57
from .types import ListIPsResponse
58
58
from .types import ListPATRulesRequest
59
59
from .types import ListPATRulesResponse
60
+ from .types import MigrateToV2Request
60
61
from .types import RefreshSSHKeysRequest
61
62
from .types import SetDHCPEntriesRequest
62
63
from .types import SetDHCPEntriesResponse
129
130
"ListIPsResponse" ,
130
131
"ListPATRulesRequest" ,
131
132
"ListPATRulesResponse" ,
133
+ "MigrateToV2Request" ,
132
134
"RefreshSSHKeysRequest" ,
133
135
"SetDHCPEntriesRequest" ,
134
136
"SetDHCPEntriesResponse" ,
Original file line number Diff line number Diff line change @@ -2080,3 +2080,32 @@ async def refresh_ssh_keys(
2080
2080
2081
2081
self ._throw_on_error (res )
2082
2082
return unmarshal_Gateway (res .json ())
2083
+
2084
+ async def migrate_to_v2 (
2085
+ self ,
2086
+ * ,
2087
+ gateway_id : str ,
2088
+ zone : Optional [ScwZone ] = None ,
2089
+ ) -> None :
2090
+ """
2091
+ :param gateway_id:
2092
+ :param zone: Zone to target. If none is passed will use default zone from the config.
2093
+
2094
+ Usage:
2095
+ ::
2096
+
2097
+ result = await api.migrate_to_v2(
2098
+ gateway_id="example",
2099
+ )
2100
+ """
2101
+
2102
+ param_zone = validate_path_param ("zone" , zone or self .client .default_zone )
2103
+ param_gateway_id = validate_path_param ("gateway_id" , gateway_id )
2104
+
2105
+ res = self ._request (
2106
+ "POST" ,
2107
+ f"/vpc-gw/v1/zones/{ param_zone } /gateways/{ param_gateway_id } /migrate-to-v2" ,
2108
+ body = {},
2109
+ )
2110
+
2111
+ self ._throw_on_error (res )
Original file line number Diff line number Diff line change @@ -1440,6 +1440,16 @@ class ListPATRulesResponse:
1440
1440
"""
1441
1441
1442
1442
1443
+ @dataclass
1444
+ class MigrateToV2Request :
1445
+ gateway_id : str
1446
+
1447
+ zone : Optional [ScwZone ]
1448
+ """
1449
+ Zone to target. If none is passed will use default zone from the config.
1450
+ """
1451
+
1452
+
1443
1453
@dataclass
1444
1454
class RefreshSSHKeysRequest :
1445
1455
gateway_id : str
Original file line number Diff line number Diff line change 57
57
from .types import ListIPsResponse
58
58
from .types import ListPATRulesRequest
59
59
from .types import ListPATRulesResponse
60
+ from .types import MigrateToV2Request
60
61
from .types import RefreshSSHKeysRequest
61
62
from .types import SetDHCPEntriesRequest
62
63
from .types import SetDHCPEntriesResponse
129
130
"ListIPsResponse" ,
130
131
"ListPATRulesRequest" ,
131
132
"ListPATRulesResponse" ,
133
+ "MigrateToV2Request" ,
132
134
"RefreshSSHKeysRequest" ,
133
135
"SetDHCPEntriesRequest" ,
134
136
"SetDHCPEntriesResponse" ,
Original file line number Diff line number Diff line change @@ -2078,3 +2078,32 @@ def refresh_ssh_keys(
2078
2078
2079
2079
self ._throw_on_error (res )
2080
2080
return unmarshal_Gateway (res .json ())
2081
+
2082
+ def migrate_to_v2 (
2083
+ self ,
2084
+ * ,
2085
+ gateway_id : str ,
2086
+ zone : Optional [ScwZone ] = None ,
2087
+ ) -> None :
2088
+ """
2089
+ :param gateway_id:
2090
+ :param zone: Zone to target. If none is passed will use default zone from the config.
2091
+
2092
+ Usage:
2093
+ ::
2094
+
2095
+ result = api.migrate_to_v2(
2096
+ gateway_id="example",
2097
+ )
2098
+ """
2099
+
2100
+ param_zone = validate_path_param ("zone" , zone or self .client .default_zone )
2101
+ param_gateway_id = validate_path_param ("gateway_id" , gateway_id )
2102
+
2103
+ res = self ._request (
2104
+ "POST" ,
2105
+ f"/vpc-gw/v1/zones/{ param_zone } /gateways/{ param_gateway_id } /migrate-to-v2" ,
2106
+ body = {},
2107
+ )
2108
+
2109
+ self ._throw_on_error (res )
Original file line number Diff line number Diff line change @@ -1440,6 +1440,16 @@ class ListPATRulesResponse:
1440
1440
"""
1441
1441
1442
1442
1443
+ @dataclass
1444
+ class MigrateToV2Request :
1445
+ gateway_id : str
1446
+
1447
+ zone : Optional [ScwZone ]
1448
+ """
1449
+ Zone to target. If none is passed will use default zone from the config.
1450
+ """
1451
+
1452
+
1443
1453
@dataclass
1444
1454
class RefreshSSHKeysRequest :
1445
1455
gateway_id : str
You can’t perform that action at this time.
0 commit comments