@scaleway/sdk-autoscaling 2.2.1 → 2.3.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.
package/README.md CHANGED
@@ -83,6 +83,7 @@ const api = new Autoscaling.v1.API(client)
83
83
  ## Support
84
84
 
85
85
  We love feedback! Feel free to reach us on:
86
+
86
87
  - [Scaleway Slack community](https://slack.scaleway.com/) - Join us on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)
87
88
  - [GitHub Issues](https://github.com/scaleway/scaleway-sdk-js/issues)
88
89
 
@@ -93,4 +94,3 @@ This repository is at its early stage and is still in active development. If you
93
94
  ## License
94
95
 
95
96
  This project is Apache 2.0 licensed. See the [LICENSE](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE) file for details.
96
-
@@ -0,0 +1,11 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __exportAll = (all, no_symbols) => {
3
+ let target = {};
4
+ for (var name in all) __defProp(target, name, {
5
+ get: all[name],
6
+ enumerable: true
7
+ });
8
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
+ return target;
10
+ };
11
+ export { __exportAll };
package/dist/index.gen.js CHANGED
@@ -1,4 +1,2 @@
1
- import * as index_gen from "./v1alpha1/index.gen.js";
2
- export {
3
- index_gen as Autoscalingv1alpha1
4
- };
1
+ import { index_gen_exports } from "./v1alpha1/index.gen.js";
2
+ export { index_gen_exports as Autoscalingv1alpha1 };
@@ -1,261 +1,186 @@
1
- import { API as API$1, validatePathParam, urlParams, enrichForPagination } from "@scaleway/sdk-client";
2
- import { unmarshalInstanceGroup, marshalCreateInstanceGroupRequest, unmarshalListInstanceGroupsResponse, marshalUpdateInstanceGroupRequest, marshalCreateInstanceTemplateRequest, unmarshalInstanceTemplate, marshalUpdateInstanceTemplateRequest, unmarshalListInstanceTemplatesResponse, marshalCreateInstancePolicyRequest, unmarshalInstancePolicy, marshalUpdateInstancePolicyRequest, unmarshalListInstancePoliciesResponse, unmarshalListInstanceGroupEventsResponse } from "./marshalling.gen.js";
3
- const jsonContentHeaders = {
4
- "Content-Type": "application/json; charset=utf-8"
5
- };
6
- class API extends API$1 {
7
- /**
8
- * Get Instance group. Retrieve information about an existing Instance group, specified by its `instance_group_id`. Its full details, including errors, are returned in the response object.
9
- *
10
- * @param request - The request {@link GetInstanceGroupRequest}
11
- * @returns A Promise of InstanceGroup
12
- */
13
- getInstanceGroup = (request) => this.client.fetch(
14
- {
15
- method: "GET",
16
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}`
17
- },
18
- unmarshalInstanceGroup
19
- );
20
- /**
21
- * Create Instance group. Create a new Instance group. You must specify a `template_id`, capacity and Load Balancer object.
22
- *
23
- * @param request - The request {@link CreateInstanceGroupRequest}
24
- * @returns A Promise of InstanceGroup
25
- */
26
- createInstanceGroup = (request) => this.client.fetch(
27
- {
28
- body: JSON.stringify(
29
- marshalCreateInstanceGroupRequest(request, this.client.settings)
30
- ),
31
- headers: jsonContentHeaders,
32
- method: "POST",
33
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups`
34
- },
35
- unmarshalInstanceGroup
36
- );
37
- pageOfListInstanceGroups = (request = {}) => this.client.fetch(
38
- {
39
- method: "GET",
40
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups`,
41
- urlParams: urlParams(
42
- ["order_by", request.orderBy],
43
- ["page", request.page],
44
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
45
- )
46
- },
47
- unmarshalListInstanceGroupsResponse
48
- );
49
- /**
50
- * List Instance groups. List all Instance groups, for a Scaleway Organization or Scaleway Project. By default, the Instance groups returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
51
- *
52
- * @param request - The request {@link ListInstanceGroupsRequest}
53
- * @returns A Promise of ListInstanceGroupsResponse
54
- */
55
- listInstanceGroups = (request = {}) => enrichForPagination("instanceGroups", this.pageOfListInstanceGroups, request);
56
- /**
57
- * Update Instance group. Update the parameters of an existing Instance group, specified by its `instance_group_id`.
58
- *
59
- * @param request - The request {@link UpdateInstanceGroupRequest}
60
- * @returns A Promise of InstanceGroup
61
- */
62
- updateInstanceGroup = (request) => this.client.fetch(
63
- {
64
- body: JSON.stringify(
65
- marshalUpdateInstanceGroupRequest(request, this.client.settings)
66
- ),
67
- headers: jsonContentHeaders,
68
- method: "PATCH",
69
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}`
70
- },
71
- unmarshalInstanceGroup
72
- );
73
- /**
74
- * Delete Instance group. Delete an existing Instance group, specified by its `instance_group_id`. Deleting an Instance group is permanent, and cannot be undone.
75
- *
76
- * @param request - The request {@link DeleteInstanceGroupRequest}
77
- */
78
- deleteInstanceGroup = (request) => this.client.fetch(
79
- {
80
- method: "DELETE",
81
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}`
82
- }
83
- );
84
- /**
85
- * Create Instance template. Create a new Instance template. This specifies the details of the Instance (commercial type, zone, image, volumes etc.) that will be in the Instance group.
86
- *
87
- * @param request - The request {@link CreateInstanceTemplateRequest}
88
- * @returns A Promise of InstanceTemplate
89
- */
90
- createInstanceTemplate = (request) => this.client.fetch(
91
- {
92
- body: JSON.stringify(
93
- marshalCreateInstanceTemplateRequest(request, this.client.settings)
94
- ),
95
- headers: jsonContentHeaders,
96
- method: "POST",
97
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates`
98
- },
99
- unmarshalInstanceTemplate
100
- );
101
- /**
102
- * Update Instance template. Update an Instance template, such as its commercial offer type, image or volume template.
103
- *
104
- * @param request - The request {@link UpdateInstanceTemplateRequest}
105
- * @returns A Promise of InstanceTemplate
106
- */
107
- updateInstanceTemplate = (request) => this.client.fetch(
108
- {
109
- body: JSON.stringify(
110
- marshalUpdateInstanceTemplateRequest(request, this.client.settings)
111
- ),
112
- headers: jsonContentHeaders,
113
- method: "PATCH",
114
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates/${validatePathParam("templateId", request.templateId)}`
115
- },
116
- unmarshalInstanceTemplate
117
- );
118
- /**
119
- * Get Instance template. Get an existing Instance template from its `template_id`.
120
- *
121
- * @param request - The request {@link GetInstanceTemplateRequest}
122
- * @returns A Promise of InstanceTemplate
123
- */
124
- getInstanceTemplate = (request) => this.client.fetch(
125
- {
126
- method: "GET",
127
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates/${validatePathParam("templateId", request.templateId)}`
128
- },
129
- unmarshalInstanceTemplate
130
- );
131
- /**
132
- * Delete Instance template. Delete an existing Instance template. This action is permanent and cannot be undone.
133
- *
134
- * @param request - The request {@link DeleteInstanceTemplateRequest}
135
- */
136
- deleteInstanceTemplate = (request) => this.client.fetch(
137
- {
138
- method: "DELETE",
139
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates/${validatePathParam("templateId", request.templateId)}`
140
- }
141
- );
142
- pageOfListInstanceTemplates = (request = {}) => this.client.fetch(
143
- {
144
- method: "GET",
145
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates`,
146
- urlParams: urlParams(
147
- ["order_by", request.orderBy],
148
- ["page", request.page],
149
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
150
- )
151
- },
152
- unmarshalListInstanceTemplatesResponse
153
- );
154
- /**
155
- * List Instance templates. List all Instance templates, for a Scaleway Organization or Scaleway Project. By default, the Instance templates returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
156
- *
157
- * @param request - The request {@link ListInstanceTemplatesRequest}
158
- * @returns A Promise of ListInstanceTemplatesResponse
159
- */
160
- listInstanceTemplates = (request = {}) => enrichForPagination("instanceTemplates", this.pageOfListInstanceTemplates, request);
161
- /**
162
- * Create scaling policy. Create a new scaling policy. You must specify a `policy_id`, capacity and Load Balancer object.
163
- *
164
- * @param request - The request {@link CreateInstancePolicyRequest}
165
- * @returns A Promise of InstancePolicy
166
- */
167
- createInstancePolicy = (request) => this.client.fetch(
168
- {
169
- body: JSON.stringify(
170
- marshalCreateInstancePolicyRequest(request, this.client.settings)
171
- ),
172
- headers: jsonContentHeaders,
173
- method: "POST",
174
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies`
175
- },
176
- unmarshalInstancePolicy
177
- );
178
- /**
179
- * Update scaling policy. Update the parameters of an existing scaling policy, specified by its `policy_id`.
180
- *
181
- * @param request - The request {@link UpdateInstancePolicyRequest}
182
- * @returns A Promise of InstancePolicy
183
- */
184
- updateInstancePolicy = (request) => this.client.fetch(
185
- {
186
- body: JSON.stringify(
187
- marshalUpdateInstancePolicyRequest(request, this.client.settings)
188
- ),
189
- headers: jsonContentHeaders,
190
- method: "PATCH",
191
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies/${validatePathParam("policyId", request.policyId)}`
192
- },
193
- unmarshalInstancePolicy
194
- );
195
- pageOfListInstancePolicies = (request) => this.client.fetch(
196
- {
197
- method: "GET",
198
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies`,
199
- urlParams: urlParams(
200
- ["instance_group_id", request.instanceGroupId],
201
- ["order_by", request.orderBy],
202
- ["page", request.page],
203
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
204
- )
205
- },
206
- unmarshalListInstancePoliciesResponse
207
- );
208
- /**
209
- * List scaling policies. List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
210
- *
211
- * @param request - The request {@link ListInstancePoliciesRequest}
212
- * @returns A Promise of ListInstancePoliciesResponse
213
- */
214
- listInstancePolicies = (request) => enrichForPagination("policies", this.pageOfListInstancePolicies, request);
215
- /**
216
- * Get scaling policy. Retrieve information about an existing scaling policy, specified by its `policy_id`. Its full details are returned in the response object.
217
- *
218
- * @param request - The request {@link GetInstancePolicyRequest}
219
- * @returns A Promise of InstancePolicy
220
- */
221
- getInstancePolicy = (request) => this.client.fetch(
222
- {
223
- method: "GET",
224
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies/${validatePathParam("policyId", request.policyId)}`
225
- },
226
- unmarshalInstancePolicy
227
- );
228
- /**
229
- * Delete scaling policy. Delete an existing scaling policy, specified by its `policy_id`. Deleting a scaling policy is permanent, and cannot be undone.
230
- *
231
- * @param request - The request {@link DeleteInstancePolicyRequest}
232
- */
233
- deleteInstancePolicy = (request) => this.client.fetch(
234
- {
235
- method: "DELETE",
236
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies/${validatePathParam("policyId", request.policyId)}`
237
- }
238
- );
239
- pageOfListInstanceGroupEvents = (request) => this.client.fetch(
240
- {
241
- method: "GET",
242
- path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}/events`,
243
- urlParams: urlParams(
244
- ["order_by", request.orderBy],
245
- ["page", request.page],
246
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
247
- )
248
- },
249
- unmarshalListInstanceGroupEventsResponse
250
- );
251
- /**
252
- * List events. List all events for a given Instance group. By default, the events are ordered by creation date in descending order, though this can be modified via the `order_by` field.
253
- *
254
- * @param request - The request {@link ListInstanceGroupEventsRequest}
255
- * @returns A Promise of ListInstanceGroupEventsResponse
256
- */
257
- listInstanceGroupEvents = (request) => enrichForPagination("instanceEvents", this.pageOfListInstanceGroupEvents, request);
258
- }
259
- export {
260
- API
1
+ import { marshalCreateInstanceGroupRequest, marshalCreateInstancePolicyRequest, marshalCreateInstanceTemplateRequest, marshalUpdateInstanceGroupRequest, marshalUpdateInstancePolicyRequest, marshalUpdateInstanceTemplateRequest, unmarshalInstanceGroup, unmarshalInstancePolicy, unmarshalInstanceTemplate, unmarshalListInstanceGroupEventsResponse, unmarshalListInstanceGroupsResponse, unmarshalListInstancePoliciesResponse, unmarshalListInstanceTemplatesResponse } from "./marshalling.gen.js";
2
+ import { API, enrichForPagination, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
+ var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
+ /**
5
+ * Instance Scaling Groups API.
6
+ */
7
+ var API$1 = class extends API {
8
+ /**
9
+ * Get Instance group. Retrieve information about an existing Instance group, specified by its `instance_group_id`. Its full details, including errors, are returned in the response object.
10
+ *
11
+ * @param request - The request {@link GetInstanceGroupRequest}
12
+ * @returns A Promise of InstanceGroup
13
+ */
14
+ getInstanceGroup = (request) => this.client.fetch({
15
+ method: "GET",
16
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}`
17
+ }, unmarshalInstanceGroup);
18
+ /**
19
+ * Create Instance group. Create a new Instance group. You must specify a `template_id`, capacity and Load Balancer object.
20
+ *
21
+ * @param request - The request {@link CreateInstanceGroupRequest}
22
+ * @returns A Promise of InstanceGroup
23
+ */
24
+ createInstanceGroup = (request) => this.client.fetch({
25
+ body: JSON.stringify(marshalCreateInstanceGroupRequest(request, this.client.settings)),
26
+ headers: jsonContentHeaders,
27
+ method: "POST",
28
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups`
29
+ }, unmarshalInstanceGroup);
30
+ pageOfListInstanceGroups = (request = {}) => this.client.fetch({
31
+ method: "GET",
32
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups`,
33
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
34
+ }, unmarshalListInstanceGroupsResponse);
35
+ /**
36
+ * List Instance groups. List all Instance groups, for a Scaleway Organization or Scaleway Project. By default, the Instance groups returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
37
+ *
38
+ * @param request - The request {@link ListInstanceGroupsRequest}
39
+ * @returns A Promise of ListInstanceGroupsResponse
40
+ */
41
+ listInstanceGroups = (request = {}) => enrichForPagination("instanceGroups", this.pageOfListInstanceGroups, request);
42
+ /**
43
+ * Update Instance group. Update the parameters of an existing Instance group, specified by its `instance_group_id`.
44
+ *
45
+ * @param request - The request {@link UpdateInstanceGroupRequest}
46
+ * @returns A Promise of InstanceGroup
47
+ */
48
+ updateInstanceGroup = (request) => this.client.fetch({
49
+ body: JSON.stringify(marshalUpdateInstanceGroupRequest(request, this.client.settings)),
50
+ headers: jsonContentHeaders,
51
+ method: "PATCH",
52
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}`
53
+ }, unmarshalInstanceGroup);
54
+ /**
55
+ * Delete Instance group. Delete an existing Instance group, specified by its `instance_group_id`. Deleting an Instance group is permanent, and cannot be undone.
56
+ *
57
+ * @param request - The request {@link DeleteInstanceGroupRequest}
58
+ */
59
+ deleteInstanceGroup = (request) => this.client.fetch({
60
+ method: "DELETE",
61
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}`
62
+ });
63
+ /**
64
+ * Create Instance template. Create a new Instance template. This specifies the details of the Instance (commercial type, zone, image, volumes etc.) that will be in the Instance group.
65
+ *
66
+ * @param request - The request {@link CreateInstanceTemplateRequest}
67
+ * @returns A Promise of InstanceTemplate
68
+ */
69
+ createInstanceTemplate = (request) => this.client.fetch({
70
+ body: JSON.stringify(marshalCreateInstanceTemplateRequest(request, this.client.settings)),
71
+ headers: jsonContentHeaders,
72
+ method: "POST",
73
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates`
74
+ }, unmarshalInstanceTemplate);
75
+ /**
76
+ * Update Instance template. Update an Instance template, such as its commercial offer type, image or volume template.
77
+ *
78
+ * @param request - The request {@link UpdateInstanceTemplateRequest}
79
+ * @returns A Promise of InstanceTemplate
80
+ */
81
+ updateInstanceTemplate = (request) => this.client.fetch({
82
+ body: JSON.stringify(marshalUpdateInstanceTemplateRequest(request, this.client.settings)),
83
+ headers: jsonContentHeaders,
84
+ method: "PATCH",
85
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates/${validatePathParam("templateId", request.templateId)}`
86
+ }, unmarshalInstanceTemplate);
87
+ /**
88
+ * Get Instance template. Get an existing Instance template from its `template_id`.
89
+ *
90
+ * @param request - The request {@link GetInstanceTemplateRequest}
91
+ * @returns A Promise of InstanceTemplate
92
+ */
93
+ getInstanceTemplate = (request) => this.client.fetch({
94
+ method: "GET",
95
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates/${validatePathParam("templateId", request.templateId)}`
96
+ }, unmarshalInstanceTemplate);
97
+ /**
98
+ * Delete Instance template. Delete an existing Instance template. This action is permanent and cannot be undone.
99
+ *
100
+ * @param request - The request {@link DeleteInstanceTemplateRequest}
101
+ */
102
+ deleteInstanceTemplate = (request) => this.client.fetch({
103
+ method: "DELETE",
104
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates/${validatePathParam("templateId", request.templateId)}`
105
+ });
106
+ pageOfListInstanceTemplates = (request = {}) => this.client.fetch({
107
+ method: "GET",
108
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-templates`,
109
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
110
+ }, unmarshalListInstanceTemplatesResponse);
111
+ /**
112
+ * List Instance templates. List all Instance templates, for a Scaleway Organization or Scaleway Project. By default, the Instance templates returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
113
+ *
114
+ * @param request - The request {@link ListInstanceTemplatesRequest}
115
+ * @returns A Promise of ListInstanceTemplatesResponse
116
+ */
117
+ listInstanceTemplates = (request = {}) => enrichForPagination("instanceTemplates", this.pageOfListInstanceTemplates, request);
118
+ /**
119
+ * Create scaling policy. Create a new scaling policy. You must specify a `policy_id`, capacity and Load Balancer object.
120
+ *
121
+ * @param request - The request {@link CreateInstancePolicyRequest}
122
+ * @returns A Promise of InstancePolicy
123
+ */
124
+ createInstancePolicy = (request) => this.client.fetch({
125
+ body: JSON.stringify(marshalCreateInstancePolicyRequest(request, this.client.settings)),
126
+ headers: jsonContentHeaders,
127
+ method: "POST",
128
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies`
129
+ }, unmarshalInstancePolicy);
130
+ /**
131
+ * Update scaling policy. Update the parameters of an existing scaling policy, specified by its `policy_id`.
132
+ *
133
+ * @param request - The request {@link UpdateInstancePolicyRequest}
134
+ * @returns A Promise of InstancePolicy
135
+ */
136
+ updateInstancePolicy = (request) => this.client.fetch({
137
+ body: JSON.stringify(marshalUpdateInstancePolicyRequest(request, this.client.settings)),
138
+ headers: jsonContentHeaders,
139
+ method: "PATCH",
140
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies/${validatePathParam("policyId", request.policyId)}`
141
+ }, unmarshalInstancePolicy);
142
+ pageOfListInstancePolicies = (request) => this.client.fetch({
143
+ method: "GET",
144
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies`,
145
+ urlParams: urlParams(["instance_group_id", request.instanceGroupId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
146
+ }, unmarshalListInstancePoliciesResponse);
147
+ /**
148
+ * List scaling policies. List all scaling policies, for a Scaleway Organization or Scaleway Project. By default, the policies returned in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.
149
+ *
150
+ * @param request - The request {@link ListInstancePoliciesRequest}
151
+ * @returns A Promise of ListInstancePoliciesResponse
152
+ */
153
+ listInstancePolicies = (request) => enrichForPagination("policies", this.pageOfListInstancePolicies, request);
154
+ /**
155
+ * Get scaling policy. Retrieve information about an existing scaling policy, specified by its `policy_id`. Its full details are returned in the response object.
156
+ *
157
+ * @param request - The request {@link GetInstancePolicyRequest}
158
+ * @returns A Promise of InstancePolicy
159
+ */
160
+ getInstancePolicy = (request) => this.client.fetch({
161
+ method: "GET",
162
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies/${validatePathParam("policyId", request.policyId)}`
163
+ }, unmarshalInstancePolicy);
164
+ /**
165
+ * Delete scaling policy. Delete an existing scaling policy, specified by its `policy_id`. Deleting a scaling policy is permanent, and cannot be undone.
166
+ *
167
+ * @param request - The request {@link DeleteInstancePolicyRequest}
168
+ */
169
+ deleteInstancePolicy = (request) => this.client.fetch({
170
+ method: "DELETE",
171
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-policies/${validatePathParam("policyId", request.policyId)}`
172
+ });
173
+ pageOfListInstanceGroupEvents = (request) => this.client.fetch({
174
+ method: "GET",
175
+ path: `/autoscaling/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/instance-groups/${validatePathParam("instanceGroupId", request.instanceGroupId)}/events`,
176
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
177
+ }, unmarshalListInstanceGroupEventsResponse);
178
+ /**
179
+ * List events. List all events for a given Instance group. By default, the events are ordered by creation date in descending order, though this can be modified via the `order_by` field.
180
+ *
181
+ * @param request - The request {@link ListInstanceGroupEventsRequest}
182
+ * @returns A Promise of ListInstanceGroupEventsResponse
183
+ */
184
+ listInstanceGroupEvents = (request) => enrichForPagination("instanceEvents", this.pageOfListInstanceGroupEvents, request);
261
185
  };
186
+ export { API$1 as API };
@@ -1,20 +1,22 @@
1
- import { API } from "./api.gen.js";
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { marshalCreateInstanceGroupRequest, marshalCreateInstancePolicyRequest, marshalCreateInstanceTemplateRequest, marshalUpdateInstanceGroupRequest, marshalUpdateInstancePolicyRequest, marshalUpdateInstanceTemplateRequest, unmarshalInstanceGroup, unmarshalInstancePolicy, unmarshalInstanceTemplate, unmarshalListInstanceGroupEventsResponse, unmarshalListInstanceGroupsResponse, unmarshalListInstancePoliciesResponse, unmarshalListInstanceTemplatesResponse } from "./marshalling.gen.js";
3
- import * as validationRules_gen from "./validation-rules.gen.js";
4
- export {
5
- API,
6
- validationRules_gen as ValidationRules,
7
- marshalCreateInstanceGroupRequest,
8
- marshalCreateInstancePolicyRequest,
9
- marshalCreateInstanceTemplateRequest,
10
- marshalUpdateInstanceGroupRequest,
11
- marshalUpdateInstancePolicyRequest,
12
- marshalUpdateInstanceTemplateRequest,
13
- unmarshalInstanceGroup,
14
- unmarshalInstancePolicy,
15
- unmarshalInstanceTemplate,
16
- unmarshalListInstanceGroupEventsResponse,
17
- unmarshalListInstanceGroupsResponse,
18
- unmarshalListInstancePoliciesResponse,
19
- unmarshalListInstanceTemplatesResponse
20
- };
3
+ import { API } from "./api.gen.js";
4
+ import { validation_rules_gen_exports } from "./validation-rules.gen.js";
5
+ var index_gen_exports = /* @__PURE__ */ __exportAll({
6
+ API: () => API,
7
+ ValidationRules: () => validation_rules_gen_exports,
8
+ marshalCreateInstanceGroupRequest: () => marshalCreateInstanceGroupRequest,
9
+ marshalCreateInstancePolicyRequest: () => marshalCreateInstancePolicyRequest,
10
+ marshalCreateInstanceTemplateRequest: () => marshalCreateInstanceTemplateRequest,
11
+ marshalUpdateInstanceGroupRequest: () => marshalUpdateInstanceGroupRequest,
12
+ marshalUpdateInstancePolicyRequest: () => marshalUpdateInstancePolicyRequest,
13
+ marshalUpdateInstanceTemplateRequest: () => marshalUpdateInstanceTemplateRequest,
14
+ unmarshalInstanceGroup: () => unmarshalInstanceGroup,
15
+ unmarshalInstancePolicy: () => unmarshalInstancePolicy,
16
+ unmarshalInstanceTemplate: () => unmarshalInstanceTemplate,
17
+ unmarshalListInstanceGroupEventsResponse: () => unmarshalListInstanceGroupEventsResponse,
18
+ unmarshalListInstanceGroupsResponse: () => unmarshalListInstanceGroupsResponse,
19
+ unmarshalListInstancePoliciesResponse: () => unmarshalListInstancePoliciesResponse,
20
+ unmarshalListInstanceTemplatesResponse: () => unmarshalListInstanceTemplatesResponse
21
+ });
22
+ export { index_gen_exports };