Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class StartBatchJobCommandProtected

Starts a batch job and returns the unique identifier of this execution of the batch job. The associated application must be running in order to start the batch job.

Example

Use a bare-bones client and the command you need to make an API call.

import { M2Client, StartBatchJobCommand } from "@aws-sdk/client-m2"; // ES Modules import
// const { M2Client, StartBatchJobCommand } = require("@aws-sdk/client-m2"); // CommonJS import
const client = new M2Client(config);
const input = { // StartBatchJobRequest
applicationId: "STRING_VALUE", // required
batchJobIdentifier: { // BatchJobIdentifier Union: only one key present
fileBatchJobIdentifier: { // FileBatchJobIdentifier
fileName: "STRING_VALUE", // required
folderPath: "STRING_VALUE",
},
scriptBatchJobIdentifier: { // ScriptBatchJobIdentifier
scriptName: "STRING_VALUE", // required
},
},
jobParams: { // BatchJobParametersMap
"<keys>": "STRING_VALUE",
},
};
const command = new StartBatchJobCommand(input);
const response = await client.send(command);
// { // StartBatchJobResponse
// executionId: "STRING_VALUE", // required
// };

Param

StartBatchJobCommandInput

Returns

StartBatchJobCommandOutput

See

Throws

AccessDeniedException (client fault)

The account or role doesn't have the right permissions to make the request.

Throws

ConflictException (client fault)

The parameters provided in the request conflict with existing resources.

Throws

InternalServerException (server fault)

An unexpected error occurred during the processing of the request.

Throws

ResourceNotFoundException (client fault)

The specified resource was not found.

Throws

ThrottlingException (client fault)

The number of requests made exceeds the limit.

Throws

ValidationException (client fault)

One or more parameters provided in the request is not valid.

Throws

M2ServiceException

Base exception class for all service exceptions from M2 service.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<StartBatchJobCommandInput, StartBatchJobCommandOutput>

Methods