Skip to content

Commit 0f4df59

Browse files
scaleway-botyfodil
andauthored
feat(vpc/v2): add ListSubnets docs (#530)
Co-authored-by: Yacine Fodil <[email protected]>
1 parent d040119 commit 0f4df59

File tree

4 files changed

+80
-30
lines changed

4 files changed

+80
-30
lines changed

scaleway-async/scaleway_async/vpc/v2/api.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,16 @@ async def list_subnets(
749749
vpc_id: Optional[str] = None,
750750
) -> ListSubnetsResponse:
751751
"""
752+
List subnets.
753+
List any Private Network's subnets. See ListPrivateNetworks to list a specific Private Network's subnets.
752754
:param region: Region to target. If none is passed will use default region from the config.
753-
:param order_by:
754-
:param page:
755-
:param page_size:
756-
:param organization_id:
757-
:param project_id:
758-
:param subnet_ids:
759-
:param vpc_id:
755+
:param order_by: Sort order of the returned subnets.
756+
:param page: Page number to return, from the paginated results.
757+
:param page_size: Maximum number of Private Networks to return per page.
758+
:param organization_id: Organization ID to filter for. Only subnets belonging to this Organization will be returned.
759+
:param project_id: Project ID to filter for. Only subnets belonging to this Project will be returned.
760+
:param subnet_ids: Subnet IDs to filter for. Only subnets matching the specified IDs will be returned.
761+
:param vpc_id: VPC ID to filter for. Only subnets belonging to this VPC will be returned.
760762
:return: :class:`ListSubnetsResponse <ListSubnetsResponse>`
761763
762764
Usage:
@@ -800,14 +802,16 @@ async def list_subnets_all(
800802
vpc_id: Optional[str] = None,
801803
) -> List[Subnet]:
802804
"""
805+
List subnets.
806+
List any Private Network's subnets. See ListPrivateNetworks to list a specific Private Network's subnets.
803807
:param region: Region to target. If none is passed will use default region from the config.
804-
:param order_by:
805-
:param page:
806-
:param page_size:
807-
:param organization_id:
808-
:param project_id:
809-
:param subnet_ids:
810-
:param vpc_id:
808+
:param order_by: Sort order of the returned subnets.
809+
:param page: Page number to return, from the paginated results.
810+
:param page_size: Maximum number of Private Networks to return per page.
811+
:param organization_id: Organization ID to filter for. Only subnets belonging to this Organization will be returned.
812+
:param project_id: Project ID to filter for. Only subnets belonging to this Project will be returned.
813+
:param subnet_ids: Subnet IDs to filter for. Only subnets matching the specified IDs will be returned.
814+
:param vpc_id: VPC ID to filter for. Only subnets belonging to this VPC will be returned.
811815
:return: :class:`List[Subnet] <List[Subnet]>`
812816
813817
Usage:
@@ -840,7 +844,7 @@ async def set_subnets(
840844
subnets: Optional[List[str]] = None,
841845
) -> SetSubnetsResponse:
842846
"""
843-
Set the subnets of a Private Network.
847+
Set a Private Network's subnets.
844848
Set subnets for an existing Private Network. Note that the method is PUT and not PATCH. Any existing subnets will be removed in favor of the new specified set of subnets.
845849
:param private_network_id: Private Network ID.
846850
:param region: Region to target. If none is passed will use default region from the config.

scaleway-async/scaleway_async/vpc/v2/types.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,18 +452,39 @@ class ListSubnetsRequest:
452452
"""
453453

454454
order_by: Optional[ListSubnetsRequestOrderBy]
455+
"""
456+
Sort order of the returned subnets.
457+
"""
455458

456459
page: Optional[int]
460+
"""
461+
Page number to return, from the paginated results.
462+
"""
457463

458464
page_size: Optional[int]
465+
"""
466+
Maximum number of Private Networks to return per page.
467+
"""
459468

460469
organization_id: Optional[str]
470+
"""
471+
Organization ID to filter for. Only subnets belonging to this Organization will be returned.
472+
"""
461473

462474
project_id: Optional[str]
475+
"""
476+
Project ID to filter for. Only subnets belonging to this Project will be returned.
477+
"""
463478

464479
subnet_ids: Optional[List[str]]
480+
"""
481+
Subnet IDs to filter for. Only subnets matching the specified IDs will be returned.
482+
"""
465483

466484
vpc_id: Optional[str]
485+
"""
486+
VPC ID to filter for. Only subnets belonging to this VPC will be returned.
487+
"""
467488

468489

469490
@dataclass

scaleway/scaleway/vpc/v2/api.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,16 @@ def list_subnets(
749749
vpc_id: Optional[str] = None,
750750
) -> ListSubnetsResponse:
751751
"""
752+
List subnets.
753+
List any Private Network's subnets. See ListPrivateNetworks to list a specific Private Network's subnets.
752754
:param region: Region to target. If none is passed will use default region from the config.
753-
:param order_by:
754-
:param page:
755-
:param page_size:
756-
:param organization_id:
757-
:param project_id:
758-
:param subnet_ids:
759-
:param vpc_id:
755+
:param order_by: Sort order of the returned subnets.
756+
:param page: Page number to return, from the paginated results.
757+
:param page_size: Maximum number of Private Networks to return per page.
758+
:param organization_id: Organization ID to filter for. Only subnets belonging to this Organization will be returned.
759+
:param project_id: Project ID to filter for. Only subnets belonging to this Project will be returned.
760+
:param subnet_ids: Subnet IDs to filter for. Only subnets matching the specified IDs will be returned.
761+
:param vpc_id: VPC ID to filter for. Only subnets belonging to this VPC will be returned.
760762
:return: :class:`ListSubnetsResponse <ListSubnetsResponse>`
761763
762764
Usage:
@@ -800,14 +802,16 @@ def list_subnets_all(
800802
vpc_id: Optional[str] = None,
801803
) -> List[Subnet]:
802804
"""
805+
List subnets.
806+
List any Private Network's subnets. See ListPrivateNetworks to list a specific Private Network's subnets.
803807
:param region: Region to target. If none is passed will use default region from the config.
804-
:param order_by:
805-
:param page:
806-
:param page_size:
807-
:param organization_id:
808-
:param project_id:
809-
:param subnet_ids:
810-
:param vpc_id:
808+
:param order_by: Sort order of the returned subnets.
809+
:param page: Page number to return, from the paginated results.
810+
:param page_size: Maximum number of Private Networks to return per page.
811+
:param organization_id: Organization ID to filter for. Only subnets belonging to this Organization will be returned.
812+
:param project_id: Project ID to filter for. Only subnets belonging to this Project will be returned.
813+
:param subnet_ids: Subnet IDs to filter for. Only subnets matching the specified IDs will be returned.
814+
:param vpc_id: VPC ID to filter for. Only subnets belonging to this VPC will be returned.
811815
:return: :class:`List[Subnet] <List[Subnet]>`
812816
813817
Usage:
@@ -840,7 +844,7 @@ def set_subnets(
840844
subnets: Optional[List[str]] = None,
841845
) -> SetSubnetsResponse:
842846
"""
843-
Set the subnets of a Private Network.
847+
Set a Private Network's subnets.
844848
Set subnets for an existing Private Network. Note that the method is PUT and not PATCH. Any existing subnets will be removed in favor of the new specified set of subnets.
845849
:param private_network_id: Private Network ID.
846850
:param region: Region to target. If none is passed will use default region from the config.

scaleway/scaleway/vpc/v2/types.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,18 +452,39 @@ class ListSubnetsRequest:
452452
"""
453453

454454
order_by: Optional[ListSubnetsRequestOrderBy]
455+
"""
456+
Sort order of the returned subnets.
457+
"""
455458

456459
page: Optional[int]
460+
"""
461+
Page number to return, from the paginated results.
462+
"""
457463

458464
page_size: Optional[int]
465+
"""
466+
Maximum number of Private Networks to return per page.
467+
"""
459468

460469
organization_id: Optional[str]
470+
"""
471+
Organization ID to filter for. Only subnets belonging to this Organization will be returned.
472+
"""
461473

462474
project_id: Optional[str]
475+
"""
476+
Project ID to filter for. Only subnets belonging to this Project will be returned.
477+
"""
463478

464479
subnet_ids: Optional[List[str]]
480+
"""
481+
Subnet IDs to filter for. Only subnets matching the specified IDs will be returned.
482+
"""
465483

466484
vpc_id: Optional[str]
485+
"""
486+
VPC ID to filter for. Only subnets belonging to this VPC will be returned.
487+
"""
467488

468489

469490
@dataclass

0 commit comments

Comments
 (0)