Skip to content
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
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/rdb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ async def list_instances(
order_by: Optional[ListInstancesRequestOrderBy] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_maintenances: Optional[bool] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
) -> ListInstancesResponse:
Expand All @@ -815,6 +816,7 @@ async def list_instances(
:param order_by: Criteria to use when ordering Database Instance listings.
:param organization_id: Please use project_id instead.
:param project_id: Project ID to list the Database Instance of.
:param has_maintenances: Filter to only list instances with a scheduled maintenance.
:param page:
:param page_size:
:return: :class:`ListInstancesResponse <ListInstancesResponse>`
Expand All @@ -833,6 +835,7 @@ async def list_instances(
"GET",
f"/rdb/v1/regions/{param_region}/instances",
params={
"has_maintenances": has_maintenances,
"name": name,
"order_by": order_by,
"organization_id": organization_id
Expand All @@ -856,6 +859,7 @@ async def list_instances_all(
order_by: Optional[ListInstancesRequestOrderBy] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_maintenances: Optional[bool] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
) -> List[Instance]:
Expand All @@ -868,6 +872,7 @@ async def list_instances_all(
:param order_by: Criteria to use when ordering Database Instance listings.
:param organization_id: Please use project_id instead.
:param project_id: Project ID to list the Database Instance of.
:param has_maintenances: Filter to only list instances with a scheduled maintenance.
:param page:
:param page_size:
:return: :class:`List[Instance] <List[Instance]>`
Expand All @@ -889,6 +894,7 @@ async def list_instances_all(
"order_by": order_by,
"organization_id": organization_id,
"project_id": project_id,
"has_maintenances": has_maintenances,
"page": page,
"page_size": page_size,
},
Expand Down
4 changes: 4 additions & 0 deletions scaleway-async/scaleway_async/rdb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ def unmarshal_Maintenance(data: Any) -> Maintenance:
if field is not None:
args["status"] = field

field = data.get("is_applicable", None)
if field is not None:
args["is_applicable"] = field

field = data.get("starts_at", None)
if field is not None:
args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field
Expand Down
10 changes: 10 additions & 0 deletions scaleway-async/scaleway_async/rdb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,11 @@ class Maintenance:
Status of the maintenance.
"""

is_applicable: bool
"""
Indicate if the maintenance can be applied by the user.
"""

starts_at: Optional[datetime]
"""
Start date of the maintenance window.
Expand Down Expand Up @@ -2044,6 +2049,11 @@ class ListInstancesRequest:
Project ID to list the Database Instance of.
"""

has_maintenances: Optional[bool]
"""
Filter to only list instances with a scheduled maintenance.
"""

page: Optional[int]

page_size: Optional[int]
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/rdb/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ def list_instances(
order_by: Optional[ListInstancesRequestOrderBy] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_maintenances: Optional[bool] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
) -> ListInstancesResponse:
Expand All @@ -813,6 +814,7 @@ def list_instances(
:param order_by: Criteria to use when ordering Database Instance listings.
:param organization_id: Please use project_id instead.
:param project_id: Project ID to list the Database Instance of.
:param has_maintenances: Filter to only list instances with a scheduled maintenance.
:param page:
:param page_size:
:return: :class:`ListInstancesResponse <ListInstancesResponse>`
Expand All @@ -831,6 +833,7 @@ def list_instances(
"GET",
f"/rdb/v1/regions/{param_region}/instances",
params={
"has_maintenances": has_maintenances,
"name": name,
"order_by": order_by,
"organization_id": organization_id
Expand All @@ -854,6 +857,7 @@ def list_instances_all(
order_by: Optional[ListInstancesRequestOrderBy] = None,
organization_id: Optional[str] = None,
project_id: Optional[str] = None,
has_maintenances: Optional[bool] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
) -> List[Instance]:
Expand All @@ -866,6 +870,7 @@ def list_instances_all(
:param order_by: Criteria to use when ordering Database Instance listings.
:param organization_id: Please use project_id instead.
:param project_id: Project ID to list the Database Instance of.
:param has_maintenances: Filter to only list instances with a scheduled maintenance.
:param page:
:param page_size:
:return: :class:`List[Instance] <List[Instance]>`
Expand All @@ -887,6 +892,7 @@ def list_instances_all(
"order_by": order_by,
"organization_id": organization_id,
"project_id": project_id,
"has_maintenances": has_maintenances,
"page": page,
"page_size": page_size,
},
Expand Down
4 changes: 4 additions & 0 deletions scaleway/scaleway/rdb/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ def unmarshal_Maintenance(data: Any) -> Maintenance:
if field is not None:
args["status"] = field

field = data.get("is_applicable", None)
if field is not None:
args["is_applicable"] = field

field = data.get("starts_at", None)
if field is not None:
args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field
Expand Down
10 changes: 10 additions & 0 deletions scaleway/scaleway/rdb/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,11 @@ class Maintenance:
Status of the maintenance.
"""

is_applicable: bool
"""
Indicate if the maintenance can be applied by the user.
"""

starts_at: Optional[datetime]
"""
Start date of the maintenance window.
Expand Down Expand Up @@ -2044,6 +2049,11 @@ class ListInstancesRequest:
Project ID to list the Database Instance of.
"""

has_maintenances: Optional[bool]
"""
Filter to only list instances with a scheduled maintenance.
"""

page: Optional[int]

page_size: Optional[int]
Expand Down