Skip to content

Commit b8610b2

Browse files
authored
feat(edge_services): add args to List filters (#597)
1 parent e289b03 commit b8610b2

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

scaleway-async/scaleway_async/edge_services/v1alpha1/api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ async def list_pipelines(
102102
name: Optional[str] = None,
103103
organization_id: Optional[str] = None,
104104
project_id: Optional[str] = None,
105+
has_backend_stage_lb: Optional[bool] = None,
105106
) -> ListPipelinesResponse:
106107
"""
107108
List pipelines.
@@ -112,6 +113,7 @@ async def list_pipelines(
112113
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
113114
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
114115
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
116+
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
115117
:return: :class:`ListPipelinesResponse <ListPipelinesResponse>`
116118
117119
Usage:
@@ -124,6 +126,7 @@ async def list_pipelines(
124126
"GET",
125127
"/edge-services/v1alpha1/pipelines",
126128
params={
129+
"has_backend_stage_lb": has_backend_stage_lb,
127130
"name": name,
128131
"order_by": order_by,
129132
"organization_id": organization_id
@@ -146,6 +149,7 @@ async def list_pipelines_all(
146149
name: Optional[str] = None,
147150
organization_id: Optional[str] = None,
148151
project_id: Optional[str] = None,
152+
has_backend_stage_lb: Optional[bool] = None,
149153
) -> List[Pipeline]:
150154
"""
151155
List pipelines.
@@ -156,6 +160,7 @@ async def list_pipelines_all(
156160
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
157161
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
158162
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
163+
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
159164
:return: :class:`List[Pipeline] <List[Pipeline]>`
160165
161166
Usage:
@@ -175,6 +180,7 @@ async def list_pipelines_all(
175180
"name": name,
176181
"organization_id": organization_id,
177182
"project_id": project_id,
183+
"has_backend_stage_lb": has_backend_stage_lb,
178184
},
179185
)
180186

@@ -1059,6 +1065,7 @@ async def list_backend_stages(
10591065
project_id: Optional[str] = None,
10601066
bucket_name: Optional[str] = None,
10611067
bucket_region: Optional[str] = None,
1068+
lb_id: Optional[str] = None,
10621069
) -> ListBackendStagesResponse:
10631070
"""
10641071
List backend stages.
@@ -1070,6 +1077,7 @@ async def list_backend_stages(
10701077
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
10711078
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
10721079
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
1080+
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
10731081
:return: :class:`ListBackendStagesResponse <ListBackendStagesResponse>`
10741082
10751083
Usage:
@@ -1084,6 +1092,7 @@ async def list_backend_stages(
10841092
params={
10851093
"bucket_name": bucket_name,
10861094
"bucket_region": bucket_region,
1095+
"lb_id": lb_id,
10871096
"order_by": order_by,
10881097
"page": page,
10891098
"page_size": page_size or self.client.default_page_size,
@@ -1105,6 +1114,7 @@ async def list_backend_stages_all(
11051114
project_id: Optional[str] = None,
11061115
bucket_name: Optional[str] = None,
11071116
bucket_region: Optional[str] = None,
1117+
lb_id: Optional[str] = None,
11081118
) -> List[BackendStage]:
11091119
"""
11101120
List backend stages.
@@ -1116,6 +1126,7 @@ async def list_backend_stages_all(
11161126
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
11171127
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
11181128
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
1129+
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
11191130
:return: :class:`List[BackendStage] <List[BackendStage]>`
11201131
11211132
Usage:
@@ -1136,6 +1147,7 @@ async def list_backend_stages_all(
11361147
"project_id": project_id,
11371148
"bucket_name": bucket_name,
11381149
"bucket_region": bucket_region,
1150+
"lb_id": lb_id,
11391151
},
11401152
)
11411153

scaleway-async/scaleway_async/edge_services/v1alpha1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,11 @@ class ListBackendStagesRequest:
766766
Bucket region to filter for, only backend stages with buckets in this region will be returned.
767767
"""
768768

769+
lb_id: Optional[str]
770+
"""
771+
Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
772+
"""
773+
769774

770775
@dataclass
771776
class ListBackendStagesResponse:
@@ -899,6 +904,11 @@ class ListPipelinesRequest:
899904
Project ID to filter for, only pipelines from this Project will be returned.
900905
"""
901906

907+
has_backend_stage_lb: Optional[bool]
908+
"""
909+
Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
910+
"""
911+
902912

903913
@dataclass
904914
class ListPipelinesResponse:

scaleway/scaleway/edge_services/v1alpha1/api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def list_pipelines(
102102
name: Optional[str] = None,
103103
organization_id: Optional[str] = None,
104104
project_id: Optional[str] = None,
105+
has_backend_stage_lb: Optional[bool] = None,
105106
) -> ListPipelinesResponse:
106107
"""
107108
List pipelines.
@@ -112,6 +113,7 @@ def list_pipelines(
112113
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
113114
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
114115
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
116+
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
115117
:return: :class:`ListPipelinesResponse <ListPipelinesResponse>`
116118
117119
Usage:
@@ -124,6 +126,7 @@ def list_pipelines(
124126
"GET",
125127
"/edge-services/v1alpha1/pipelines",
126128
params={
129+
"has_backend_stage_lb": has_backend_stage_lb,
127130
"name": name,
128131
"order_by": order_by,
129132
"organization_id": organization_id
@@ -146,6 +149,7 @@ def list_pipelines_all(
146149
name: Optional[str] = None,
147150
organization_id: Optional[str] = None,
148151
project_id: Optional[str] = None,
152+
has_backend_stage_lb: Optional[bool] = None,
149153
) -> List[Pipeline]:
150154
"""
151155
List pipelines.
@@ -156,6 +160,7 @@ def list_pipelines_all(
156160
:param name: Pipeline name to filter for, only pipelines with this string within their name will be returned.
157161
:param organization_id: Organization ID to filter for, only pipelines from this Organization will be returned.
158162
:param project_id: Project ID to filter for, only pipelines from this Project will be returned.
163+
:param has_backend_stage_lb: Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
159164
:return: :class:`List[Pipeline] <List[Pipeline]>`
160165
161166
Usage:
@@ -175,6 +180,7 @@ def list_pipelines_all(
175180
"name": name,
176181
"organization_id": organization_id,
177182
"project_id": project_id,
183+
"has_backend_stage_lb": has_backend_stage_lb,
178184
},
179185
)
180186

@@ -1057,6 +1063,7 @@ def list_backend_stages(
10571063
project_id: Optional[str] = None,
10581064
bucket_name: Optional[str] = None,
10591065
bucket_region: Optional[str] = None,
1066+
lb_id: Optional[str] = None,
10601067
) -> ListBackendStagesResponse:
10611068
"""
10621069
List backend stages.
@@ -1068,6 +1075,7 @@ def list_backend_stages(
10681075
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
10691076
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
10701077
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
1078+
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
10711079
:return: :class:`ListBackendStagesResponse <ListBackendStagesResponse>`
10721080
10731081
Usage:
@@ -1082,6 +1090,7 @@ def list_backend_stages(
10821090
params={
10831091
"bucket_name": bucket_name,
10841092
"bucket_region": bucket_region,
1093+
"lb_id": lb_id,
10851094
"order_by": order_by,
10861095
"page": page,
10871096
"page_size": page_size or self.client.default_page_size,
@@ -1103,6 +1112,7 @@ def list_backend_stages_all(
11031112
project_id: Optional[str] = None,
11041113
bucket_name: Optional[str] = None,
11051114
bucket_region: Optional[str] = None,
1115+
lb_id: Optional[str] = None,
11061116
) -> List[BackendStage]:
11071117
"""
11081118
List backend stages.
@@ -1114,6 +1124,7 @@ def list_backend_stages_all(
11141124
:param project_id: Project ID to filter for, only backend stages from this Project will be returned.
11151125
:param bucket_name: Bucket name to filter for, only backend stages from this Bucket will be returned.
11161126
:param bucket_region: Bucket region to filter for, only backend stages with buckets in this region will be returned.
1127+
:param lb_id: Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
11171128
:return: :class:`List[BackendStage] <List[BackendStage]>`
11181129
11191130
Usage:
@@ -1134,6 +1145,7 @@ def list_backend_stages_all(
11341145
"project_id": project_id,
11351146
"bucket_name": bucket_name,
11361147
"bucket_region": bucket_region,
1148+
"lb_id": lb_id,
11371149
},
11381150
)
11391151

scaleway/scaleway/edge_services/v1alpha1/types.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,11 @@ class ListBackendStagesRequest:
766766
Bucket region to filter for, only backend stages with buckets in this region will be returned.
767767
"""
768768

769+
lb_id: Optional[str]
770+
"""
771+
Load Balancer ID to filter for, only backend stages with this Load Balancer will be returned.
772+
"""
773+
769774

770775
@dataclass
771776
class ListBackendStagesResponse:
@@ -899,6 +904,11 @@ class ListPipelinesRequest:
899904
Project ID to filter for, only pipelines from this Project will be returned.
900905
"""
901906

907+
has_backend_stage_lb: Optional[bool]
908+
"""
909+
Filter on backend stage, only pipelines with a Load Balancer origin will be returned.
910+
"""
911+
902912

903913
@dataclass
904914
class ListPipelinesResponse:

0 commit comments

Comments
 (0)