Skip to content

Commit 7bb67d2

Browse files
authored
feat(rdb): add has_maintenances filter to ListInstances endpoint and... (#2207)
1 parent e6389d9 commit 7bb67d2

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

packages_generated/rdb/src/v1/api.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ export class API extends ParentAPI {
425425
method: 'GET',
426426
path: `/rdb/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/instances`,
427427
urlParams: urlParams(
428+
['has_maintenances', request.hasMaintenances],
428429
['name', request.name],
429430
['order_by', request.orderBy],
430431
['organization_id', request.organizationId],

packages_generated/rdb/src/v1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export const unmarshalMaintenance = (data: unknown): Maintenance => {
171171
return {
172172
closedAt: unmarshalDate(data.closed_at),
173173
forcedAt: unmarshalDate(data.forced_at),
174+
isApplicable: data.is_applicable,
174175
reason: data.reason,
175176
startsAt: unmarshalDate(data.starts_at),
176177
status: data.status,

packages_generated/rdb/src/v1/types.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,10 @@ export interface Maintenance {
390390
* Time when Scaleway-side maintenance will be applied.
391391
*/
392392
forcedAt?: Date
393+
/**
394+
* Indicate if the maintenance can be applied by the user.
395+
*/
396+
isApplicable: boolean
393397
}
394398

395399
export interface ReadReplica {
@@ -1642,6 +1646,10 @@ export type ListInstancesRequest = {
16421646
* Project ID to list the Database Instance of.
16431647
*/
16441648
projectId?: string
1649+
/**
1650+
* Filter to only list instances with a scheduled maintenance.
1651+
*/
1652+
hasMaintenances?: boolean
16451653
page?: number
16461654
pageSize?: number
16471655
}

0 commit comments

Comments
 (0)