@@ -43,6 +43,7 @@ import {
43
43
} from "../commands/GetDashboardForJobRunCommand" ;
44
44
import { GetJobRunCommandInput , GetJobRunCommandOutput } from "../commands/GetJobRunCommand" ;
45
45
import { ListApplicationsCommandInput , ListApplicationsCommandOutput } from "../commands/ListApplicationsCommand" ;
46
+ import { ListJobRunAttemptsCommandInput , ListJobRunAttemptsCommandOutput } from "../commands/ListJobRunAttemptsCommand" ;
46
47
import { ListJobRunsCommandInput , ListJobRunsCommandOutput } from "../commands/ListJobRunsCommand" ;
47
48
import {
48
49
ListTagsForResourceCommandInput ,
@@ -71,6 +72,7 @@ import {
71
72
InternalServerException ,
72
73
JobDriver ,
73
74
JobRun ,
75
+ JobRunAttemptSummary ,
74
76
JobRunSummary ,
75
77
ManagedPersistenceMonitoringConfiguration ,
76
78
MaximumAllowedResources ,
@@ -79,6 +81,7 @@ import {
79
81
PrometheusMonitoringConfiguration ,
80
82
ResourceNotFoundException ,
81
83
ResourceUtilization ,
84
+ RetryPolicy ,
82
85
S3MonitoringConfiguration ,
83
86
ServiceQuotaExceededException ,
84
87
SparkSubmit ,
@@ -186,8 +189,11 @@ export const se_GetDashboardForJobRunCommand = async (
186
189
b . bp ( "/applications/{applicationId}/jobruns/{jobRunId}/dashboard" ) ;
187
190
b . p ( "applicationId" , ( ) => input . applicationId ! , "{applicationId}" , false ) ;
188
191
b . p ( "jobRunId" , ( ) => input . jobRunId ! , "{jobRunId}" , false ) ;
192
+ const query : any = map ( {
193
+ [ _a ] : [ ( ) => input . attempt !== void 0 , ( ) => input [ _a ] ! . toString ( ) ] ,
194
+ } ) ;
189
195
let body : any ;
190
- b . m ( "GET" ) . h ( headers ) . b ( body ) ;
196
+ b . m ( "GET" ) . h ( headers ) . q ( query ) . b ( body ) ;
191
197
return b . build ( ) ;
192
198
} ;
193
199
@@ -203,8 +209,11 @@ export const se_GetJobRunCommand = async (
203
209
b . bp ( "/applications/{applicationId}/jobruns/{jobRunId}" ) ;
204
210
b . p ( "applicationId" , ( ) => input . applicationId ! , "{applicationId}" , false ) ;
205
211
b . p ( "jobRunId" , ( ) => input . jobRunId ! , "{jobRunId}" , false ) ;
212
+ const query : any = map ( {
213
+ [ _a ] : [ ( ) => input . attempt !== void 0 , ( ) => input [ _a ] ! . toString ( ) ] ,
214
+ } ) ;
206
215
let body : any ;
207
- b . m ( "GET" ) . h ( headers ) . b ( body ) ;
216
+ b . m ( "GET" ) . h ( headers ) . q ( query ) . b ( body ) ;
208
217
return b . build ( ) ;
209
218
} ;
210
219
@@ -228,6 +237,27 @@ export const se_ListApplicationsCommand = async (
228
237
return b . build ( ) ;
229
238
} ;
230
239
240
+ /**
241
+ * serializeAws_restJson1ListJobRunAttemptsCommand
242
+ */
243
+ export const se_ListJobRunAttemptsCommand = async (
244
+ input : ListJobRunAttemptsCommandInput ,
245
+ context : __SerdeContext
246
+ ) : Promise < __HttpRequest > => {
247
+ const b = rb ( input , context ) ;
248
+ const headers : any = { } ;
249
+ b . bp ( "/applications/{applicationId}/jobruns/{jobRunId}/attempts" ) ;
250
+ b . p ( "applicationId" , ( ) => input . applicationId ! , "{applicationId}" , false ) ;
251
+ b . p ( "jobRunId" , ( ) => input . jobRunId ! , "{jobRunId}" , false ) ;
252
+ const query : any = map ( {
253
+ [ _nT ] : [ , input [ _nT ] ! ] ,
254
+ [ _mR ] : [ ( ) => input . maxResults !== void 0 , ( ) => input [ _mR ] ! . toString ( ) ] ,
255
+ } ) ;
256
+ let body : any ;
257
+ b . m ( "GET" ) . h ( headers ) . q ( query ) . b ( body ) ;
258
+ return b . build ( ) ;
259
+ } ;
260
+
231
261
/**
232
262
* serializeAws_restJson1ListJobRunsCommand
233
263
*/
@@ -245,6 +275,7 @@ export const se_ListJobRunsCommand = async (
245
275
[ _cAA ] : [ ( ) => input . createdAtAfter !== void 0 , ( ) => __serializeDateTime ( input [ _cAA ] ! ) . toString ( ) ] ,
246
276
[ _cAB ] : [ ( ) => input . createdAtBefore !== void 0 , ( ) => __serializeDateTime ( input [ _cAB ] ! ) . toString ( ) ] ,
247
277
[ _s ] : [ ( ) => input . states !== void 0 , ( ) => ( input [ _s ] ! || [ ] ) . map ( ( _entry ) => _entry as any ) ] ,
278
+ [ _m ] : [ , input [ _m ] ! ] ,
248
279
} ) ;
249
280
let body : any ;
250
281
b . m ( "GET" ) . h ( headers ) . q ( query ) . b ( body ) ;
@@ -304,7 +335,9 @@ export const se_StartJobRunCommand = async (
304
335
executionRoleArn : [ ] ,
305
336
executionTimeoutMinutes : [ ] ,
306
337
jobDriver : ( _ ) => _json ( _ ) ,
338
+ mode : [ ] ,
307
339
name : [ ] ,
340
+ retryPolicy : ( _ ) => _json ( _ ) ,
308
341
tags : ( _ ) => _json ( _ ) ,
309
342
} )
310
343
) ;
@@ -555,6 +588,28 @@ export const de_ListApplicationsCommand = async (
555
588
return contents ;
556
589
} ;
557
590
591
+ /**
592
+ * deserializeAws_restJson1ListJobRunAttemptsCommand
593
+ */
594
+ export const de_ListJobRunAttemptsCommand = async (
595
+ output : __HttpResponse ,
596
+ context : __SerdeContext
597
+ ) : Promise < ListJobRunAttemptsCommandOutput > => {
598
+ if ( output . statusCode !== 200 && output . statusCode >= 300 ) {
599
+ return de_CommandError ( output , context ) ;
600
+ }
601
+ const contents : any = map ( {
602
+ $metadata : deserializeMetadata ( output ) ,
603
+ } ) ;
604
+ const data : Record < string , any > = __expectNonNull ( __expectObject ( await parseBody ( output . body , context ) ) , "body" ) ;
605
+ const doc = take ( data , {
606
+ jobRunAttempts : ( _ ) => de_JobRunAttempts ( _ , context ) ,
607
+ nextToken : __expectString ,
608
+ } ) ;
609
+ Object . assign ( contents , doc ) ;
610
+ return contents ;
611
+ } ;
612
+
558
613
/**
559
614
* deserializeAws_restJson1ListJobRunsCommand
560
615
*/
@@ -906,6 +961,8 @@ const se_ConfigurationOverrides = (input: ConfigurationOverrides, context: __Ser
906
961
907
962
// se_PrometheusMonitoringConfiguration omitted.
908
963
964
+ // se_RetryPolicy omitted.
965
+
909
966
// se_S3MonitoringConfiguration omitted.
910
967
911
968
// se_SecurityGroupIds omitted.
@@ -1043,6 +1100,9 @@ const de_JobRun = (output: any, context: __SerdeContext): JobRun => {
1043
1100
return take ( output , {
1044
1101
applicationId : __expectString ,
1045
1102
arn : __expectString ,
1103
+ attempt : __expectInt32 ,
1104
+ attemptCreatedAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1105
+ attemptUpdatedAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1046
1106
billedResourceUtilization : ( _ : any ) => de_ResourceUtilization ( _ , context ) ,
1047
1107
configurationOverrides : ( _ : any ) => de_ConfigurationOverrides ( _ , context ) ,
1048
1108
createdAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
@@ -1051,9 +1111,11 @@ const de_JobRun = (output: any, context: __SerdeContext): JobRun => {
1051
1111
executionTimeoutMinutes : __expectLong ,
1052
1112
jobDriver : ( _ : any ) => _json ( __expectUnion ( _ ) ) ,
1053
1113
jobRunId : __expectString ,
1114
+ mode : __expectString ,
1054
1115
name : __expectString ,
1055
1116
networkConfiguration : _json ,
1056
1117
releaseLabel : __expectString ,
1118
+ retryPolicy : _json ,
1057
1119
state : __expectString ,
1058
1120
stateDetails : __expectString ,
1059
1121
tags : _json ,
@@ -1063,6 +1125,41 @@ const de_JobRun = (output: any, context: __SerdeContext): JobRun => {
1063
1125
} ) as any ;
1064
1126
} ;
1065
1127
1128
+ /**
1129
+ * deserializeAws_restJson1JobRunAttempts
1130
+ */
1131
+ const de_JobRunAttempts = ( output : any , context : __SerdeContext ) : JobRunAttemptSummary [ ] => {
1132
+ const retVal = ( output || [ ] )
1133
+ . filter ( ( e : any ) => e != null )
1134
+ . map ( ( entry : any ) => {
1135
+ return de_JobRunAttemptSummary ( entry , context ) ;
1136
+ } ) ;
1137
+ return retVal ;
1138
+ } ;
1139
+
1140
+ /**
1141
+ * deserializeAws_restJson1JobRunAttemptSummary
1142
+ */
1143
+ const de_JobRunAttemptSummary = ( output : any , context : __SerdeContext ) : JobRunAttemptSummary => {
1144
+ return take ( output , {
1145
+ applicationId : __expectString ,
1146
+ arn : __expectString ,
1147
+ attempt : __expectInt32 ,
1148
+ createdAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1149
+ createdBy : __expectString ,
1150
+ executionRole : __expectString ,
1151
+ id : __expectString ,
1152
+ jobCreatedAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1153
+ mode : __expectString ,
1154
+ name : __expectString ,
1155
+ releaseLabel : __expectString ,
1156
+ state : __expectString ,
1157
+ stateDetails : __expectString ,
1158
+ type : __expectString ,
1159
+ updatedAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1160
+ } ) as any ;
1161
+ } ;
1162
+
1066
1163
/**
1067
1164
* deserializeAws_restJson1JobRuns
1068
1165
*/
@@ -1082,10 +1179,14 @@ const de_JobRunSummary = (output: any, context: __SerdeContext): JobRunSummary =
1082
1179
return take ( output , {
1083
1180
applicationId : __expectString ,
1084
1181
arn : __expectString ,
1182
+ attempt : __expectInt32 ,
1183
+ attemptCreatedAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1184
+ attemptUpdatedAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1085
1185
createdAt : ( _ : any ) => __expectNonNull ( __parseEpochTimestamp ( __expectNumber ( _ ) ) ) ,
1086
1186
createdBy : __expectString ,
1087
1187
executionRole : __expectString ,
1088
1188
id : __expectString ,
1189
+ mode : __expectString ,
1089
1190
name : __expectString ,
1090
1191
releaseLabel : __expectString ,
1091
1192
state : __expectString ,
@@ -1120,6 +1221,8 @@ const de_ResourceUtilization = (output: any, context: __SerdeContext): ResourceU
1120
1221
} ) as any ;
1121
1222
} ;
1122
1223
1224
+ // de_RetryPolicy omitted.
1225
+
1123
1226
// de_S3MonitoringConfiguration omitted.
1124
1227
1125
1228
// de_SecurityGroupIds omitted.
@@ -1168,8 +1271,10 @@ const isSerializableHeaderValue = (value: any): boolean =>
1168
1271
( ! Object . getOwnPropertyNames ( value ) . includes ( "length" ) || value . length != 0 ) &&
1169
1272
( ! Object . getOwnPropertyNames ( value ) . includes ( "size" ) || value . size != 0 ) ;
1170
1273
1274
+ const _a = "attempt" ;
1171
1275
const _cAA = "createdAtAfter" ;
1172
1276
const _cAB = "createdAtBefore" ;
1277
+ const _m = "mode" ;
1173
1278
const _mR = "maxResults" ;
1174
1279
const _nT = "nextToken" ;
1175
1280
const _s = "states" ;
0 commit comments