@scaleway/sdk-autoscaling 2.2.0 → 2.3.0
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 +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1alpha1/api.gen.js +185 -278
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +21 -19
- package/dist/v1alpha1/marshalling.gen.js +240 -336
- package/dist/v1alpha1/validation-rules.gen.js +89 -119
- package/package.json +4 -4
|
@@ -1,376 +1,280 @@
|
|
|
1
|
-
import { resolveOneOf,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
cooldownDelay: data.cooldown_delay,
|
|
10
|
-
maxReplicas: data.max_replicas,
|
|
11
|
-
minReplicas: data.min_replicas
|
|
12
|
-
};
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject } from "@scaleway/sdk-client";
|
|
2
|
+
var unmarshalCapacity = (data) => {
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Capacity' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
cooldownDelay: data.cooldown_delay,
|
|
6
|
+
maxReplicas: data.max_replicas,
|
|
7
|
+
minReplicas: data.min_replicas
|
|
8
|
+
};
|
|
13
9
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
backendIds: data.backend_ids,
|
|
22
|
-
id: data.id,
|
|
23
|
-
privateNetworkId: data.private_network_id
|
|
24
|
-
};
|
|
10
|
+
var unmarshalLoadbalancer = (data) => {
|
|
11
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Loadbalancer' failed as data isn't a dictionary.`);
|
|
12
|
+
return {
|
|
13
|
+
backendIds: data.backend_ids,
|
|
14
|
+
id: data.id,
|
|
15
|
+
privateNetworkId: data.private_network_id
|
|
16
|
+
};
|
|
25
17
|
};
|
|
26
18
|
const unmarshalInstanceGroup = (data) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
tags: data.tags,
|
|
42
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
43
|
-
zone: data.zone
|
|
44
|
-
};
|
|
19
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceGroup' failed as data isn't a dictionary.`);
|
|
20
|
+
return {
|
|
21
|
+
capacity: unmarshalCapacity(data.capacity),
|
|
22
|
+
createdAt: unmarshalDate(data.created_at),
|
|
23
|
+
errorMessages: data.error_messages,
|
|
24
|
+
id: data.id,
|
|
25
|
+
instanceTemplateId: data.instance_template_id,
|
|
26
|
+
loadbalancer: unmarshalLoadbalancer(data.loadbalancer),
|
|
27
|
+
name: data.name,
|
|
28
|
+
projectId: data.project_id,
|
|
29
|
+
tags: data.tags,
|
|
30
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
31
|
+
zone: data.zone
|
|
32
|
+
};
|
|
45
33
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
operator: data.operator,
|
|
58
|
-
samplingRangeMin: data.sampling_range_min,
|
|
59
|
-
threshold: data.threshold
|
|
60
|
-
};
|
|
34
|
+
var unmarshalMetric = (data) => {
|
|
35
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Metric' failed as data isn't a dictionary.`);
|
|
36
|
+
return {
|
|
37
|
+
aggregate: data.aggregate,
|
|
38
|
+
cockpitMetricName: data.cockpit_metric_name,
|
|
39
|
+
managedMetric: data.managed_metric ? data.managed_metric : void 0,
|
|
40
|
+
name: data.name,
|
|
41
|
+
operator: data.operator,
|
|
42
|
+
samplingRangeMin: data.sampling_range_min,
|
|
43
|
+
threshold: data.threshold
|
|
44
|
+
};
|
|
61
45
|
};
|
|
62
46
|
const unmarshalInstancePolicy = (data) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
type: data.type,
|
|
76
|
-
value: data.value,
|
|
77
|
-
zone: data.zone
|
|
78
|
-
};
|
|
47
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstancePolicy' failed as data isn't a dictionary.`);
|
|
48
|
+
return {
|
|
49
|
+
action: data.action,
|
|
50
|
+
id: data.id,
|
|
51
|
+
instanceGroupId: data.instance_group_id,
|
|
52
|
+
metric: data.metric ? unmarshalMetric(data.metric) : void 0,
|
|
53
|
+
name: data.name,
|
|
54
|
+
priority: data.priority,
|
|
55
|
+
type: data.type,
|
|
56
|
+
value: data.value,
|
|
57
|
+
zone: data.zone
|
|
58
|
+
};
|
|
79
59
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`Unmarshalling the type 'VolumeInstanceTemplateFromEmpty' failed as data isn't a dictionary.`
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
size: data.size
|
|
88
|
-
};
|
|
60
|
+
var unmarshalVolumeInstanceTemplateFromEmpty = (data) => {
|
|
61
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VolumeInstanceTemplateFromEmpty' failed as data isn't a dictionary.`);
|
|
62
|
+
return { size: data.size };
|
|
89
63
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return {
|
|
97
|
-
size: data.size,
|
|
98
|
-
snapshotId: data.snapshot_id
|
|
99
|
-
};
|
|
64
|
+
var unmarshalVolumeInstanceTemplateFromSnapshot = (data) => {
|
|
65
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VolumeInstanceTemplateFromSnapshot' failed as data isn't a dictionary.`);
|
|
66
|
+
return {
|
|
67
|
+
size: data.size,
|
|
68
|
+
snapshotId: data.snapshot_id
|
|
69
|
+
};
|
|
100
70
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
perfIops: data.perf_iops,
|
|
113
|
-
tags: data.tags,
|
|
114
|
-
volumeType: data.volume_type
|
|
115
|
-
};
|
|
71
|
+
var unmarshalVolumeInstanceTemplate = (data) => {
|
|
72
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VolumeInstanceTemplate' failed as data isn't a dictionary.`);
|
|
73
|
+
return {
|
|
74
|
+
boot: data.boot,
|
|
75
|
+
fromEmpty: data.from_empty ? unmarshalVolumeInstanceTemplateFromEmpty(data.from_empty) : void 0,
|
|
76
|
+
fromSnapshot: data.from_snapshot ? unmarshalVolumeInstanceTemplateFromSnapshot(data.from_snapshot) : void 0,
|
|
77
|
+
name: data.name,
|
|
78
|
+
perfIops: data.perf_iops,
|
|
79
|
+
tags: data.tags,
|
|
80
|
+
volumeType: data.volume_type
|
|
81
|
+
};
|
|
116
82
|
};
|
|
117
83
|
const unmarshalInstanceTemplate = (data) => {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
139
|
-
volumes: unmarshalMapOfObject(
|
|
140
|
-
data.volumes,
|
|
141
|
-
unmarshalVolumeInstanceTemplate
|
|
142
|
-
),
|
|
143
|
-
zone: data.zone
|
|
144
|
-
};
|
|
84
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceTemplate' failed as data isn't a dictionary.`);
|
|
85
|
+
return {
|
|
86
|
+
cloudInit: data.cloud_init,
|
|
87
|
+
commercialType: data.commercial_type,
|
|
88
|
+
createdAt: unmarshalDate(data.created_at),
|
|
89
|
+
id: data.id,
|
|
90
|
+
imageId: data.image_id,
|
|
91
|
+
name: data.name,
|
|
92
|
+
placementGroupId: data.placement_group_id,
|
|
93
|
+
privateNetworkIds: data.private_network_ids,
|
|
94
|
+
projectId: data.project_id,
|
|
95
|
+
publicIpsV4Count: data.public_ips_v4_count,
|
|
96
|
+
publicIpsV6Count: data.public_ips_v6_count,
|
|
97
|
+
securityGroupId: data.security_group_id,
|
|
98
|
+
status: data.status,
|
|
99
|
+
tags: data.tags,
|
|
100
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
101
|
+
volumes: unmarshalMapOfObject(data.volumes, unmarshalVolumeInstanceTemplate),
|
|
102
|
+
zone: data.zone
|
|
103
|
+
};
|
|
145
104
|
};
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
level: data.level,
|
|
157
|
-
name: data.name,
|
|
158
|
-
source: data.source
|
|
159
|
-
};
|
|
105
|
+
var unmarshalInstanceGroupEvent = (data) => {
|
|
106
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceGroupEvent' failed as data isn't a dictionary.`);
|
|
107
|
+
return {
|
|
108
|
+
createdAt: unmarshalDate(data.created_at),
|
|
109
|
+
details: data.details,
|
|
110
|
+
id: data.id,
|
|
111
|
+
level: data.level,
|
|
112
|
+
name: data.name,
|
|
113
|
+
source: data.source
|
|
114
|
+
};
|
|
160
115
|
};
|
|
161
116
|
const unmarshalListInstanceGroupEventsResponse = (data) => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
return {
|
|
168
|
-
instanceEvents: unmarshalArrayOfObject(
|
|
169
|
-
data.instance_events,
|
|
170
|
-
unmarshalInstanceGroupEvent
|
|
171
|
-
),
|
|
172
|
-
totalCount: data.total_count
|
|
173
|
-
};
|
|
117
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceGroupEventsResponse' failed as data isn't a dictionary.`);
|
|
118
|
+
return {
|
|
119
|
+
instanceEvents: unmarshalArrayOfObject(data.instance_events, unmarshalInstanceGroupEvent),
|
|
120
|
+
totalCount: data.total_count
|
|
121
|
+
};
|
|
174
122
|
};
|
|
175
123
|
const unmarshalListInstanceGroupsResponse = (data) => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return {
|
|
182
|
-
instanceGroups: unmarshalArrayOfObject(
|
|
183
|
-
data.instance_groups,
|
|
184
|
-
unmarshalInstanceGroup
|
|
185
|
-
),
|
|
186
|
-
totalCount: data.total_count
|
|
187
|
-
};
|
|
124
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceGroupsResponse' failed as data isn't a dictionary.`);
|
|
125
|
+
return {
|
|
126
|
+
instanceGroups: unmarshalArrayOfObject(data.instance_groups, unmarshalInstanceGroup),
|
|
127
|
+
totalCount: data.total_count
|
|
128
|
+
};
|
|
188
129
|
};
|
|
189
130
|
const unmarshalListInstancePoliciesResponse = (data) => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return {
|
|
196
|
-
policies: unmarshalArrayOfObject(data.policies, unmarshalInstancePolicy),
|
|
197
|
-
totalCount: data.total_count
|
|
198
|
-
};
|
|
131
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstancePoliciesResponse' failed as data isn't a dictionary.`);
|
|
132
|
+
return {
|
|
133
|
+
policies: unmarshalArrayOfObject(data.policies, unmarshalInstancePolicy),
|
|
134
|
+
totalCount: data.total_count
|
|
135
|
+
};
|
|
199
136
|
};
|
|
200
137
|
const unmarshalListInstanceTemplatesResponse = (data) => {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return {
|
|
207
|
-
instanceTemplates: unmarshalArrayOfObject(
|
|
208
|
-
data.instance_templates,
|
|
209
|
-
unmarshalInstanceTemplate
|
|
210
|
-
),
|
|
211
|
-
totalCount: data.total_count
|
|
212
|
-
};
|
|
138
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInstanceTemplatesResponse' failed as data isn't a dictionary.`);
|
|
139
|
+
return {
|
|
140
|
+
instanceTemplates: unmarshalArrayOfObject(data.instance_templates, unmarshalInstanceTemplate),
|
|
141
|
+
totalCount: data.total_count
|
|
142
|
+
};
|
|
213
143
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
144
|
+
var marshalCapacity = (request, defaults) => ({
|
|
145
|
+
cooldown_delay: request.cooldownDelay,
|
|
146
|
+
max_replicas: request.maxReplicas,
|
|
147
|
+
min_replicas: request.minReplicas
|
|
218
148
|
});
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
149
|
+
var marshalLoadbalancer = (request, defaults) => ({
|
|
150
|
+
backend_ids: request.backendIds,
|
|
151
|
+
id: request.id,
|
|
152
|
+
private_network_id: request.privateNetworkId
|
|
223
153
|
});
|
|
224
154
|
const marshalCreateInstanceGroupRequest = (request, defaults) => ({
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
155
|
+
capacity: marshalCapacity(request.capacity, defaults),
|
|
156
|
+
loadbalancer: marshalLoadbalancer(request.loadbalancer, defaults),
|
|
157
|
+
name: request.name,
|
|
158
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
159
|
+
tags: request.tags,
|
|
160
|
+
template_id: request.templateId
|
|
231
161
|
});
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
162
|
+
var marshalMetric = (request, defaults) => ({
|
|
163
|
+
aggregate: request.aggregate,
|
|
164
|
+
name: request.name,
|
|
165
|
+
operator: request.operator,
|
|
166
|
+
sampling_range_min: request.samplingRangeMin,
|
|
167
|
+
threshold: request.threshold,
|
|
168
|
+
...resolveOneOf([{
|
|
169
|
+
param: "managed_metric",
|
|
170
|
+
value: request.managedMetric
|
|
171
|
+
}, {
|
|
172
|
+
param: "cockpit_metric_name",
|
|
173
|
+
value: request.cockpitMetricName
|
|
174
|
+
}])
|
|
242
175
|
});
|
|
243
176
|
const marshalCreateInstancePolicyRequest = (request, defaults) => ({
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
])
|
|
177
|
+
action: request.action,
|
|
178
|
+
instance_group_id: request.instanceGroupId,
|
|
179
|
+
name: request.name,
|
|
180
|
+
priority: request.priority,
|
|
181
|
+
type: request.type,
|
|
182
|
+
value: request.value,
|
|
183
|
+
...resolveOneOf([{
|
|
184
|
+
param: "metric",
|
|
185
|
+
value: request.metric !== void 0 ? marshalMetric(request.metric, defaults) : void 0
|
|
186
|
+
}])
|
|
256
187
|
});
|
|
257
|
-
|
|
258
|
-
|
|
188
|
+
var marshalVolumeInstanceTemplateFromEmpty = (request, defaults) => ({ size: request.size });
|
|
189
|
+
var marshalVolumeInstanceTemplateFromSnapshot = (request, defaults) => ({
|
|
190
|
+
size: request.size,
|
|
191
|
+
snapshot_id: request.snapshotId
|
|
259
192
|
});
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
value: request.fromSnapshot !== void 0 ? marshalVolumeInstanceTemplateFromSnapshot(
|
|
277
|
-
request.fromSnapshot
|
|
278
|
-
) : void 0
|
|
279
|
-
}
|
|
280
|
-
]),
|
|
281
|
-
...resolveOneOf([{ param: "perf_iops", value: request.perfIops }])
|
|
193
|
+
var marshalVolumeInstanceTemplate = (request, defaults) => ({
|
|
194
|
+
boot: request.boot,
|
|
195
|
+
name: request.name,
|
|
196
|
+
tags: request.tags,
|
|
197
|
+
volume_type: request.volumeType,
|
|
198
|
+
...resolveOneOf([{
|
|
199
|
+
param: "from_empty",
|
|
200
|
+
value: request.fromEmpty !== void 0 ? marshalVolumeInstanceTemplateFromEmpty(request.fromEmpty, defaults) : void 0
|
|
201
|
+
}, {
|
|
202
|
+
param: "from_snapshot",
|
|
203
|
+
value: request.fromSnapshot !== void 0 ? marshalVolumeInstanceTemplateFromSnapshot(request.fromSnapshot, defaults) : void 0
|
|
204
|
+
}]),
|
|
205
|
+
...resolveOneOf([{
|
|
206
|
+
param: "perf_iops",
|
|
207
|
+
value: request.perfIops
|
|
208
|
+
}])
|
|
282
209
|
});
|
|
283
210
|
const marshalCreateInstanceTemplateRequest = (request, defaults) => ({
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
{}
|
|
301
|
-
)
|
|
302
|
-
});
|
|
303
|
-
const marshalUpdateInstanceGroupRequestCapacity = (request, defaults) => ({
|
|
304
|
-
cooldown_delay: request.cooldownDelay,
|
|
305
|
-
max_replicas: request.maxReplicas,
|
|
306
|
-
min_replicas: request.minReplicas
|
|
211
|
+
cloud_init: request.cloudInit,
|
|
212
|
+
commercial_type: request.commercialType,
|
|
213
|
+
image_id: request.imageId,
|
|
214
|
+
name: request.name,
|
|
215
|
+
placement_group_id: request.placementGroupId,
|
|
216
|
+
private_network_ids: request.privateNetworkIds,
|
|
217
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
218
|
+
public_ips_v4_count: request.publicIpsV4Count,
|
|
219
|
+
public_ips_v6_count: request.publicIpsV6Count,
|
|
220
|
+
security_group_id: request.securityGroupId,
|
|
221
|
+
tags: request.tags,
|
|
222
|
+
volumes: Object.entries(request.volumes).reduce((acc, [key, value]) => ({
|
|
223
|
+
...acc,
|
|
224
|
+
[key]: marshalVolumeInstanceTemplate(value, defaults)
|
|
225
|
+
}), {})
|
|
307
226
|
});
|
|
308
|
-
|
|
309
|
-
|
|
227
|
+
var marshalUpdateInstanceGroupRequestCapacity = (request, defaults) => ({
|
|
228
|
+
cooldown_delay: request.cooldownDelay,
|
|
229
|
+
max_replicas: request.maxReplicas,
|
|
230
|
+
min_replicas: request.minReplicas
|
|
310
231
|
});
|
|
232
|
+
var marshalUpdateInstanceGroupRequestLoadbalancer = (request, defaults) => ({ backend_ids: request.backendIds });
|
|
311
233
|
const marshalUpdateInstanceGroupRequest = (request, defaults) => ({
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
name: request.name,
|
|
317
|
-
tags: request.tags
|
|
234
|
+
capacity: request.capacity !== void 0 ? marshalUpdateInstanceGroupRequestCapacity(request.capacity, defaults) : void 0,
|
|
235
|
+
loadbalancer: request.loadbalancer !== void 0 ? marshalUpdateInstanceGroupRequestLoadbalancer(request.loadbalancer, defaults) : void 0,
|
|
236
|
+
name: request.name,
|
|
237
|
+
tags: request.tags
|
|
318
238
|
});
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
239
|
+
var marshalUpdateInstancePolicyRequestMetric = (request, defaults) => ({
|
|
240
|
+
aggregate: request.aggregate,
|
|
241
|
+
name: request.name,
|
|
242
|
+
operator: request.operator,
|
|
243
|
+
sampling_range_min: request.samplingRangeMin,
|
|
244
|
+
threshold: request.threshold,
|
|
245
|
+
...resolveOneOf([{
|
|
246
|
+
param: "managed_metric",
|
|
247
|
+
value: request.managedMetric
|
|
248
|
+
}, {
|
|
249
|
+
param: "cockpit_metric_name",
|
|
250
|
+
value: request.cockpitMetricName
|
|
251
|
+
}])
|
|
329
252
|
});
|
|
330
253
|
const marshalUpdateInstancePolicyRequest = (request, defaults) => ({
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
])
|
|
254
|
+
action: request.action,
|
|
255
|
+
name: request.name,
|
|
256
|
+
priority: request.priority,
|
|
257
|
+
type: request.type,
|
|
258
|
+
value: request.value,
|
|
259
|
+
...resolveOneOf([{
|
|
260
|
+
param: "metric",
|
|
261
|
+
value: request.metric !== void 0 ? marshalUpdateInstancePolicyRequestMetric(request.metric, defaults) : void 0
|
|
262
|
+
}])
|
|
342
263
|
});
|
|
343
264
|
const marshalUpdateInstanceTemplateRequest = (request, defaults) => ({
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}),
|
|
359
|
-
{}
|
|
360
|
-
) : void 0
|
|
265
|
+
cloud_init: request.cloudInit,
|
|
266
|
+
commercial_type: request.commercialType,
|
|
267
|
+
image_id: request.imageId,
|
|
268
|
+
name: request.name,
|
|
269
|
+
placement_group_id: request.placementGroupId,
|
|
270
|
+
private_network_ids: request.privateNetworkIds,
|
|
271
|
+
public_ips_v4_count: request.publicIpsV4Count,
|
|
272
|
+
public_ips_v6_count: request.publicIpsV6Count,
|
|
273
|
+
security_group_id: request.securityGroupId,
|
|
274
|
+
tags: request.tags,
|
|
275
|
+
volumes: request.volumes !== void 0 ? Object.entries(request.volumes).reduce((acc, [key, value]) => ({
|
|
276
|
+
...acc,
|
|
277
|
+
[key]: marshalVolumeInstanceTemplate(value, defaults)
|
|
278
|
+
}), {}) : void 0
|
|
361
279
|
});
|
|
362
|
-
export {
|
|
363
|
-
marshalCreateInstanceGroupRequest,
|
|
364
|
-
marshalCreateInstancePolicyRequest,
|
|
365
|
-
marshalCreateInstanceTemplateRequest,
|
|
366
|
-
marshalUpdateInstanceGroupRequest,
|
|
367
|
-
marshalUpdateInstancePolicyRequest,
|
|
368
|
-
marshalUpdateInstanceTemplateRequest,
|
|
369
|
-
unmarshalInstanceGroup,
|
|
370
|
-
unmarshalInstancePolicy,
|
|
371
|
-
unmarshalInstanceTemplate,
|
|
372
|
-
unmarshalListInstanceGroupEventsResponse,
|
|
373
|
-
unmarshalListInstanceGroupsResponse,
|
|
374
|
-
unmarshalListInstancePoliciesResponse,
|
|
375
|
-
unmarshalListInstanceTemplatesResponse
|
|
376
|
-
};
|
|
280
|
+
export { marshalCreateInstanceGroupRequest, marshalCreateInstancePolicyRequest, marshalCreateInstanceTemplateRequest, marshalUpdateInstanceGroupRequest, marshalUpdateInstancePolicyRequest, marshalUpdateInstanceTemplateRequest, unmarshalInstanceGroup, unmarshalInstancePolicy, unmarshalInstanceTemplate, unmarshalListInstanceGroupEventsResponse, unmarshalListInstanceGroupsResponse, unmarshalListInstancePoliciesResponse, unmarshalListInstanceTemplatesResponse };
|