Skip to content

feat(edge_services): add args to List filters #597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scaleway-async/scaleway_async/edge_services/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ async def list_pipelines(
name: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_backend_stage_lb: Optional[bool] = None,
) -> ListPipelinesResponse:
"""
List pipelines.
Expand All @@ -112,6 +113,7 @@ async def list_pipelines(
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
:return: :class:`ListPipelinesResponse <ListPipelinesResponse>`

Usage:
Expand All @@ -124,6 +126,7 @@ async def list_pipelines(
"GET",
"/edge-services/v1alpha1/pipelines",
params={
"has_backend_stage_lb": has_backend_stage_lb,
"name": name,
"order_by": order_by,
"organization_id": organization_id
Expand All @@ -146,6 +149,7 @@ async def list_pipelines_all(
name: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_backend_stage_lb: Optional[bool] = None,
) -> List[Pipeline]:
"""
List pipelines.
Expand All @@ -156,6 +160,7 @@ async def list_pipelines_all(
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
:return: :class:`List[Pipeline] <List[Pipeline]>`

Usage:
Expand All @@ -175,6 +180,7 @@ async def list_pipelines_all(
"name": name,
"organization_id": organization_id,
"project_id": project_id,
"has_backend_stage_lb": has_backend_stage_lb,
},
)

Expand Down Expand Up @@ -1059,6 +1065,7 @@ async def list_backend_stages(
project_id: Optional[str] = None,
bucket_name: Optional[str] = None,
bucket_region: Optional[str] = None,
lb_id: Optional[str] = None,
) -> ListBackendStagesResponse:
"""
List backend stages.
Expand All @@ -1070,6 +1077,7 @@ async def list_backend_stages(
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
:return: :class:`ListBackendStagesResponse <ListBackendStagesResponse>`

Usage:
Expand All @@ -1084,6 +1092,7 @@ async def list_backend_stages(
params={
"bucket_name": bucket_name,
"bucket_region": bucket_region,
"lb_id": lb_id,
"order_by": order_by,
"page": page,
"page_size": page_size or self.client.default_page_size,
Expand All @@ -1105,6 +1114,7 @@ async def list_backend_stages_all(
project_id: Optional[str] = None,
bucket_name: Optional[str] = None,
bucket_region: Optional[str] = None,
lb_id: Optional[str] = None,
) -> List[BackendStage]:
"""
List backend stages.
Expand All @@ -1116,6 +1126,7 @@ async def list_backend_stages_all(
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
:return: :class:`List[BackendStage] <List[BackendStage]>`

Usage:
Expand All @@ -1136,6 +1147,7 @@ async def list_backend_stages_all(
"project_id": project_id,
"bucket_name": bucket_name,
"bucket_region": bucket_region,
"lb_id": lb_id,
},
)

Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/edge_services/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,11 @@ class ListBackendStagesRequest:
Bucket region to filter for, only backend stages with buckets in this region will be returned.
"""

lb_id: Optional[str]
"""
Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
"""


@dataclass
class ListBackendStagesResponse:
Expand Down Expand Up @@ -899,6 +904,11 @@ class ListPipelinesRequest:
Project ID to filter for, only pipelines from this Project will be returned.
"""

has_backend_stage_lb: Optional[bool]
"""
Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
"""


@dataclass
class ListPipelinesResponse:
Expand Down
12 changes: 12 additions & 0 deletions scaleway/scaleway/edge_services/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def list_pipelines(
name: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_backend_stage_lb: Optional[bool] = None,
) -> ListPipelinesResponse:
"""
List pipelines.
Expand All @@ -112,6 +113,7 @@ def list_pipelines(
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
:return: :class:`ListPipelinesResponse <ListPipelinesResponse>`

Usage:
Expand All @@ -124,6 +126,7 @@ def list_pipelines(
"GET",
"/edge-services/v1alpha1/pipelines",
params={
"has_backend_stage_lb": has_backend_stage_lb,
"name": name,
"order_by": order_by,
"organization_id": organization_id
Expand All @@ -146,6 +149,7 @@ def list_pipelines_all(
name: Optional[str] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_backend_stage_lb: Optional[bool] = None,
) -> List[Pipeline]:
"""
List pipelines.
Expand All @@ -156,6 +160,7 @@ def list_pipelines_all(
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
:return: :class:`List[Pipeline] <List[Pipeline]>`

Usage:
Expand All @@ -175,6 +180,7 @@ def list_pipelines_all(
"name": name,
"organization_id": organization_id,
"project_id": project_id,
"has_backend_stage_lb": has_backend_stage_lb,
},
)

Expand Down Expand Up @@ -1057,6 +1063,7 @@ def list_backend_stages(
project_id: Optional[str] = None,
bucket_name: Optional[str] = None,
bucket_region: Optional[str] = None,
lb_id: Optional[str] = None,
) -> ListBackendStagesResponse:
"""
List backend stages.
Expand All @@ -1068,6 +1075,7 @@ def list_backend_stages(
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
:return: :class:`ListBackendStagesResponse <ListBackendStagesResponse>`

Usage:
Expand All @@ -1082,6 +1090,7 @@ def list_backend_stages(
params={
"bucket_name": bucket_name,
"bucket_region": bucket_region,
"lb_id": lb_id,
"order_by": order_by,
"page": page,
"page_size": page_size or self.client.default_page_size,
Expand All @@ -1103,6 +1112,7 @@ def list_backend_stages_all(
project_id: Optional[str] = None,
bucket_name: Optional[str] = None,
bucket_region: Optional[str] = None,
lb_id: Optional[str] = None,
) -> List[BackendStage]:
"""
List backend stages.
Expand All @@ -1114,6 +1124,7 @@ def list_backend_stages_all(
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
:return: :class:`List[BackendStage] <List[BackendStage]>`

Usage:
Expand All @@ -1134,6 +1145,7 @@ def list_backend_stages_all(
"project_id": project_id,
"bucket_name": bucket_name,
"bucket_region": bucket_region,
"lb_id": lb_id,
},
)

Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/edge_services/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,11 @@ class ListBackendStagesRequest:
Bucket region to filter for, only backend stages with buckets in this region will be returned.
"""

lb_id: Optional[str]
"""
Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
"""


@dataclass
class ListBackendStagesResponse:
Expand Down Expand Up @@ -899,6 +904,11 @@ class ListPipelinesRequest:
Project ID to filter for, only pipelines from this Project will be returned.
"""

has_backend_stage_lb: Optional[bool]
"""
Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
"""


@dataclass
class ListPipelinesResponse:
Expand Down