@alicloud/emr-serverless-spark20230808 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,1607 @@
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 Artifact extends $tea.Model {
12
+ bizId?: string;
13
+ creator?: number;
14
+ credential?: Credential;
15
+ gmtCreated?: string;
16
+ gmtModified?: string;
17
+ location?: string;
18
+ modifier?: number;
19
+ name?: string;
20
+ static names(): { [key: string]: string } {
21
+ return {
22
+ bizId: 'bizId',
23
+ creator: 'creator',
24
+ credential: 'credential',
25
+ gmtCreated: 'gmtCreated',
26
+ gmtModified: 'gmtModified',
27
+ location: 'location',
28
+ modifier: 'modifier',
29
+ name: 'name',
30
+ };
31
+ }
32
+
33
+ static types(): { [key: string]: any } {
34
+ return {
35
+ bizId: 'string',
36
+ creator: 'number',
37
+ credential: Credential,
38
+ gmtCreated: 'string',
39
+ gmtModified: 'string',
40
+ location: 'string',
41
+ modifier: 'number',
42
+ name: 'string',
43
+ };
44
+ }
45
+
46
+ constructor(map?: { [key: string]: any }) {
47
+ super(map);
48
+ }
49
+ }
50
+
51
+ export class Category extends $tea.Model {
52
+ bizId?: string;
53
+ creator?: number;
54
+ gmtCreated?: string;
55
+ gmtModified?: string;
56
+ modifier?: number;
57
+ name?: string;
58
+ parentBizId?: string;
59
+ type?: string;
60
+ static names(): { [key: string]: string } {
61
+ return {
62
+ bizId: 'bizId',
63
+ creator: 'creator',
64
+ gmtCreated: 'gmtCreated',
65
+ gmtModified: 'gmtModified',
66
+ modifier: 'modifier',
67
+ name: 'name',
68
+ parentBizId: 'parentBizId',
69
+ type: 'type',
70
+ };
71
+ }
72
+
73
+ static types(): { [key: string]: any } {
74
+ return {
75
+ bizId: 'string',
76
+ creator: 'number',
77
+ gmtCreated: 'string',
78
+ gmtModified: 'string',
79
+ modifier: 'number',
80
+ name: 'string',
81
+ parentBizId: 'string',
82
+ type: 'string',
83
+ };
84
+ }
85
+
86
+ constructor(map?: { [key: string]: any }) {
87
+ super(map);
88
+ }
89
+ }
90
+
91
+ export class Configuration extends $tea.Model {
92
+ configFileName?: string;
93
+ configItemKey?: string;
94
+ configItemValue?: string;
95
+ static names(): { [key: string]: string } {
96
+ return {
97
+ configFileName: 'configFileName',
98
+ configItemKey: 'configItemKey',
99
+ configItemValue: 'configItemValue',
100
+ };
101
+ }
102
+
103
+ static types(): { [key: string]: any } {
104
+ return {
105
+ configFileName: 'string',
106
+ configItemKey: 'string',
107
+ configItemValue: 'string',
108
+ };
109
+ }
110
+
111
+ constructor(map?: { [key: string]: any }) {
112
+ super(map);
113
+ }
114
+ }
115
+
116
+ export class Credential extends $tea.Model {
117
+ accessId?: string;
118
+ dir?: string;
119
+ expire?: string;
120
+ host?: string;
121
+ policy?: string;
122
+ securityToken?: string;
123
+ signature?: string;
124
+ static names(): { [key: string]: string } {
125
+ return {
126
+ accessId: 'accessId',
127
+ dir: 'dir',
128
+ expire: 'expire',
129
+ host: 'host',
130
+ policy: 'policy',
131
+ securityToken: 'securityToken',
132
+ signature: 'signature',
133
+ };
134
+ }
135
+
136
+ static types(): { [key: string]: any } {
137
+ return {
138
+ accessId: 'string',
139
+ dir: 'string',
140
+ expire: 'string',
141
+ host: 'string',
142
+ policy: 'string',
143
+ securityToken: 'string',
144
+ signature: 'string',
145
+ };
146
+ }
147
+
148
+ constructor(map?: { [key: string]: any }) {
149
+ super(map);
150
+ }
151
+ }
152
+
153
+ export class JobDriver extends $tea.Model {
154
+ sparkSubmit?: JobDriverSparkSubmit;
155
+ static names(): { [key: string]: string } {
156
+ return {
157
+ sparkSubmit: 'sparkSubmit',
158
+ };
159
+ }
160
+
161
+ static types(): { [key: string]: any } {
162
+ return {
163
+ sparkSubmit: JobDriverSparkSubmit,
164
+ };
165
+ }
166
+
167
+ constructor(map?: { [key: string]: any }) {
168
+ super(map);
169
+ }
170
+ }
171
+
172
+ export class PrincipalAction extends $tea.Model {
173
+ actionArn?: string;
174
+ principalArn?: string;
175
+ static names(): { [key: string]: string } {
176
+ return {
177
+ actionArn: 'actionArn',
178
+ principalArn: 'principalArn',
179
+ };
180
+ }
181
+
182
+ static types(): { [key: string]: any } {
183
+ return {
184
+ actionArn: 'string',
185
+ principalArn: 'string',
186
+ };
187
+ }
188
+
189
+ constructor(map?: { [key: string]: any }) {
190
+ super(map);
191
+ }
192
+ }
193
+
194
+ export class ReleaseVersionImage extends $tea.Model {
195
+ cpuArchitecture?: string;
196
+ imageId?: string;
197
+ runtimeEngineType?: string;
198
+ static names(): { [key: string]: string } {
199
+ return {
200
+ cpuArchitecture: 'cpuArchitecture',
201
+ imageId: 'imageId',
202
+ runtimeEngineType: 'runtimeEngineType',
203
+ };
204
+ }
205
+
206
+ static types(): { [key: string]: any } {
207
+ return {
208
+ cpuArchitecture: 'string',
209
+ imageId: 'string',
210
+ runtimeEngineType: 'string',
211
+ };
212
+ }
213
+
214
+ constructor(map?: { [key: string]: any }) {
215
+ super(map);
216
+ }
217
+ }
218
+
219
+ export class RunLog extends $tea.Model {
220
+ driverStdError?: string;
221
+ driverStdOut?: string;
222
+ static names(): { [key: string]: string } {
223
+ return {
224
+ driverStdError: 'driverStdError',
225
+ driverStdOut: 'driverStdOut',
226
+ };
227
+ }
228
+
229
+ static types(): { [key: string]: any } {
230
+ return {
231
+ driverStdError: 'string',
232
+ driverStdOut: 'string',
233
+ };
234
+ }
235
+
236
+ constructor(map?: { [key: string]: any }) {
237
+ super(map);
238
+ }
239
+ }
240
+
241
+ export class SparkConf extends $tea.Model {
242
+ key?: string;
243
+ value?: string;
244
+ static names(): { [key: string]: string } {
245
+ return {
246
+ key: 'key',
247
+ value: 'value',
248
+ };
249
+ }
250
+
251
+ static types(): { [key: string]: any } {
252
+ return {
253
+ key: 'string',
254
+ value: 'string',
255
+ };
256
+ }
257
+
258
+ constructor(map?: { [key: string]: any }) {
259
+ super(map);
260
+ }
261
+ }
262
+
263
+ export class SqlOutput extends $tea.Model {
264
+ rows?: SqlOutputRows[];
265
+ schema?: SqlOutputSchema;
266
+ static names(): { [key: string]: string } {
267
+ return {
268
+ rows: 'rows',
269
+ schema: 'schema',
270
+ };
271
+ }
272
+
273
+ static types(): { [key: string]: any } {
274
+ return {
275
+ rows: { 'type': 'array', 'itemType': SqlOutputRows },
276
+ schema: SqlOutputSchema,
277
+ };
278
+ }
279
+
280
+ constructor(map?: { [key: string]: any }) {
281
+ super(map);
282
+ }
283
+ }
284
+
285
+ export class Tag extends $tea.Model {
286
+ key?: string;
287
+ value?: string;
288
+ static names(): { [key: string]: string } {
289
+ return {
290
+ key: 'key',
291
+ value: 'value',
292
+ };
293
+ }
294
+
295
+ static types(): { [key: string]: any } {
296
+ return {
297
+ key: 'string',
298
+ value: 'string',
299
+ };
300
+ }
301
+
302
+ constructor(map?: { [key: string]: any }) {
303
+ super(map);
304
+ }
305
+ }
306
+
307
+ export class Task extends $tea.Model {
308
+ artifactUrl?: string;
309
+ bizId?: string;
310
+ categoryBizId?: string;
311
+ content?: string;
312
+ creator?: number;
313
+ defaultCatalogId?: string;
314
+ defaultDatabase?: string;
315
+ defaultResourceQueueId?: string;
316
+ defaultSqlComputeId?: string;
317
+ extraArtifactIds?: string[];
318
+ gmtCreated?: string;
319
+ gmtModified?: string;
320
+ hasChanged?: boolean;
321
+ hasCommited?: boolean;
322
+ lastRunResourceQueueId?: string;
323
+ modifier?: number;
324
+ name?: string;
325
+ pyFiles?: string[];
326
+ sparkArgs?: string;
327
+ sparkConf?: SparkConf[];
328
+ sparkDriverCores?: number;
329
+ sparkDriverMemory?: number;
330
+ sparkEntrypoint?: string;
331
+ sparkExecutorCores?: number;
332
+ sparkExecutorMemory?: number;
333
+ sparkLogLevel?: string;
334
+ sparkLogPath?: string;
335
+ sparkVersion?: string;
336
+ tags?: { [key: string]: string };
337
+ type?: string;
338
+ static names(): { [key: string]: string } {
339
+ return {
340
+ artifactUrl: 'artifactUrl',
341
+ bizId: 'bizId',
342
+ categoryBizId: 'categoryBizId',
343
+ content: 'content',
344
+ creator: 'creator',
345
+ defaultCatalogId: 'defaultCatalogId',
346
+ defaultDatabase: 'defaultDatabase',
347
+ defaultResourceQueueId: 'defaultResourceQueueId',
348
+ defaultSqlComputeId: 'defaultSqlComputeId',
349
+ extraArtifactIds: 'extraArtifactIds',
350
+ gmtCreated: 'gmtCreated',
351
+ gmtModified: 'gmtModified',
352
+ hasChanged: 'hasChanged',
353
+ hasCommited: 'hasCommited',
354
+ lastRunResourceQueueId: 'lastRunResourceQueueId',
355
+ modifier: 'modifier',
356
+ name: 'name',
357
+ pyFiles: 'pyFiles',
358
+ sparkArgs: 'sparkArgs',
359
+ sparkConf: 'sparkConf',
360
+ sparkDriverCores: 'sparkDriverCores',
361
+ sparkDriverMemory: 'sparkDriverMemory',
362
+ sparkEntrypoint: 'sparkEntrypoint',
363
+ sparkExecutorCores: 'sparkExecutorCores',
364
+ sparkExecutorMemory: 'sparkExecutorMemory',
365
+ sparkLogLevel: 'sparkLogLevel',
366
+ sparkLogPath: 'sparkLogPath',
367
+ sparkVersion: 'sparkVersion',
368
+ tags: 'tags',
369
+ type: 'type',
370
+ };
371
+ }
372
+
373
+ static types(): { [key: string]: any } {
374
+ return {
375
+ artifactUrl: 'string',
376
+ bizId: 'string',
377
+ categoryBizId: 'string',
378
+ content: 'string',
379
+ creator: 'number',
380
+ defaultCatalogId: 'string',
381
+ defaultDatabase: 'string',
382
+ defaultResourceQueueId: 'string',
383
+ defaultSqlComputeId: 'string',
384
+ extraArtifactIds: { 'type': 'array', 'itemType': 'string' },
385
+ gmtCreated: 'string',
386
+ gmtModified: 'string',
387
+ hasChanged: 'boolean',
388
+ hasCommited: 'boolean',
389
+ lastRunResourceQueueId: 'string',
390
+ modifier: 'number',
391
+ name: 'string',
392
+ pyFiles: { 'type': 'array', 'itemType': 'string' },
393
+ sparkArgs: 'string',
394
+ sparkConf: { 'type': 'array', 'itemType': SparkConf },
395
+ sparkDriverCores: 'number',
396
+ sparkDriverMemory: 'number',
397
+ sparkEntrypoint: 'string',
398
+ sparkExecutorCores: 'number',
399
+ sparkExecutorMemory: 'number',
400
+ sparkLogLevel: 'string',
401
+ sparkLogPath: 'string',
402
+ sparkVersion: 'string',
403
+ tags: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
404
+ type: 'string',
405
+ };
406
+ }
407
+
408
+ constructor(map?: { [key: string]: any }) {
409
+ super(map);
410
+ }
411
+ }
412
+
413
+ export class TaskInstance extends $tea.Model {
414
+ bizId?: string;
415
+ creator?: number;
416
+ fenixRunId?: string;
417
+ gmtCreated?: string;
418
+ taskBizId?: string;
419
+ taskInfo?: Task;
420
+ taskStatus?: string;
421
+ workspaceBizId?: string;
422
+ static names(): { [key: string]: string } {
423
+ return {
424
+ bizId: 'bizId',
425
+ creator: 'creator',
426
+ fenixRunId: 'fenixRunId',
427
+ gmtCreated: 'gmtCreated',
428
+ taskBizId: 'taskBizId',
429
+ taskInfo: 'taskInfo',
430
+ taskStatus: 'taskStatus',
431
+ workspaceBizId: 'workspaceBizId',
432
+ };
433
+ }
434
+
435
+ static types(): { [key: string]: any } {
436
+ return {
437
+ bizId: 'string',
438
+ creator: 'number',
439
+ fenixRunId: 'string',
440
+ gmtCreated: 'string',
441
+ taskBizId: 'string',
442
+ taskInfo: Task,
443
+ taskStatus: 'string',
444
+ workspaceBizId: 'string',
445
+ };
446
+ }
447
+
448
+ constructor(map?: { [key: string]: any }) {
449
+ super(map);
450
+ }
451
+ }
452
+
453
+ export class TaskSnapshot extends $tea.Model {
454
+ bizId?: string;
455
+ commiter?: number;
456
+ gmtCreated?: string;
457
+ item?: Task;
458
+ message?: string;
459
+ taskBizId?: string;
460
+ version?: string;
461
+ static names(): { [key: string]: string } {
462
+ return {
463
+ bizId: 'bizId',
464
+ commiter: 'commiter',
465
+ gmtCreated: 'gmtCreated',
466
+ item: 'item',
467
+ message: 'message',
468
+ taskBizId: 'taskBizId',
469
+ version: 'version',
470
+ };
471
+ }
472
+
473
+ static types(): { [key: string]: any } {
474
+ return {
475
+ bizId: 'string',
476
+ commiter: 'number',
477
+ gmtCreated: 'string',
478
+ item: Task,
479
+ message: 'string',
480
+ taskBizId: 'string',
481
+ version: 'string',
482
+ };
483
+ }
484
+
485
+ constructor(map?: { [key: string]: any }) {
486
+ super(map);
487
+ }
488
+ }
489
+
490
+ export class Template extends $tea.Model {
491
+ creator?: number;
492
+ gmtCreated?: string;
493
+ gmtModified?: string;
494
+ modifier?: number;
495
+ sparkConf?: SparkConf[];
496
+ sparkDriverCores?: number;
497
+ sparkDriverMemory?: number;
498
+ sparkExecutorCores?: number;
499
+ sparkExecutorMemory?: number;
500
+ sparkLogLevel?: string;
501
+ sparkLogPath?: string;
502
+ sparkVersion?: string;
503
+ templateType?: string;
504
+ static names(): { [key: string]: string } {
505
+ return {
506
+ creator: 'creator',
507
+ gmtCreated: 'gmtCreated',
508
+ gmtModified: 'gmtModified',
509
+ modifier: 'modifier',
510
+ sparkConf: 'sparkConf',
511
+ sparkDriverCores: 'sparkDriverCores',
512
+ sparkDriverMemory: 'sparkDriverMemory',
513
+ sparkExecutorCores: 'sparkExecutorCores',
514
+ sparkExecutorMemory: 'sparkExecutorMemory',
515
+ sparkLogLevel: 'sparkLogLevel',
516
+ sparkLogPath: 'sparkLogPath',
517
+ sparkVersion: 'sparkVersion',
518
+ templateType: 'templateType',
519
+ };
520
+ }
521
+
522
+ static types(): { [key: string]: any } {
523
+ return {
524
+ creator: 'number',
525
+ gmtCreated: 'string',
526
+ gmtModified: 'string',
527
+ modifier: 'number',
528
+ sparkConf: { 'type': 'array', 'itemType': SparkConf },
529
+ sparkDriverCores: 'number',
530
+ sparkDriverMemory: 'number',
531
+ sparkExecutorCores: 'number',
532
+ sparkExecutorMemory: 'number',
533
+ sparkLogLevel: 'string',
534
+ sparkLogPath: 'string',
535
+ sparkVersion: 'string',
536
+ templateType: 'string',
537
+ };
538
+ }
539
+
540
+ constructor(map?: { [key: string]: any }) {
541
+ super(map);
542
+ }
543
+ }
544
+
545
+ export class TimeRange extends $tea.Model {
546
+ endTime?: number;
547
+ startTime?: number;
548
+ static names(): { [key: string]: string } {
549
+ return {
550
+ endTime: 'endTime',
551
+ startTime: 'startTime',
552
+ };
553
+ }
554
+
555
+ static types(): { [key: string]: any } {
556
+ return {
557
+ endTime: 'number',
558
+ startTime: 'number',
559
+ };
560
+ }
561
+
562
+ constructor(map?: { [key: string]: any }) {
563
+ super(map);
564
+ }
565
+ }
566
+
567
+ export class CancelJobRunRequest extends $tea.Model {
568
+ regionId?: string;
569
+ static names(): { [key: string]: string } {
570
+ return {
571
+ regionId: 'regionId',
572
+ };
573
+ }
574
+
575
+ static types(): { [key: string]: any } {
576
+ return {
577
+ regionId: 'string',
578
+ };
579
+ }
580
+
581
+ constructor(map?: { [key: string]: any }) {
582
+ super(map);
583
+ }
584
+ }
585
+
586
+ export class CancelJobRunResponseBody extends $tea.Model {
587
+ jobRunId?: string;
588
+ requestId?: string;
589
+ static names(): { [key: string]: string } {
590
+ return {
591
+ jobRunId: 'jobRunId',
592
+ requestId: 'requestId',
593
+ };
594
+ }
595
+
596
+ static types(): { [key: string]: any } {
597
+ return {
598
+ jobRunId: 'string',
599
+ requestId: 'string',
600
+ };
601
+ }
602
+
603
+ constructor(map?: { [key: string]: any }) {
604
+ super(map);
605
+ }
606
+ }
607
+
608
+ export class CancelJobRunResponse extends $tea.Model {
609
+ headers?: { [key: string]: string };
610
+ statusCode?: number;
611
+ body?: CancelJobRunResponseBody;
612
+ static names(): { [key: string]: string } {
613
+ return {
614
+ headers: 'headers',
615
+ statusCode: 'statusCode',
616
+ body: 'body',
617
+ };
618
+ }
619
+
620
+ static types(): { [key: string]: any } {
621
+ return {
622
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
623
+ statusCode: 'number',
624
+ body: CancelJobRunResponseBody,
625
+ };
626
+ }
627
+
628
+ constructor(map?: { [key: string]: any }) {
629
+ super(map);
630
+ }
631
+ }
632
+
633
+ export class GetJobRunRequest extends $tea.Model {
634
+ regionId?: string;
635
+ static names(): { [key: string]: string } {
636
+ return {
637
+ regionId: 'regionId',
638
+ };
639
+ }
640
+
641
+ static types(): { [key: string]: any } {
642
+ return {
643
+ regionId: 'string',
644
+ };
645
+ }
646
+
647
+ constructor(map?: { [key: string]: any }) {
648
+ super(map);
649
+ }
650
+ }
651
+
652
+ export class GetJobRunResponseBody extends $tea.Model {
653
+ jobRun?: GetJobRunResponseBodyJobRun;
654
+ requestId?: string;
655
+ static names(): { [key: string]: string } {
656
+ return {
657
+ jobRun: 'jobRun',
658
+ requestId: 'requestId',
659
+ };
660
+ }
661
+
662
+ static types(): { [key: string]: any } {
663
+ return {
664
+ jobRun: GetJobRunResponseBodyJobRun,
665
+ requestId: 'string',
666
+ };
667
+ }
668
+
669
+ constructor(map?: { [key: string]: any }) {
670
+ super(map);
671
+ }
672
+ }
673
+
674
+ export class GetJobRunResponse extends $tea.Model {
675
+ headers?: { [key: string]: string };
676
+ statusCode?: number;
677
+ body?: GetJobRunResponseBody;
678
+ static names(): { [key: string]: string } {
679
+ return {
680
+ headers: 'headers',
681
+ statusCode: 'statusCode',
682
+ body: 'body',
683
+ };
684
+ }
685
+
686
+ static types(): { [key: string]: any } {
687
+ return {
688
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
689
+ statusCode: 'number',
690
+ body: GetJobRunResponseBody,
691
+ };
692
+ }
693
+
694
+ constructor(map?: { [key: string]: any }) {
695
+ super(map);
696
+ }
697
+ }
698
+
699
+ export class ListJobRunsRequest extends $tea.Model {
700
+ creator?: string;
701
+ endTime?: ListJobRunsRequestEndTime;
702
+ jobRunId?: string;
703
+ maxResults?: number;
704
+ name?: string;
705
+ nextToken?: string;
706
+ regionId?: string;
707
+ resourceQueueId?: string;
708
+ startTime?: ListJobRunsRequestStartTime;
709
+ states?: string[];
710
+ tags?: ListJobRunsRequestTags[];
711
+ static names(): { [key: string]: string } {
712
+ return {
713
+ creator: 'creator',
714
+ endTime: 'endTime',
715
+ jobRunId: 'jobRunId',
716
+ maxResults: 'maxResults',
717
+ name: 'name',
718
+ nextToken: 'nextToken',
719
+ regionId: 'regionId',
720
+ resourceQueueId: 'resourceQueueId',
721
+ startTime: 'startTime',
722
+ states: 'states',
723
+ tags: 'tags',
724
+ };
725
+ }
726
+
727
+ static types(): { [key: string]: any } {
728
+ return {
729
+ creator: 'string',
730
+ endTime: ListJobRunsRequestEndTime,
731
+ jobRunId: 'string',
732
+ maxResults: 'number',
733
+ name: 'string',
734
+ nextToken: 'string',
735
+ regionId: 'string',
736
+ resourceQueueId: 'string',
737
+ startTime: ListJobRunsRequestStartTime,
738
+ states: { 'type': 'array', 'itemType': 'string' },
739
+ tags: { 'type': 'array', 'itemType': ListJobRunsRequestTags },
740
+ };
741
+ }
742
+
743
+ constructor(map?: { [key: string]: any }) {
744
+ super(map);
745
+ }
746
+ }
747
+
748
+ export class ListJobRunsShrinkRequest extends $tea.Model {
749
+ creator?: string;
750
+ endTimeShrink?: string;
751
+ jobRunId?: string;
752
+ maxResults?: number;
753
+ name?: string;
754
+ nextToken?: string;
755
+ regionId?: string;
756
+ resourceQueueId?: string;
757
+ startTimeShrink?: string;
758
+ statesShrink?: string;
759
+ tagsShrink?: string;
760
+ static names(): { [key: string]: string } {
761
+ return {
762
+ creator: 'creator',
763
+ endTimeShrink: 'endTime',
764
+ jobRunId: 'jobRunId',
765
+ maxResults: 'maxResults',
766
+ name: 'name',
767
+ nextToken: 'nextToken',
768
+ regionId: 'regionId',
769
+ resourceQueueId: 'resourceQueueId',
770
+ startTimeShrink: 'startTime',
771
+ statesShrink: 'states',
772
+ tagsShrink: 'tags',
773
+ };
774
+ }
775
+
776
+ static types(): { [key: string]: any } {
777
+ return {
778
+ creator: 'string',
779
+ endTimeShrink: 'string',
780
+ jobRunId: 'string',
781
+ maxResults: 'number',
782
+ name: 'string',
783
+ nextToken: 'string',
784
+ regionId: 'string',
785
+ resourceQueueId: 'string',
786
+ startTimeShrink: 'string',
787
+ statesShrink: 'string',
788
+ tagsShrink: 'string',
789
+ };
790
+ }
791
+
792
+ constructor(map?: { [key: string]: any }) {
793
+ super(map);
794
+ }
795
+ }
796
+
797
+ export class ListJobRunsResponseBody extends $tea.Model {
798
+ jobRuns?: ListJobRunsResponseBodyJobRuns[];
799
+ maxResults?: number;
800
+ nextToken?: string;
801
+ requestId?: string;
802
+ totalCount?: number;
803
+ static names(): { [key: string]: string } {
804
+ return {
805
+ jobRuns: 'jobRuns',
806
+ maxResults: 'maxResults',
807
+ nextToken: 'nextToken',
808
+ requestId: 'requestId',
809
+ totalCount: 'totalCount',
810
+ };
811
+ }
812
+
813
+ static types(): { [key: string]: any } {
814
+ return {
815
+ jobRuns: { 'type': 'array', 'itemType': ListJobRunsResponseBodyJobRuns },
816
+ maxResults: 'number',
817
+ nextToken: 'string',
818
+ requestId: 'string',
819
+ totalCount: 'number',
820
+ };
821
+ }
822
+
823
+ constructor(map?: { [key: string]: any }) {
824
+ super(map);
825
+ }
826
+ }
827
+
828
+ export class ListJobRunsResponse extends $tea.Model {
829
+ headers?: { [key: string]: string };
830
+ statusCode?: number;
831
+ body?: ListJobRunsResponseBody;
832
+ static names(): { [key: string]: string } {
833
+ return {
834
+ headers: 'headers',
835
+ statusCode: 'statusCode',
836
+ body: 'body',
837
+ };
838
+ }
839
+
840
+ static types(): { [key: string]: any } {
841
+ return {
842
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
843
+ statusCode: 'number',
844
+ body: ListJobRunsResponseBody,
845
+ };
846
+ }
847
+
848
+ constructor(map?: { [key: string]: any }) {
849
+ super(map);
850
+ }
851
+ }
852
+
853
+ export class StartJobRunRequest extends $tea.Model {
854
+ clientToken?: string;
855
+ codeType?: string;
856
+ configurationOverrides?: StartJobRunRequestConfigurationOverrides;
857
+ executionTimeoutSeconds?: number;
858
+ jobDriver?: JobDriver;
859
+ jobId?: string;
860
+ name?: string;
861
+ releaseVersion?: string;
862
+ resourceQueueId?: string;
863
+ tags?: Tag[];
864
+ regionId?: string;
865
+ static names(): { [key: string]: string } {
866
+ return {
867
+ clientToken: 'clientToken',
868
+ codeType: 'codeType',
869
+ configurationOverrides: 'configurationOverrides',
870
+ executionTimeoutSeconds: 'executionTimeoutSeconds',
871
+ jobDriver: 'jobDriver',
872
+ jobId: 'jobId',
873
+ name: 'name',
874
+ releaseVersion: 'releaseVersion',
875
+ resourceQueueId: 'resourceQueueId',
876
+ tags: 'tags',
877
+ regionId: 'regionId',
878
+ };
879
+ }
880
+
881
+ static types(): { [key: string]: any } {
882
+ return {
883
+ clientToken: 'string',
884
+ codeType: 'string',
885
+ configurationOverrides: StartJobRunRequestConfigurationOverrides,
886
+ executionTimeoutSeconds: 'number',
887
+ jobDriver: JobDriver,
888
+ jobId: 'string',
889
+ name: 'string',
890
+ releaseVersion: 'string',
891
+ resourceQueueId: 'string',
892
+ tags: { 'type': 'array', 'itemType': Tag },
893
+ regionId: 'string',
894
+ };
895
+ }
896
+
897
+ constructor(map?: { [key: string]: any }) {
898
+ super(map);
899
+ }
900
+ }
901
+
902
+ export class StartJobRunResponseBody extends $tea.Model {
903
+ jobRunId?: string;
904
+ requestId?: string;
905
+ static names(): { [key: string]: string } {
906
+ return {
907
+ jobRunId: 'jobRunId',
908
+ requestId: 'requestId',
909
+ };
910
+ }
911
+
912
+ static types(): { [key: string]: any } {
913
+ return {
914
+ jobRunId: 'string',
915
+ requestId: 'string',
916
+ };
917
+ }
918
+
919
+ constructor(map?: { [key: string]: any }) {
920
+ super(map);
921
+ }
922
+ }
923
+
924
+ export class StartJobRunResponse extends $tea.Model {
925
+ headers?: { [key: string]: string };
926
+ statusCode?: number;
927
+ body?: StartJobRunResponseBody;
928
+ static names(): { [key: string]: string } {
929
+ return {
930
+ headers: 'headers',
931
+ statusCode: 'statusCode',
932
+ body: 'body',
933
+ };
934
+ }
935
+
936
+ static types(): { [key: string]: any } {
937
+ return {
938
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
939
+ statusCode: 'number',
940
+ body: StartJobRunResponseBody,
941
+ };
942
+ }
943
+
944
+ constructor(map?: { [key: string]: any }) {
945
+ super(map);
946
+ }
947
+ }
948
+
949
+ export class JobDriverSparkSubmit extends $tea.Model {
950
+ entryPoint?: string;
951
+ entryPointArguments?: string[];
952
+ sparkSubmitParameters?: string;
953
+ static names(): { [key: string]: string } {
954
+ return {
955
+ entryPoint: 'entryPoint',
956
+ entryPointArguments: 'entryPointArguments',
957
+ sparkSubmitParameters: 'sparkSubmitParameters',
958
+ };
959
+ }
960
+
961
+ static types(): { [key: string]: any } {
962
+ return {
963
+ entryPoint: 'string',
964
+ entryPointArguments: { 'type': 'array', 'itemType': 'string' },
965
+ sparkSubmitParameters: 'string',
966
+ };
967
+ }
968
+
969
+ constructor(map?: { [key: string]: any }) {
970
+ super(map);
971
+ }
972
+ }
973
+
974
+ export class SqlOutputRows extends $tea.Model {
975
+ values?: string[];
976
+ static names(): { [key: string]: string } {
977
+ return {
978
+ values: 'values',
979
+ };
980
+ }
981
+
982
+ static types(): { [key: string]: any } {
983
+ return {
984
+ values: { 'type': 'array', 'itemType': 'string' },
985
+ };
986
+ }
987
+
988
+ constructor(map?: { [key: string]: any }) {
989
+ super(map);
990
+ }
991
+ }
992
+
993
+ export class SqlOutputSchemaFields extends $tea.Model {
994
+ name?: string;
995
+ nullable?: boolean;
996
+ type?: string;
997
+ static names(): { [key: string]: string } {
998
+ return {
999
+ name: 'name',
1000
+ nullable: 'nullable',
1001
+ type: 'type',
1002
+ };
1003
+ }
1004
+
1005
+ static types(): { [key: string]: any } {
1006
+ return {
1007
+ name: 'string',
1008
+ nullable: 'boolean',
1009
+ type: 'string',
1010
+ };
1011
+ }
1012
+
1013
+ constructor(map?: { [key: string]: any }) {
1014
+ super(map);
1015
+ }
1016
+ }
1017
+
1018
+ export class SqlOutputSchema extends $tea.Model {
1019
+ fields?: SqlOutputSchemaFields[];
1020
+ static names(): { [key: string]: string } {
1021
+ return {
1022
+ fields: 'fields',
1023
+ };
1024
+ }
1025
+
1026
+ static types(): { [key: string]: any } {
1027
+ return {
1028
+ fields: { 'type': 'array', 'itemType': SqlOutputSchemaFields },
1029
+ };
1030
+ }
1031
+
1032
+ constructor(map?: { [key: string]: any }) {
1033
+ super(map);
1034
+ }
1035
+ }
1036
+
1037
+ export class GetJobRunResponseBodyJobRunConfigurationOverrides extends $tea.Model {
1038
+ configurations?: Configuration[];
1039
+ static names(): { [key: string]: string } {
1040
+ return {
1041
+ configurations: 'configurations',
1042
+ };
1043
+ }
1044
+
1045
+ static types(): { [key: string]: any } {
1046
+ return {
1047
+ configurations: { 'type': 'array', 'itemType': Configuration },
1048
+ };
1049
+ }
1050
+
1051
+ constructor(map?: { [key: string]: any }) {
1052
+ super(map);
1053
+ }
1054
+ }
1055
+
1056
+ export class GetJobRunResponseBodyJobRunStateChangeReason extends $tea.Model {
1057
+ code?: string;
1058
+ message?: string;
1059
+ static names(): { [key: string]: string } {
1060
+ return {
1061
+ code: 'code',
1062
+ message: 'message',
1063
+ };
1064
+ }
1065
+
1066
+ static types(): { [key: string]: any } {
1067
+ return {
1068
+ code: 'string',
1069
+ message: 'string',
1070
+ };
1071
+ }
1072
+
1073
+ constructor(map?: { [key: string]: any }) {
1074
+ super(map);
1075
+ }
1076
+ }
1077
+
1078
+ export class GetJobRunResponseBodyJobRun extends $tea.Model {
1079
+ codeType?: string;
1080
+ configurationOverrides?: GetJobRunResponseBodyJobRunConfigurationOverrides;
1081
+ endTime?: number;
1082
+ executionTimeoutSeconds?: number;
1083
+ jobDriver?: JobDriver;
1084
+ jobRunId?: string;
1085
+ log?: RunLog;
1086
+ name?: string;
1087
+ releaseVersion?: string;
1088
+ resourceOwnerId?: string;
1089
+ resourceQueueId?: string;
1090
+ state?: string;
1091
+ stateChangeReason?: GetJobRunResponseBodyJobRunStateChangeReason;
1092
+ submitTime?: number;
1093
+ tags?: Tag[];
1094
+ webUI?: string;
1095
+ workspaceId?: string;
1096
+ static names(): { [key: string]: string } {
1097
+ return {
1098
+ codeType: 'codeType',
1099
+ configurationOverrides: 'configurationOverrides',
1100
+ endTime: 'endTime',
1101
+ executionTimeoutSeconds: 'executionTimeoutSeconds',
1102
+ jobDriver: 'jobDriver',
1103
+ jobRunId: 'jobRunId',
1104
+ log: 'log',
1105
+ name: 'name',
1106
+ releaseVersion: 'releaseVersion',
1107
+ resourceOwnerId: 'resourceOwnerId',
1108
+ resourceQueueId: 'resourceQueueId',
1109
+ state: 'state',
1110
+ stateChangeReason: 'stateChangeReason',
1111
+ submitTime: 'submitTime',
1112
+ tags: 'tags',
1113
+ webUI: 'webUI',
1114
+ workspaceId: 'workspaceId',
1115
+ };
1116
+ }
1117
+
1118
+ static types(): { [key: string]: any } {
1119
+ return {
1120
+ codeType: 'string',
1121
+ configurationOverrides: GetJobRunResponseBodyJobRunConfigurationOverrides,
1122
+ endTime: 'number',
1123
+ executionTimeoutSeconds: 'number',
1124
+ jobDriver: JobDriver,
1125
+ jobRunId: 'string',
1126
+ log: RunLog,
1127
+ name: 'string',
1128
+ releaseVersion: 'string',
1129
+ resourceOwnerId: 'string',
1130
+ resourceQueueId: 'string',
1131
+ state: 'string',
1132
+ stateChangeReason: GetJobRunResponseBodyJobRunStateChangeReason,
1133
+ submitTime: 'number',
1134
+ tags: { 'type': 'array', 'itemType': Tag },
1135
+ webUI: 'string',
1136
+ workspaceId: 'string',
1137
+ };
1138
+ }
1139
+
1140
+ constructor(map?: { [key: string]: any }) {
1141
+ super(map);
1142
+ }
1143
+ }
1144
+
1145
+ export class ListJobRunsRequestEndTime extends $tea.Model {
1146
+ endTime?: number;
1147
+ startTime?: number;
1148
+ static names(): { [key: string]: string } {
1149
+ return {
1150
+ endTime: 'endTime',
1151
+ startTime: 'startTime',
1152
+ };
1153
+ }
1154
+
1155
+ static types(): { [key: string]: any } {
1156
+ return {
1157
+ endTime: 'number',
1158
+ startTime: 'number',
1159
+ };
1160
+ }
1161
+
1162
+ constructor(map?: { [key: string]: any }) {
1163
+ super(map);
1164
+ }
1165
+ }
1166
+
1167
+ export class ListJobRunsRequestStartTime extends $tea.Model {
1168
+ endTime?: number;
1169
+ startTime?: number;
1170
+ static names(): { [key: string]: string } {
1171
+ return {
1172
+ endTime: 'endTime',
1173
+ startTime: 'startTime',
1174
+ };
1175
+ }
1176
+
1177
+ static types(): { [key: string]: any } {
1178
+ return {
1179
+ endTime: 'number',
1180
+ startTime: 'number',
1181
+ };
1182
+ }
1183
+
1184
+ constructor(map?: { [key: string]: any }) {
1185
+ super(map);
1186
+ }
1187
+ }
1188
+
1189
+ export class ListJobRunsRequestTags extends $tea.Model {
1190
+ key?: string;
1191
+ value?: string;
1192
+ static names(): { [key: string]: string } {
1193
+ return {
1194
+ key: 'key',
1195
+ value: 'value',
1196
+ };
1197
+ }
1198
+
1199
+ static types(): { [key: string]: any } {
1200
+ return {
1201
+ key: 'string',
1202
+ value: 'string',
1203
+ };
1204
+ }
1205
+
1206
+ constructor(map?: { [key: string]: any }) {
1207
+ super(map);
1208
+ }
1209
+ }
1210
+
1211
+ export class ListJobRunsResponseBodyJobRunsConfigurationOverrides extends $tea.Model {
1212
+ configurations?: Configuration[];
1213
+ static names(): { [key: string]: string } {
1214
+ return {
1215
+ configurations: 'configurations',
1216
+ };
1217
+ }
1218
+
1219
+ static types(): { [key: string]: any } {
1220
+ return {
1221
+ configurations: { 'type': 'array', 'itemType': Configuration },
1222
+ };
1223
+ }
1224
+
1225
+ constructor(map?: { [key: string]: any }) {
1226
+ super(map);
1227
+ }
1228
+ }
1229
+
1230
+ export class ListJobRunsResponseBodyJobRunsStateChangeReason extends $tea.Model {
1231
+ code?: string;
1232
+ message?: string;
1233
+ static names(): { [key: string]: string } {
1234
+ return {
1235
+ code: 'code',
1236
+ message: 'message',
1237
+ };
1238
+ }
1239
+
1240
+ static types(): { [key: string]: any } {
1241
+ return {
1242
+ code: 'string',
1243
+ message: 'string',
1244
+ };
1245
+ }
1246
+
1247
+ constructor(map?: { [key: string]: any }) {
1248
+ super(map);
1249
+ }
1250
+ }
1251
+
1252
+ export class ListJobRunsResponseBodyJobRuns extends $tea.Model {
1253
+ codeType?: string;
1254
+ configurationOverrides?: ListJobRunsResponseBodyJobRunsConfigurationOverrides;
1255
+ creator?: string;
1256
+ endTime?: number;
1257
+ executionTimeoutSeconds?: number;
1258
+ jobDriver?: JobDriver;
1259
+ jobRunId?: string;
1260
+ log?: RunLog;
1261
+ name?: string;
1262
+ releaseVersion?: string;
1263
+ state?: string;
1264
+ stateChangeReason?: ListJobRunsResponseBodyJobRunsStateChangeReason;
1265
+ submitTime?: number;
1266
+ tags?: Tag[];
1267
+ webUI?: string;
1268
+ workspaceId?: string;
1269
+ static names(): { [key: string]: string } {
1270
+ return {
1271
+ codeType: 'codeType',
1272
+ configurationOverrides: 'configurationOverrides',
1273
+ creator: 'creator',
1274
+ endTime: 'endTime',
1275
+ executionTimeoutSeconds: 'executionTimeoutSeconds',
1276
+ jobDriver: 'jobDriver',
1277
+ jobRunId: 'jobRunId',
1278
+ log: 'log',
1279
+ name: 'name',
1280
+ releaseVersion: 'releaseVersion',
1281
+ state: 'state',
1282
+ stateChangeReason: 'stateChangeReason',
1283
+ submitTime: 'submitTime',
1284
+ tags: 'tags',
1285
+ webUI: 'webUI',
1286
+ workspaceId: 'workspaceId',
1287
+ };
1288
+ }
1289
+
1290
+ static types(): { [key: string]: any } {
1291
+ return {
1292
+ codeType: 'string',
1293
+ configurationOverrides: ListJobRunsResponseBodyJobRunsConfigurationOverrides,
1294
+ creator: 'string',
1295
+ endTime: 'number',
1296
+ executionTimeoutSeconds: 'number',
1297
+ jobDriver: JobDriver,
1298
+ jobRunId: 'string',
1299
+ log: RunLog,
1300
+ name: 'string',
1301
+ releaseVersion: 'string',
1302
+ state: 'string',
1303
+ stateChangeReason: ListJobRunsResponseBodyJobRunsStateChangeReason,
1304
+ submitTime: 'number',
1305
+ tags: { 'type': 'array', 'itemType': Tag },
1306
+ webUI: 'string',
1307
+ workspaceId: 'string',
1308
+ };
1309
+ }
1310
+
1311
+ constructor(map?: { [key: string]: any }) {
1312
+ super(map);
1313
+ }
1314
+ }
1315
+
1316
+ export class StartJobRunRequestConfigurationOverridesConfigurations extends $tea.Model {
1317
+ configFileName?: string;
1318
+ configItemKey?: string;
1319
+ configItemValue?: string;
1320
+ static names(): { [key: string]: string } {
1321
+ return {
1322
+ configFileName: 'configFileName',
1323
+ configItemKey: 'configItemKey',
1324
+ configItemValue: 'configItemValue',
1325
+ };
1326
+ }
1327
+
1328
+ static types(): { [key: string]: any } {
1329
+ return {
1330
+ configFileName: 'string',
1331
+ configItemKey: 'string',
1332
+ configItemValue: 'string',
1333
+ };
1334
+ }
1335
+
1336
+ constructor(map?: { [key: string]: any }) {
1337
+ super(map);
1338
+ }
1339
+ }
1340
+
1341
+ export class StartJobRunRequestConfigurationOverrides extends $tea.Model {
1342
+ configurations?: StartJobRunRequestConfigurationOverridesConfigurations[];
1343
+ static names(): { [key: string]: string } {
1344
+ return {
1345
+ configurations: 'configurations',
1346
+ };
1347
+ }
1348
+
1349
+ static types(): { [key: string]: any } {
1350
+ return {
1351
+ configurations: { 'type': 'array', 'itemType': StartJobRunRequestConfigurationOverridesConfigurations },
1352
+ };
1353
+ }
1354
+
1355
+ constructor(map?: { [key: string]: any }) {
1356
+ super(map);
1357
+ }
1358
+ }
1359
+
1360
+
1361
+ export default class Client extends OpenApi {
1362
+
1363
+ constructor(config: $OpenApi.Config) {
1364
+ super(config);
1365
+ this._endpointRule = "";
1366
+ this.checkConfig(config);
1367
+ this._endpoint = this.getEndpoint("emr-serverless-spark", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
1368
+ }
1369
+
1370
+
1371
+ getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
1372
+ if (!Util.empty(endpoint)) {
1373
+ return endpoint;
1374
+ }
1375
+
1376
+ if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
1377
+ return endpointMap[regionId];
1378
+ }
1379
+
1380
+ return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
1381
+ }
1382
+
1383
+ async cancelJobRunWithOptions(workspaceId: string, jobRunId: string, request: CancelJobRunRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CancelJobRunResponse> {
1384
+ Util.validateModel(request);
1385
+ let query : {[key: string ]: any} = { };
1386
+ if (!Util.isUnset(request.regionId)) {
1387
+ query["regionId"] = request.regionId;
1388
+ }
1389
+
1390
+ let req = new $OpenApi.OpenApiRequest({
1391
+ headers: headers,
1392
+ query: OpenApiUtil.query(query),
1393
+ });
1394
+ let params = new $OpenApi.Params({
1395
+ action: "CancelJobRun",
1396
+ version: "2023-08-08",
1397
+ protocol: "HTTPS",
1398
+ pathname: `/api/v1/workspaces/${OpenApiUtil.getEncodeParam(workspaceId)}/jobRuns/${OpenApiUtil.getEncodeParam(jobRunId)}`,
1399
+ method: "DELETE",
1400
+ authType: "AK",
1401
+ style: "ROA",
1402
+ reqBodyType: "json",
1403
+ bodyType: "json",
1404
+ });
1405
+ return $tea.cast<CancelJobRunResponse>(await this.callApi(params, req, runtime), new CancelJobRunResponse({}));
1406
+ }
1407
+
1408
+ async cancelJobRun(workspaceId: string, jobRunId: string, request: CancelJobRunRequest): Promise<CancelJobRunResponse> {
1409
+ let runtime = new $Util.RuntimeOptions({ });
1410
+ let headers : {[key: string ]: string} = { };
1411
+ return await this.cancelJobRunWithOptions(workspaceId, jobRunId, request, headers, runtime);
1412
+ }
1413
+
1414
+ async getJobRunWithOptions(workspaceId: string, jobRunId: string, request: GetJobRunRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<GetJobRunResponse> {
1415
+ Util.validateModel(request);
1416
+ let query : {[key: string ]: any} = { };
1417
+ if (!Util.isUnset(request.regionId)) {
1418
+ query["regionId"] = request.regionId;
1419
+ }
1420
+
1421
+ let req = new $OpenApi.OpenApiRequest({
1422
+ headers: headers,
1423
+ query: OpenApiUtil.query(query),
1424
+ });
1425
+ let params = new $OpenApi.Params({
1426
+ action: "GetJobRun",
1427
+ version: "2023-08-08",
1428
+ protocol: "HTTPS",
1429
+ pathname: `/api/v1/workspaces/${OpenApiUtil.getEncodeParam(workspaceId)}/jobRuns/${OpenApiUtil.getEncodeParam(jobRunId)}`,
1430
+ method: "GET",
1431
+ authType: "AK",
1432
+ style: "ROA",
1433
+ reqBodyType: "json",
1434
+ bodyType: "json",
1435
+ });
1436
+ return $tea.cast<GetJobRunResponse>(await this.callApi(params, req, runtime), new GetJobRunResponse({}));
1437
+ }
1438
+
1439
+ async getJobRun(workspaceId: string, jobRunId: string, request: GetJobRunRequest): Promise<GetJobRunResponse> {
1440
+ let runtime = new $Util.RuntimeOptions({ });
1441
+ let headers : {[key: string ]: string} = { };
1442
+ return await this.getJobRunWithOptions(workspaceId, jobRunId, request, headers, runtime);
1443
+ }
1444
+
1445
+ async listJobRunsWithOptions(workspaceId: string, tmpReq: ListJobRunsRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ListJobRunsResponse> {
1446
+ Util.validateModel(tmpReq);
1447
+ let request = new ListJobRunsShrinkRequest({ });
1448
+ OpenApiUtil.convert(tmpReq, request);
1449
+ if (!Util.isUnset(tmpReq.endTime)) {
1450
+ request.endTimeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.endTime, "endTime", "json");
1451
+ }
1452
+
1453
+ if (!Util.isUnset(tmpReq.startTime)) {
1454
+ request.startTimeShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.startTime, "startTime", "json");
1455
+ }
1456
+
1457
+ if (!Util.isUnset(tmpReq.states)) {
1458
+ request.statesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.states, "states", "json");
1459
+ }
1460
+
1461
+ if (!Util.isUnset(tmpReq.tags)) {
1462
+ request.tagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tags, "tags", "json");
1463
+ }
1464
+
1465
+ let query : {[key: string ]: any} = { };
1466
+ if (!Util.isUnset(request.creator)) {
1467
+ query["creator"] = request.creator;
1468
+ }
1469
+
1470
+ if (!Util.isUnset(request.endTimeShrink)) {
1471
+ query["endTime"] = request.endTimeShrink;
1472
+ }
1473
+
1474
+ if (!Util.isUnset(request.jobRunId)) {
1475
+ query["jobRunId"] = request.jobRunId;
1476
+ }
1477
+
1478
+ if (!Util.isUnset(request.maxResults)) {
1479
+ query["maxResults"] = request.maxResults;
1480
+ }
1481
+
1482
+ if (!Util.isUnset(request.name)) {
1483
+ query["name"] = request.name;
1484
+ }
1485
+
1486
+ if (!Util.isUnset(request.nextToken)) {
1487
+ query["nextToken"] = request.nextToken;
1488
+ }
1489
+
1490
+ if (!Util.isUnset(request.regionId)) {
1491
+ query["regionId"] = request.regionId;
1492
+ }
1493
+
1494
+ if (!Util.isUnset(request.resourceQueueId)) {
1495
+ query["resourceQueueId"] = request.resourceQueueId;
1496
+ }
1497
+
1498
+ if (!Util.isUnset(request.startTimeShrink)) {
1499
+ query["startTime"] = request.startTimeShrink;
1500
+ }
1501
+
1502
+ if (!Util.isUnset(request.statesShrink)) {
1503
+ query["states"] = request.statesShrink;
1504
+ }
1505
+
1506
+ if (!Util.isUnset(request.tagsShrink)) {
1507
+ query["tags"] = request.tagsShrink;
1508
+ }
1509
+
1510
+ let req = new $OpenApi.OpenApiRequest({
1511
+ headers: headers,
1512
+ query: OpenApiUtil.query(query),
1513
+ });
1514
+ let params = new $OpenApi.Params({
1515
+ action: "ListJobRuns",
1516
+ version: "2023-08-08",
1517
+ protocol: "HTTPS",
1518
+ pathname: `/api/v1/workspaces/${OpenApiUtil.getEncodeParam(workspaceId)}/jobRuns`,
1519
+ method: "GET",
1520
+ authType: "AK",
1521
+ style: "ROA",
1522
+ reqBodyType: "json",
1523
+ bodyType: "json",
1524
+ });
1525
+ return $tea.cast<ListJobRunsResponse>(await this.callApi(params, req, runtime), new ListJobRunsResponse({}));
1526
+ }
1527
+
1528
+ async listJobRuns(workspaceId: string, request: ListJobRunsRequest): Promise<ListJobRunsResponse> {
1529
+ let runtime = new $Util.RuntimeOptions({ });
1530
+ let headers : {[key: string ]: string} = { };
1531
+ return await this.listJobRunsWithOptions(workspaceId, request, headers, runtime);
1532
+ }
1533
+
1534
+ async startJobRunWithOptions(workspaceId: string, request: StartJobRunRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<StartJobRunResponse> {
1535
+ Util.validateModel(request);
1536
+ let query : {[key: string ]: any} = { };
1537
+ if (!Util.isUnset(request.regionId)) {
1538
+ query["regionId"] = request.regionId;
1539
+ }
1540
+
1541
+ let body : {[key: string ]: any} = { };
1542
+ if (!Util.isUnset(request.clientToken)) {
1543
+ body["clientToken"] = request.clientToken;
1544
+ }
1545
+
1546
+ if (!Util.isUnset(request.codeType)) {
1547
+ body["codeType"] = request.codeType;
1548
+ }
1549
+
1550
+ if (!Util.isUnset(request.configurationOverrides)) {
1551
+ body["configurationOverrides"] = request.configurationOverrides;
1552
+ }
1553
+
1554
+ if (!Util.isUnset(request.executionTimeoutSeconds)) {
1555
+ body["executionTimeoutSeconds"] = request.executionTimeoutSeconds;
1556
+ }
1557
+
1558
+ if (!Util.isUnset(request.jobDriver)) {
1559
+ body["jobDriver"] = request.jobDriver;
1560
+ }
1561
+
1562
+ if (!Util.isUnset(request.jobId)) {
1563
+ body["jobId"] = request.jobId;
1564
+ }
1565
+
1566
+ if (!Util.isUnset(request.name)) {
1567
+ body["name"] = request.name;
1568
+ }
1569
+
1570
+ if (!Util.isUnset(request.releaseVersion)) {
1571
+ body["releaseVersion"] = request.releaseVersion;
1572
+ }
1573
+
1574
+ if (!Util.isUnset(request.resourceQueueId)) {
1575
+ body["resourceQueueId"] = request.resourceQueueId;
1576
+ }
1577
+
1578
+ if (!Util.isUnset(request.tags)) {
1579
+ body["tags"] = request.tags;
1580
+ }
1581
+
1582
+ let req = new $OpenApi.OpenApiRequest({
1583
+ headers: headers,
1584
+ query: OpenApiUtil.query(query),
1585
+ body: OpenApiUtil.parseToMap(body),
1586
+ });
1587
+ let params = new $OpenApi.Params({
1588
+ action: "StartJobRun",
1589
+ version: "2023-08-08",
1590
+ protocol: "HTTPS",
1591
+ pathname: `/api/v1/workspaces/${OpenApiUtil.getEncodeParam(workspaceId)}/jobRuns`,
1592
+ method: "POST",
1593
+ authType: "AK",
1594
+ style: "ROA",
1595
+ reqBodyType: "json",
1596
+ bodyType: "json",
1597
+ });
1598
+ return $tea.cast<StartJobRunResponse>(await this.callApi(params, req, runtime), new StartJobRunResponse({}));
1599
+ }
1600
+
1601
+ async startJobRun(workspaceId: string, request: StartJobRunRequest): Promise<StartJobRunResponse> {
1602
+ let runtime = new $Util.RuntimeOptions({ });
1603
+ let headers : {[key: string ]: string} = { };
1604
+ return await this.startJobRunWithOptions(workspaceId, request, headers, runtime);
1605
+ }
1606
+
1607
+ }