Skip to content

Commit 717df3e

Browse files
author
awstools
committed
feat(client-m2): Add returnCode, batchJobIdentifier in GetBatchJobExecution response, for user to view the batch job execution result & unique identifier from engine. Also removed unused headers from REST APIs
1 parent 40714b5 commit 717df3e

File tree

4 files changed

+322
-588
lines changed

4 files changed

+322
-588
lines changed

clients/client-m2/src/endpoint/ruleset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ m={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsFIPS"]}]},
2525
n={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsDualStack"]}]},
2626
o=[j],
2727
p=[k];
28-
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{endpoint:{url:"https://m2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{endpoint:{url:"https://m2.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]};
28+
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://m2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://m2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://m2.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]}]};
2929
export const ruleSet: RuleSetObject = _data;

clients/client-m2/src/models/models_0.ts

Lines changed: 124 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,80 @@ export interface GetBatchJobExecutionRequest {
10011001
executionId: string | undefined;
10021002
}
10031003

1004+
/**
1005+
* <p>A batch job identifier in which the batch job to run is identified by the file name and
1006+
* the relative path to the file name.</p>
1007+
*/
1008+
export interface FileBatchJobIdentifier {
1009+
/**
1010+
* <p>The file name for the batch job identifier.</p>
1011+
*/
1012+
fileName: string | undefined;
1013+
1014+
/**
1015+
* <p>The relative path to the file name for the batch job identifier.</p>
1016+
*/
1017+
folderPath?: string;
1018+
}
1019+
1020+
/**
1021+
* <p>A batch job identifier in which the batch job to run is identified by the script
1022+
* name.</p>
1023+
*/
1024+
export interface ScriptBatchJobIdentifier {
1025+
/**
1026+
* <p>The name of the script containing the batch job definition.</p>
1027+
*/
1028+
scriptName: string | undefined;
1029+
}
1030+
1031+
/**
1032+
* <p>Identifies a specific batch job.</p>
1033+
*/
1034+
export type BatchJobIdentifier =
1035+
| BatchJobIdentifier.FileBatchJobIdentifierMember
1036+
| BatchJobIdentifier.ScriptBatchJobIdentifierMember
1037+
| BatchJobIdentifier.$UnknownMember;
1038+
1039+
export namespace BatchJobIdentifier {
1040+
/**
1041+
* <p>Specifies a file associated with a specific batch job.</p>
1042+
*/
1043+
export interface FileBatchJobIdentifierMember {
1044+
fileBatchJobIdentifier: FileBatchJobIdentifier;
1045+
scriptBatchJobIdentifier?: never;
1046+
$unknown?: never;
1047+
}
1048+
1049+
/**
1050+
* <p>A batch job identifier in which the batch job to run is identified by the script name.</p>
1051+
*/
1052+
export interface ScriptBatchJobIdentifierMember {
1053+
fileBatchJobIdentifier?: never;
1054+
scriptBatchJobIdentifier: ScriptBatchJobIdentifier;
1055+
$unknown?: never;
1056+
}
1057+
1058+
export interface $UnknownMember {
1059+
fileBatchJobIdentifier?: never;
1060+
scriptBatchJobIdentifier?: never;
1061+
$unknown: [string, any];
1062+
}
1063+
1064+
export interface Visitor<T> {
1065+
fileBatchJobIdentifier: (value: FileBatchJobIdentifier) => T;
1066+
scriptBatchJobIdentifier: (value: ScriptBatchJobIdentifier) => T;
1067+
_: (name: string, value: any) => T;
1068+
}
1069+
1070+
export const visit = <T>(value: BatchJobIdentifier, visitor: Visitor<T>): T => {
1071+
if (value.fileBatchJobIdentifier !== undefined) return visitor.fileBatchJobIdentifier(value.fileBatchJobIdentifier);
1072+
if (value.scriptBatchJobIdentifier !== undefined)
1073+
return visitor.scriptBatchJobIdentifier(value.scriptBatchJobIdentifier);
1074+
return visitor._(value.$unknown[0], value.$unknown[1]);
1075+
};
1076+
}
1077+
10041078
export enum BatchJobType {
10051079
JES2 = "JES2",
10061080
JES3 = "JES3",
@@ -1069,6 +1143,16 @@ export interface GetBatchJobExecutionResponse {
10691143
* <p>The reason for the reported status.</p>
10701144
*/
10711145
statusReason?: string;
1146+
1147+
/**
1148+
* <p/>
1149+
*/
1150+
returnCode?: string;
1151+
1152+
/**
1153+
* <p>Identifies a specific batch job.</p>
1154+
*/
1155+
batchJobIdentifier?: BatchJobIdentifier;
10721156
}
10731157

10741158
export interface GetDataSetDetailsRequest {
@@ -1681,6 +1765,16 @@ export interface BatchJobExecutionSummary {
16811765
* <p>The timestamp when this batch job execution ended.</p>
16821766
*/
16831767
endTime?: Date;
1768+
1769+
/**
1770+
* <p/>
1771+
*/
1772+
returnCode?: string;
1773+
1774+
/**
1775+
* <p>Identifies a specific batch job.</p>
1776+
*/
1777+
batchJobIdentifier?: BatchJobIdentifier;
16841778
}
16851779

16861780
export interface ListBatchJobExecutionsResponse {
@@ -1905,80 +1999,6 @@ export interface StartApplicationRequest {
19051999

19062000
export interface StartApplicationResponse {}
19072001

1908-
/**
1909-
* <p>A batch job identifier in which the batch job to run is identified by the file name and
1910-
* the relative path to the file name.</p>
1911-
*/
1912-
export interface FileBatchJobIdentifier {
1913-
/**
1914-
* <p>The file name for the batch job identifier.</p>
1915-
*/
1916-
fileName: string | undefined;
1917-
1918-
/**
1919-
* <p>The relative path to the file name for the batch job identifier.</p>
1920-
*/
1921-
folderPath?: string;
1922-
}
1923-
1924-
/**
1925-
* <p>A batch job identifier in which the batch job to run is identified by the script
1926-
* name.</p>
1927-
*/
1928-
export interface ScriptBatchJobIdentifier {
1929-
/**
1930-
* <p>The name of the script containing the batch job definition.</p>
1931-
*/
1932-
scriptName: string | undefined;
1933-
}
1934-
1935-
/**
1936-
* <p>Identifies a specific batch job.</p>
1937-
*/
1938-
export type BatchJobIdentifier =
1939-
| BatchJobIdentifier.FileBatchJobIdentifierMember
1940-
| BatchJobIdentifier.ScriptBatchJobIdentifierMember
1941-
| BatchJobIdentifier.$UnknownMember;
1942-
1943-
export namespace BatchJobIdentifier {
1944-
/**
1945-
* <p>Specifies a file associated with a specific batch job.</p>
1946-
*/
1947-
export interface FileBatchJobIdentifierMember {
1948-
fileBatchJobIdentifier: FileBatchJobIdentifier;
1949-
scriptBatchJobIdentifier?: never;
1950-
$unknown?: never;
1951-
}
1952-
1953-
/**
1954-
* <p>A batch job identifier in which the batch job to run is identified by the script name.</p>
1955-
*/
1956-
export interface ScriptBatchJobIdentifierMember {
1957-
fileBatchJobIdentifier?: never;
1958-
scriptBatchJobIdentifier: ScriptBatchJobIdentifier;
1959-
$unknown?: never;
1960-
}
1961-
1962-
export interface $UnknownMember {
1963-
fileBatchJobIdentifier?: never;
1964-
scriptBatchJobIdentifier?: never;
1965-
$unknown: [string, any];
1966-
}
1967-
1968-
export interface Visitor<T> {
1969-
fileBatchJobIdentifier: (value: FileBatchJobIdentifier) => T;
1970-
scriptBatchJobIdentifier: (value: ScriptBatchJobIdentifier) => T;
1971-
_: (name: string, value: any) => T;
1972-
}
1973-
1974-
export const visit = <T>(value: BatchJobIdentifier, visitor: Visitor<T>): T => {
1975-
if (value.fileBatchJobIdentifier !== undefined) return visitor.fileBatchJobIdentifier(value.fileBatchJobIdentifier);
1976-
if (value.scriptBatchJobIdentifier !== undefined)
1977-
return visitor.scriptBatchJobIdentifier(value.scriptBatchJobIdentifier);
1978-
return visitor._(value.$unknown[0], value.$unknown[1]);
1979-
};
1980-
}
1981-
19822002
export interface StartBatchJobRequest {
19832003
/**
19842004
* <p>The unique identifier of the application associated with this batch job.</p>
@@ -2848,11 +2868,37 @@ export const GetBatchJobExecutionRequestFilterSensitiveLog = (obj: GetBatchJobEx
28482868
...obj,
28492869
});
28502870

2871+
/**
2872+
* @internal
2873+
*/
2874+
export const FileBatchJobIdentifierFilterSensitiveLog = (obj: FileBatchJobIdentifier): any => ({
2875+
...obj,
2876+
});
2877+
2878+
/**
2879+
* @internal
2880+
*/
2881+
export const ScriptBatchJobIdentifierFilterSensitiveLog = (obj: ScriptBatchJobIdentifier): any => ({
2882+
...obj,
2883+
});
2884+
2885+
/**
2886+
* @internal
2887+
*/
2888+
export const BatchJobIdentifierFilterSensitiveLog = (obj: BatchJobIdentifier): any => {
2889+
if (obj.fileBatchJobIdentifier !== undefined)
2890+
return { fileBatchJobIdentifier: FileBatchJobIdentifierFilterSensitiveLog(obj.fileBatchJobIdentifier) };
2891+
if (obj.scriptBatchJobIdentifier !== undefined)
2892+
return { scriptBatchJobIdentifier: ScriptBatchJobIdentifierFilterSensitiveLog(obj.scriptBatchJobIdentifier) };
2893+
if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" };
2894+
};
2895+
28512896
/**
28522897
* @internal
28532898
*/
28542899
export const GetBatchJobExecutionResponseFilterSensitiveLog = (obj: GetBatchJobExecutionResponse): any => ({
28552900
...obj,
2901+
...(obj.batchJobIdentifier && { batchJobIdentifier: BatchJobIdentifierFilterSensitiveLog(obj.batchJobIdentifier) }),
28562902
});
28572903

28582904
/**
@@ -3017,13 +3063,17 @@ export const ListBatchJobExecutionsRequestFilterSensitiveLog = (obj: ListBatchJo
30173063
*/
30183064
export const BatchJobExecutionSummaryFilterSensitiveLog = (obj: BatchJobExecutionSummary): any => ({
30193065
...obj,
3066+
...(obj.batchJobIdentifier && { batchJobIdentifier: BatchJobIdentifierFilterSensitiveLog(obj.batchJobIdentifier) }),
30203067
});
30213068

30223069
/**
30233070
* @internal
30243071
*/
30253072
export const ListBatchJobExecutionsResponseFilterSensitiveLog = (obj: ListBatchJobExecutionsResponse): any => ({
30263073
...obj,
3074+
...(obj.batchJobExecutions && {
3075+
batchJobExecutions: obj.batchJobExecutions.map((item) => BatchJobExecutionSummaryFilterSensitiveLog(item)),
3076+
}),
30273077
});
30283078

30293079
/**
@@ -3103,31 +3153,6 @@ export const StartApplicationResponseFilterSensitiveLog = (obj: StartApplication
31033153
...obj,
31043154
});
31053155

3106-
/**
3107-
* @internal
3108-
*/
3109-
export const FileBatchJobIdentifierFilterSensitiveLog = (obj: FileBatchJobIdentifier): any => ({
3110-
...obj,
3111-
});
3112-
3113-
/**
3114-
* @internal
3115-
*/
3116-
export const ScriptBatchJobIdentifierFilterSensitiveLog = (obj: ScriptBatchJobIdentifier): any => ({
3117-
...obj,
3118-
});
3119-
3120-
/**
3121-
* @internal
3122-
*/
3123-
export const BatchJobIdentifierFilterSensitiveLog = (obj: BatchJobIdentifier): any => {
3124-
if (obj.fileBatchJobIdentifier !== undefined)
3125-
return { fileBatchJobIdentifier: FileBatchJobIdentifierFilterSensitiveLog(obj.fileBatchJobIdentifier) };
3126-
if (obj.scriptBatchJobIdentifier !== undefined)
3127-
return { scriptBatchJobIdentifier: ScriptBatchJobIdentifierFilterSensitiveLog(obj.scriptBatchJobIdentifier) };
3128-
if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" };
3129-
};
3130-
31313156
/**
31323157
* @internal
31333158
*/

clients/client-m2/src/protocols/Aws_restJson1.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,6 +1798,12 @@ export const deserializeAws_restJson1GetBatchJobExecutionCommand = async (
17981798
if (data.applicationId != null) {
17991799
contents.applicationId = __expectString(data.applicationId);
18001800
}
1801+
if (data.batchJobIdentifier != null) {
1802+
contents.batchJobIdentifier = deserializeAws_restJson1BatchJobIdentifier(
1803+
__expectUnion(data.batchJobIdentifier),
1804+
context
1805+
);
1806+
}
18011807
if (data.endTime != null) {
18021808
contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime)));
18031809
}
@@ -1816,6 +1822,9 @@ export const deserializeAws_restJson1GetBatchJobExecutionCommand = async (
18161822
if (data.jobUser != null) {
18171823
contents.jobUser = __expectString(data.jobUser);
18181824
}
1825+
if (data.returnCode != null) {
1826+
contents.returnCode = __expectString(data.returnCode);
1827+
}
18191828
if (data.startTime != null) {
18201829
contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime)));
18211830
}
@@ -3630,12 +3639,17 @@ const deserializeAws_restJson1BatchJobExecutionSummary = (
36303639
): BatchJobExecutionSummary => {
36313640
return {
36323641
applicationId: __expectString(output.applicationId),
3642+
batchJobIdentifier:
3643+
output.batchJobIdentifier != null
3644+
? deserializeAws_restJson1BatchJobIdentifier(__expectUnion(output.batchJobIdentifier), context)
3645+
: undefined,
36333646
endTime:
36343647
output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined,
36353648
executionId: __expectString(output.executionId),
36363649
jobId: __expectString(output.jobId),
36373650
jobName: __expectString(output.jobName),
36383651
jobType: __expectString(output.jobType),
3652+
returnCode: __expectString(output.returnCode),
36393653
startTime:
36403654
output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined,
36413655
status: __expectString(output.status),
@@ -3657,6 +3671,23 @@ const deserializeAws_restJson1BatchJobExecutionSummaryList = (
36573671
return retVal;
36583672
};
36593673

3674+
const deserializeAws_restJson1BatchJobIdentifier = (output: any, context: __SerdeContext): BatchJobIdentifier => {
3675+
if (output.fileBatchJobIdentifier != null) {
3676+
return {
3677+
fileBatchJobIdentifier: deserializeAws_restJson1FileBatchJobIdentifier(output.fileBatchJobIdentifier, context),
3678+
};
3679+
}
3680+
if (output.scriptBatchJobIdentifier != null) {
3681+
return {
3682+
scriptBatchJobIdentifier: deserializeAws_restJson1ScriptBatchJobIdentifier(
3683+
output.scriptBatchJobIdentifier,
3684+
context
3685+
),
3686+
};
3687+
}
3688+
return { $unknown: Object.entries(output)[0] };
3689+
};
3690+
36603691
const deserializeAws_restJson1DatasetDetailOrgAttributes = (
36613692
output: any,
36623693
context: __SerdeContext
@@ -3844,6 +3875,16 @@ const deserializeAws_restJson1FileBatchJobDefinition = (
38443875
} as any;
38453876
};
38463877

3878+
const deserializeAws_restJson1FileBatchJobIdentifier = (
3879+
output: any,
3880+
context: __SerdeContext
3881+
): FileBatchJobIdentifier => {
3882+
return {
3883+
fileName: __expectString(output.fileName),
3884+
folderPath: __expectString(output.folderPath),
3885+
} as any;
3886+
};
3887+
38473888
const deserializeAws_restJson1FsxStorageConfiguration = (
38483889
output: any,
38493890
context: __SerdeContext
@@ -3935,6 +3976,15 @@ const deserializeAws_restJson1ScriptBatchJobDefinition = (
39353976
} as any;
39363977
};
39373978

3979+
const deserializeAws_restJson1ScriptBatchJobIdentifier = (
3980+
output: any,
3981+
context: __SerdeContext
3982+
): ScriptBatchJobIdentifier => {
3983+
return {
3984+
scriptName: __expectString(output.scriptName),
3985+
} as any;
3986+
};
3987+
39383988
const deserializeAws_restJson1StorageConfiguration = (output: any, context: __SerdeContext): StorageConfiguration => {
39393989
if (output.efs != null) {
39403990
return {

0 commit comments

Comments
 (0)