@scaleway/sdk-autoscaling 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,5 +75,5 @@ export declare class API extends ParentAPI {
|
|
|
75
75
|
* @param request - The request {@link ListAlertsRequest}
|
|
76
76
|
* @returns A Promise of ListAlertsResponse
|
|
77
77
|
*/
|
|
78
|
-
listAlerts: (request
|
|
78
|
+
listAlerts: (request?: Readonly<ListAlertsRequest>) => Promise<ListAlertsResponse>;
|
|
79
79
|
}
|
package/dist/v1alpha2/api.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GROUP_GROUP_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateGroupRequest, marshalUpdateGroupRequest, unmarshalGroup, unmarshalListAlertsResponse, unmarshalListGroupsResponse, unmarshalListLogsResponse, unmarshalListServersResponse } from "./marshalling.gen.js";
|
|
3
|
-
import { API as API$1, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, resolveOneOf, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1alpha2/api.gen.ts
|
|
5
5
|
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
6
6
|
/**
|
|
@@ -39,18 +39,25 @@ var API = class extends API$1 {
|
|
|
39
39
|
}, unmarshalGroup);
|
|
40
40
|
this.listLogs = (request) => this.client.fetch({
|
|
41
41
|
method: "GET",
|
|
42
|
-
path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/
|
|
43
|
-
urlParams: urlParams(["end_time", request.endTime], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["start_time", request.startTime])
|
|
42
|
+
path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/logs`,
|
|
43
|
+
urlParams: urlParams(["end_time", request.endTime], ["group_id", request.groupId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ["start_time", request.startTime])
|
|
44
44
|
}, unmarshalListLogsResponse);
|
|
45
45
|
this.listServers = (request) => this.client.fetch({
|
|
46
46
|
method: "GET",
|
|
47
|
-
path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/
|
|
48
|
-
urlParams: urlParams(["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken])
|
|
47
|
+
path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
48
|
+
urlParams: urlParams(["group_id", request.groupId], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken])
|
|
49
49
|
}, unmarshalListServersResponse);
|
|
50
|
-
this.listAlerts = (request) => this.client.fetch({
|
|
50
|
+
this.listAlerts = (request = {}) => this.client.fetch({
|
|
51
51
|
method: "GET",
|
|
52
|
-
path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/
|
|
53
|
-
urlParams: urlParams(["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken]
|
|
52
|
+
path: `/autoscaling/v1alpha2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/alerts`,
|
|
53
|
+
urlParams: urlParams(["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["page_token", request.pageToken], ...Object.entries(resolveOneOf([{
|
|
54
|
+
param: "group_id",
|
|
55
|
+
value: request.groupId
|
|
56
|
+
}, {
|
|
57
|
+
default: this.client.settings.defaultProjectId,
|
|
58
|
+
param: "project_id",
|
|
59
|
+
value: request.projectId
|
|
60
|
+
}])))
|
|
54
61
|
}, unmarshalListAlertsResponse);
|
|
55
62
|
}
|
|
56
63
|
static {
|
|
@@ -59,6 +59,10 @@ export interface Alert {
|
|
|
59
59
|
* Optional timestamp when the alert was closed.
|
|
60
60
|
*/
|
|
61
61
|
closedAt?: Date;
|
|
62
|
+
/**
|
|
63
|
+
* ID of the group.
|
|
64
|
+
*/
|
|
65
|
+
groupId: string;
|
|
62
66
|
/**
|
|
63
67
|
* List of quota names that are exceeded (for quotas_exceeded alerts).
|
|
64
68
|
*/
|
|
@@ -333,9 +337,18 @@ export type ListAlertsRequest = {
|
|
|
333
337
|
* Zone to target. If none is passed will use default zone from the config.
|
|
334
338
|
*/
|
|
335
339
|
zone?: ScwZone;
|
|
336
|
-
|
|
340
|
+
/**
|
|
341
|
+
*
|
|
342
|
+
* One-of ('scope'): at most one of 'groupId', 'projectId' could be set.
|
|
343
|
+
*/
|
|
344
|
+
groupId?: string;
|
|
337
345
|
pageToken?: string;
|
|
338
346
|
pageSize?: number;
|
|
347
|
+
/**
|
|
348
|
+
*
|
|
349
|
+
* One-of ('scope'): at most one of 'groupId', 'projectId' could be set.
|
|
350
|
+
*/
|
|
351
|
+
projectId?: string;
|
|
339
352
|
};
|
|
340
353
|
export interface ListAlertsResponse {
|
|
341
354
|
/**
|