@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/dist/client.js ADDED
@@ -0,0 +1,1291 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.StartJobRunRequestConfigurationOverrides = exports.StartJobRunRequestConfigurationOverridesConfigurations = exports.ListJobRunsResponseBodyJobRuns = exports.ListJobRunsResponseBodyJobRunsStateChangeReason = exports.ListJobRunsResponseBodyJobRunsConfigurationOverrides = exports.ListJobRunsRequestTags = exports.ListJobRunsRequestStartTime = exports.ListJobRunsRequestEndTime = exports.GetJobRunResponseBodyJobRun = exports.GetJobRunResponseBodyJobRunStateChangeReason = exports.GetJobRunResponseBodyJobRunConfigurationOverrides = exports.SqlOutputSchema = exports.SqlOutputSchemaFields = exports.SqlOutputRows = exports.JobDriverSparkSubmit = exports.StartJobRunResponse = exports.StartJobRunResponseBody = exports.StartJobRunRequest = exports.ListJobRunsResponse = exports.ListJobRunsResponseBody = exports.ListJobRunsShrinkRequest = exports.ListJobRunsRequest = exports.GetJobRunResponse = exports.GetJobRunResponseBody = exports.GetJobRunRequest = exports.CancelJobRunResponse = exports.CancelJobRunResponseBody = exports.CancelJobRunRequest = exports.TimeRange = exports.Template = exports.TaskSnapshot = exports.TaskInstance = exports.Task = exports.Tag = exports.SqlOutput = exports.SparkConf = exports.RunLog = exports.ReleaseVersionImage = exports.PrincipalAction = exports.JobDriver = exports.Credential = exports.Configuration = exports.Category = exports.Artifact = void 0;
30
+ // This file is auto-generated, don't edit it
31
+ /**
32
+ *
33
+ */
34
+ const tea_util_1 = __importStar(require("@alicloud/tea-util")), $Util = tea_util_1;
35
+ const openapi_client_1 = __importStar(require("@alicloud/openapi-client")), $OpenApi = openapi_client_1;
36
+ const openapi_util_1 = __importDefault(require("@alicloud/openapi-util"));
37
+ const endpoint_util_1 = __importDefault(require("@alicloud/endpoint-util"));
38
+ const $tea = __importStar(require("@alicloud/tea-typescript"));
39
+ class Artifact extends $tea.Model {
40
+ static names() {
41
+ return {
42
+ bizId: 'bizId',
43
+ creator: 'creator',
44
+ credential: 'credential',
45
+ gmtCreated: 'gmtCreated',
46
+ gmtModified: 'gmtModified',
47
+ location: 'location',
48
+ modifier: 'modifier',
49
+ name: 'name',
50
+ };
51
+ }
52
+ static types() {
53
+ return {
54
+ bizId: 'string',
55
+ creator: 'number',
56
+ credential: Credential,
57
+ gmtCreated: 'string',
58
+ gmtModified: 'string',
59
+ location: 'string',
60
+ modifier: 'number',
61
+ name: 'string',
62
+ };
63
+ }
64
+ constructor(map) {
65
+ super(map);
66
+ }
67
+ }
68
+ exports.Artifact = Artifact;
69
+ class Category extends $tea.Model {
70
+ static names() {
71
+ return {
72
+ bizId: 'bizId',
73
+ creator: 'creator',
74
+ gmtCreated: 'gmtCreated',
75
+ gmtModified: 'gmtModified',
76
+ modifier: 'modifier',
77
+ name: 'name',
78
+ parentBizId: 'parentBizId',
79
+ type: 'type',
80
+ };
81
+ }
82
+ static types() {
83
+ return {
84
+ bizId: 'string',
85
+ creator: 'number',
86
+ gmtCreated: 'string',
87
+ gmtModified: 'string',
88
+ modifier: 'number',
89
+ name: 'string',
90
+ parentBizId: 'string',
91
+ type: 'string',
92
+ };
93
+ }
94
+ constructor(map) {
95
+ super(map);
96
+ }
97
+ }
98
+ exports.Category = Category;
99
+ class Configuration extends $tea.Model {
100
+ static names() {
101
+ return {
102
+ configFileName: 'configFileName',
103
+ configItemKey: 'configItemKey',
104
+ configItemValue: 'configItemValue',
105
+ };
106
+ }
107
+ static types() {
108
+ return {
109
+ configFileName: 'string',
110
+ configItemKey: 'string',
111
+ configItemValue: 'string',
112
+ };
113
+ }
114
+ constructor(map) {
115
+ super(map);
116
+ }
117
+ }
118
+ exports.Configuration = Configuration;
119
+ class Credential extends $tea.Model {
120
+ static names() {
121
+ return {
122
+ accessId: 'accessId',
123
+ dir: 'dir',
124
+ expire: 'expire',
125
+ host: 'host',
126
+ policy: 'policy',
127
+ securityToken: 'securityToken',
128
+ signature: 'signature',
129
+ };
130
+ }
131
+ static types() {
132
+ return {
133
+ accessId: 'string',
134
+ dir: 'string',
135
+ expire: 'string',
136
+ host: 'string',
137
+ policy: 'string',
138
+ securityToken: 'string',
139
+ signature: 'string',
140
+ };
141
+ }
142
+ constructor(map) {
143
+ super(map);
144
+ }
145
+ }
146
+ exports.Credential = Credential;
147
+ class JobDriver extends $tea.Model {
148
+ static names() {
149
+ return {
150
+ sparkSubmit: 'sparkSubmit',
151
+ };
152
+ }
153
+ static types() {
154
+ return {
155
+ sparkSubmit: JobDriverSparkSubmit,
156
+ };
157
+ }
158
+ constructor(map) {
159
+ super(map);
160
+ }
161
+ }
162
+ exports.JobDriver = JobDriver;
163
+ class PrincipalAction extends $tea.Model {
164
+ static names() {
165
+ return {
166
+ actionArn: 'actionArn',
167
+ principalArn: 'principalArn',
168
+ };
169
+ }
170
+ static types() {
171
+ return {
172
+ actionArn: 'string',
173
+ principalArn: 'string',
174
+ };
175
+ }
176
+ constructor(map) {
177
+ super(map);
178
+ }
179
+ }
180
+ exports.PrincipalAction = PrincipalAction;
181
+ class ReleaseVersionImage extends $tea.Model {
182
+ static names() {
183
+ return {
184
+ cpuArchitecture: 'cpuArchitecture',
185
+ imageId: 'imageId',
186
+ runtimeEngineType: 'runtimeEngineType',
187
+ };
188
+ }
189
+ static types() {
190
+ return {
191
+ cpuArchitecture: 'string',
192
+ imageId: 'string',
193
+ runtimeEngineType: 'string',
194
+ };
195
+ }
196
+ constructor(map) {
197
+ super(map);
198
+ }
199
+ }
200
+ exports.ReleaseVersionImage = ReleaseVersionImage;
201
+ class RunLog extends $tea.Model {
202
+ static names() {
203
+ return {
204
+ driverStdError: 'driverStdError',
205
+ driverStdOut: 'driverStdOut',
206
+ };
207
+ }
208
+ static types() {
209
+ return {
210
+ driverStdError: 'string',
211
+ driverStdOut: 'string',
212
+ };
213
+ }
214
+ constructor(map) {
215
+ super(map);
216
+ }
217
+ }
218
+ exports.RunLog = RunLog;
219
+ class SparkConf extends $tea.Model {
220
+ static names() {
221
+ return {
222
+ key: 'key',
223
+ value: 'value',
224
+ };
225
+ }
226
+ static types() {
227
+ return {
228
+ key: 'string',
229
+ value: 'string',
230
+ };
231
+ }
232
+ constructor(map) {
233
+ super(map);
234
+ }
235
+ }
236
+ exports.SparkConf = SparkConf;
237
+ class SqlOutput extends $tea.Model {
238
+ static names() {
239
+ return {
240
+ rows: 'rows',
241
+ schema: 'schema',
242
+ };
243
+ }
244
+ static types() {
245
+ return {
246
+ rows: { 'type': 'array', 'itemType': SqlOutputRows },
247
+ schema: SqlOutputSchema,
248
+ };
249
+ }
250
+ constructor(map) {
251
+ super(map);
252
+ }
253
+ }
254
+ exports.SqlOutput = SqlOutput;
255
+ class Tag extends $tea.Model {
256
+ static names() {
257
+ return {
258
+ key: 'key',
259
+ value: 'value',
260
+ };
261
+ }
262
+ static types() {
263
+ return {
264
+ key: 'string',
265
+ value: 'string',
266
+ };
267
+ }
268
+ constructor(map) {
269
+ super(map);
270
+ }
271
+ }
272
+ exports.Tag = Tag;
273
+ class Task extends $tea.Model {
274
+ static names() {
275
+ return {
276
+ artifactUrl: 'artifactUrl',
277
+ bizId: 'bizId',
278
+ categoryBizId: 'categoryBizId',
279
+ content: 'content',
280
+ creator: 'creator',
281
+ defaultCatalogId: 'defaultCatalogId',
282
+ defaultDatabase: 'defaultDatabase',
283
+ defaultResourceQueueId: 'defaultResourceQueueId',
284
+ defaultSqlComputeId: 'defaultSqlComputeId',
285
+ extraArtifactIds: 'extraArtifactIds',
286
+ gmtCreated: 'gmtCreated',
287
+ gmtModified: 'gmtModified',
288
+ hasChanged: 'hasChanged',
289
+ hasCommited: 'hasCommited',
290
+ lastRunResourceQueueId: 'lastRunResourceQueueId',
291
+ modifier: 'modifier',
292
+ name: 'name',
293
+ pyFiles: 'pyFiles',
294
+ sparkArgs: 'sparkArgs',
295
+ sparkConf: 'sparkConf',
296
+ sparkDriverCores: 'sparkDriverCores',
297
+ sparkDriverMemory: 'sparkDriverMemory',
298
+ sparkEntrypoint: 'sparkEntrypoint',
299
+ sparkExecutorCores: 'sparkExecutorCores',
300
+ sparkExecutorMemory: 'sparkExecutorMemory',
301
+ sparkLogLevel: 'sparkLogLevel',
302
+ sparkLogPath: 'sparkLogPath',
303
+ sparkVersion: 'sparkVersion',
304
+ tags: 'tags',
305
+ type: 'type',
306
+ };
307
+ }
308
+ static types() {
309
+ return {
310
+ artifactUrl: 'string',
311
+ bizId: 'string',
312
+ categoryBizId: 'string',
313
+ content: 'string',
314
+ creator: 'number',
315
+ defaultCatalogId: 'string',
316
+ defaultDatabase: 'string',
317
+ defaultResourceQueueId: 'string',
318
+ defaultSqlComputeId: 'string',
319
+ extraArtifactIds: { 'type': 'array', 'itemType': 'string' },
320
+ gmtCreated: 'string',
321
+ gmtModified: 'string',
322
+ hasChanged: 'boolean',
323
+ hasCommited: 'boolean',
324
+ lastRunResourceQueueId: 'string',
325
+ modifier: 'number',
326
+ name: 'string',
327
+ pyFiles: { 'type': 'array', 'itemType': 'string' },
328
+ sparkArgs: 'string',
329
+ sparkConf: { 'type': 'array', 'itemType': SparkConf },
330
+ sparkDriverCores: 'number',
331
+ sparkDriverMemory: 'number',
332
+ sparkEntrypoint: 'string',
333
+ sparkExecutorCores: 'number',
334
+ sparkExecutorMemory: 'number',
335
+ sparkLogLevel: 'string',
336
+ sparkLogPath: 'string',
337
+ sparkVersion: 'string',
338
+ tags: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
339
+ type: 'string',
340
+ };
341
+ }
342
+ constructor(map) {
343
+ super(map);
344
+ }
345
+ }
346
+ exports.Task = Task;
347
+ class TaskInstance extends $tea.Model {
348
+ static names() {
349
+ return {
350
+ bizId: 'bizId',
351
+ creator: 'creator',
352
+ fenixRunId: 'fenixRunId',
353
+ gmtCreated: 'gmtCreated',
354
+ taskBizId: 'taskBizId',
355
+ taskInfo: 'taskInfo',
356
+ taskStatus: 'taskStatus',
357
+ workspaceBizId: 'workspaceBizId',
358
+ };
359
+ }
360
+ static types() {
361
+ return {
362
+ bizId: 'string',
363
+ creator: 'number',
364
+ fenixRunId: 'string',
365
+ gmtCreated: 'string',
366
+ taskBizId: 'string',
367
+ taskInfo: Task,
368
+ taskStatus: 'string',
369
+ workspaceBizId: 'string',
370
+ };
371
+ }
372
+ constructor(map) {
373
+ super(map);
374
+ }
375
+ }
376
+ exports.TaskInstance = TaskInstance;
377
+ class TaskSnapshot extends $tea.Model {
378
+ static names() {
379
+ return {
380
+ bizId: 'bizId',
381
+ commiter: 'commiter',
382
+ gmtCreated: 'gmtCreated',
383
+ item: 'item',
384
+ message: 'message',
385
+ taskBizId: 'taskBizId',
386
+ version: 'version',
387
+ };
388
+ }
389
+ static types() {
390
+ return {
391
+ bizId: 'string',
392
+ commiter: 'number',
393
+ gmtCreated: 'string',
394
+ item: Task,
395
+ message: 'string',
396
+ taskBizId: 'string',
397
+ version: 'string',
398
+ };
399
+ }
400
+ constructor(map) {
401
+ super(map);
402
+ }
403
+ }
404
+ exports.TaskSnapshot = TaskSnapshot;
405
+ class Template extends $tea.Model {
406
+ static names() {
407
+ return {
408
+ creator: 'creator',
409
+ gmtCreated: 'gmtCreated',
410
+ gmtModified: 'gmtModified',
411
+ modifier: 'modifier',
412
+ sparkConf: 'sparkConf',
413
+ sparkDriverCores: 'sparkDriverCores',
414
+ sparkDriverMemory: 'sparkDriverMemory',
415
+ sparkExecutorCores: 'sparkExecutorCores',
416
+ sparkExecutorMemory: 'sparkExecutorMemory',
417
+ sparkLogLevel: 'sparkLogLevel',
418
+ sparkLogPath: 'sparkLogPath',
419
+ sparkVersion: 'sparkVersion',
420
+ templateType: 'templateType',
421
+ };
422
+ }
423
+ static types() {
424
+ return {
425
+ creator: 'number',
426
+ gmtCreated: 'string',
427
+ gmtModified: 'string',
428
+ modifier: 'number',
429
+ sparkConf: { 'type': 'array', 'itemType': SparkConf },
430
+ sparkDriverCores: 'number',
431
+ sparkDriverMemory: 'number',
432
+ sparkExecutorCores: 'number',
433
+ sparkExecutorMemory: 'number',
434
+ sparkLogLevel: 'string',
435
+ sparkLogPath: 'string',
436
+ sparkVersion: 'string',
437
+ templateType: 'string',
438
+ };
439
+ }
440
+ constructor(map) {
441
+ super(map);
442
+ }
443
+ }
444
+ exports.Template = Template;
445
+ class TimeRange extends $tea.Model {
446
+ static names() {
447
+ return {
448
+ endTime: 'endTime',
449
+ startTime: 'startTime',
450
+ };
451
+ }
452
+ static types() {
453
+ return {
454
+ endTime: 'number',
455
+ startTime: 'number',
456
+ };
457
+ }
458
+ constructor(map) {
459
+ super(map);
460
+ }
461
+ }
462
+ exports.TimeRange = TimeRange;
463
+ class CancelJobRunRequest extends $tea.Model {
464
+ static names() {
465
+ return {
466
+ regionId: 'regionId',
467
+ };
468
+ }
469
+ static types() {
470
+ return {
471
+ regionId: 'string',
472
+ };
473
+ }
474
+ constructor(map) {
475
+ super(map);
476
+ }
477
+ }
478
+ exports.CancelJobRunRequest = CancelJobRunRequest;
479
+ class CancelJobRunResponseBody extends $tea.Model {
480
+ static names() {
481
+ return {
482
+ jobRunId: 'jobRunId',
483
+ requestId: 'requestId',
484
+ };
485
+ }
486
+ static types() {
487
+ return {
488
+ jobRunId: 'string',
489
+ requestId: 'string',
490
+ };
491
+ }
492
+ constructor(map) {
493
+ super(map);
494
+ }
495
+ }
496
+ exports.CancelJobRunResponseBody = CancelJobRunResponseBody;
497
+ class CancelJobRunResponse extends $tea.Model {
498
+ static names() {
499
+ return {
500
+ headers: 'headers',
501
+ statusCode: 'statusCode',
502
+ body: 'body',
503
+ };
504
+ }
505
+ static types() {
506
+ return {
507
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
508
+ statusCode: 'number',
509
+ body: CancelJobRunResponseBody,
510
+ };
511
+ }
512
+ constructor(map) {
513
+ super(map);
514
+ }
515
+ }
516
+ exports.CancelJobRunResponse = CancelJobRunResponse;
517
+ class GetJobRunRequest extends $tea.Model {
518
+ static names() {
519
+ return {
520
+ regionId: 'regionId',
521
+ };
522
+ }
523
+ static types() {
524
+ return {
525
+ regionId: 'string',
526
+ };
527
+ }
528
+ constructor(map) {
529
+ super(map);
530
+ }
531
+ }
532
+ exports.GetJobRunRequest = GetJobRunRequest;
533
+ class GetJobRunResponseBody extends $tea.Model {
534
+ static names() {
535
+ return {
536
+ jobRun: 'jobRun',
537
+ requestId: 'requestId',
538
+ };
539
+ }
540
+ static types() {
541
+ return {
542
+ jobRun: GetJobRunResponseBodyJobRun,
543
+ requestId: 'string',
544
+ };
545
+ }
546
+ constructor(map) {
547
+ super(map);
548
+ }
549
+ }
550
+ exports.GetJobRunResponseBody = GetJobRunResponseBody;
551
+ class GetJobRunResponse extends $tea.Model {
552
+ static names() {
553
+ return {
554
+ headers: 'headers',
555
+ statusCode: 'statusCode',
556
+ body: 'body',
557
+ };
558
+ }
559
+ static types() {
560
+ return {
561
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
562
+ statusCode: 'number',
563
+ body: GetJobRunResponseBody,
564
+ };
565
+ }
566
+ constructor(map) {
567
+ super(map);
568
+ }
569
+ }
570
+ exports.GetJobRunResponse = GetJobRunResponse;
571
+ class ListJobRunsRequest extends $tea.Model {
572
+ static names() {
573
+ return {
574
+ creator: 'creator',
575
+ endTime: 'endTime',
576
+ jobRunId: 'jobRunId',
577
+ maxResults: 'maxResults',
578
+ name: 'name',
579
+ nextToken: 'nextToken',
580
+ regionId: 'regionId',
581
+ resourceQueueId: 'resourceQueueId',
582
+ startTime: 'startTime',
583
+ states: 'states',
584
+ tags: 'tags',
585
+ };
586
+ }
587
+ static types() {
588
+ return {
589
+ creator: 'string',
590
+ endTime: ListJobRunsRequestEndTime,
591
+ jobRunId: 'string',
592
+ maxResults: 'number',
593
+ name: 'string',
594
+ nextToken: 'string',
595
+ regionId: 'string',
596
+ resourceQueueId: 'string',
597
+ startTime: ListJobRunsRequestStartTime,
598
+ states: { 'type': 'array', 'itemType': 'string' },
599
+ tags: { 'type': 'array', 'itemType': ListJobRunsRequestTags },
600
+ };
601
+ }
602
+ constructor(map) {
603
+ super(map);
604
+ }
605
+ }
606
+ exports.ListJobRunsRequest = ListJobRunsRequest;
607
+ class ListJobRunsShrinkRequest extends $tea.Model {
608
+ static names() {
609
+ return {
610
+ creator: 'creator',
611
+ endTimeShrink: 'endTime',
612
+ jobRunId: 'jobRunId',
613
+ maxResults: 'maxResults',
614
+ name: 'name',
615
+ nextToken: 'nextToken',
616
+ regionId: 'regionId',
617
+ resourceQueueId: 'resourceQueueId',
618
+ startTimeShrink: 'startTime',
619
+ statesShrink: 'states',
620
+ tagsShrink: 'tags',
621
+ };
622
+ }
623
+ static types() {
624
+ return {
625
+ creator: 'string',
626
+ endTimeShrink: 'string',
627
+ jobRunId: 'string',
628
+ maxResults: 'number',
629
+ name: 'string',
630
+ nextToken: 'string',
631
+ regionId: 'string',
632
+ resourceQueueId: 'string',
633
+ startTimeShrink: 'string',
634
+ statesShrink: 'string',
635
+ tagsShrink: 'string',
636
+ };
637
+ }
638
+ constructor(map) {
639
+ super(map);
640
+ }
641
+ }
642
+ exports.ListJobRunsShrinkRequest = ListJobRunsShrinkRequest;
643
+ class ListJobRunsResponseBody extends $tea.Model {
644
+ static names() {
645
+ return {
646
+ jobRuns: 'jobRuns',
647
+ maxResults: 'maxResults',
648
+ nextToken: 'nextToken',
649
+ requestId: 'requestId',
650
+ totalCount: 'totalCount',
651
+ };
652
+ }
653
+ static types() {
654
+ return {
655
+ jobRuns: { 'type': 'array', 'itemType': ListJobRunsResponseBodyJobRuns },
656
+ maxResults: 'number',
657
+ nextToken: 'string',
658
+ requestId: 'string',
659
+ totalCount: 'number',
660
+ };
661
+ }
662
+ constructor(map) {
663
+ super(map);
664
+ }
665
+ }
666
+ exports.ListJobRunsResponseBody = ListJobRunsResponseBody;
667
+ class ListJobRunsResponse extends $tea.Model {
668
+ static names() {
669
+ return {
670
+ headers: 'headers',
671
+ statusCode: 'statusCode',
672
+ body: 'body',
673
+ };
674
+ }
675
+ static types() {
676
+ return {
677
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
678
+ statusCode: 'number',
679
+ body: ListJobRunsResponseBody,
680
+ };
681
+ }
682
+ constructor(map) {
683
+ super(map);
684
+ }
685
+ }
686
+ exports.ListJobRunsResponse = ListJobRunsResponse;
687
+ class StartJobRunRequest extends $tea.Model {
688
+ static names() {
689
+ return {
690
+ clientToken: 'clientToken',
691
+ codeType: 'codeType',
692
+ configurationOverrides: 'configurationOverrides',
693
+ executionTimeoutSeconds: 'executionTimeoutSeconds',
694
+ jobDriver: 'jobDriver',
695
+ jobId: 'jobId',
696
+ name: 'name',
697
+ releaseVersion: 'releaseVersion',
698
+ resourceQueueId: 'resourceQueueId',
699
+ tags: 'tags',
700
+ regionId: 'regionId',
701
+ };
702
+ }
703
+ static types() {
704
+ return {
705
+ clientToken: 'string',
706
+ codeType: 'string',
707
+ configurationOverrides: StartJobRunRequestConfigurationOverrides,
708
+ executionTimeoutSeconds: 'number',
709
+ jobDriver: JobDriver,
710
+ jobId: 'string',
711
+ name: 'string',
712
+ releaseVersion: 'string',
713
+ resourceQueueId: 'string',
714
+ tags: { 'type': 'array', 'itemType': Tag },
715
+ regionId: 'string',
716
+ };
717
+ }
718
+ constructor(map) {
719
+ super(map);
720
+ }
721
+ }
722
+ exports.StartJobRunRequest = StartJobRunRequest;
723
+ class StartJobRunResponseBody extends $tea.Model {
724
+ static names() {
725
+ return {
726
+ jobRunId: 'jobRunId',
727
+ requestId: 'requestId',
728
+ };
729
+ }
730
+ static types() {
731
+ return {
732
+ jobRunId: 'string',
733
+ requestId: 'string',
734
+ };
735
+ }
736
+ constructor(map) {
737
+ super(map);
738
+ }
739
+ }
740
+ exports.StartJobRunResponseBody = StartJobRunResponseBody;
741
+ class StartJobRunResponse extends $tea.Model {
742
+ static names() {
743
+ return {
744
+ headers: 'headers',
745
+ statusCode: 'statusCode',
746
+ body: 'body',
747
+ };
748
+ }
749
+ static types() {
750
+ return {
751
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
752
+ statusCode: 'number',
753
+ body: StartJobRunResponseBody,
754
+ };
755
+ }
756
+ constructor(map) {
757
+ super(map);
758
+ }
759
+ }
760
+ exports.StartJobRunResponse = StartJobRunResponse;
761
+ class JobDriverSparkSubmit extends $tea.Model {
762
+ static names() {
763
+ return {
764
+ entryPoint: 'entryPoint',
765
+ entryPointArguments: 'entryPointArguments',
766
+ sparkSubmitParameters: 'sparkSubmitParameters',
767
+ };
768
+ }
769
+ static types() {
770
+ return {
771
+ entryPoint: 'string',
772
+ entryPointArguments: { 'type': 'array', 'itemType': 'string' },
773
+ sparkSubmitParameters: 'string',
774
+ };
775
+ }
776
+ constructor(map) {
777
+ super(map);
778
+ }
779
+ }
780
+ exports.JobDriverSparkSubmit = JobDriverSparkSubmit;
781
+ class SqlOutputRows extends $tea.Model {
782
+ static names() {
783
+ return {
784
+ values: 'values',
785
+ };
786
+ }
787
+ static types() {
788
+ return {
789
+ values: { 'type': 'array', 'itemType': 'string' },
790
+ };
791
+ }
792
+ constructor(map) {
793
+ super(map);
794
+ }
795
+ }
796
+ exports.SqlOutputRows = SqlOutputRows;
797
+ class SqlOutputSchemaFields extends $tea.Model {
798
+ static names() {
799
+ return {
800
+ name: 'name',
801
+ nullable: 'nullable',
802
+ type: 'type',
803
+ };
804
+ }
805
+ static types() {
806
+ return {
807
+ name: 'string',
808
+ nullable: 'boolean',
809
+ type: 'string',
810
+ };
811
+ }
812
+ constructor(map) {
813
+ super(map);
814
+ }
815
+ }
816
+ exports.SqlOutputSchemaFields = SqlOutputSchemaFields;
817
+ class SqlOutputSchema extends $tea.Model {
818
+ static names() {
819
+ return {
820
+ fields: 'fields',
821
+ };
822
+ }
823
+ static types() {
824
+ return {
825
+ fields: { 'type': 'array', 'itemType': SqlOutputSchemaFields },
826
+ };
827
+ }
828
+ constructor(map) {
829
+ super(map);
830
+ }
831
+ }
832
+ exports.SqlOutputSchema = SqlOutputSchema;
833
+ class GetJobRunResponseBodyJobRunConfigurationOverrides extends $tea.Model {
834
+ static names() {
835
+ return {
836
+ configurations: 'configurations',
837
+ };
838
+ }
839
+ static types() {
840
+ return {
841
+ configurations: { 'type': 'array', 'itemType': Configuration },
842
+ };
843
+ }
844
+ constructor(map) {
845
+ super(map);
846
+ }
847
+ }
848
+ exports.GetJobRunResponseBodyJobRunConfigurationOverrides = GetJobRunResponseBodyJobRunConfigurationOverrides;
849
+ class GetJobRunResponseBodyJobRunStateChangeReason extends $tea.Model {
850
+ static names() {
851
+ return {
852
+ code: 'code',
853
+ message: 'message',
854
+ };
855
+ }
856
+ static types() {
857
+ return {
858
+ code: 'string',
859
+ message: 'string',
860
+ };
861
+ }
862
+ constructor(map) {
863
+ super(map);
864
+ }
865
+ }
866
+ exports.GetJobRunResponseBodyJobRunStateChangeReason = GetJobRunResponseBodyJobRunStateChangeReason;
867
+ class GetJobRunResponseBodyJobRun extends $tea.Model {
868
+ static names() {
869
+ return {
870
+ codeType: 'codeType',
871
+ configurationOverrides: 'configurationOverrides',
872
+ endTime: 'endTime',
873
+ executionTimeoutSeconds: 'executionTimeoutSeconds',
874
+ jobDriver: 'jobDriver',
875
+ jobRunId: 'jobRunId',
876
+ log: 'log',
877
+ name: 'name',
878
+ releaseVersion: 'releaseVersion',
879
+ resourceOwnerId: 'resourceOwnerId',
880
+ resourceQueueId: 'resourceQueueId',
881
+ state: 'state',
882
+ stateChangeReason: 'stateChangeReason',
883
+ submitTime: 'submitTime',
884
+ tags: 'tags',
885
+ webUI: 'webUI',
886
+ workspaceId: 'workspaceId',
887
+ };
888
+ }
889
+ static types() {
890
+ return {
891
+ codeType: 'string',
892
+ configurationOverrides: GetJobRunResponseBodyJobRunConfigurationOverrides,
893
+ endTime: 'number',
894
+ executionTimeoutSeconds: 'number',
895
+ jobDriver: JobDriver,
896
+ jobRunId: 'string',
897
+ log: RunLog,
898
+ name: 'string',
899
+ releaseVersion: 'string',
900
+ resourceOwnerId: 'string',
901
+ resourceQueueId: 'string',
902
+ state: 'string',
903
+ stateChangeReason: GetJobRunResponseBodyJobRunStateChangeReason,
904
+ submitTime: 'number',
905
+ tags: { 'type': 'array', 'itemType': Tag },
906
+ webUI: 'string',
907
+ workspaceId: 'string',
908
+ };
909
+ }
910
+ constructor(map) {
911
+ super(map);
912
+ }
913
+ }
914
+ exports.GetJobRunResponseBodyJobRun = GetJobRunResponseBodyJobRun;
915
+ class ListJobRunsRequestEndTime extends $tea.Model {
916
+ static names() {
917
+ return {
918
+ endTime: 'endTime',
919
+ startTime: 'startTime',
920
+ };
921
+ }
922
+ static types() {
923
+ return {
924
+ endTime: 'number',
925
+ startTime: 'number',
926
+ };
927
+ }
928
+ constructor(map) {
929
+ super(map);
930
+ }
931
+ }
932
+ exports.ListJobRunsRequestEndTime = ListJobRunsRequestEndTime;
933
+ class ListJobRunsRequestStartTime extends $tea.Model {
934
+ static names() {
935
+ return {
936
+ endTime: 'endTime',
937
+ startTime: 'startTime',
938
+ };
939
+ }
940
+ static types() {
941
+ return {
942
+ endTime: 'number',
943
+ startTime: 'number',
944
+ };
945
+ }
946
+ constructor(map) {
947
+ super(map);
948
+ }
949
+ }
950
+ exports.ListJobRunsRequestStartTime = ListJobRunsRequestStartTime;
951
+ class ListJobRunsRequestTags extends $tea.Model {
952
+ static names() {
953
+ return {
954
+ key: 'key',
955
+ value: 'value',
956
+ };
957
+ }
958
+ static types() {
959
+ return {
960
+ key: 'string',
961
+ value: 'string',
962
+ };
963
+ }
964
+ constructor(map) {
965
+ super(map);
966
+ }
967
+ }
968
+ exports.ListJobRunsRequestTags = ListJobRunsRequestTags;
969
+ class ListJobRunsResponseBodyJobRunsConfigurationOverrides extends $tea.Model {
970
+ static names() {
971
+ return {
972
+ configurations: 'configurations',
973
+ };
974
+ }
975
+ static types() {
976
+ return {
977
+ configurations: { 'type': 'array', 'itemType': Configuration },
978
+ };
979
+ }
980
+ constructor(map) {
981
+ super(map);
982
+ }
983
+ }
984
+ exports.ListJobRunsResponseBodyJobRunsConfigurationOverrides = ListJobRunsResponseBodyJobRunsConfigurationOverrides;
985
+ class ListJobRunsResponseBodyJobRunsStateChangeReason extends $tea.Model {
986
+ static names() {
987
+ return {
988
+ code: 'code',
989
+ message: 'message',
990
+ };
991
+ }
992
+ static types() {
993
+ return {
994
+ code: 'string',
995
+ message: 'string',
996
+ };
997
+ }
998
+ constructor(map) {
999
+ super(map);
1000
+ }
1001
+ }
1002
+ exports.ListJobRunsResponseBodyJobRunsStateChangeReason = ListJobRunsResponseBodyJobRunsStateChangeReason;
1003
+ class ListJobRunsResponseBodyJobRuns extends $tea.Model {
1004
+ static names() {
1005
+ return {
1006
+ codeType: 'codeType',
1007
+ configurationOverrides: 'configurationOverrides',
1008
+ creator: 'creator',
1009
+ endTime: 'endTime',
1010
+ executionTimeoutSeconds: 'executionTimeoutSeconds',
1011
+ jobDriver: 'jobDriver',
1012
+ jobRunId: 'jobRunId',
1013
+ log: 'log',
1014
+ name: 'name',
1015
+ releaseVersion: 'releaseVersion',
1016
+ state: 'state',
1017
+ stateChangeReason: 'stateChangeReason',
1018
+ submitTime: 'submitTime',
1019
+ tags: 'tags',
1020
+ webUI: 'webUI',
1021
+ workspaceId: 'workspaceId',
1022
+ };
1023
+ }
1024
+ static types() {
1025
+ return {
1026
+ codeType: 'string',
1027
+ configurationOverrides: ListJobRunsResponseBodyJobRunsConfigurationOverrides,
1028
+ creator: 'string',
1029
+ endTime: 'number',
1030
+ executionTimeoutSeconds: 'number',
1031
+ jobDriver: JobDriver,
1032
+ jobRunId: 'string',
1033
+ log: RunLog,
1034
+ name: 'string',
1035
+ releaseVersion: 'string',
1036
+ state: 'string',
1037
+ stateChangeReason: ListJobRunsResponseBodyJobRunsStateChangeReason,
1038
+ submitTime: 'number',
1039
+ tags: { 'type': 'array', 'itemType': Tag },
1040
+ webUI: 'string',
1041
+ workspaceId: 'string',
1042
+ };
1043
+ }
1044
+ constructor(map) {
1045
+ super(map);
1046
+ }
1047
+ }
1048
+ exports.ListJobRunsResponseBodyJobRuns = ListJobRunsResponseBodyJobRuns;
1049
+ class StartJobRunRequestConfigurationOverridesConfigurations extends $tea.Model {
1050
+ static names() {
1051
+ return {
1052
+ configFileName: 'configFileName',
1053
+ configItemKey: 'configItemKey',
1054
+ configItemValue: 'configItemValue',
1055
+ };
1056
+ }
1057
+ static types() {
1058
+ return {
1059
+ configFileName: 'string',
1060
+ configItemKey: 'string',
1061
+ configItemValue: 'string',
1062
+ };
1063
+ }
1064
+ constructor(map) {
1065
+ super(map);
1066
+ }
1067
+ }
1068
+ exports.StartJobRunRequestConfigurationOverridesConfigurations = StartJobRunRequestConfigurationOverridesConfigurations;
1069
+ class StartJobRunRequestConfigurationOverrides extends $tea.Model {
1070
+ static names() {
1071
+ return {
1072
+ configurations: 'configurations',
1073
+ };
1074
+ }
1075
+ static types() {
1076
+ return {
1077
+ configurations: { 'type': 'array', 'itemType': StartJobRunRequestConfigurationOverridesConfigurations },
1078
+ };
1079
+ }
1080
+ constructor(map) {
1081
+ super(map);
1082
+ }
1083
+ }
1084
+ exports.StartJobRunRequestConfigurationOverrides = StartJobRunRequestConfigurationOverrides;
1085
+ class Client extends openapi_client_1.default {
1086
+ constructor(config) {
1087
+ super(config);
1088
+ this._endpointRule = "";
1089
+ this.checkConfig(config);
1090
+ this._endpoint = this.getEndpoint("emr-serverless-spark", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
1091
+ }
1092
+ getEndpoint(productId, regionId, endpointRule, network, suffix, endpointMap, endpoint) {
1093
+ if (!tea_util_1.default.empty(endpoint)) {
1094
+ return endpoint;
1095
+ }
1096
+ if (!tea_util_1.default.isUnset(endpointMap) && !tea_util_1.default.empty(endpointMap[regionId])) {
1097
+ return endpointMap[regionId];
1098
+ }
1099
+ return endpoint_util_1.default.getEndpointRules(productId, regionId, endpointRule, network, suffix);
1100
+ }
1101
+ async cancelJobRunWithOptions(workspaceId, jobRunId, request, headers, runtime) {
1102
+ tea_util_1.default.validateModel(request);
1103
+ let query = {};
1104
+ if (!tea_util_1.default.isUnset(request.regionId)) {
1105
+ query["regionId"] = request.regionId;
1106
+ }
1107
+ let req = new $OpenApi.OpenApiRequest({
1108
+ headers: headers,
1109
+ query: openapi_util_1.default.query(query),
1110
+ });
1111
+ let params = new $OpenApi.Params({
1112
+ action: "CancelJobRun",
1113
+ version: "2023-08-08",
1114
+ protocol: "HTTPS",
1115
+ pathname: `/api/v1/workspaces/${openapi_util_1.default.getEncodeParam(workspaceId)}/jobRuns/${openapi_util_1.default.getEncodeParam(jobRunId)}`,
1116
+ method: "DELETE",
1117
+ authType: "AK",
1118
+ style: "ROA",
1119
+ reqBodyType: "json",
1120
+ bodyType: "json",
1121
+ });
1122
+ return $tea.cast(await this.callApi(params, req, runtime), new CancelJobRunResponse({}));
1123
+ }
1124
+ async cancelJobRun(workspaceId, jobRunId, request) {
1125
+ let runtime = new $Util.RuntimeOptions({});
1126
+ let headers = {};
1127
+ return await this.cancelJobRunWithOptions(workspaceId, jobRunId, request, headers, runtime);
1128
+ }
1129
+ async getJobRunWithOptions(workspaceId, jobRunId, request, headers, runtime) {
1130
+ tea_util_1.default.validateModel(request);
1131
+ let query = {};
1132
+ if (!tea_util_1.default.isUnset(request.regionId)) {
1133
+ query["regionId"] = request.regionId;
1134
+ }
1135
+ let req = new $OpenApi.OpenApiRequest({
1136
+ headers: headers,
1137
+ query: openapi_util_1.default.query(query),
1138
+ });
1139
+ let params = new $OpenApi.Params({
1140
+ action: "GetJobRun",
1141
+ version: "2023-08-08",
1142
+ protocol: "HTTPS",
1143
+ pathname: `/api/v1/workspaces/${openapi_util_1.default.getEncodeParam(workspaceId)}/jobRuns/${openapi_util_1.default.getEncodeParam(jobRunId)}`,
1144
+ method: "GET",
1145
+ authType: "AK",
1146
+ style: "ROA",
1147
+ reqBodyType: "json",
1148
+ bodyType: "json",
1149
+ });
1150
+ return $tea.cast(await this.callApi(params, req, runtime), new GetJobRunResponse({}));
1151
+ }
1152
+ async getJobRun(workspaceId, jobRunId, request) {
1153
+ let runtime = new $Util.RuntimeOptions({});
1154
+ let headers = {};
1155
+ return await this.getJobRunWithOptions(workspaceId, jobRunId, request, headers, runtime);
1156
+ }
1157
+ async listJobRunsWithOptions(workspaceId, tmpReq, headers, runtime) {
1158
+ tea_util_1.default.validateModel(tmpReq);
1159
+ let request = new ListJobRunsShrinkRequest({});
1160
+ openapi_util_1.default.convert(tmpReq, request);
1161
+ if (!tea_util_1.default.isUnset(tmpReq.endTime)) {
1162
+ request.endTimeShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.endTime, "endTime", "json");
1163
+ }
1164
+ if (!tea_util_1.default.isUnset(tmpReq.startTime)) {
1165
+ request.startTimeShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.startTime, "startTime", "json");
1166
+ }
1167
+ if (!tea_util_1.default.isUnset(tmpReq.states)) {
1168
+ request.statesShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.states, "states", "json");
1169
+ }
1170
+ if (!tea_util_1.default.isUnset(tmpReq.tags)) {
1171
+ request.tagsShrink = openapi_util_1.default.arrayToStringWithSpecifiedStyle(tmpReq.tags, "tags", "json");
1172
+ }
1173
+ let query = {};
1174
+ if (!tea_util_1.default.isUnset(request.creator)) {
1175
+ query["creator"] = request.creator;
1176
+ }
1177
+ if (!tea_util_1.default.isUnset(request.endTimeShrink)) {
1178
+ query["endTime"] = request.endTimeShrink;
1179
+ }
1180
+ if (!tea_util_1.default.isUnset(request.jobRunId)) {
1181
+ query["jobRunId"] = request.jobRunId;
1182
+ }
1183
+ if (!tea_util_1.default.isUnset(request.maxResults)) {
1184
+ query["maxResults"] = request.maxResults;
1185
+ }
1186
+ if (!tea_util_1.default.isUnset(request.name)) {
1187
+ query["name"] = request.name;
1188
+ }
1189
+ if (!tea_util_1.default.isUnset(request.nextToken)) {
1190
+ query["nextToken"] = request.nextToken;
1191
+ }
1192
+ if (!tea_util_1.default.isUnset(request.regionId)) {
1193
+ query["regionId"] = request.regionId;
1194
+ }
1195
+ if (!tea_util_1.default.isUnset(request.resourceQueueId)) {
1196
+ query["resourceQueueId"] = request.resourceQueueId;
1197
+ }
1198
+ if (!tea_util_1.default.isUnset(request.startTimeShrink)) {
1199
+ query["startTime"] = request.startTimeShrink;
1200
+ }
1201
+ if (!tea_util_1.default.isUnset(request.statesShrink)) {
1202
+ query["states"] = request.statesShrink;
1203
+ }
1204
+ if (!tea_util_1.default.isUnset(request.tagsShrink)) {
1205
+ query["tags"] = request.tagsShrink;
1206
+ }
1207
+ let req = new $OpenApi.OpenApiRequest({
1208
+ headers: headers,
1209
+ query: openapi_util_1.default.query(query),
1210
+ });
1211
+ let params = new $OpenApi.Params({
1212
+ action: "ListJobRuns",
1213
+ version: "2023-08-08",
1214
+ protocol: "HTTPS",
1215
+ pathname: `/api/v1/workspaces/${openapi_util_1.default.getEncodeParam(workspaceId)}/jobRuns`,
1216
+ method: "GET",
1217
+ authType: "AK",
1218
+ style: "ROA",
1219
+ reqBodyType: "json",
1220
+ bodyType: "json",
1221
+ });
1222
+ return $tea.cast(await this.callApi(params, req, runtime), new ListJobRunsResponse({}));
1223
+ }
1224
+ async listJobRuns(workspaceId, request) {
1225
+ let runtime = new $Util.RuntimeOptions({});
1226
+ let headers = {};
1227
+ return await this.listJobRunsWithOptions(workspaceId, request, headers, runtime);
1228
+ }
1229
+ async startJobRunWithOptions(workspaceId, request, headers, runtime) {
1230
+ tea_util_1.default.validateModel(request);
1231
+ let query = {};
1232
+ if (!tea_util_1.default.isUnset(request.regionId)) {
1233
+ query["regionId"] = request.regionId;
1234
+ }
1235
+ let body = {};
1236
+ if (!tea_util_1.default.isUnset(request.clientToken)) {
1237
+ body["clientToken"] = request.clientToken;
1238
+ }
1239
+ if (!tea_util_1.default.isUnset(request.codeType)) {
1240
+ body["codeType"] = request.codeType;
1241
+ }
1242
+ if (!tea_util_1.default.isUnset(request.configurationOverrides)) {
1243
+ body["configurationOverrides"] = request.configurationOverrides;
1244
+ }
1245
+ if (!tea_util_1.default.isUnset(request.executionTimeoutSeconds)) {
1246
+ body["executionTimeoutSeconds"] = request.executionTimeoutSeconds;
1247
+ }
1248
+ if (!tea_util_1.default.isUnset(request.jobDriver)) {
1249
+ body["jobDriver"] = request.jobDriver;
1250
+ }
1251
+ if (!tea_util_1.default.isUnset(request.jobId)) {
1252
+ body["jobId"] = request.jobId;
1253
+ }
1254
+ if (!tea_util_1.default.isUnset(request.name)) {
1255
+ body["name"] = request.name;
1256
+ }
1257
+ if (!tea_util_1.default.isUnset(request.releaseVersion)) {
1258
+ body["releaseVersion"] = request.releaseVersion;
1259
+ }
1260
+ if (!tea_util_1.default.isUnset(request.resourceQueueId)) {
1261
+ body["resourceQueueId"] = request.resourceQueueId;
1262
+ }
1263
+ if (!tea_util_1.default.isUnset(request.tags)) {
1264
+ body["tags"] = request.tags;
1265
+ }
1266
+ let req = new $OpenApi.OpenApiRequest({
1267
+ headers: headers,
1268
+ query: openapi_util_1.default.query(query),
1269
+ body: openapi_util_1.default.parseToMap(body),
1270
+ });
1271
+ let params = new $OpenApi.Params({
1272
+ action: "StartJobRun",
1273
+ version: "2023-08-08",
1274
+ protocol: "HTTPS",
1275
+ pathname: `/api/v1/workspaces/${openapi_util_1.default.getEncodeParam(workspaceId)}/jobRuns`,
1276
+ method: "POST",
1277
+ authType: "AK",
1278
+ style: "ROA",
1279
+ reqBodyType: "json",
1280
+ bodyType: "json",
1281
+ });
1282
+ return $tea.cast(await this.callApi(params, req, runtime), new StartJobRunResponse({}));
1283
+ }
1284
+ async startJobRun(workspaceId, request) {
1285
+ let runtime = new $Util.RuntimeOptions({});
1286
+ let headers = {};
1287
+ return await this.startJobRunWithOptions(workspaceId, request, headers, runtime);
1288
+ }
1289
+ }
1290
+ exports.default = Client;
1291
+ //# sourceMappingURL=client.js.map