@scaleway/sdk-autoscaling 1.1.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.
@@ -0,0 +1,762 @@
1
+ import type { Zone as ScwZone } from '@scaleway/sdk-client';
2
+ export type InstanceGroupEventLevel = 'info' | 'success' | 'error';
3
+ export type InstanceGroupEventSource = 'unknown_source' | 'watcher' | 'scaler' | 'instance_manager' | 'supervisor';
4
+ export type InstancePolicyAction = 'unknown_action' | 'scale_up' | 'scale_down';
5
+ export type InstancePolicyType = 'unknown_type' | 'flat_count' | 'percent_of_total_group' | 'set_total_group';
6
+ export type InstanceTemplateStatus = 'unknown_status' | 'ready' | 'error';
7
+ export type ListInstanceGroupEventsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
8
+ export type ListInstanceGroupsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
9
+ export type ListInstancePoliciesRequestOrderBy = 'created_at_desc' | 'created_at_asc';
10
+ export type ListInstanceTemplatesRequestOrderBy = 'created_at_desc' | 'created_at_asc';
11
+ export type MetricAggregate = 'aggregate_unknown' | 'aggregate_average' | 'aggregate_max' | 'aggregate_min' | 'aggregate_sum';
12
+ export type MetricManagedMetric = 'managed_metric_unknown' | 'managed_metric_instance_cpu' | 'managed_metric_instance_network_in' | 'managed_metric_instance_network_out' | 'managed_loadbalancer_backend_connections_rate' | 'managed_loadbalancer_backend_throughput';
13
+ export type MetricOperator = 'operator_unknown' | 'operator_greater_than' | 'operator_less_than';
14
+ export type UpdateInstancePolicyRequestMetricAggregate = 'aggregate_unknown' | 'aggregate_average' | 'aggregate_max' | 'aggregate_min' | 'aggregate_sum';
15
+ export type UpdateInstancePolicyRequestMetricManagedMetric = 'managed_metric_unknown' | 'managed_metric_instance_cpu' | 'managed_metric_instance_network_in' | 'managed_metric_instance_network_out' | 'managed_loadbalancer_backend_connections_rate' | 'managed_loadbalancer_backend_throughput';
16
+ export type UpdateInstancePolicyRequestMetricOperator = 'operator_unknown' | 'operator_greater_than' | 'operator_less_than';
17
+ export type VolumeInstanceTemplateVolumeType = 'unknown_volume_type' | 'l_ssd' | 'sbs';
18
+ export interface VolumeInstanceTemplateFromEmpty {
19
+ size: number;
20
+ }
21
+ export interface VolumeInstanceTemplateFromSnapshot {
22
+ size?: number;
23
+ snapshotId: string;
24
+ }
25
+ export interface Capacity {
26
+ /**
27
+ * Maximum count of Instances for the Instance group.
28
+ */
29
+ maxReplicas: number;
30
+ /**
31
+ * Minimum count of Instances for the Instance group.
32
+ */
33
+ minReplicas: number;
34
+ /**
35
+ * Time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
36
+ */
37
+ cooldownDelay?: string;
38
+ }
39
+ export interface Loadbalancer {
40
+ /**
41
+ * Load Balancer ID.
42
+ */
43
+ id: string;
44
+ /**
45
+ * Load Balancer backend IDs.
46
+ */
47
+ backendIds: string[];
48
+ /**
49
+ * ID of the Private Network attached to the Load Balancer.
50
+ */
51
+ privateNetworkId: string;
52
+ }
53
+ export interface Metric {
54
+ /**
55
+ * Name or description of the metric policy.
56
+ */
57
+ name: string;
58
+ /**
59
+ * Managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
60
+ *
61
+ * One-of ('metricType'): at most one of 'managedMetric', 'cockpitMetricName' could be set.
62
+ */
63
+ managedMetric?: MetricManagedMetric;
64
+ /**
65
+ * Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
66
+ *
67
+ * One-of ('metricType'): at most one of 'managedMetric', 'cockpitMetricName' could be set.
68
+ */
69
+ cockpitMetricName?: string;
70
+ /**
71
+ * Operator used when comparing the threshold value of the chosen `metric` to the actual sampled and aggregated value.
72
+ */
73
+ operator: MetricOperator;
74
+ /**
75
+ * How the values sampled for the `metric` should be aggregated.
76
+ */
77
+ aggregate: MetricAggregate;
78
+ /**
79
+ * Interval of time, in minutes, during which metric is sampled.
80
+ */
81
+ samplingRangeMin: number;
82
+ /**
83
+ * Threshold value to measure the aggregated sampled `metric` value against. Combined with the `operator` field, determines whether a scaling action should be triggered.
84
+ */
85
+ threshold: number;
86
+ }
87
+ export interface VolumeInstanceTemplate {
88
+ /**
89
+ * Name of the volume.
90
+ */
91
+ name: string;
92
+ /**
93
+ * The maximum IO/s expected, according to the different options available in stock (`5000 | 15000`).
94
+ *
95
+ * One-of ('requirements'): at most one of 'perfIops' could be set.
96
+ */
97
+ perfIops?: number;
98
+ /**
99
+ * Specify the size of the new volume if creating a new one from scratch.
100
+ *
101
+ * One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
102
+ */
103
+ fromEmpty?: VolumeInstanceTemplateFromEmpty;
104
+ /**
105
+ * Specify the snapshot ID of the original snapshot.
106
+ *
107
+ * One-of ('from'): at most one of 'fromEmpty', 'fromSnapshot' could be set.
108
+ */
109
+ fromSnapshot?: VolumeInstanceTemplateFromSnapshot;
110
+ /**
111
+ * List of tags assigned to the volume.
112
+ */
113
+ tags: string[];
114
+ /**
115
+ * Force the Instance to boot on this volume.
116
+ */
117
+ boot: boolean;
118
+ /**
119
+ * Type of the volume.
120
+ */
121
+ volumeType: VolumeInstanceTemplateVolumeType;
122
+ }
123
+ export interface InstanceGroupEvent {
124
+ /**
125
+ * Instance group event ID.
126
+ */
127
+ id: string;
128
+ /**
129
+ * Log source.
130
+ */
131
+ source: InstanceGroupEventSource;
132
+ /**
133
+ * The severity of the log.
134
+ */
135
+ level: InstanceGroupEventLevel;
136
+ /**
137
+ * Log title.
138
+ */
139
+ name: string;
140
+ /**
141
+ * Date and time of the log.
142
+ */
143
+ createdAt?: Date;
144
+ /**
145
+ * Full text of the log.
146
+ */
147
+ details?: string;
148
+ }
149
+ export interface InstanceGroup {
150
+ /**
151
+ * Instance group ID.
152
+ */
153
+ id: string;
154
+ /**
155
+ * Project ID of the Instance group.
156
+ */
157
+ projectId: string;
158
+ /**
159
+ * Name of the Instance group.
160
+ */
161
+ name: string;
162
+ /**
163
+ * Instance group tags.
164
+ */
165
+ tags: string[];
166
+ /**
167
+ * Template ID (ID of the Instance template to attach to the Instance group).
168
+ */
169
+ instanceTemplateId: string;
170
+ /**
171
+ * Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
172
+ */
173
+ capacity: Capacity;
174
+ /**
175
+ * Specification of the Load Balancer linked to the Instance group.
176
+ */
177
+ loadbalancer: Loadbalancer;
178
+ /**
179
+ * Any configuration errors for dependencies (Load Balancer, Private Network, Instance template etc.).
180
+ */
181
+ errorMessages: string[];
182
+ /**
183
+ * Date on which the Instance group was created.
184
+ */
185
+ createdAt?: Date;
186
+ /**
187
+ * Date on which the Instance group was last updated.
188
+ */
189
+ updatedAt?: Date;
190
+ }
191
+ export interface InstancePolicy {
192
+ /**
193
+ * Scaling policy ID.
194
+ */
195
+ id: string;
196
+ /**
197
+ * Name of scaling policy.
198
+ */
199
+ name: string;
200
+ /**
201
+ * Managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
202
+ *
203
+ * One-of ('trigger'): at most one of 'metric' could be set.
204
+ */
205
+ metric?: Metric;
206
+ /**
207
+ * Action to execute when the metric-based condition is met.
208
+ */
209
+ action: InstancePolicyAction;
210
+ /**
211
+ * How to use the number defined in `value` when determining by how many Instances to scale up/down.
212
+ */
213
+ type: InstancePolicyType;
214
+ /**
215
+ * Number representing the magnitude of the scaling action to take for the Instance group.
216
+ */
217
+ value: number;
218
+ /**
219
+ * Priority of this policy compared to all other scaling policies. The lower the number, the higher the priority (higher priority will be processed sooner in the order).
220
+ */
221
+ priority: number;
222
+ /**
223
+ * Instance group ID related to this policy.
224
+ */
225
+ instanceGroupId: string;
226
+ }
227
+ export interface InstanceTemplate {
228
+ /**
229
+ * ID of Instance template resource.
230
+ */
231
+ id: string;
232
+ /**
233
+ * Name of Instance commercial type.
234
+ */
235
+ commercialType: string;
236
+ /**
237
+ * Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with `volume` and `commercial_type` template.
238
+ */
239
+ imageId?: string;
240
+ /**
241
+ * Template of Instance volume.
242
+ */
243
+ volumes: Record<string, VolumeInstanceTemplate>;
244
+ /**
245
+ * List of tags for the Instance template.
246
+ */
247
+ tags: string[];
248
+ /**
249
+ * Instance security group ID (optional).
250
+ */
251
+ securityGroupId?: string;
252
+ /**
253
+ * Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
254
+ */
255
+ placementGroupId?: string;
256
+ /**
257
+ * Number of flexible IPv4 addresses to attach to the new Instance.
258
+ */
259
+ publicIpsV4Count?: number;
260
+ /**
261
+ * Number of flexible IPv6 addresses to attach to the new Instance.
262
+ */
263
+ publicIpsV6Count?: number;
264
+ /**
265
+ * ID of the Project containing the Instance template resource.
266
+ */
267
+ projectId: string;
268
+ /**
269
+ * Name of Instance template.
270
+ */
271
+ name: string;
272
+ /**
273
+ * Private Network IDs to attach to the new Instance.
274
+ */
275
+ privateNetworkIds: string[];
276
+ /**
277
+ * Status of Instance template.
278
+ */
279
+ status: InstanceTemplateStatus;
280
+ /**
281
+ * Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
282
+ */
283
+ cloudInit?: string;
284
+ /**
285
+ * Date on which the Instance template was created.
286
+ */
287
+ createdAt?: Date;
288
+ /**
289
+ * Date on which the Instance template was last updated.
290
+ */
291
+ updatedAt?: Date;
292
+ }
293
+ export interface UpdateInstanceGroupRequestCapacity {
294
+ /**
295
+ * Maximum count of Instances for the Instance group.
296
+ */
297
+ maxReplicas?: number;
298
+ /**
299
+ * Minimum count of Instances for the Instance group.
300
+ */
301
+ minReplicas?: number;
302
+ /**
303
+ * Time (in seconds) after a scaling action during which requests to carry out a new scaling action will be denied.
304
+ */
305
+ cooldownDelay?: string;
306
+ }
307
+ export interface UpdateInstanceGroupRequestLoadbalancer {
308
+ /**
309
+ * Load Balancer backend IDs.
310
+ */
311
+ backendIds?: string[];
312
+ }
313
+ export interface UpdateInstancePolicyRequestMetric {
314
+ /**
315
+ * Name or description of your metric policy.
316
+ */
317
+ name?: string;
318
+ /**
319
+ * Managed metric to use for this policy. These are available by default in Cockpit without any configuration or `node_exporter`. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
320
+ *
321
+ * One-of ('metricType'): at most one of 'managedMetric', 'cockpitMetricName' could be set.
322
+ */
323
+ managedMetric?: UpdateInstancePolicyRequestMetricManagedMetric;
324
+ /**
325
+ * Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered.
326
+ *
327
+ * One-of ('metricType'): at most one of 'managedMetric', 'cockpitMetricName' could be set.
328
+ */
329
+ cockpitMetricName?: string;
330
+ /**
331
+ * Operator used when comparing the threshold value of the chosen `metric` to the actual sampled and aggregated value.
332
+ */
333
+ operator: UpdateInstancePolicyRequestMetricOperator;
334
+ /**
335
+ * How the values sampled for the `metric` should be aggregated.
336
+ */
337
+ aggregate: UpdateInstancePolicyRequestMetricAggregate;
338
+ /**
339
+ * Interval of time, in minutes, during which metric is sampled.
340
+ */
341
+ samplingRangeMin?: number;
342
+ /**
343
+ * Threshold value to measure the aggregated sampled `metric` value against. Combined with the `operator` field, determines whether a scaling action should be triggered.
344
+ */
345
+ threshold?: number;
346
+ }
347
+ export type CreateInstanceGroupRequest = {
348
+ /**
349
+ * Zone to target. If none is passed will use default zone from the config.
350
+ */
351
+ zone?: ScwZone;
352
+ /**
353
+ * Project ID to filter for, only Instance groups from this Project will be returned.
354
+ */
355
+ projectId?: string;
356
+ /**
357
+ * Name of Instance group.
358
+ */
359
+ name: string;
360
+ /**
361
+ * List of tags for the Instance group.
362
+ */
363
+ tags?: string[];
364
+ /**
365
+ * Template ID (ID of the Instance template to attach to the Instance group).
366
+ */
367
+ templateId: string;
368
+ /**
369
+ * Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
370
+ */
371
+ capacity: Capacity;
372
+ /**
373
+ * Specification of the Load Balancer to link to the Instance group.
374
+ */
375
+ loadbalancer: Loadbalancer;
376
+ };
377
+ export type CreateInstancePolicyRequest = {
378
+ /**
379
+ * Zone to target. If none is passed will use default zone from the config.
380
+ */
381
+ zone?: ScwZone;
382
+ /**
383
+ * Name of the policy.
384
+ */
385
+ name: string;
386
+ /**
387
+ * Cockpit metric to use when determining whether to trigger a scale up/down action.
388
+ *
389
+ * One-of ('trigger'): at most one of 'metric' could be set.
390
+ */
391
+ metric?: Metric;
392
+ /**
393
+ * Action to execute when the metric-based condition is met.
394
+ */
395
+ action: InstancePolicyAction;
396
+ /**
397
+ * How to use the number defined in `value` when determining by how many Instances to scale up/down.
398
+ */
399
+ type: InstancePolicyType;
400
+ /**
401
+ * Value representing the magnitude of the scaling action to take for the Instance group. Depending on the `type` parameter, this number could represent a total number of Instances in the group, a number of Instances to add, or a percentage to scale the group by.
402
+ */
403
+ value: number;
404
+ /**
405
+ * Priority of this policy compared to all other scaling policies. This determines the processing order. The lower the number, the higher the priority.
406
+ */
407
+ priority: number;
408
+ /**
409
+ * Instance group ID related to this policy.
410
+ */
411
+ instanceGroupId: string;
412
+ };
413
+ export type CreateInstanceTemplateRequest = {
414
+ /**
415
+ * Zone to target. If none is passed will use default zone from the config.
416
+ */
417
+ zone?: ScwZone;
418
+ /**
419
+ * Name of Instance commercial type.
420
+ */
421
+ commercialType: string;
422
+ /**
423
+ * Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with `volume` and `commercial_type` template.
424
+ */
425
+ imageId?: string;
426
+ /**
427
+ * Template of Instance volume.
428
+ */
429
+ volumes: Record<string, VolumeInstanceTemplate>;
430
+ /**
431
+ * List of tags for the Instance template.
432
+ */
433
+ tags?: string[];
434
+ /**
435
+ * Instance security group ID (optional).
436
+ */
437
+ securityGroupId?: string;
438
+ /**
439
+ * Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
440
+ */
441
+ placementGroupId?: string;
442
+ /**
443
+ * Number of flexible IPv4 addresses to attach to the new Instance.
444
+ */
445
+ publicIpsV4Count?: number;
446
+ /**
447
+ * Number of flexible IPv6 addresses to attach to the new Instance.
448
+ */
449
+ publicIpsV6Count?: number;
450
+ /**
451
+ * ID of the Project containing the Instance template resource.
452
+ */
453
+ projectId?: string;
454
+ /**
455
+ * Name of Instance template.
456
+ */
457
+ name: string;
458
+ /**
459
+ * Private Network IDs to attach to the new Instance.
460
+ */
461
+ privateNetworkIds?: string[];
462
+ /**
463
+ * Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
464
+ */
465
+ cloudInit?: string;
466
+ };
467
+ export type DeleteInstanceGroupRequest = {
468
+ /**
469
+ * Zone to target. If none is passed will use default zone from the config.
470
+ */
471
+ zone?: ScwZone;
472
+ /**
473
+ * ID of the Instance group to delete.
474
+ */
475
+ instanceGroupId: string;
476
+ };
477
+ export type DeleteInstancePolicyRequest = {
478
+ /**
479
+ * Zone to target. If none is passed will use default zone from the config.
480
+ */
481
+ zone?: ScwZone;
482
+ /**
483
+ * ID of the policy to delete.
484
+ */
485
+ policyId: string;
486
+ };
487
+ export type DeleteInstanceTemplateRequest = {
488
+ /**
489
+ * Zone to target. If none is passed will use default zone from the config.
490
+ */
491
+ zone?: ScwZone;
492
+ /**
493
+ * ID of the template to delete.
494
+ */
495
+ templateId: string;
496
+ };
497
+ export type GetInstanceGroupRequest = {
498
+ /**
499
+ * Zone to target. If none is passed will use default zone from the config.
500
+ */
501
+ zone?: ScwZone;
502
+ /**
503
+ * ID of the requested Instance group.
504
+ */
505
+ instanceGroupId: string;
506
+ };
507
+ export type GetInstancePolicyRequest = {
508
+ /**
509
+ * Zone to target. If none is passed will use default zone from the config.
510
+ */
511
+ zone?: ScwZone;
512
+ /**
513
+ * Policy ID.
514
+ */
515
+ policyId: string;
516
+ };
517
+ export type GetInstanceTemplateRequest = {
518
+ /**
519
+ * Zone to target. If none is passed will use default zone from the config.
520
+ */
521
+ zone?: ScwZone;
522
+ /**
523
+ * Template ID of the resource.
524
+ */
525
+ templateId: string;
526
+ };
527
+ export type ListInstanceGroupEventsRequest = {
528
+ /**
529
+ * Zone to target. If none is passed will use default zone from the config.
530
+ */
531
+ zone?: ScwZone;
532
+ /**
533
+ * List all event logs for the Instance group ID.
534
+ */
535
+ instanceGroupId: string;
536
+ /**
537
+ * Sort order of Instance groups in the response.
538
+ */
539
+ orderBy?: ListInstanceGroupEventsRequestOrderBy;
540
+ /**
541
+ * Page number to return, from the paginated results.
542
+ */
543
+ page?: number;
544
+ /**
545
+ * Number of Instance groups to return per page.
546
+ */
547
+ pageSize?: number;
548
+ };
549
+ export interface ListInstanceGroupEventsResponse {
550
+ /**
551
+ * Paginated list of Instance groups.
552
+ */
553
+ instanceEvents: InstanceGroupEvent[];
554
+ /**
555
+ * Count of all Instance groups matching the requested criteria.
556
+ */
557
+ totalCount: number;
558
+ }
559
+ export type ListInstanceGroupsRequest = {
560
+ /**
561
+ * Zone to target. If none is passed will use default zone from the config.
562
+ */
563
+ zone?: ScwZone;
564
+ /**
565
+ * Sort order of Instance groups in the response.
566
+ */
567
+ orderBy?: ListInstanceGroupsRequestOrderBy;
568
+ /**
569
+ * Page number to return, from the paginated results.
570
+ */
571
+ page?: number;
572
+ /**
573
+ * Number of Instance groups to return per page.
574
+ */
575
+ pageSize?: number;
576
+ };
577
+ export interface ListInstanceGroupsResponse {
578
+ /**
579
+ * Paginated list of Instance groups.
580
+ */
581
+ instanceGroups: InstanceGroup[];
582
+ /**
583
+ * Count of all Instance groups matching the requested criteria.
584
+ */
585
+ totalCount: number;
586
+ }
587
+ export type ListInstancePoliciesRequest = {
588
+ /**
589
+ * Zone to target. If none is passed will use default zone from the config.
590
+ */
591
+ zone?: ScwZone;
592
+ /**
593
+ * Sort order of Instance groups in the response.
594
+ */
595
+ orderBy?: ListInstancePoliciesRequestOrderBy;
596
+ /**
597
+ * Instance group ID.
598
+ */
599
+ instanceGroupId: string;
600
+ /**
601
+ * Page number to return, from the paginated results.
602
+ */
603
+ page?: number;
604
+ /**
605
+ * Number of scaling policies to return per page.
606
+ */
607
+ pageSize?: number;
608
+ };
609
+ export interface ListInstancePoliciesResponse {
610
+ /**
611
+ * Paginated list of policies.
612
+ */
613
+ policies: InstancePolicy[];
614
+ /**
615
+ * Count of all policies matching the requested criteria.
616
+ */
617
+ totalCount: number;
618
+ }
619
+ export type ListInstanceTemplatesRequest = {
620
+ /**
621
+ * Zone to target. If none is passed will use default zone from the config.
622
+ */
623
+ zone?: ScwZone;
624
+ /**
625
+ * Sort order of Instance groups in the response.
626
+ */
627
+ orderBy?: ListInstanceTemplatesRequestOrderBy;
628
+ /**
629
+ * Page number to return, from the paginated results.
630
+ */
631
+ page?: number;
632
+ /**
633
+ * Number of Instance groups to return per page.
634
+ */
635
+ pageSize?: number;
636
+ };
637
+ export interface ListInstanceTemplatesResponse {
638
+ /**
639
+ * Count of all templates matching the requested criteria.
640
+ */
641
+ totalCount: number;
642
+ /**
643
+ * Paginated list of Instance templates.
644
+ */
645
+ instanceTemplates: InstanceTemplate[];
646
+ }
647
+ export type UpdateInstanceGroupRequest = {
648
+ /**
649
+ * Zone to target. If none is passed will use default zone from the config.
650
+ */
651
+ zone?: ScwZone;
652
+ /**
653
+ * Instance group ID to update.
654
+ */
655
+ instanceGroupId: string;
656
+ /**
657
+ * Name of Instance group.
658
+ */
659
+ name?: string;
660
+ /**
661
+ * List of tags for the Load Balancer.
662
+ */
663
+ tags?: string[];
664
+ /**
665
+ * Specification of the minimum and maximum replicas for the Instance group, and the cooldown interval between two scaling events.
666
+ */
667
+ capacity?: UpdateInstanceGroupRequestCapacity;
668
+ /**
669
+ * Specification of the Load Balancer to link to the Instance group.
670
+ */
671
+ loadbalancer?: UpdateInstanceGroupRequestLoadbalancer;
672
+ };
673
+ export type UpdateInstancePolicyRequest = {
674
+ /**
675
+ * Zone to target. If none is passed will use default zone from the config.
676
+ */
677
+ zone?: ScwZone;
678
+ /**
679
+ * Policy ID to update.
680
+ */
681
+ policyId: string;
682
+ /**
683
+ * Policy name to update.
684
+ */
685
+ name?: string;
686
+ /**
687
+ * Metric specification to update (Cockpit metric to use when determining whether to trigger a scale up/down action).
688
+ *
689
+ * One-of ('trigger'): at most one of 'metric' could be set.
690
+ */
691
+ metric?: UpdateInstancePolicyRequestMetric;
692
+ /**
693
+ * Action to update (action to execute when the metric-based condition is met).
694
+ */
695
+ action?: InstancePolicyAction;
696
+ /**
697
+ * Type to update (how to use the number defined in `value` when determining by how many Instances to scale up/down).
698
+ */
699
+ type?: InstancePolicyType;
700
+ /**
701
+ * Value to update (number representing the magnitude of the scaling action to take for the Instance group).
702
+ */
703
+ value?: number;
704
+ /**
705
+ * Priority to update (priority of this policy compared to all other scaling policies. The lower the number, the higher the priority).
706
+ */
707
+ priority?: number;
708
+ };
709
+ export type UpdateInstanceTemplateRequest = {
710
+ /**
711
+ * Zone to target. If none is passed will use default zone from the config.
712
+ */
713
+ zone?: ScwZone;
714
+ /**
715
+ * Template ID of the resource.
716
+ */
717
+ templateId: string;
718
+ /**
719
+ * Name of Instance commercial type.
720
+ */
721
+ commercialType?: string;
722
+ /**
723
+ * Instance image ID. Can be an ID of a marketplace or personal image. This image must be compatible with `volume` and `commercial_type` template.
724
+ */
725
+ imageId?: string;
726
+ /**
727
+ * Template of Instance volume.
728
+ */
729
+ volumes?: Record<string, VolumeInstanceTemplate>;
730
+ /**
731
+ * List of tags for the Instance template.
732
+ */
733
+ tags?: string[];
734
+ /**
735
+ * Instance security group ID (optional).
736
+ */
737
+ securityGroupId?: string;
738
+ /**
739
+ * Instance placement group ID. This is optional, but it is highly recommended to set a preference for Instance location within Availability Zone.
740
+ */
741
+ placementGroupId?: string;
742
+ /**
743
+ * Number of flexible IPv4 addresses to attach to the new Instance.
744
+ */
745
+ publicIpsV4Count?: number;
746
+ /**
747
+ * Number of flexible IPv6 addresses to attach to the new Instance.
748
+ */
749
+ publicIpsV6Count?: number;
750
+ /**
751
+ * Name of Instance template.
752
+ */
753
+ name?: string;
754
+ /**
755
+ * Private Network IDs to attach to the new Instance.
756
+ */
757
+ privateNetworkIds?: string[];
758
+ /**
759
+ * Cloud-config file must be passed in Base64 format. Cloud-config files are special scripts designed to be run by the cloud-init process. These are generally used for initial configuration on the very first boot of a server.
760
+ */
761
+ cloudInit?: string;
762
+ };