Skip to content

Commit ce26e98

Browse files
committed
feat: update generated APIs
1 parent ecfee66 commit ce26e98

File tree

12 files changed

+52
-96
lines changed

12 files changed

+52
-96
lines changed

scaleway-async/scaleway_async/container/v1beta1/api.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -267,34 +267,32 @@ async def wait_for_namespace(
267267
async def create_namespace(
268268
self,
269269
*,
270-
activate_vpc_integration: bool,
271270
region: Optional[ScwRegion] = None,
272271
name: Optional[str] = None,
273272
environment_variables: Optional[Dict[str, str]] = None,
274273
project_id: Optional[str] = None,
275274
description: Optional[str] = None,
276275
secret_environment_variables: Optional[List[Secret]] = None,
277276
tags: Optional[List[str]] = None,
277+
activate_vpc_integration: Optional[bool] = None,
278278
) -> Namespace:
279279
"""
280280
Create a new namespace.
281281
Create a new namespace in a specified region.
282-
:param activate_vpc_integration: When activated, containers in the namespace can be connected to a Private Network.
283282
:param region: Region to target. If none is passed will use default region from the config.
284283
:param name: Name of the namespace to create.
285284
:param environment_variables: Environment variables of the namespace to create.
286285
:param project_id: UUID of the Project in which the namespace will be created.
287286
:param description: Description of the namespace to create.
288287
:param secret_environment_variables: Secret environment variables of the namespace to create.
289288
:param tags: Tags of the Serverless Container Namespace.
289+
:param activate_vpc_integration: Setting this field to true doesn't matter anymore. It will be removed in a near future.
290290
:return: :class:`Namespace <Namespace>`
291291
292292
Usage:
293293
::
294294
295-
result = await api.create_namespace(
296-
activate_vpc_integration=False,
297-
)
295+
result = await api.create_namespace()
298296
"""
299297

300298
param_region = validate_path_param(
@@ -306,14 +304,14 @@ async def create_namespace(
306304
f"/containers/v1beta1/regions/{param_region}/namespaces",
307305
body=marshal_CreateNamespaceRequest(
308306
CreateNamespaceRequest(
309-
activate_vpc_integration=activate_vpc_integration,
310307
region=region,
311308
name=name or random_name(prefix="cns"),
312309
environment_variables=environment_variables,
313310
project_id=project_id,
314311
description=description,
315312
secret_environment_variables=secret_environment_variables,
316313
tags=tags,
314+
activate_vpc_integration=activate_vpc_integration,
317315
),
318316
self.client,
319317
),
@@ -646,8 +644,6 @@ async def create_container(
646644
:param health_check: Health check configuration of the container.
647645
:param tags: Tags of the Serverless Container.
648646
:param private_network_id: When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
649-
650-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
651647
:param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
652648
:param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters.
653649
:return: :class:`Container <Container>`
@@ -763,8 +759,6 @@ async def update_container(
763759
:param health_check: Health check configuration of the container.
764760
:param tags: Tags of the Serverless Container.
765761
:param private_network_id: When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
766-
767-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
768762
:param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
769763
:param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters.
770764
:return: :class:`Container <Container>`

scaleway-async/scaleway_async/container/v1beta1/marshalling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,9 +1037,6 @@ def marshal_CreateNamespaceRequest(
10371037
) -> Dict[str, Any]:
10381038
output: Dict[str, Any] = {}
10391039

1040-
if request.activate_vpc_integration is not None:
1041-
output["activate_vpc_integration"] = request.activate_vpc_integration
1042-
10431040
if request.name is not None:
10441041
output["name"] = request.name
10451042

@@ -1061,6 +1058,9 @@ def marshal_CreateNamespaceRequest(
10611058
if request.tags is not None:
10621059
output["tags"] = request.tags
10631060

1061+
if request.activate_vpc_integration is not None:
1062+
output["activate_vpc_integration"] = request.activate_vpc_integration
1063+
10641064
return output
10651065

10661066

scaleway-async/scaleway_async/container/v1beta1/types.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,7 @@ class Namespace:
672672

673673
vpc_integration_activated: Optional[bool]
674674
"""
675-
When activated, containers in the namespace can be connected to a Private Network.
676-
Note that activating the VPC integration can only be done when creating a new namespace.
675+
The value of this field doesn't matter anymore, and will be removed in a near future.
677676
"""
678677

679678

@@ -885,8 +884,6 @@ class CreateContainerRequest:
885884
private_network_id: Optional[str]
886885
"""
887886
When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
888-
889-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
890887
"""
891888

892889
command: Optional[List[str]]
@@ -948,11 +945,6 @@ class CreateDomainRequest:
948945

949946
@dataclass
950947
class CreateNamespaceRequest:
951-
activate_vpc_integration: bool
952-
"""
953-
When activated, containers in the namespace can be connected to a Private Network.
954-
"""
955-
956948
region: Optional[ScwRegion]
957949
"""
958950
Region to target. If none is passed will use default region from the config.
@@ -988,6 +980,11 @@ class CreateNamespaceRequest:
988980
Tags of the Serverless Container Namespace.
989981
"""
990982

983+
activate_vpc_integration: Optional[bool]
984+
"""
985+
Setting this field to true doesn't matter anymore. It will be removed in a near future.
986+
"""
987+
991988

992989
@dataclass
993990
class CreateTokenRequest:
@@ -1600,8 +1597,6 @@ class UpdateContainerRequest:
16001597
private_network_id: Optional[str]
16011598
"""
16021599
When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
1603-
1604-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
16051600
"""
16061601

16071602
command: Optional[List[str]]

scaleway-async/scaleway_async/function/v1beta1/api.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,34 +271,32 @@ async def wait_for_namespace(
271271
async def create_namespace(
272272
self,
273273
*,
274-
activate_vpc_integration: bool,
275274
region: Optional[ScwRegion] = None,
276275
name: Optional[str] = None,
277276
environment_variables: Optional[Dict[str, str]] = None,
278277
project_id: Optional[str] = None,
279278
description: Optional[str] = None,
280279
secret_environment_variables: Optional[List[Secret]] = None,
281280
tags: Optional[List[str]] = None,
281+
activate_vpc_integration: Optional[bool] = None,
282282
) -> Namespace:
283283
"""
284284
Create a new namespace.
285285
Create a new namespace in a specified Organization or Project.
286-
:param activate_vpc_integration: When activated, functions in the namespace can be connected to a Private Network.
287286
:param region: Region to target. If none is passed will use default region from the config.
288287
:param name:
289288
:param environment_variables: Environment variables of the namespace.
290289
:param project_id: UUID of the project in which the namespace will be created.
291290
:param description: Description of the namespace.
292291
:param secret_environment_variables: Secret environment variables of the namespace.
293292
:param tags: Tags of the Serverless Function Namespace.
293+
:param activate_vpc_integration: Setting this field to true doesn't matter anymore. It will be removed in a near future.
294294
:return: :class:`Namespace <Namespace>`
295295
296296
Usage:
297297
::
298298
299-
result = await api.create_namespace(
300-
activate_vpc_integration=False,
301-
)
299+
result = await api.create_namespace()
302300
"""
303301

304302
param_region = validate_path_param(
@@ -310,14 +308,14 @@ async def create_namespace(
310308
f"/functions/v1beta1/regions/{param_region}/namespaces",
311309
body=marshal_CreateNamespaceRequest(
312310
CreateNamespaceRequest(
313-
activate_vpc_integration=activate_vpc_integration,
314311
region=region,
315312
name=name or random_name(prefix="ns"),
316313
environment_variables=environment_variables,
317314
project_id=project_id,
318315
description=description,
319316
secret_environment_variables=secret_environment_variables,
320317
tags=tags,
318+
activate_vpc_integration=activate_vpc_integration,
321319
),
322320
self.client,
323321
),
@@ -631,8 +629,6 @@ async def create_function(
631629
:param sandbox: Execution environment of the function.
632630
:param tags: Tags of the Serverless Function.
633631
:param private_network_id: When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
634-
635-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
636632
:return: :class:`Function <Function>`
637633
638634
Usage:
@@ -720,8 +716,6 @@ async def update_function(
720716
:param sandbox: Execution environment of the function.
721717
:param tags: Tags of the Serverless Function.
722718
:param private_network_id: When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
723-
724-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
725719
:return: :class:`Function <Function>`
726720
727721
Usage:

scaleway-async/scaleway_async/function/v1beta1/marshalling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,9 +923,6 @@ def marshal_CreateNamespaceRequest(
923923
) -> Dict[str, Any]:
924924
output: Dict[str, Any] = {}
925925

926-
if request.activate_vpc_integration is not None:
927-
output["activate_vpc_integration"] = request.activate_vpc_integration
928-
929926
if request.name is not None:
930927
output["name"] = request.name
931928

@@ -947,6 +944,9 @@ def marshal_CreateNamespaceRequest(
947944
if request.tags is not None:
948945
output["tags"] = request.tags
949946

947+
if request.activate_vpc_integration is not None:
948+
output["activate_vpc_integration"] = request.activate_vpc_integration
949+
950950
return output
951951

952952

scaleway-async/scaleway_async/function/v1beta1/types.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,7 @@ class Namespace:
668668

669669
vpc_integration_activated: Optional[bool]
670670
"""
671-
When activated, functions in the namespace can be connected to a Private Network.
672-
Note that activating the VPC integration can only be done when creating a new namespace.
671+
The value of this field doesn't matter anymore, and will be removed in a near future.
673672
"""
674673

675674

@@ -891,18 +890,11 @@ class CreateFunctionRequest:
891890
private_network_id: Optional[str]
892891
"""
893892
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
894-
895-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
896893
"""
897894

898895

899896
@dataclass
900897
class CreateNamespaceRequest:
901-
activate_vpc_integration: bool
902-
"""
903-
When activated, functions in the namespace can be connected to a Private Network.
904-
"""
905-
906898
region: Optional[ScwRegion]
907899
"""
908900
Region to target. If none is passed will use default region from the config.
@@ -935,6 +927,11 @@ class CreateNamespaceRequest:
935927
Tags of the Serverless Function Namespace.
936928
"""
937929

930+
activate_vpc_integration: Optional[bool]
931+
"""
932+
Setting this field to true doesn't matter anymore. It will be removed in a near future.
933+
"""
934+
938935

939936
@dataclass
940937
class CreateTokenRequest:
@@ -1603,8 +1600,6 @@ class UpdateFunctionRequest:
16031600
private_network_id: Optional[str]
16041601
"""
16051602
When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
1606-
1607-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
16081603
"""
16091604

16101605

scaleway/scaleway/container/v1beta1/api.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,34 +265,32 @@ def wait_for_namespace(
265265
def create_namespace(
266266
self,
267267
*,
268-
activate_vpc_integration: bool,
269268
region: Optional[ScwRegion] = None,
270269
name: Optional[str] = None,
271270
environment_variables: Optional[Dict[str, str]] = None,
272271
project_id: Optional[str] = None,
273272
description: Optional[str] = None,
274273
secret_environment_variables: Optional[List[Secret]] = None,
275274
tags: Optional[List[str]] = None,
275+
activate_vpc_integration: Optional[bool] = None,
276276
) -> Namespace:
277277
"""
278278
Create a new namespace.
279279
Create a new namespace in a specified region.
280-
:param activate_vpc_integration: When activated, containers in the namespace can be connected to a Private Network.
281280
:param region: Region to target. If none is passed will use default region from the config.
282281
:param name: Name of the namespace to create.
283282
:param environment_variables: Environment variables of the namespace to create.
284283
:param project_id: UUID of the Project in which the namespace will be created.
285284
:param description: Description of the namespace to create.
286285
:param secret_environment_variables: Secret environment variables of the namespace to create.
287286
:param tags: Tags of the Serverless Container Namespace.
287+
:param activate_vpc_integration: Setting this field to true doesn't matter anymore. It will be removed in a near future.
288288
:return: :class:`Namespace <Namespace>`
289289
290290
Usage:
291291
::
292292
293-
result = api.create_namespace(
294-
activate_vpc_integration=False,
295-
)
293+
result = api.create_namespace()
296294
"""
297295

298296
param_region = validate_path_param(
@@ -304,14 +302,14 @@ def create_namespace(
304302
f"/containers/v1beta1/regions/{param_region}/namespaces",
305303
body=marshal_CreateNamespaceRequest(
306304
CreateNamespaceRequest(
307-
activate_vpc_integration=activate_vpc_integration,
308305
region=region,
309306
name=name or random_name(prefix="cns"),
310307
environment_variables=environment_variables,
311308
project_id=project_id,
312309
description=description,
313310
secret_environment_variables=secret_environment_variables,
314311
tags=tags,
312+
activate_vpc_integration=activate_vpc_integration,
315313
),
316314
self.client,
317315
),
@@ -642,8 +640,6 @@ def create_container(
642640
:param health_check: Health check configuration of the container.
643641
:param tags: Tags of the Serverless Container.
644642
:param private_network_id: When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
645-
646-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
647643
:param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
648644
:param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters.
649645
:return: :class:`Container <Container>`
@@ -759,8 +755,6 @@ def update_container(
759755
:param health_check: Health check configuration of the container.
760756
:param tags: Tags of the Serverless Container.
761757
:param private_network_id: When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
762-
763-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
764758
:param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
765759
:param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters.
766760
:return: :class:`Container <Container>`

scaleway/scaleway/container/v1beta1/marshalling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,9 +1037,6 @@ def marshal_CreateNamespaceRequest(
10371037
) -> Dict[str, Any]:
10381038
output: Dict[str, Any] = {}
10391039

1040-
if request.activate_vpc_integration is not None:
1041-
output["activate_vpc_integration"] = request.activate_vpc_integration
1042-
10431040
if request.name is not None:
10441041
output["name"] = request.name
10451042

@@ -1061,6 +1058,9 @@ def marshal_CreateNamespaceRequest(
10611058
if request.tags is not None:
10621059
output["tags"] = request.tags
10631060

1061+
if request.activate_vpc_integration is not None:
1062+
output["activate_vpc_integration"] = request.activate_vpc_integration
1063+
10641064
return output
10651065

10661066

0 commit comments

Comments
 (0)