Skip to content

Commit 0aa8336

Browse files
author
awstools
committed
feat(client-m2): Adding new ListBatchJobRestartPoints API and support for restart batch job.
1 parent b99376e commit 0aa8336

File tree

11 files changed

+596
-0
lines changed

11 files changed

+596
-0
lines changed

clients/client-m2/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,14 @@ ListBatchJobExecutions
366366

367367
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/m2/command/ListBatchJobExecutionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-m2/Interface/ListBatchJobExecutionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-m2/Interface/ListBatchJobExecutionsCommandOutput/)
368368

369+
</details>
370+
<details>
371+
<summary>
372+
ListBatchJobRestartPoints
373+
</summary>
374+
375+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/m2/command/ListBatchJobRestartPointsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-m2/Interface/ListBatchJobRestartPointsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-m2/Interface/ListBatchJobRestartPointsCommandOutput/)
376+
369377
</details>
370378
<details>
371379
<summary>

clients/client-m2/src/M2.ts

+23
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ import {
102102
ListBatchJobExecutionsCommandInput,
103103
ListBatchJobExecutionsCommandOutput,
104104
} from "./commands/ListBatchJobExecutionsCommand";
105+
import {
106+
ListBatchJobRestartPointsCommand,
107+
ListBatchJobRestartPointsCommandInput,
108+
ListBatchJobRestartPointsCommandOutput,
109+
} from "./commands/ListBatchJobRestartPointsCommand";
105110
import {
106111
ListDataSetImportHistoryCommand,
107112
ListDataSetImportHistoryCommandInput,
@@ -186,6 +191,7 @@ const commands = {
186191
ListApplicationVersionsCommand,
187192
ListBatchJobDefinitionsCommand,
188193
ListBatchJobExecutionsCommand,
194+
ListBatchJobRestartPointsCommand,
189195
ListDataSetImportHistoryCommand,
190196
ListDataSetsCommand,
191197
ListDeploymentsCommand,
@@ -532,6 +538,23 @@ export interface M2 {
532538
cb: (err: any, data?: ListBatchJobExecutionsCommandOutput) => void
533539
): void;
534540

541+
/**
542+
* @see {@link ListBatchJobRestartPointsCommand}
543+
*/
544+
listBatchJobRestartPoints(
545+
args: ListBatchJobRestartPointsCommandInput,
546+
options?: __HttpHandlerOptions
547+
): Promise<ListBatchJobRestartPointsCommandOutput>;
548+
listBatchJobRestartPoints(
549+
args: ListBatchJobRestartPointsCommandInput,
550+
cb: (err: any, data?: ListBatchJobRestartPointsCommandOutput) => void
551+
): void;
552+
listBatchJobRestartPoints(
553+
args: ListBatchJobRestartPointsCommandInput,
554+
options: __HttpHandlerOptions,
555+
cb: (err: any, data?: ListBatchJobRestartPointsCommandOutput) => void
556+
): void;
557+
535558
/**
536559
* @see {@link ListDataSetImportHistoryCommand}
537560
*/

clients/client-m2/src/M2Client.ts

+6
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ import {
103103
ListBatchJobExecutionsCommandInput,
104104
ListBatchJobExecutionsCommandOutput,
105105
} from "./commands/ListBatchJobExecutionsCommand";
106+
import {
107+
ListBatchJobRestartPointsCommandInput,
108+
ListBatchJobRestartPointsCommandOutput,
109+
} from "./commands/ListBatchJobRestartPointsCommand";
106110
import {
107111
ListDataSetImportHistoryCommandInput,
108112
ListDataSetImportHistoryCommandOutput,
@@ -157,6 +161,7 @@ export type ServiceInputTypes =
157161
| ListApplicationsCommandInput
158162
| ListBatchJobDefinitionsCommandInput
159163
| ListBatchJobExecutionsCommandInput
164+
| ListBatchJobRestartPointsCommandInput
160165
| ListDataSetImportHistoryCommandInput
161166
| ListDataSetsCommandInput
162167
| ListDeploymentsCommandInput
@@ -195,6 +200,7 @@ export type ServiceOutputTypes =
195200
| ListApplicationsCommandOutput
196201
| ListBatchJobDefinitionsCommandOutput
197202
| ListBatchJobExecutionsCommandOutput
203+
| ListBatchJobRestartPointsCommandOutput
198204
| ListDataSetImportHistoryCommandOutput
199205
| ListDataSetsCommandOutput
200206
| ListDeploymentsCommandOutput

clients/client-m2/src/commands/GetBatchJobExecutionCommand.ts

+15
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ export interface GetBatchJobExecutionCommandOutput extends GetBatchJobExecutionR
6868
* // scriptName: "STRING_VALUE",
6969
* // },
7070
* // },
71+
* // restartBatchJobIdentifier: { // RestartBatchJobIdentifier
72+
* // executionId: "STRING_VALUE", // required
73+
* // jobStepRestartMarker: { // JobStepRestartMarker
74+
* // fromStep: "STRING_VALUE", // required
75+
* // fromProcStep: "STRING_VALUE",
76+
* // toStep: "STRING_VALUE",
77+
* // toProcStep: "STRING_VALUE",
78+
* // },
79+
* // },
80+
* // },
81+
* // jobStepRestartMarker: {
82+
* // fromStep: "STRING_VALUE", // required
83+
* // fromProcStep: "STRING_VALUE",
84+
* // toStep: "STRING_VALUE",
85+
* // toProcStep: "STRING_VALUE",
7186
* // },
7287
* // };
7388
*

clients/client-m2/src/commands/ListBatchJobExecutionsCommand.ts

+9
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ export interface ListBatchJobExecutionsCommandOutput extends ListBatchJobExecuti
7777
* // scriptName: "STRING_VALUE",
7878
* // },
7979
* // },
80+
* // restartBatchJobIdentifier: { // RestartBatchJobIdentifier
81+
* // executionId: "STRING_VALUE", // required
82+
* // jobStepRestartMarker: { // JobStepRestartMarker
83+
* // fromStep: "STRING_VALUE", // required
84+
* // fromProcStep: "STRING_VALUE",
85+
* // toStep: "STRING_VALUE",
86+
* // toProcStep: "STRING_VALUE",
87+
* // },
88+
* // },
8089
* // },
8190
* // },
8291
* // ],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { M2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../M2Client";
9+
import { ListBatchJobRestartPointsRequest, ListBatchJobRestartPointsResponse } from "../models/models_0";
10+
import { de_ListBatchJobRestartPointsCommand, se_ListBatchJobRestartPointsCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link ListBatchJobRestartPointsCommand}.
20+
*/
21+
export interface ListBatchJobRestartPointsCommandInput extends ListBatchJobRestartPointsRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link ListBatchJobRestartPointsCommand}.
26+
*/
27+
export interface ListBatchJobRestartPointsCommandOutput extends ListBatchJobRestartPointsResponse, __MetadataBearer {}
28+
29+
/**
30+
* <p>Lists all the job steps for JCL files to restart a batch job. This is only applicable for Micro Focus engine with versions 8.0.6 and above.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { M2Client, ListBatchJobRestartPointsCommand } from "@aws-sdk/client-m2"; // ES Modules import
35+
* // const { M2Client, ListBatchJobRestartPointsCommand } = require("@aws-sdk/client-m2"); // CommonJS import
36+
* const client = new M2Client(config);
37+
* const input = { // ListBatchJobRestartPointsRequest
38+
* applicationId: "STRING_VALUE", // required
39+
* executionId: "STRING_VALUE", // required
40+
* };
41+
* const command = new ListBatchJobRestartPointsCommand(input);
42+
* const response = await client.send(command);
43+
* // { // ListBatchJobRestartPointsResponse
44+
* // batchJobSteps: [ // BatchJobStepList
45+
* // { // JobStep
46+
* // stepNumber: Number("int"),
47+
* // stepName: "STRING_VALUE",
48+
* // procStepNumber: Number("int"),
49+
* // procStepName: "STRING_VALUE",
50+
* // stepCondCode: "STRING_VALUE",
51+
* // stepRestartable: true || false,
52+
* // },
53+
* // ],
54+
* // };
55+
*
56+
* ```
57+
*
58+
* @param ListBatchJobRestartPointsCommandInput - {@link ListBatchJobRestartPointsCommandInput}
59+
* @returns {@link ListBatchJobRestartPointsCommandOutput}
60+
* @see {@link ListBatchJobRestartPointsCommandInput} for command's `input` shape.
61+
* @see {@link ListBatchJobRestartPointsCommandOutput} for command's `response` shape.
62+
* @see {@link M2ClientResolvedConfig | config} for M2Client's `config` shape.
63+
*
64+
* @throws {@link AccessDeniedException} (client fault)
65+
* <p>The account or role doesn't have the right permissions to make the request.</p>
66+
*
67+
* @throws {@link ConflictException} (client fault)
68+
* <p>The parameters provided in the request conflict with existing resources.</p>
69+
*
70+
* @throws {@link InternalServerException} (server fault)
71+
* <p>An unexpected error occurred during the processing of the request.</p>
72+
*
73+
* @throws {@link ResourceNotFoundException} (client fault)
74+
* <p>The specified resource was not found.</p>
75+
*
76+
* @throws {@link ThrottlingException} (client fault)
77+
* <p>The number of requests made exceeds the limit.</p>
78+
*
79+
* @throws {@link ValidationException} (client fault)
80+
* <p>One or more parameters provided in the request is not valid.</p>
81+
*
82+
* @throws {@link M2ServiceException}
83+
* <p>Base exception class for all service exceptions from M2 service.</p>
84+
*
85+
* @public
86+
*/
87+
export class ListBatchJobRestartPointsCommand extends $Command
88+
.classBuilder<
89+
ListBatchJobRestartPointsCommandInput,
90+
ListBatchJobRestartPointsCommandOutput,
91+
M2ClientResolvedConfig,
92+
ServiceInputTypes,
93+
ServiceOutputTypes
94+
>()
95+
.ep({
96+
...commonParams,
97+
})
98+
.m(function (this: any, Command: any, cs: any, config: M2ClientResolvedConfig, o: any) {
99+
return [
100+
getSerdePlugin(config, this.serialize, this.deserialize),
101+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
102+
];
103+
})
104+
.s("AwsSupernovaControlPlaneService", "ListBatchJobRestartPoints", {})
105+
.n("M2Client", "ListBatchJobRestartPointsCommand")
106+
.f(void 0, void 0)
107+
.ser(se_ListBatchJobRestartPointsCommand)
108+
.de(de_ListBatchJobRestartPointsCommand)
109+
.build() {}

clients/client-m2/src/commands/StartBatchJobCommand.ts

+9
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ export interface StartBatchJobCommandOutput extends StartBatchJobResponse, __Met
5353
* scriptName: "STRING_VALUE",
5454
* },
5555
* },
56+
* restartBatchJobIdentifier: { // RestartBatchJobIdentifier
57+
* executionId: "STRING_VALUE", // required
58+
* jobStepRestartMarker: { // JobStepRestartMarker
59+
* fromStep: "STRING_VALUE", // required
60+
* fromProcStep: "STRING_VALUE",
61+
* toStep: "STRING_VALUE",
62+
* toProcStep: "STRING_VALUE",
63+
* },
64+
* },
5665
* },
5766
* jobParams: { // BatchJobParametersMap
5867
* "<keys>": "STRING_VALUE",

clients/client-m2/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export * from "./ListApplicationVersionsCommand";
1919
export * from "./ListApplicationsCommand";
2020
export * from "./ListBatchJobDefinitionsCommand";
2121
export * from "./ListBatchJobExecutionsCommand";
22+
export * from "./ListBatchJobRestartPointsCommand";
2223
export * from "./ListDataSetImportHistoryCommand";
2324
export * from "./ListDataSetsCommand";
2425
export * from "./ListDeploymentsCommand";

0 commit comments

Comments
 (0)