Skip to content

Commit b2cc08e

Browse files
authored
docs(containers): document VPC integration fields (#1018)
1 parent f86f889 commit b2cc08e

File tree

4 files changed

+78
-12
lines changed

4 files changed

+78
-12
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ async def create_namespace(
279279
"""
280280
Create a new namespace.
281281
Create a new namespace in a specified region.
282-
:param activate_vpc_integration:
282+
:param activate_vpc_integration: When activated, containers in the namespace can be connected to a Private Network.
283283
:param region: Region to target. If none is passed will use default region from the config.
284284
:param name: Name of the namespace to create.
285285
:param environment_variables: Environment variables of the namespace to create.
@@ -645,7 +645,9 @@ async def create_container(
645645
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
646646
:param health_check: Health check configuration of the container.
647647
:param tags: Tags of the Serverless Container.
648-
:param private_network_id:
648+
: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.
649651
: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.
650652
: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.
651653
:return: :class:`Container <Container>`
@@ -746,9 +748,9 @@ async def update_container(
746748
:param description: Description of the container.
747749
:param registry_image: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
748750
:param max_concurrency: Number of maximum concurrent executions of the container.
749-
:param protocol:
750-
:param port:
751-
:param secret_environment_variables:
751+
:param protocol: Protocol the container uses.
752+
:param port: Port the container listens on.
753+
:param secret_environment_variables: Secret environment variables of the container.
752754
:param http_option: Possible values:
753755
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
754756
- enabled: Serve both HTTP and HTTPS traffic.
@@ -760,7 +762,9 @@ async def update_container(
760762
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
761763
:param health_check: Health check configuration of the container.
762764
:param tags: Tags of the Serverless Container.
763-
:param private_network_id:
765+
: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.
764768
: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.
765769
: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.
766770
:return: :class:`Container <Container>`

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,9 @@ class Container:
522522
"""
523523

524524
private_network_id: Optional[str]
525+
"""
526+
When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
527+
"""
525528

526529

527530
@dataclass
@@ -668,6 +671,10 @@ class Namespace:
668671
"""
669672

670673
vpc_integration_activated: Optional[bool]
674+
"""
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.
677+
"""
671678

672679

673680
@dataclass
@@ -876,6 +883,11 @@ class CreateContainerRequest:
876883
"""
877884

878885
private_network_id: Optional[str]
886+
"""
887+
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.
890+
"""
879891

880892
command: Optional[List[str]]
881893
"""
@@ -937,6 +949,9 @@ class CreateDomainRequest:
937949
@dataclass
938950
class CreateNamespaceRequest:
939951
activate_vpc_integration: bool
952+
"""
953+
When activated, containers in the namespace can be connected to a Private Network.
954+
"""
940955

941956
region: Optional[ScwRegion]
942957
"""
@@ -1533,10 +1548,19 @@ class UpdateContainerRequest:
15331548
"""
15341549

15351550
protocol: Optional[ContainerProtocol]
1551+
"""
1552+
Protocol the container uses.
1553+
"""
15361554

15371555
port: Optional[int]
1556+
"""
1557+
Port the container listens on.
1558+
"""
15381559

15391560
secret_environment_variables: Optional[List[Secret]]
1561+
"""
1562+
Secret environment variables of the container.
1563+
"""
15401564

15411565
http_option: Optional[ContainerHttpOption]
15421566
"""
@@ -1574,6 +1598,11 @@ class UpdateContainerRequest:
15741598
"""
15751599

15761600
private_network_id: Optional[str]
1601+
"""
1602+
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.
1605+
"""
15771606

15781607
command: Optional[List[str]]
15791608
"""

scaleway/scaleway/container/v1beta1/api.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def create_namespace(
277277
"""
278278
Create a new namespace.
279279
Create a new namespace in a specified region.
280-
:param activate_vpc_integration:
280+
:param activate_vpc_integration: When activated, containers in the namespace can be connected to a Private Network.
281281
:param region: Region to target. If none is passed will use default region from the config.
282282
:param name: Name of the namespace to create.
283283
:param environment_variables: Environment variables of the namespace to create.
@@ -641,7 +641,9 @@ def create_container(
641641
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
642642
:param health_check: Health check configuration of the container.
643643
:param tags: Tags of the Serverless Container.
644-
:param private_network_id:
644+
: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.
645647
: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.
646648
: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.
647649
:return: :class:`Container <Container>`
@@ -742,9 +744,9 @@ def update_container(
742744
:param description: Description of the container.
743745
:param registry_image: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
744746
:param max_concurrency: Number of maximum concurrent executions of the container.
745-
:param protocol:
746-
:param port:
747-
:param secret_environment_variables:
747+
:param protocol: Protocol the container uses.
748+
:param port: Port the container listens on.
749+
:param secret_environment_variables: Secret environment variables of the container.
748750
:param http_option: Possible values:
749751
- redirected: Responds to HTTP request with a 301 redirect to ask the clients to use HTTPS.
750752
- enabled: Serve both HTTP and HTTPS traffic.
@@ -756,7 +758,9 @@ def update_container(
756758
- memory_usage_threshold: Scale depending on the memory usage of a container instance.
757759
:param health_check: Health check configuration of the container.
758760
:param tags: Tags of the Serverless Container.
759-
:param private_network_id:
761+
: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.
760764
: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.
761765
: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.
762766
:return: :class:`Container <Container>`

scaleway/scaleway/container/v1beta1/types.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,9 @@ class Container:
522522
"""
523523

524524
private_network_id: Optional[str]
525+
"""
526+
When connected to a Private Network, the container can access other Scaleway resources in this Private Network.
527+
"""
525528

526529

527530
@dataclass
@@ -668,6 +671,10 @@ class Namespace:
668671
"""
669672

670673
vpc_integration_activated: Optional[bool]
674+
"""
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.
677+
"""
671678

672679

673680
@dataclass
@@ -876,6 +883,11 @@ class CreateContainerRequest:
876883
"""
877884

878885
private_network_id: Optional[str]
886+
"""
887+
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.
890+
"""
879891

880892
command: Optional[List[str]]
881893
"""
@@ -937,6 +949,9 @@ class CreateDomainRequest:
937949
@dataclass
938950
class CreateNamespaceRequest:
939951
activate_vpc_integration: bool
952+
"""
953+
When activated, containers in the namespace can be connected to a Private Network.
954+
"""
940955

941956
region: Optional[ScwRegion]
942957
"""
@@ -1533,10 +1548,19 @@ class UpdateContainerRequest:
15331548
"""
15341549

15351550
protocol: Optional[ContainerProtocol]
1551+
"""
1552+
Protocol the container uses.
1553+
"""
15361554

15371555
port: Optional[int]
1556+
"""
1557+
Port the container listens on.
1558+
"""
15381559

15391560
secret_environment_variables: Optional[List[Secret]]
1561+
"""
1562+
Secret environment variables of the container.
1563+
"""
15401564

15411565
http_option: Optional[ContainerHttpOption]
15421566
"""
@@ -1574,6 +1598,11 @@ class UpdateContainerRequest:
15741598
"""
15751599

15761600
private_network_id: Optional[str]
1601+
"""
1602+
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.
1605+
"""
15771606

15781607
command: Optional[List[str]]
15791608
"""

0 commit comments

Comments
 (0)