@alicloud/hologram20220601 1.0.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/src/client.ts ADDED
@@ -0,0 +1,1815 @@
1
+ // This file is auto-generated, don't edit it
2
+ /**
3
+ *
4
+ */
5
+ import Util, * as $Util from '@alicloud/tea-util';
6
+ import OpenApi, * as $OpenApi from '@alicloud/openapi-client';
7
+ import OpenApiUtil from '@alicloud/openapi-util';
8
+ import EndpointUtil from '@alicloud/endpoint-util';
9
+ import * as $tea from '@alicloud/tea-typescript';
10
+
11
+ export class CreateInstanceRequest extends $tea.Model {
12
+ autoPay?: boolean;
13
+ autoRenew?: boolean;
14
+ chargeType?: string;
15
+ coldStorageSize?: number;
16
+ cpu?: number;
17
+ duration?: number;
18
+ gatewayCount?: number;
19
+ instanceName?: string;
20
+ instanceType?: string;
21
+ leaderInstanceId?: string;
22
+ pricingCycle?: string;
23
+ regionId?: string;
24
+ resourceGroupId?: string;
25
+ storageSize?: number;
26
+ vSwitchId?: string;
27
+ vpcId?: string;
28
+ zoneId?: string;
29
+ static names(): { [key: string]: string } {
30
+ return {
31
+ autoPay: 'autoPay',
32
+ autoRenew: 'autoRenew',
33
+ chargeType: 'chargeType',
34
+ coldStorageSize: 'coldStorageSize',
35
+ cpu: 'cpu',
36
+ duration: 'duration',
37
+ gatewayCount: 'gatewayCount',
38
+ instanceName: 'instanceName',
39
+ instanceType: 'instanceType',
40
+ leaderInstanceId: 'leaderInstanceId',
41
+ pricingCycle: 'pricingCycle',
42
+ regionId: 'regionId',
43
+ resourceGroupId: 'resourceGroupId',
44
+ storageSize: 'storageSize',
45
+ vSwitchId: 'vSwitchId',
46
+ vpcId: 'vpcId',
47
+ zoneId: 'zoneId',
48
+ };
49
+ }
50
+
51
+ static types(): { [key: string]: any } {
52
+ return {
53
+ autoPay: 'boolean',
54
+ autoRenew: 'boolean',
55
+ chargeType: 'string',
56
+ coldStorageSize: 'number',
57
+ cpu: 'number',
58
+ duration: 'number',
59
+ gatewayCount: 'number',
60
+ instanceName: 'string',
61
+ instanceType: 'string',
62
+ leaderInstanceId: 'string',
63
+ pricingCycle: 'string',
64
+ regionId: 'string',
65
+ resourceGroupId: 'string',
66
+ storageSize: 'number',
67
+ vSwitchId: 'string',
68
+ vpcId: 'string',
69
+ zoneId: 'string',
70
+ };
71
+ }
72
+
73
+ constructor(map?: { [key: string]: any }) {
74
+ super(map);
75
+ }
76
+ }
77
+
78
+ export class CreateInstanceResponseBody extends $tea.Model {
79
+ data?: CreateInstanceResponseBodyData;
80
+ errorCode?: string;
81
+ errorMessage?: string;
82
+ httpStatusCode?: string;
83
+ requestId?: string;
84
+ static names(): { [key: string]: string } {
85
+ return {
86
+ data: 'Data',
87
+ errorCode: 'ErrorCode',
88
+ errorMessage: 'ErrorMessage',
89
+ httpStatusCode: 'HttpStatusCode',
90
+ requestId: 'RequestId',
91
+ };
92
+ }
93
+
94
+ static types(): { [key: string]: any } {
95
+ return {
96
+ data: CreateInstanceResponseBodyData,
97
+ errorCode: 'string',
98
+ errorMessage: 'string',
99
+ httpStatusCode: 'string',
100
+ requestId: 'string',
101
+ };
102
+ }
103
+
104
+ constructor(map?: { [key: string]: any }) {
105
+ super(map);
106
+ }
107
+ }
108
+
109
+ export class CreateInstanceResponse extends $tea.Model {
110
+ headers: { [key: string]: string };
111
+ statusCode: number;
112
+ body: CreateInstanceResponseBody;
113
+ static names(): { [key: string]: string } {
114
+ return {
115
+ headers: 'headers',
116
+ statusCode: 'statusCode',
117
+ body: 'body',
118
+ };
119
+ }
120
+
121
+ static types(): { [key: string]: any } {
122
+ return {
123
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
124
+ statusCode: 'number',
125
+ body: CreateInstanceResponseBody,
126
+ };
127
+ }
128
+
129
+ constructor(map?: { [key: string]: any }) {
130
+ super(map);
131
+ }
132
+ }
133
+
134
+ export class DeleteInstanceRequest extends $tea.Model {
135
+ regionId?: string;
136
+ static names(): { [key: string]: string } {
137
+ return {
138
+ regionId: 'RegionId',
139
+ };
140
+ }
141
+
142
+ static types(): { [key: string]: any } {
143
+ return {
144
+ regionId: 'string',
145
+ };
146
+ }
147
+
148
+ constructor(map?: { [key: string]: any }) {
149
+ super(map);
150
+ }
151
+ }
152
+
153
+ export class DeleteInstanceResponseBody extends $tea.Model {
154
+ data?: boolean;
155
+ errorCode?: string;
156
+ errorMessage?: string;
157
+ httpStatusCode?: string;
158
+ requestId?: string;
159
+ success?: boolean;
160
+ static names(): { [key: string]: string } {
161
+ return {
162
+ data: 'Data',
163
+ errorCode: 'ErrorCode',
164
+ errorMessage: 'ErrorMessage',
165
+ httpStatusCode: 'HttpStatusCode',
166
+ requestId: 'RequestId',
167
+ success: 'Success',
168
+ };
169
+ }
170
+
171
+ static types(): { [key: string]: any } {
172
+ return {
173
+ data: 'boolean',
174
+ errorCode: 'string',
175
+ errorMessage: 'string',
176
+ httpStatusCode: 'string',
177
+ requestId: 'string',
178
+ success: 'boolean',
179
+ };
180
+ }
181
+
182
+ constructor(map?: { [key: string]: any }) {
183
+ super(map);
184
+ }
185
+ }
186
+
187
+ export class DeleteInstanceResponse extends $tea.Model {
188
+ headers: { [key: string]: string };
189
+ statusCode: number;
190
+ body: DeleteInstanceResponseBody;
191
+ static names(): { [key: string]: string } {
192
+ return {
193
+ headers: 'headers',
194
+ statusCode: 'statusCode',
195
+ body: 'body',
196
+ };
197
+ }
198
+
199
+ static types(): { [key: string]: any } {
200
+ return {
201
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
202
+ statusCode: 'number',
203
+ body: DeleteInstanceResponseBody,
204
+ };
205
+ }
206
+
207
+ constructor(map?: { [key: string]: any }) {
208
+ super(map);
209
+ }
210
+ }
211
+
212
+ export class GetInstanceResponseBody extends $tea.Model {
213
+ errorCode?: string;
214
+ errorMessage?: string;
215
+ httpStatusCode?: string;
216
+ instance?: GetInstanceResponseBodyInstance;
217
+ requestId?: string;
218
+ success?: boolean;
219
+ static names(): { [key: string]: string } {
220
+ return {
221
+ errorCode: 'ErrorCode',
222
+ errorMessage: 'ErrorMessage',
223
+ httpStatusCode: 'HttpStatusCode',
224
+ instance: 'Instance',
225
+ requestId: 'RequestId',
226
+ success: 'Success',
227
+ };
228
+ }
229
+
230
+ static types(): { [key: string]: any } {
231
+ return {
232
+ errorCode: 'string',
233
+ errorMessage: 'string',
234
+ httpStatusCode: 'string',
235
+ instance: GetInstanceResponseBodyInstance,
236
+ requestId: 'string',
237
+ success: 'boolean',
238
+ };
239
+ }
240
+
241
+ constructor(map?: { [key: string]: any }) {
242
+ super(map);
243
+ }
244
+ }
245
+
246
+ export class GetInstanceResponse extends $tea.Model {
247
+ headers: { [key: string]: string };
248
+ statusCode: number;
249
+ body: GetInstanceResponseBody;
250
+ static names(): { [key: string]: string } {
251
+ return {
252
+ headers: 'headers',
253
+ statusCode: 'statusCode',
254
+ body: 'body',
255
+ };
256
+ }
257
+
258
+ static types(): { [key: string]: any } {
259
+ return {
260
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
261
+ statusCode: 'number',
262
+ body: GetInstanceResponseBody,
263
+ };
264
+ }
265
+
266
+ constructor(map?: { [key: string]: any }) {
267
+ super(map);
268
+ }
269
+ }
270
+
271
+ export class ListInstancesRequest extends $tea.Model {
272
+ cmsInstanceType?: string;
273
+ resourceGroupId?: string;
274
+ tag?: ListInstancesRequestTag[];
275
+ static names(): { [key: string]: string } {
276
+ return {
277
+ cmsInstanceType: 'cmsInstanceType',
278
+ resourceGroupId: 'resourceGroupId',
279
+ tag: 'tag',
280
+ };
281
+ }
282
+
283
+ static types(): { [key: string]: any } {
284
+ return {
285
+ cmsInstanceType: 'string',
286
+ resourceGroupId: 'string',
287
+ tag: { 'type': 'array', 'itemType': ListInstancesRequestTag },
288
+ };
289
+ }
290
+
291
+ constructor(map?: { [key: string]: any }) {
292
+ super(map);
293
+ }
294
+ }
295
+
296
+ export class ListInstancesResponseBody extends $tea.Model {
297
+ errorCode?: string;
298
+ errorMessage?: string;
299
+ httpStatusCode?: string;
300
+ instanceList?: ListInstancesResponseBodyInstanceList[];
301
+ requestId?: string;
302
+ success?: string;
303
+ static names(): { [key: string]: string } {
304
+ return {
305
+ errorCode: 'ErrorCode',
306
+ errorMessage: 'ErrorMessage',
307
+ httpStatusCode: 'HttpStatusCode',
308
+ instanceList: 'InstanceList',
309
+ requestId: 'RequestId',
310
+ success: 'Success',
311
+ };
312
+ }
313
+
314
+ static types(): { [key: string]: any } {
315
+ return {
316
+ errorCode: 'string',
317
+ errorMessage: 'string',
318
+ httpStatusCode: 'string',
319
+ instanceList: { 'type': 'array', 'itemType': ListInstancesResponseBodyInstanceList },
320
+ requestId: 'string',
321
+ success: 'string',
322
+ };
323
+ }
324
+
325
+ constructor(map?: { [key: string]: any }) {
326
+ super(map);
327
+ }
328
+ }
329
+
330
+ export class ListInstancesResponse extends $tea.Model {
331
+ headers: { [key: string]: string };
332
+ statusCode: number;
333
+ body: ListInstancesResponseBody;
334
+ static names(): { [key: string]: string } {
335
+ return {
336
+ headers: 'headers',
337
+ statusCode: 'statusCode',
338
+ body: 'body',
339
+ };
340
+ }
341
+
342
+ static types(): { [key: string]: any } {
343
+ return {
344
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
345
+ statusCode: 'number',
346
+ body: ListInstancesResponseBody,
347
+ };
348
+ }
349
+
350
+ constructor(map?: { [key: string]: any }) {
351
+ super(map);
352
+ }
353
+ }
354
+
355
+ export class RenewInstanceRequest extends $tea.Model {
356
+ autoRenew?: boolean;
357
+ duration?: number;
358
+ static names(): { [key: string]: string } {
359
+ return {
360
+ autoRenew: 'autoRenew',
361
+ duration: 'duration',
362
+ };
363
+ }
364
+
365
+ static types(): { [key: string]: any } {
366
+ return {
367
+ autoRenew: 'boolean',
368
+ duration: 'number',
369
+ };
370
+ }
371
+
372
+ constructor(map?: { [key: string]: any }) {
373
+ super(map);
374
+ }
375
+ }
376
+
377
+ export class RenewInstanceResponseBody extends $tea.Model {
378
+ data?: RenewInstanceResponseBodyData;
379
+ errorCode?: string;
380
+ errorMessage?: string;
381
+ httpStatusCode?: string;
382
+ requestId?: string;
383
+ success?: string;
384
+ static names(): { [key: string]: string } {
385
+ return {
386
+ data: 'Data',
387
+ errorCode: 'ErrorCode',
388
+ errorMessage: 'ErrorMessage',
389
+ httpStatusCode: 'HttpStatusCode',
390
+ requestId: 'RequestId',
391
+ success: 'Success',
392
+ };
393
+ }
394
+
395
+ static types(): { [key: string]: any } {
396
+ return {
397
+ data: RenewInstanceResponseBodyData,
398
+ errorCode: 'string',
399
+ errorMessage: 'string',
400
+ httpStatusCode: 'string',
401
+ requestId: 'string',
402
+ success: 'string',
403
+ };
404
+ }
405
+
406
+ constructor(map?: { [key: string]: any }) {
407
+ super(map);
408
+ }
409
+ }
410
+
411
+ export class RenewInstanceResponse extends $tea.Model {
412
+ headers: { [key: string]: string };
413
+ statusCode: number;
414
+ body: RenewInstanceResponseBody;
415
+ static names(): { [key: string]: string } {
416
+ return {
417
+ headers: 'headers',
418
+ statusCode: 'statusCode',
419
+ body: 'body',
420
+ };
421
+ }
422
+
423
+ static types(): { [key: string]: any } {
424
+ return {
425
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
426
+ statusCode: 'number',
427
+ body: RenewInstanceResponseBody,
428
+ };
429
+ }
430
+
431
+ constructor(map?: { [key: string]: any }) {
432
+ super(map);
433
+ }
434
+ }
435
+
436
+ export class RestartInstanceResponseBody extends $tea.Model {
437
+ data?: boolean;
438
+ errorCode?: string;
439
+ errorMessage?: string;
440
+ httpStatusCode?: string;
441
+ requestId?: string;
442
+ success?: boolean;
443
+ static names(): { [key: string]: string } {
444
+ return {
445
+ data: 'Data',
446
+ errorCode: 'ErrorCode',
447
+ errorMessage: 'ErrorMessage',
448
+ httpStatusCode: 'HttpStatusCode',
449
+ requestId: 'RequestId',
450
+ success: 'Success',
451
+ };
452
+ }
453
+
454
+ static types(): { [key: string]: any } {
455
+ return {
456
+ data: 'boolean',
457
+ errorCode: 'string',
458
+ errorMessage: 'string',
459
+ httpStatusCode: 'string',
460
+ requestId: 'string',
461
+ success: 'boolean',
462
+ };
463
+ }
464
+
465
+ constructor(map?: { [key: string]: any }) {
466
+ super(map);
467
+ }
468
+ }
469
+
470
+ export class RestartInstanceResponse extends $tea.Model {
471
+ headers: { [key: string]: string };
472
+ statusCode: number;
473
+ body: RestartInstanceResponseBody;
474
+ static names(): { [key: string]: string } {
475
+ return {
476
+ headers: 'headers',
477
+ statusCode: 'statusCode',
478
+ body: 'body',
479
+ };
480
+ }
481
+
482
+ static types(): { [key: string]: any } {
483
+ return {
484
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
485
+ statusCode: 'number',
486
+ body: RestartInstanceResponseBody,
487
+ };
488
+ }
489
+
490
+ constructor(map?: { [key: string]: any }) {
491
+ super(map);
492
+ }
493
+ }
494
+
495
+ export class ResumeInstanceResponseBody extends $tea.Model {
496
+ data?: boolean;
497
+ errorCode?: string;
498
+ errorMessage?: string;
499
+ httpStatusCode?: string;
500
+ requestId?: string;
501
+ success?: boolean;
502
+ static names(): { [key: string]: string } {
503
+ return {
504
+ data: 'Data',
505
+ errorCode: 'ErrorCode',
506
+ errorMessage: 'ErrorMessage',
507
+ httpStatusCode: 'HttpStatusCode',
508
+ requestId: 'RequestId',
509
+ success: 'Success',
510
+ };
511
+ }
512
+
513
+ static types(): { [key: string]: any } {
514
+ return {
515
+ data: 'boolean',
516
+ errorCode: 'string',
517
+ errorMessage: 'string',
518
+ httpStatusCode: 'string',
519
+ requestId: 'string',
520
+ success: 'boolean',
521
+ };
522
+ }
523
+
524
+ constructor(map?: { [key: string]: any }) {
525
+ super(map);
526
+ }
527
+ }
528
+
529
+ export class ResumeInstanceResponse extends $tea.Model {
530
+ headers: { [key: string]: string };
531
+ statusCode: number;
532
+ body: ResumeInstanceResponseBody;
533
+ static names(): { [key: string]: string } {
534
+ return {
535
+ headers: 'headers',
536
+ statusCode: 'statusCode',
537
+ body: 'body',
538
+ };
539
+ }
540
+
541
+ static types(): { [key: string]: any } {
542
+ return {
543
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
544
+ statusCode: 'number',
545
+ body: ResumeInstanceResponseBody,
546
+ };
547
+ }
548
+
549
+ constructor(map?: { [key: string]: any }) {
550
+ super(map);
551
+ }
552
+ }
553
+
554
+ export class ScaleInstanceRequest extends $tea.Model {
555
+ coldStorageSize?: number;
556
+ cpu?: number;
557
+ gatewayCount?: number;
558
+ scaleType?: string;
559
+ storageSize?: number;
560
+ static names(): { [key: string]: string } {
561
+ return {
562
+ coldStorageSize: 'coldStorageSize',
563
+ cpu: 'cpu',
564
+ gatewayCount: 'gatewayCount',
565
+ scaleType: 'scaleType',
566
+ storageSize: 'storageSize',
567
+ };
568
+ }
569
+
570
+ static types(): { [key: string]: any } {
571
+ return {
572
+ coldStorageSize: 'number',
573
+ cpu: 'number',
574
+ gatewayCount: 'number',
575
+ scaleType: 'string',
576
+ storageSize: 'number',
577
+ };
578
+ }
579
+
580
+ constructor(map?: { [key: string]: any }) {
581
+ super(map);
582
+ }
583
+ }
584
+
585
+ export class ScaleInstanceResponseBody extends $tea.Model {
586
+ data?: ScaleInstanceResponseBodyData;
587
+ errorCode?: string;
588
+ errorMessage?: string;
589
+ httpStatusCode?: string;
590
+ requestId?: string;
591
+ static names(): { [key: string]: string } {
592
+ return {
593
+ data: 'Data',
594
+ errorCode: 'ErrorCode',
595
+ errorMessage: 'ErrorMessage',
596
+ httpStatusCode: 'HttpStatusCode',
597
+ requestId: 'RequestId',
598
+ };
599
+ }
600
+
601
+ static types(): { [key: string]: any } {
602
+ return {
603
+ data: ScaleInstanceResponseBodyData,
604
+ errorCode: 'string',
605
+ errorMessage: 'string',
606
+ httpStatusCode: 'string',
607
+ requestId: 'string',
608
+ };
609
+ }
610
+
611
+ constructor(map?: { [key: string]: any }) {
612
+ super(map);
613
+ }
614
+ }
615
+
616
+ export class ScaleInstanceResponse extends $tea.Model {
617
+ headers: { [key: string]: string };
618
+ statusCode: number;
619
+ body: ScaleInstanceResponseBody;
620
+ static names(): { [key: string]: string } {
621
+ return {
622
+ headers: 'headers',
623
+ statusCode: 'statusCode',
624
+ body: 'body',
625
+ };
626
+ }
627
+
628
+ static types(): { [key: string]: any } {
629
+ return {
630
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
631
+ statusCode: 'number',
632
+ body: ScaleInstanceResponseBody,
633
+ };
634
+ }
635
+
636
+ constructor(map?: { [key: string]: any }) {
637
+ super(map);
638
+ }
639
+ }
640
+
641
+ export class StopInstanceResponseBody extends $tea.Model {
642
+ data?: boolean;
643
+ errorCode?: string;
644
+ errorMessage?: string;
645
+ httpStatusCode?: string;
646
+ requestId?: string;
647
+ success?: boolean;
648
+ static names(): { [key: string]: string } {
649
+ return {
650
+ data: 'Data',
651
+ errorCode: 'ErrorCode',
652
+ errorMessage: 'ErrorMessage',
653
+ httpStatusCode: 'HttpStatusCode',
654
+ requestId: 'RequestId',
655
+ success: 'Success',
656
+ };
657
+ }
658
+
659
+ static types(): { [key: string]: any } {
660
+ return {
661
+ data: 'boolean',
662
+ errorCode: 'string',
663
+ errorMessage: 'string',
664
+ httpStatusCode: 'string',
665
+ requestId: 'string',
666
+ success: 'boolean',
667
+ };
668
+ }
669
+
670
+ constructor(map?: { [key: string]: any }) {
671
+ super(map);
672
+ }
673
+ }
674
+
675
+ export class StopInstanceResponse extends $tea.Model {
676
+ headers: { [key: string]: string };
677
+ statusCode: number;
678
+ body: StopInstanceResponseBody;
679
+ static names(): { [key: string]: string } {
680
+ return {
681
+ headers: 'headers',
682
+ statusCode: 'statusCode',
683
+ body: 'body',
684
+ };
685
+ }
686
+
687
+ static types(): { [key: string]: any } {
688
+ return {
689
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
690
+ statusCode: 'number',
691
+ body: StopInstanceResponseBody,
692
+ };
693
+ }
694
+
695
+ constructor(map?: { [key: string]: any }) {
696
+ super(map);
697
+ }
698
+ }
699
+
700
+ export class UpdateInstanceNameRequest extends $tea.Model {
701
+ instanceName?: string;
702
+ static names(): { [key: string]: string } {
703
+ return {
704
+ instanceName: 'instanceName',
705
+ };
706
+ }
707
+
708
+ static types(): { [key: string]: any } {
709
+ return {
710
+ instanceName: 'string',
711
+ };
712
+ }
713
+
714
+ constructor(map?: { [key: string]: any }) {
715
+ super(map);
716
+ }
717
+ }
718
+
719
+ export class UpdateInstanceNameResponseBody extends $tea.Model {
720
+ data?: boolean;
721
+ errorCode?: string;
722
+ errorMessage?: string;
723
+ httpStatusCode?: string;
724
+ requestId?: string;
725
+ success?: boolean;
726
+ static names(): { [key: string]: string } {
727
+ return {
728
+ data: 'Data',
729
+ errorCode: 'ErrorCode',
730
+ errorMessage: 'ErrorMessage',
731
+ httpStatusCode: 'HttpStatusCode',
732
+ requestId: 'RequestId',
733
+ success: 'Success',
734
+ };
735
+ }
736
+
737
+ static types(): { [key: string]: any } {
738
+ return {
739
+ data: 'boolean',
740
+ errorCode: 'string',
741
+ errorMessage: 'string',
742
+ httpStatusCode: 'string',
743
+ requestId: 'string',
744
+ success: 'boolean',
745
+ };
746
+ }
747
+
748
+ constructor(map?: { [key: string]: any }) {
749
+ super(map);
750
+ }
751
+ }
752
+
753
+ export class UpdateInstanceNameResponse extends $tea.Model {
754
+ headers: { [key: string]: string };
755
+ statusCode: number;
756
+ body: UpdateInstanceNameResponseBody;
757
+ static names(): { [key: string]: string } {
758
+ return {
759
+ headers: 'headers',
760
+ statusCode: 'statusCode',
761
+ body: 'body',
762
+ };
763
+ }
764
+
765
+ static types(): { [key: string]: any } {
766
+ return {
767
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
768
+ statusCode: 'number',
769
+ body: UpdateInstanceNameResponseBody,
770
+ };
771
+ }
772
+
773
+ constructor(map?: { [key: string]: any }) {
774
+ super(map);
775
+ }
776
+ }
777
+
778
+ export class UpdateInstanceNetworkTypeRequest extends $tea.Model {
779
+ anyTunnelToSingleTunnel?: string;
780
+ networkTypes?: string;
781
+ vSwitchId?: string;
782
+ vpcId?: string;
783
+ vpcOwnerId?: string;
784
+ vpcRegionId?: string;
785
+ static names(): { [key: string]: string } {
786
+ return {
787
+ anyTunnelToSingleTunnel: 'anyTunnelToSingleTunnel',
788
+ networkTypes: 'networkTypes',
789
+ vSwitchId: 'vSwitchId',
790
+ vpcId: 'vpcId',
791
+ vpcOwnerId: 'vpcOwnerId',
792
+ vpcRegionId: 'vpcRegionId',
793
+ };
794
+ }
795
+
796
+ static types(): { [key: string]: any } {
797
+ return {
798
+ anyTunnelToSingleTunnel: 'string',
799
+ networkTypes: 'string',
800
+ vSwitchId: 'string',
801
+ vpcId: 'string',
802
+ vpcOwnerId: 'string',
803
+ vpcRegionId: 'string',
804
+ };
805
+ }
806
+
807
+ constructor(map?: { [key: string]: any }) {
808
+ super(map);
809
+ }
810
+ }
811
+
812
+ export class UpdateInstanceNetworkTypeResponseBody extends $tea.Model {
813
+ data?: string;
814
+ errorCode?: string;
815
+ errorMessage?: string;
816
+ httpStatusCode?: string;
817
+ requestId?: string;
818
+ success?: boolean;
819
+ static names(): { [key: string]: string } {
820
+ return {
821
+ data: 'Data',
822
+ errorCode: 'ErrorCode',
823
+ errorMessage: 'ErrorMessage',
824
+ httpStatusCode: 'HttpStatusCode',
825
+ requestId: 'RequestId',
826
+ success: 'Success',
827
+ };
828
+ }
829
+
830
+ static types(): { [key: string]: any } {
831
+ return {
832
+ data: 'string',
833
+ errorCode: 'string',
834
+ errorMessage: 'string',
835
+ httpStatusCode: 'string',
836
+ requestId: 'string',
837
+ success: 'boolean',
838
+ };
839
+ }
840
+
841
+ constructor(map?: { [key: string]: any }) {
842
+ super(map);
843
+ }
844
+ }
845
+
846
+ export class UpdateInstanceNetworkTypeResponse extends $tea.Model {
847
+ headers: { [key: string]: string };
848
+ statusCode: number;
849
+ body: UpdateInstanceNetworkTypeResponseBody;
850
+ static names(): { [key: string]: string } {
851
+ return {
852
+ headers: 'headers',
853
+ statusCode: 'statusCode',
854
+ body: 'body',
855
+ };
856
+ }
857
+
858
+ static types(): { [key: string]: any } {
859
+ return {
860
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
861
+ statusCode: 'number',
862
+ body: UpdateInstanceNetworkTypeResponseBody,
863
+ };
864
+ }
865
+
866
+ constructor(map?: { [key: string]: any }) {
867
+ super(map);
868
+ }
869
+ }
870
+
871
+ export class CreateInstanceResponseBodyData extends $tea.Model {
872
+ code?: string;
873
+ instanceId?: string;
874
+ message?: string;
875
+ orderId?: string;
876
+ success?: string;
877
+ static names(): { [key: string]: string } {
878
+ return {
879
+ code: 'Code',
880
+ instanceId: 'InstanceId',
881
+ message: 'Message',
882
+ orderId: 'OrderId',
883
+ success: 'Success',
884
+ };
885
+ }
886
+
887
+ static types(): { [key: string]: any } {
888
+ return {
889
+ code: 'string',
890
+ instanceId: 'string',
891
+ message: 'string',
892
+ orderId: 'string',
893
+ success: 'string',
894
+ };
895
+ }
896
+
897
+ constructor(map?: { [key: string]: any }) {
898
+ super(map);
899
+ }
900
+ }
901
+
902
+ export class GetInstanceResponseBodyInstanceEndpoints extends $tea.Model {
903
+ alternativeEndpoints?: string;
904
+ enabled?: boolean;
905
+ endpoint?: string;
906
+ type?: string;
907
+ vSwitchId?: string;
908
+ vpcId?: string;
909
+ vpcInstanceId?: string;
910
+ static names(): { [key: string]: string } {
911
+ return {
912
+ alternativeEndpoints: 'AlternativeEndpoints',
913
+ enabled: 'Enabled',
914
+ endpoint: 'Endpoint',
915
+ type: 'Type',
916
+ vSwitchId: 'VSwitchId',
917
+ vpcId: 'VpcId',
918
+ vpcInstanceId: 'VpcInstanceId',
919
+ };
920
+ }
921
+
922
+ static types(): { [key: string]: any } {
923
+ return {
924
+ alternativeEndpoints: 'string',
925
+ enabled: 'boolean',
926
+ endpoint: 'string',
927
+ type: 'string',
928
+ vSwitchId: 'string',
929
+ vpcId: 'string',
930
+ vpcInstanceId: 'string',
931
+ };
932
+ }
933
+
934
+ constructor(map?: { [key: string]: any }) {
935
+ super(map);
936
+ }
937
+ }
938
+
939
+ export class GetInstanceResponseBodyInstanceTags extends $tea.Model {
940
+ key?: string;
941
+ value?: string;
942
+ static names(): { [key: string]: string } {
943
+ return {
944
+ key: 'Key',
945
+ value: 'Value',
946
+ };
947
+ }
948
+
949
+ static types(): { [key: string]: any } {
950
+ return {
951
+ key: 'string',
952
+ value: 'string',
953
+ };
954
+ }
955
+
956
+ constructor(map?: { [key: string]: any }) {
957
+ super(map);
958
+ }
959
+ }
960
+
961
+ export class GetInstanceResponseBodyInstance extends $tea.Model {
962
+ autoRenewal?: string;
963
+ coldStorage?: number;
964
+ commodityCode?: string;
965
+ computeNodeCount?: number;
966
+ cpu?: number;
967
+ creationTime?: string;
968
+ disk?: string;
969
+ enableHiveAccess?: string;
970
+ endpoints?: GetInstanceResponseBodyInstanceEndpoints[];
971
+ expirationTime?: string;
972
+ gatewayCount?: number;
973
+ gatewayCpu?: number;
974
+ gatewayMemory?: number;
975
+ instanceChargeType?: string;
976
+ instanceId?: string;
977
+ instanceName?: string;
978
+ instanceOwner?: string;
979
+ instanceStatus?: string;
980
+ instanceType?: string;
981
+ leaderInstanceId?: string;
982
+ memory?: number;
983
+ regionId?: string;
984
+ resourceGroupId?: string;
985
+ suspendReason?: string;
986
+ tags?: GetInstanceResponseBodyInstanceTags[];
987
+ version?: string;
988
+ zoneId?: string;
989
+ static names(): { [key: string]: string } {
990
+ return {
991
+ autoRenewal: 'AutoRenewal',
992
+ coldStorage: 'ColdStorage',
993
+ commodityCode: 'CommodityCode',
994
+ computeNodeCount: 'ComputeNodeCount',
995
+ cpu: 'Cpu',
996
+ creationTime: 'CreationTime',
997
+ disk: 'Disk',
998
+ enableHiveAccess: 'EnableHiveAccess',
999
+ endpoints: 'Endpoints',
1000
+ expirationTime: 'ExpirationTime',
1001
+ gatewayCount: 'GatewayCount',
1002
+ gatewayCpu: 'GatewayCpu',
1003
+ gatewayMemory: 'GatewayMemory',
1004
+ instanceChargeType: 'InstanceChargeType',
1005
+ instanceId: 'InstanceId',
1006
+ instanceName: 'InstanceName',
1007
+ instanceOwner: 'InstanceOwner',
1008
+ instanceStatus: 'InstanceStatus',
1009
+ instanceType: 'InstanceType',
1010
+ leaderInstanceId: 'LeaderInstanceId',
1011
+ memory: 'Memory',
1012
+ regionId: 'RegionId',
1013
+ resourceGroupId: 'ResourceGroupId',
1014
+ suspendReason: 'SuspendReason',
1015
+ tags: 'Tags',
1016
+ version: 'Version',
1017
+ zoneId: 'ZoneId',
1018
+ };
1019
+ }
1020
+
1021
+ static types(): { [key: string]: any } {
1022
+ return {
1023
+ autoRenewal: 'string',
1024
+ coldStorage: 'number',
1025
+ commodityCode: 'string',
1026
+ computeNodeCount: 'number',
1027
+ cpu: 'number',
1028
+ creationTime: 'string',
1029
+ disk: 'string',
1030
+ enableHiveAccess: 'string',
1031
+ endpoints: { 'type': 'array', 'itemType': GetInstanceResponseBodyInstanceEndpoints },
1032
+ expirationTime: 'string',
1033
+ gatewayCount: 'number',
1034
+ gatewayCpu: 'number',
1035
+ gatewayMemory: 'number',
1036
+ instanceChargeType: 'string',
1037
+ instanceId: 'string',
1038
+ instanceName: 'string',
1039
+ instanceOwner: 'string',
1040
+ instanceStatus: 'string',
1041
+ instanceType: 'string',
1042
+ leaderInstanceId: 'string',
1043
+ memory: 'number',
1044
+ regionId: 'string',
1045
+ resourceGroupId: 'string',
1046
+ suspendReason: 'string',
1047
+ tags: { 'type': 'array', 'itemType': GetInstanceResponseBodyInstanceTags },
1048
+ version: 'string',
1049
+ zoneId: 'string',
1050
+ };
1051
+ }
1052
+
1053
+ constructor(map?: { [key: string]: any }) {
1054
+ super(map);
1055
+ }
1056
+ }
1057
+
1058
+ export class ListInstancesRequestTag extends $tea.Model {
1059
+ key?: string;
1060
+ value?: string;
1061
+ static names(): { [key: string]: string } {
1062
+ return {
1063
+ key: 'key',
1064
+ value: 'value',
1065
+ };
1066
+ }
1067
+
1068
+ static types(): { [key: string]: any } {
1069
+ return {
1070
+ key: 'string',
1071
+ value: 'string',
1072
+ };
1073
+ }
1074
+
1075
+ constructor(map?: { [key: string]: any }) {
1076
+ super(map);
1077
+ }
1078
+ }
1079
+
1080
+ export class ListInstancesResponseBodyInstanceListEndpoints extends $tea.Model {
1081
+ enabled?: boolean;
1082
+ endpoint?: string;
1083
+ type?: string;
1084
+ vSwitchId?: string;
1085
+ vpcId?: string;
1086
+ vpcInstanceId?: string;
1087
+ static names(): { [key: string]: string } {
1088
+ return {
1089
+ enabled: 'Enabled',
1090
+ endpoint: 'Endpoint',
1091
+ type: 'Type',
1092
+ vSwitchId: 'VSwitchId',
1093
+ vpcId: 'VpcId',
1094
+ vpcInstanceId: 'VpcInstanceId',
1095
+ };
1096
+ }
1097
+
1098
+ static types(): { [key: string]: any } {
1099
+ return {
1100
+ enabled: 'boolean',
1101
+ endpoint: 'string',
1102
+ type: 'string',
1103
+ vSwitchId: 'string',
1104
+ vpcId: 'string',
1105
+ vpcInstanceId: 'string',
1106
+ };
1107
+ }
1108
+
1109
+ constructor(map?: { [key: string]: any }) {
1110
+ super(map);
1111
+ }
1112
+ }
1113
+
1114
+ export class ListInstancesResponseBodyInstanceListTags extends $tea.Model {
1115
+ key?: string;
1116
+ value?: string;
1117
+ static names(): { [key: string]: string } {
1118
+ return {
1119
+ key: 'Key',
1120
+ value: 'Value',
1121
+ };
1122
+ }
1123
+
1124
+ static types(): { [key: string]: any } {
1125
+ return {
1126
+ key: 'string',
1127
+ value: 'string',
1128
+ };
1129
+ }
1130
+
1131
+ constructor(map?: { [key: string]: any }) {
1132
+ super(map);
1133
+ }
1134
+ }
1135
+
1136
+ export class ListInstancesResponseBodyInstanceList extends $tea.Model {
1137
+ commodityCode?: string;
1138
+ creationTime?: string;
1139
+ enableHiveAccess?: string;
1140
+ endpoints?: ListInstancesResponseBodyInstanceListEndpoints[];
1141
+ expirationTime?: string;
1142
+ instanceChargeType?: string;
1143
+ instanceId?: string;
1144
+ instanceName?: string;
1145
+ instanceStatus?: string;
1146
+ instanceType?: string;
1147
+ leaderInstanceId?: string;
1148
+ regionId?: string;
1149
+ resourceGroupId?: string;
1150
+ suspendReason?: string;
1151
+ tags?: ListInstancesResponseBodyInstanceListTags[];
1152
+ version?: string;
1153
+ zoneId?: string;
1154
+ static names(): { [key: string]: string } {
1155
+ return {
1156
+ commodityCode: 'CommodityCode',
1157
+ creationTime: 'CreationTime',
1158
+ enableHiveAccess: 'EnableHiveAccess',
1159
+ endpoints: 'Endpoints',
1160
+ expirationTime: 'ExpirationTime',
1161
+ instanceChargeType: 'InstanceChargeType',
1162
+ instanceId: 'InstanceId',
1163
+ instanceName: 'InstanceName',
1164
+ instanceStatus: 'InstanceStatus',
1165
+ instanceType: 'InstanceType',
1166
+ leaderInstanceId: 'LeaderInstanceId',
1167
+ regionId: 'RegionId',
1168
+ resourceGroupId: 'ResourceGroupId',
1169
+ suspendReason: 'SuspendReason',
1170
+ tags: 'Tags',
1171
+ version: 'Version',
1172
+ zoneId: 'ZoneId',
1173
+ };
1174
+ }
1175
+
1176
+ static types(): { [key: string]: any } {
1177
+ return {
1178
+ commodityCode: 'string',
1179
+ creationTime: 'string',
1180
+ enableHiveAccess: 'string',
1181
+ endpoints: { 'type': 'array', 'itemType': ListInstancesResponseBodyInstanceListEndpoints },
1182
+ expirationTime: 'string',
1183
+ instanceChargeType: 'string',
1184
+ instanceId: 'string',
1185
+ instanceName: 'string',
1186
+ instanceStatus: 'string',
1187
+ instanceType: 'string',
1188
+ leaderInstanceId: 'string',
1189
+ regionId: 'string',
1190
+ resourceGroupId: 'string',
1191
+ suspendReason: 'string',
1192
+ tags: { 'type': 'array', 'itemType': ListInstancesResponseBodyInstanceListTags },
1193
+ version: 'string',
1194
+ zoneId: 'string',
1195
+ };
1196
+ }
1197
+
1198
+ constructor(map?: { [key: string]: any }) {
1199
+ super(map);
1200
+ }
1201
+ }
1202
+
1203
+ export class RenewInstanceResponseBodyData extends $tea.Model {
1204
+ code?: string;
1205
+ message?: string;
1206
+ orderId?: string;
1207
+ success?: boolean;
1208
+ static names(): { [key: string]: string } {
1209
+ return {
1210
+ code: 'Code',
1211
+ message: 'Message',
1212
+ orderId: 'OrderId',
1213
+ success: 'Success',
1214
+ };
1215
+ }
1216
+
1217
+ static types(): { [key: string]: any } {
1218
+ return {
1219
+ code: 'string',
1220
+ message: 'string',
1221
+ orderId: 'string',
1222
+ success: 'boolean',
1223
+ };
1224
+ }
1225
+
1226
+ constructor(map?: { [key: string]: any }) {
1227
+ super(map);
1228
+ }
1229
+ }
1230
+
1231
+ export class ScaleInstanceResponseBodyData extends $tea.Model {
1232
+ code?: string;
1233
+ message?: string;
1234
+ orderId?: string;
1235
+ success?: boolean;
1236
+ static names(): { [key: string]: string } {
1237
+ return {
1238
+ code: 'Code',
1239
+ message: 'Message',
1240
+ orderId: 'OrderId',
1241
+ success: 'Success',
1242
+ };
1243
+ }
1244
+
1245
+ static types(): { [key: string]: any } {
1246
+ return {
1247
+ code: 'string',
1248
+ message: 'string',
1249
+ orderId: 'string',
1250
+ success: 'boolean',
1251
+ };
1252
+ }
1253
+
1254
+ constructor(map?: { [key: string]: any }) {
1255
+ super(map);
1256
+ }
1257
+ }
1258
+
1259
+
1260
+ export default class Client extends OpenApi {
1261
+
1262
+ constructor(config: $OpenApi.Config) {
1263
+ super(config);
1264
+ this._endpointRule = "";
1265
+ this.checkConfig(config);
1266
+ this._endpoint = this.getEndpoint("hologram", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
1267
+ }
1268
+
1269
+
1270
+ getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
1271
+ if (!Util.empty(endpoint)) {
1272
+ return endpoint;
1273
+ }
1274
+
1275
+ if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
1276
+ return endpointMap[regionId];
1277
+ }
1278
+
1279
+ return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
1280
+ }
1281
+
1282
+ /**
1283
+ * > Before you call this operation, make sure that you understand the billing method and pricing of Hologres because this operation is charged.
1284
+ * * For more information about the billing details of Hologres, see [Pricing](https://www.alibabacloud.com/help/en/hologres/developer-reference/api-hologram-2022-06-01-createinstance).
1285
+ * * When you purchase a Hologres instance, you must specify the region and zone in which the Hologres instance resides. A region may correspond to multiple zones. Example:
1286
+ * <!---->
1287
+ * cn-hangzhou: cn-hangzhou-h, cn-hangzhou-j
1288
+ * cn-shanghai: cn-shanghai-e, cn-shanghai-f
1289
+ * cn-beijing: cn-beijing-i, cn-beijing-g
1290
+ * cn-zhangjiakou: cn-zhangjiakou-b
1291
+ * cn-shenzhen: cn-shenzhen-e
1292
+ * cn-hongkong: cn-hongkong-b
1293
+ * cn-shanghai-finance-1: cn-shanghai-finance-1z
1294
+ * ap-northeast-1: ap-northeast-1a
1295
+ * ap-southeast-1: ap-southeast-1c
1296
+ * ap-southeast-3: ap-southeast-3b
1297
+ * ap-southeast-5: ap-southeast-5b
1298
+ * ap-south-1: ap-south-1b
1299
+ * eu-central-1: eu-central-1a
1300
+ * us-east-1: us-east-1a
1301
+ * us-west-1: us-west-1b
1302
+ *
1303
+ * @param request CreateInstanceRequest
1304
+ * @param headers map
1305
+ * @param runtime runtime options for this request RuntimeOptions
1306
+ * @return CreateInstanceResponse
1307
+ */
1308
+ async createInstanceWithOptions(request: CreateInstanceRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CreateInstanceResponse> {
1309
+ Util.validateModel(request);
1310
+ let body : {[key: string ]: any} = { };
1311
+ if (!Util.isUnset(request.autoPay)) {
1312
+ body["autoPay"] = request.autoPay;
1313
+ }
1314
+
1315
+ if (!Util.isUnset(request.autoRenew)) {
1316
+ body["autoRenew"] = request.autoRenew;
1317
+ }
1318
+
1319
+ if (!Util.isUnset(request.chargeType)) {
1320
+ body["chargeType"] = request.chargeType;
1321
+ }
1322
+
1323
+ if (!Util.isUnset(request.coldStorageSize)) {
1324
+ body["coldStorageSize"] = request.coldStorageSize;
1325
+ }
1326
+
1327
+ if (!Util.isUnset(request.cpu)) {
1328
+ body["cpu"] = request.cpu;
1329
+ }
1330
+
1331
+ if (!Util.isUnset(request.duration)) {
1332
+ body["duration"] = request.duration;
1333
+ }
1334
+
1335
+ if (!Util.isUnset(request.gatewayCount)) {
1336
+ body["gatewayCount"] = request.gatewayCount;
1337
+ }
1338
+
1339
+ if (!Util.isUnset(request.instanceName)) {
1340
+ body["instanceName"] = request.instanceName;
1341
+ }
1342
+
1343
+ if (!Util.isUnset(request.instanceType)) {
1344
+ body["instanceType"] = request.instanceType;
1345
+ }
1346
+
1347
+ if (!Util.isUnset(request.leaderInstanceId)) {
1348
+ body["leaderInstanceId"] = request.leaderInstanceId;
1349
+ }
1350
+
1351
+ if (!Util.isUnset(request.pricingCycle)) {
1352
+ body["pricingCycle"] = request.pricingCycle;
1353
+ }
1354
+
1355
+ if (!Util.isUnset(request.regionId)) {
1356
+ body["regionId"] = request.regionId;
1357
+ }
1358
+
1359
+ if (!Util.isUnset(request.resourceGroupId)) {
1360
+ body["resourceGroupId"] = request.resourceGroupId;
1361
+ }
1362
+
1363
+ if (!Util.isUnset(request.storageSize)) {
1364
+ body["storageSize"] = request.storageSize;
1365
+ }
1366
+
1367
+ if (!Util.isUnset(request.vSwitchId)) {
1368
+ body["vSwitchId"] = request.vSwitchId;
1369
+ }
1370
+
1371
+ if (!Util.isUnset(request.vpcId)) {
1372
+ body["vpcId"] = request.vpcId;
1373
+ }
1374
+
1375
+ if (!Util.isUnset(request.zoneId)) {
1376
+ body["zoneId"] = request.zoneId;
1377
+ }
1378
+
1379
+ let req = new $OpenApi.OpenApiRequest({
1380
+ headers: headers,
1381
+ body: OpenApiUtil.parseToMap(body),
1382
+ });
1383
+ let params = new $OpenApi.Params({
1384
+ action: "CreateInstance",
1385
+ version: "2022-06-01",
1386
+ protocol: "HTTPS",
1387
+ pathname: `/api/v1/instances/create`,
1388
+ method: "POST",
1389
+ authType: "AK",
1390
+ style: "ROA",
1391
+ reqBodyType: "json",
1392
+ bodyType: "json",
1393
+ });
1394
+ return $tea.cast<CreateInstanceResponse>(await this.callApi(params, req, runtime), new CreateInstanceResponse({}));
1395
+ }
1396
+
1397
+ /**
1398
+ * > Before you call this operation, make sure that you understand the billing method and pricing of Hologres because this operation is charged.
1399
+ * * For more information about the billing details of Hologres, see [Pricing](https://www.alibabacloud.com/help/en/hologres/developer-reference/api-hologram-2022-06-01-createinstance).
1400
+ * * When you purchase a Hologres instance, you must specify the region and zone in which the Hologres instance resides. A region may correspond to multiple zones. Example:
1401
+ * <!---->
1402
+ * cn-hangzhou: cn-hangzhou-h, cn-hangzhou-j
1403
+ * cn-shanghai: cn-shanghai-e, cn-shanghai-f
1404
+ * cn-beijing: cn-beijing-i, cn-beijing-g
1405
+ * cn-zhangjiakou: cn-zhangjiakou-b
1406
+ * cn-shenzhen: cn-shenzhen-e
1407
+ * cn-hongkong: cn-hongkong-b
1408
+ * cn-shanghai-finance-1: cn-shanghai-finance-1z
1409
+ * ap-northeast-1: ap-northeast-1a
1410
+ * ap-southeast-1: ap-southeast-1c
1411
+ * ap-southeast-3: ap-southeast-3b
1412
+ * ap-southeast-5: ap-southeast-5b
1413
+ * ap-south-1: ap-south-1b
1414
+ * eu-central-1: eu-central-1a
1415
+ * us-east-1: us-east-1a
1416
+ * us-west-1: us-west-1b
1417
+ *
1418
+ * @param request CreateInstanceRequest
1419
+ * @return CreateInstanceResponse
1420
+ */
1421
+ async createInstance(request: CreateInstanceRequest): Promise<CreateInstanceResponse> {
1422
+ let runtime = new $Util.RuntimeOptions({ });
1423
+ let headers : {[key: string ]: string} = { };
1424
+ return await this.createInstanceWithOptions(request, headers, runtime);
1425
+ }
1426
+
1427
+ /**
1428
+ * > Before you call this operation, read the documentation and make sure that you understand the prerequisites and impacts of this operation.
1429
+ * * After you delete a Hologres instance, data and objects in the instance cannot be restored. Proceed with caution. For more information, see [Billing overview](https://www.alibabacloud.com/help/en/hologres/product-overview/billing-overview#section-h6a-x58-jc0).
1430
+ * * You can delete only pay-as-you-go instances.
1431
+ * * If you want to unsubscribe from a subscription instance, submit a ticket.[](https://help.aliyun.com/document_detail/150284.html#section-ogc-9vc-858)
1432
+ *
1433
+ * @param request DeleteInstanceRequest
1434
+ * @param headers map
1435
+ * @param runtime runtime options for this request RuntimeOptions
1436
+ * @return DeleteInstanceResponse
1437
+ */
1438
+ async deleteInstanceWithOptions(instanceId: string, request: DeleteInstanceRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DeleteInstanceResponse> {
1439
+ Util.validateModel(request);
1440
+ let query : {[key: string ]: any} = { };
1441
+ if (!Util.isUnset(request.regionId)) {
1442
+ query["RegionId"] = request.regionId;
1443
+ }
1444
+
1445
+ let req = new $OpenApi.OpenApiRequest({
1446
+ headers: headers,
1447
+ query: OpenApiUtil.query(query),
1448
+ });
1449
+ let params = new $OpenApi.Params({
1450
+ action: "DeleteInstance",
1451
+ version: "2022-06-01",
1452
+ protocol: "HTTPS",
1453
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/delete`,
1454
+ method: "POST",
1455
+ authType: "AK",
1456
+ style: "ROA",
1457
+ reqBodyType: "json",
1458
+ bodyType: "json",
1459
+ });
1460
+ return $tea.cast<DeleteInstanceResponse>(await this.callApi(params, req, runtime), new DeleteInstanceResponse({}));
1461
+ }
1462
+
1463
+ /**
1464
+ * > Before you call this operation, read the documentation and make sure that you understand the prerequisites and impacts of this operation.
1465
+ * * After you delete a Hologres instance, data and objects in the instance cannot be restored. Proceed with caution. For more information, see [Billing overview](https://www.alibabacloud.com/help/en/hologres/product-overview/billing-overview#section-h6a-x58-jc0).
1466
+ * * You can delete only pay-as-you-go instances.
1467
+ * * If you want to unsubscribe from a subscription instance, submit a ticket.[](https://help.aliyun.com/document_detail/150284.html#section-ogc-9vc-858)
1468
+ *
1469
+ * @param request DeleteInstanceRequest
1470
+ * @return DeleteInstanceResponse
1471
+ */
1472
+ async deleteInstance(instanceId: string, request: DeleteInstanceRequest): Promise<DeleteInstanceResponse> {
1473
+ let runtime = new $Util.RuntimeOptions({ });
1474
+ let headers : {[key: string ]: string} = { };
1475
+ return await this.deleteInstanceWithOptions(instanceId, request, headers, runtime);
1476
+ }
1477
+
1478
+ async getInstanceWithOptions(instanceId: string, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<GetInstanceResponse> {
1479
+ let req = new $OpenApi.OpenApiRequest({
1480
+ headers: headers,
1481
+ });
1482
+ let params = new $OpenApi.Params({
1483
+ action: "GetInstance",
1484
+ version: "2022-06-01",
1485
+ protocol: "HTTPS",
1486
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}`,
1487
+ method: "GET",
1488
+ authType: "AK",
1489
+ style: "ROA",
1490
+ reqBodyType: "json",
1491
+ bodyType: "json",
1492
+ });
1493
+ return $tea.cast<GetInstanceResponse>(await this.callApi(params, req, runtime), new GetInstanceResponse({}));
1494
+ }
1495
+
1496
+ async getInstance(instanceId: string): Promise<GetInstanceResponse> {
1497
+ let runtime = new $Util.RuntimeOptions({ });
1498
+ let headers : {[key: string ]: string} = { };
1499
+ return await this.getInstanceWithOptions(instanceId, headers, runtime);
1500
+ }
1501
+
1502
+ async listInstancesWithOptions(request: ListInstancesRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ListInstancesResponse> {
1503
+ Util.validateModel(request);
1504
+ let body : {[key: string ]: any} = { };
1505
+ if (!Util.isUnset(request.cmsInstanceType)) {
1506
+ body["cmsInstanceType"] = request.cmsInstanceType;
1507
+ }
1508
+
1509
+ if (!Util.isUnset(request.resourceGroupId)) {
1510
+ body["resourceGroupId"] = request.resourceGroupId;
1511
+ }
1512
+
1513
+ if (!Util.isUnset(request.tag)) {
1514
+ body["tag"] = request.tag;
1515
+ }
1516
+
1517
+ let req = new $OpenApi.OpenApiRequest({
1518
+ headers: headers,
1519
+ body: OpenApiUtil.parseToMap(body),
1520
+ });
1521
+ let params = new $OpenApi.Params({
1522
+ action: "ListInstances",
1523
+ version: "2022-06-01",
1524
+ protocol: "HTTPS",
1525
+ pathname: `/api/v1/instances`,
1526
+ method: "POST",
1527
+ authType: "AK",
1528
+ style: "ROA",
1529
+ reqBodyType: "json",
1530
+ bodyType: "json",
1531
+ });
1532
+ return $tea.cast<ListInstancesResponse>(await this.callApi(params, req, runtime), new ListInstancesResponse({}));
1533
+ }
1534
+
1535
+ async listInstances(request: ListInstancesRequest): Promise<ListInstancesResponse> {
1536
+ let runtime = new $Util.RuntimeOptions({ });
1537
+ let headers : {[key: string ]: string} = { };
1538
+ return await this.listInstancesWithOptions(request, headers, runtime);
1539
+ }
1540
+
1541
+ /**
1542
+ * > Before you call this operation, make sure that you understand the billing method and pricing of Hologres because this operation is charged.
1543
+ * * For more information about billing details of Hologres, see [Pricing](https://www.alibabacloud.com/help/en/hologres/product-overview/billing-overview).
1544
+ * * For more information about how to renew a Hologres instance, see [Manage renewals](https://www.alibabacloud.com/help/en/hologres/product-overview/manage-renewals?spm=a2c63.p38356.0.0.73f27c8d1Q0FUi).
1545
+ * * You can renew only subscription instances.
1546
+ *
1547
+ * @param request RenewInstanceRequest
1548
+ * @param headers map
1549
+ * @param runtime runtime options for this request RuntimeOptions
1550
+ * @return RenewInstanceResponse
1551
+ */
1552
+ async renewInstanceWithOptions(instanceId: string, request: RenewInstanceRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<RenewInstanceResponse> {
1553
+ Util.validateModel(request);
1554
+ let body : {[key: string ]: any} = { };
1555
+ if (!Util.isUnset(request.autoRenew)) {
1556
+ body["autoRenew"] = request.autoRenew;
1557
+ }
1558
+
1559
+ if (!Util.isUnset(request.duration)) {
1560
+ body["duration"] = request.duration;
1561
+ }
1562
+
1563
+ let req = new $OpenApi.OpenApiRequest({
1564
+ headers: headers,
1565
+ body: OpenApiUtil.parseToMap(body),
1566
+ });
1567
+ let params = new $OpenApi.Params({
1568
+ action: "RenewInstance",
1569
+ version: "2022-06-01",
1570
+ protocol: "HTTPS",
1571
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/renew`,
1572
+ method: "POST",
1573
+ authType: "AK",
1574
+ style: "ROA",
1575
+ reqBodyType: "json",
1576
+ bodyType: "json",
1577
+ });
1578
+ return $tea.cast<RenewInstanceResponse>(await this.callApi(params, req, runtime), new RenewInstanceResponse({}));
1579
+ }
1580
+
1581
+ /**
1582
+ * > Before you call this operation, make sure that you understand the billing method and pricing of Hologres because this operation is charged.
1583
+ * * For more information about billing details of Hologres, see [Pricing](https://www.alibabacloud.com/help/en/hologres/product-overview/billing-overview).
1584
+ * * For more information about how to renew a Hologres instance, see [Manage renewals](https://www.alibabacloud.com/help/en/hologres/product-overview/manage-renewals?spm=a2c63.p38356.0.0.73f27c8d1Q0FUi).
1585
+ * * You can renew only subscription instances.
1586
+ *
1587
+ * @param request RenewInstanceRequest
1588
+ * @return RenewInstanceResponse
1589
+ */
1590
+ async renewInstance(instanceId: string, request: RenewInstanceRequest): Promise<RenewInstanceResponse> {
1591
+ let runtime = new $Util.RuntimeOptions({ });
1592
+ let headers : {[key: string ]: string} = { };
1593
+ return await this.renewInstanceWithOptions(instanceId, request, headers, runtime);
1594
+ }
1595
+
1596
+ async restartInstanceWithOptions(instanceId: string, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<RestartInstanceResponse> {
1597
+ let req = new $OpenApi.OpenApiRequest({
1598
+ headers: headers,
1599
+ });
1600
+ let params = new $OpenApi.Params({
1601
+ action: "RestartInstance",
1602
+ version: "2022-06-01",
1603
+ protocol: "HTTPS",
1604
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/restart`,
1605
+ method: "POST",
1606
+ authType: "AK",
1607
+ style: "ROA",
1608
+ reqBodyType: "json",
1609
+ bodyType: "json",
1610
+ });
1611
+ return $tea.cast<RestartInstanceResponse>(await this.callApi(params, req, runtime), new RestartInstanceResponse({}));
1612
+ }
1613
+
1614
+ async restartInstance(instanceId: string): Promise<RestartInstanceResponse> {
1615
+ let runtime = new $Util.RuntimeOptions({ });
1616
+ let headers : {[key: string ]: string} = { };
1617
+ return await this.restartInstanceWithOptions(instanceId, headers, runtime);
1618
+ }
1619
+
1620
+ async resumeInstanceWithOptions(instanceId: string, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ResumeInstanceResponse> {
1621
+ let req = new $OpenApi.OpenApiRequest({
1622
+ headers: headers,
1623
+ });
1624
+ let params = new $OpenApi.Params({
1625
+ action: "ResumeInstance",
1626
+ version: "2022-06-01",
1627
+ protocol: "HTTPS",
1628
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/resume`,
1629
+ method: "POST",
1630
+ authType: "AK",
1631
+ style: "ROA",
1632
+ reqBodyType: "json",
1633
+ bodyType: "json",
1634
+ });
1635
+ return $tea.cast<ResumeInstanceResponse>(await this.callApi(params, req, runtime), new ResumeInstanceResponse({}));
1636
+ }
1637
+
1638
+ async resumeInstance(instanceId: string): Promise<ResumeInstanceResponse> {
1639
+ let runtime = new $Util.RuntimeOptions({ });
1640
+ let headers : {[key: string ]: string} = { };
1641
+ return await this.resumeInstanceWithOptions(instanceId, headers, runtime);
1642
+ }
1643
+
1644
+ /**
1645
+ * > Before you call this operation, make sure that you understand the billing method and pricing of Hologres because this operation is charged.
1646
+ * * For more information about the billing details of Hologres, see [Billing overview](https://www.alibabacloud.com/help/en/hologres/product-overview/billing-overview).
1647
+ * * During the change of computing resource specifications of a Hologres instance, the instance is unavailable. During the change of storage resources of a Hologres instance, the instance can work normally. Do not frequently change instance specifications. For more information, see [Upgrade and downgrade instance specifications](https://www.alibabacloud.com/help/en/hologres/product-overview/upgrade-or-downgrade-instance-specifications?spm=a2c63.p38356.0.0.2bb57c8dbVt68U).
1648
+ *
1649
+ * @param request ScaleInstanceRequest
1650
+ * @param headers map
1651
+ * @param runtime runtime options for this request RuntimeOptions
1652
+ * @return ScaleInstanceResponse
1653
+ */
1654
+ async scaleInstanceWithOptions(instanceId: string, request: ScaleInstanceRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ScaleInstanceResponse> {
1655
+ Util.validateModel(request);
1656
+ let body : {[key: string ]: any} = { };
1657
+ if (!Util.isUnset(request.coldStorageSize)) {
1658
+ body["coldStorageSize"] = request.coldStorageSize;
1659
+ }
1660
+
1661
+ if (!Util.isUnset(request.cpu)) {
1662
+ body["cpu"] = request.cpu;
1663
+ }
1664
+
1665
+ if (!Util.isUnset(request.gatewayCount)) {
1666
+ body["gatewayCount"] = request.gatewayCount;
1667
+ }
1668
+
1669
+ if (!Util.isUnset(request.scaleType)) {
1670
+ body["scaleType"] = request.scaleType;
1671
+ }
1672
+
1673
+ if (!Util.isUnset(request.storageSize)) {
1674
+ body["storageSize"] = request.storageSize;
1675
+ }
1676
+
1677
+ let req = new $OpenApi.OpenApiRequest({
1678
+ headers: headers,
1679
+ body: OpenApiUtil.parseToMap(body),
1680
+ });
1681
+ let params = new $OpenApi.Params({
1682
+ action: "ScaleInstance",
1683
+ version: "2022-06-01",
1684
+ protocol: "HTTPS",
1685
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/scale`,
1686
+ method: "POST",
1687
+ authType: "AK",
1688
+ style: "ROA",
1689
+ reqBodyType: "json",
1690
+ bodyType: "json",
1691
+ });
1692
+ return $tea.cast<ScaleInstanceResponse>(await this.callApi(params, req, runtime), new ScaleInstanceResponse({}));
1693
+ }
1694
+
1695
+ /**
1696
+ * > Before you call this operation, make sure that you understand the billing method and pricing of Hologres because this operation is charged.
1697
+ * * For more information about the billing details of Hologres, see [Billing overview](https://www.alibabacloud.com/help/en/hologres/product-overview/billing-overview).
1698
+ * * During the change of computing resource specifications of a Hologres instance, the instance is unavailable. During the change of storage resources of a Hologres instance, the instance can work normally. Do not frequently change instance specifications. For more information, see [Upgrade and downgrade instance specifications](https://www.alibabacloud.com/help/en/hologres/product-overview/upgrade-or-downgrade-instance-specifications?spm=a2c63.p38356.0.0.2bb57c8dbVt68U).
1699
+ *
1700
+ * @param request ScaleInstanceRequest
1701
+ * @return ScaleInstanceResponse
1702
+ */
1703
+ async scaleInstance(instanceId: string, request: ScaleInstanceRequest): Promise<ScaleInstanceResponse> {
1704
+ let runtime = new $Util.RuntimeOptions({ });
1705
+ let headers : {[key: string ]: string} = { };
1706
+ return await this.scaleInstanceWithOptions(instanceId, request, headers, runtime);
1707
+ }
1708
+
1709
+ async stopInstanceWithOptions(instanceId: string, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<StopInstanceResponse> {
1710
+ let req = new $OpenApi.OpenApiRequest({
1711
+ headers: headers,
1712
+ });
1713
+ let params = new $OpenApi.Params({
1714
+ action: "StopInstance",
1715
+ version: "2022-06-01",
1716
+ protocol: "HTTPS",
1717
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/stop`,
1718
+ method: "POST",
1719
+ authType: "AK",
1720
+ style: "ROA",
1721
+ reqBodyType: "json",
1722
+ bodyType: "json",
1723
+ });
1724
+ return $tea.cast<StopInstanceResponse>(await this.callApi(params, req, runtime), new StopInstanceResponse({}));
1725
+ }
1726
+
1727
+ async stopInstance(instanceId: string): Promise<StopInstanceResponse> {
1728
+ let runtime = new $Util.RuntimeOptions({ });
1729
+ let headers : {[key: string ]: string} = { };
1730
+ return await this.stopInstanceWithOptions(instanceId, headers, runtime);
1731
+ }
1732
+
1733
+ async updateInstanceNameWithOptions(instanceId: string, request: UpdateInstanceNameRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<UpdateInstanceNameResponse> {
1734
+ Util.validateModel(request);
1735
+ let body : {[key: string ]: any} = { };
1736
+ if (!Util.isUnset(request.instanceName)) {
1737
+ body["instanceName"] = request.instanceName;
1738
+ }
1739
+
1740
+ let req = new $OpenApi.OpenApiRequest({
1741
+ headers: headers,
1742
+ body: OpenApiUtil.parseToMap(body),
1743
+ });
1744
+ let params = new $OpenApi.Params({
1745
+ action: "UpdateInstanceName",
1746
+ version: "2022-06-01",
1747
+ protocol: "HTTPS",
1748
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/instanceName`,
1749
+ method: "POST",
1750
+ authType: "AK",
1751
+ style: "ROA",
1752
+ reqBodyType: "json",
1753
+ bodyType: "json",
1754
+ });
1755
+ return $tea.cast<UpdateInstanceNameResponse>(await this.callApi(params, req, runtime), new UpdateInstanceNameResponse({}));
1756
+ }
1757
+
1758
+ async updateInstanceName(instanceId: string, request: UpdateInstanceNameRequest): Promise<UpdateInstanceNameResponse> {
1759
+ let runtime = new $Util.RuntimeOptions({ });
1760
+ let headers : {[key: string ]: string} = { };
1761
+ return await this.updateInstanceNameWithOptions(instanceId, request, headers, runtime);
1762
+ }
1763
+
1764
+ async updateInstanceNetworkTypeWithOptions(instanceId: string, request: UpdateInstanceNetworkTypeRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<UpdateInstanceNetworkTypeResponse> {
1765
+ Util.validateModel(request);
1766
+ let body : {[key: string ]: any} = { };
1767
+ if (!Util.isUnset(request.anyTunnelToSingleTunnel)) {
1768
+ body["anyTunnelToSingleTunnel"] = request.anyTunnelToSingleTunnel;
1769
+ }
1770
+
1771
+ if (!Util.isUnset(request.networkTypes)) {
1772
+ body["networkTypes"] = request.networkTypes;
1773
+ }
1774
+
1775
+ if (!Util.isUnset(request.vSwitchId)) {
1776
+ body["vSwitchId"] = request.vSwitchId;
1777
+ }
1778
+
1779
+ if (!Util.isUnset(request.vpcId)) {
1780
+ body["vpcId"] = request.vpcId;
1781
+ }
1782
+
1783
+ if (!Util.isUnset(request.vpcOwnerId)) {
1784
+ body["vpcOwnerId"] = request.vpcOwnerId;
1785
+ }
1786
+
1787
+ if (!Util.isUnset(request.vpcRegionId)) {
1788
+ body["vpcRegionId"] = request.vpcRegionId;
1789
+ }
1790
+
1791
+ let req = new $OpenApi.OpenApiRequest({
1792
+ headers: headers,
1793
+ body: OpenApiUtil.parseToMap(body),
1794
+ });
1795
+ let params = new $OpenApi.Params({
1796
+ action: "UpdateInstanceNetworkType",
1797
+ version: "2022-06-01",
1798
+ protocol: "HTTPS",
1799
+ pathname: `/api/v1/instances/${OpenApiUtil.getEncodeParam(instanceId)}/network`,
1800
+ method: "POST",
1801
+ authType: "AK",
1802
+ style: "ROA",
1803
+ reqBodyType: "json",
1804
+ bodyType: "json",
1805
+ });
1806
+ return $tea.cast<UpdateInstanceNetworkTypeResponse>(await this.callApi(params, req, runtime), new UpdateInstanceNetworkTypeResponse({}));
1807
+ }
1808
+
1809
+ async updateInstanceNetworkType(instanceId: string, request: UpdateInstanceNetworkTypeRequest): Promise<UpdateInstanceNetworkTypeResponse> {
1810
+ let runtime = new $Util.RuntimeOptions({ });
1811
+ let headers : {[key: string ]: string} = { };
1812
+ return await this.updateInstanceNetworkTypeWithOptions(instanceId, request, headers, runtime);
1813
+ }
1814
+
1815
+ }