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