Skip to content

Commit

Permalink
feat(client-m2): Adding new ListBatchJobRestartPoints API and support…
Browse files Browse the repository at this point in the history
… for restart batch job.
  • Loading branch information
awstools committed Apr 16, 2024
1 parent b99376e commit 0aa8336
Show file tree
Hide file tree
Showing 11 changed files with 596 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clients/client-m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,14 @@ ListBatchJobExecutions

[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/)

</details>
<details>
<summary>
ListBatchJobRestartPoints
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-m2/src/M2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ import {
ListBatchJobExecutionsCommandInput,
ListBatchJobExecutionsCommandOutput,
} from "./commands/ListBatchJobExecutionsCommand";
import {
ListBatchJobRestartPointsCommand,
ListBatchJobRestartPointsCommandInput,
ListBatchJobRestartPointsCommandOutput,
} from "./commands/ListBatchJobRestartPointsCommand";
import {
ListDataSetImportHistoryCommand,
ListDataSetImportHistoryCommandInput,
Expand Down Expand Up @@ -186,6 +191,7 @@ const commands = {
ListApplicationVersionsCommand,
ListBatchJobDefinitionsCommand,
ListBatchJobExecutionsCommand,
ListBatchJobRestartPointsCommand,
ListDataSetImportHistoryCommand,
ListDataSetsCommand,
ListDeploymentsCommand,
Expand Down Expand Up @@ -532,6 +538,23 @@ export interface M2 {
cb: (err: any, data?: ListBatchJobExecutionsCommandOutput) => void
): void;

/**
* @see {@link ListBatchJobRestartPointsCommand}
*/
listBatchJobRestartPoints(
args: ListBatchJobRestartPointsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListBatchJobRestartPointsCommandOutput>;
listBatchJobRestartPoints(
args: ListBatchJobRestartPointsCommandInput,
cb: (err: any, data?: ListBatchJobRestartPointsCommandOutput) => void
): void;
listBatchJobRestartPoints(
args: ListBatchJobRestartPointsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListBatchJobRestartPointsCommandOutput) => void
): void;

/**
* @see {@link ListDataSetImportHistoryCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-m2/src/M2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ import {
ListBatchJobExecutionsCommandInput,
ListBatchJobExecutionsCommandOutput,
} from "./commands/ListBatchJobExecutionsCommand";
import {
ListBatchJobRestartPointsCommandInput,
ListBatchJobRestartPointsCommandOutput,
} from "./commands/ListBatchJobRestartPointsCommand";
import {
ListDataSetImportHistoryCommandInput,
ListDataSetImportHistoryCommandOutput,
Expand Down Expand Up @@ -157,6 +161,7 @@ export type ServiceInputTypes =
| ListApplicationsCommandInput
| ListBatchJobDefinitionsCommandInput
| ListBatchJobExecutionsCommandInput
| ListBatchJobRestartPointsCommandInput
| ListDataSetImportHistoryCommandInput
| ListDataSetsCommandInput
| ListDeploymentsCommandInput
Expand Down Expand Up @@ -195,6 +200,7 @@ export type ServiceOutputTypes =
| ListApplicationsCommandOutput
| ListBatchJobDefinitionsCommandOutput
| ListBatchJobExecutionsCommandOutput
| ListBatchJobRestartPointsCommandOutput
| ListDataSetImportHistoryCommandOutput
| ListDataSetsCommandOutput
| ListDeploymentsCommandOutput
Expand Down
15 changes: 15 additions & 0 deletions clients/client-m2/src/commands/GetBatchJobExecutionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ export interface GetBatchJobExecutionCommandOutput extends GetBatchJobExecutionR
* // scriptName: "STRING_VALUE",
* // },
* // },
* // restartBatchJobIdentifier: { // RestartBatchJobIdentifier
* // executionId: "STRING_VALUE", // required
* // jobStepRestartMarker: { // JobStepRestartMarker
* // fromStep: "STRING_VALUE", // required
* // fromProcStep: "STRING_VALUE",
* // toStep: "STRING_VALUE",
* // toProcStep: "STRING_VALUE",
* // },
* // },
* // },
* // jobStepRestartMarker: {
* // fromStep: "STRING_VALUE", // required
* // fromProcStep: "STRING_VALUE",
* // toStep: "STRING_VALUE",
* // toProcStep: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ export interface ListBatchJobExecutionsCommandOutput extends ListBatchJobExecuti
* // scriptName: "STRING_VALUE",
* // },
* // },
* // restartBatchJobIdentifier: { // RestartBatchJobIdentifier
* // executionId: "STRING_VALUE", // required
* // jobStepRestartMarker: { // JobStepRestartMarker
* // fromStep: "STRING_VALUE", // required
* // fromProcStep: "STRING_VALUE",
* // toStep: "STRING_VALUE",
* // toProcStep: "STRING_VALUE",
* // },
* // },
* // },
* // },
* // ],
Expand Down
109 changes: 109 additions & 0 deletions clients/client-m2/src/commands/ListBatchJobRestartPointsCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { M2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../M2Client";
import { ListBatchJobRestartPointsRequest, ListBatchJobRestartPointsResponse } from "../models/models_0";
import { de_ListBatchJobRestartPointsCommand, se_ListBatchJobRestartPointsCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link ListBatchJobRestartPointsCommand}.
*/
export interface ListBatchJobRestartPointsCommandInput extends ListBatchJobRestartPointsRequest {}
/**
* @public
*
* The output of {@link ListBatchJobRestartPointsCommand}.
*/
export interface ListBatchJobRestartPointsCommandOutput extends ListBatchJobRestartPointsResponse, __MetadataBearer {}

/**
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { M2Client, ListBatchJobRestartPointsCommand } from "@aws-sdk/client-m2"; // ES Modules import
* // const { M2Client, ListBatchJobRestartPointsCommand } = require("@aws-sdk/client-m2"); // CommonJS import
* const client = new M2Client(config);
* const input = { // ListBatchJobRestartPointsRequest
* applicationId: "STRING_VALUE", // required
* executionId: "STRING_VALUE", // required
* };
* const command = new ListBatchJobRestartPointsCommand(input);
* const response = await client.send(command);
* // { // ListBatchJobRestartPointsResponse
* // batchJobSteps: [ // BatchJobStepList
* // { // JobStep
* // stepNumber: Number("int"),
* // stepName: "STRING_VALUE",
* // procStepNumber: Number("int"),
* // procStepName: "STRING_VALUE",
* // stepCondCode: "STRING_VALUE",
* // stepRestartable: true || false,
* // },
* // ],
* // };
*
* ```
*
* @param ListBatchJobRestartPointsCommandInput - {@link ListBatchJobRestartPointsCommandInput}
* @returns {@link ListBatchJobRestartPointsCommandOutput}
* @see {@link ListBatchJobRestartPointsCommandInput} for command's `input` shape.
* @see {@link ListBatchJobRestartPointsCommandOutput} for command's `response` shape.
* @see {@link M2ClientResolvedConfig | config} for M2Client's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>The account or role doesn't have the right permissions to make the request.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>The parameters provided in the request conflict with existing resources.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>An unexpected error occurred during the processing of the request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource was not found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The number of requests made exceeds the limit.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>One or more parameters provided in the request is not valid.</p>
*
* @throws {@link M2ServiceException}
* <p>Base exception class for all service exceptions from M2 service.</p>
*
* @public
*/
export class ListBatchJobRestartPointsCommand extends $Command
.classBuilder<
ListBatchJobRestartPointsCommandInput,
ListBatchJobRestartPointsCommandOutput,
M2ClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: M2ClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AwsSupernovaControlPlaneService", "ListBatchJobRestartPoints", {})
.n("M2Client", "ListBatchJobRestartPointsCommand")
.f(void 0, void 0)
.ser(se_ListBatchJobRestartPointsCommand)
.de(de_ListBatchJobRestartPointsCommand)
.build() {}
9 changes: 9 additions & 0 deletions clients/client-m2/src/commands/StartBatchJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ export interface StartBatchJobCommandOutput extends StartBatchJobResponse, __Met
* scriptName: "STRING_VALUE",
* },
* },
* restartBatchJobIdentifier: { // RestartBatchJobIdentifier
* executionId: "STRING_VALUE", // required
* jobStepRestartMarker: { // JobStepRestartMarker
* fromStep: "STRING_VALUE", // required
* fromProcStep: "STRING_VALUE",
* toStep: "STRING_VALUE",
* toProcStep: "STRING_VALUE",
* },
* },
* },
* jobParams: { // BatchJobParametersMap
* "<keys>": "STRING_VALUE",
Expand Down
1 change: 1 addition & 0 deletions clients/client-m2/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export * from "./ListApplicationVersionsCommand";
export * from "./ListApplicationsCommand";
export * from "./ListBatchJobDefinitionsCommand";
export * from "./ListBatchJobExecutionsCommand";
export * from "./ListBatchJobRestartPointsCommand";
export * from "./ListDataSetImportHistoryCommand";
export * from "./ListDataSetsCommand";
export * from "./ListDeploymentsCommand";
Expand Down
Loading

0 comments on commit 0aa8336

Please sign in to comment.