- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
StartJobRunCommand
Starts a job run using a job definition.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlueClient, StartJobRunCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, StartJobRunCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // StartJobRunRequest
JobName: "STRING_VALUE", // required
JobRunQueuingEnabled: true || false,
JobRunId: "STRING_VALUE",
Arguments: { // GenericMap
"<keys>": "STRING_VALUE",
},
AllocatedCapacity: Number("int"),
Timeout: Number("int"),
MaxCapacity: Number("double"),
SecurityConfiguration: "STRING_VALUE",
NotificationProperty: { // NotificationProperty
NotifyDelayAfter: Number("int"),
},
WorkerType: "Standard" || "G.1X" || "G.2X" || "G.025X" || "G.4X" || "G.8X" || "Z.2X",
NumberOfWorkers: Number("int"),
ExecutionClass: "FLEX" || "STANDARD",
};
const command = new StartJobRunCommand(input);
const response = await client.send(command);
// { // StartJobRunResponse
// JobRunId: "STRING_VALUE",
// };
StartJobRunCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
JobName Required | string | undefined | The name of the job definition to use. |
AllocatedCapacity | number | undefined | |
Arguments | Record<string, string> | undefined | The job arguments associated with this run. For this job run, they replace the default arguments set in the job definition itself. You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes. Job arguments may be logged. Do not pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, Secrets Manager or other secret management mechanism if you intend to keep them within the Job. For information about how to specify and consume your own Job arguments, see the Calling Glue APIs in Python topic in the developer guide. For information about the arguments you can provide to this field when configuring Spark jobs, see the Special Parameters Used by Glue topic in the developer guide. For information about the arguments you can provide to this field when configuring Ray jobs, see Using job parameters in Ray jobs in the developer guide. |
ExecutionClass | ExecutionClass | undefined | Indicates whether the job is run with a standard or flexible execution class. The standard execution-class is ideal for time-sensitive workloads that require fast job startup and dedicated resources. The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary. Only jobs with Glue version 3.0 and above and command type |
JobRunId | string | undefined | The ID of a previous |
JobRunQueuingEnabled | boolean | undefined | Specifies whether job run queuing is enabled for the job run. A value of true means job run queuing is enabled for the job run. If false or not populated, the job run will not be considered for queueing. |
MaxCapacity | number | undefined | For Glue version 1.0 or earlier jobs, using the standard worker type, the number of Glue data processing units (DPUs) that can be allocated when this job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the Glue pricing page . For Glue version 2.0+ jobs, you cannot specify a Do not set The value that can be allocated for
|
NotificationProperty | NotificationProperty | undefined | Specifies configuration properties of a job run notification. |
NumberOfWorkers | number | undefined | The number of workers of a defined |
SecurityConfiguration | string | undefined | The name of the |
Timeout | number | undefined | The Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception. When the value is left blank, the timeout is defaulted to 2880 minutes. Any existing Glue jobs that had a timeout value greater than 7 days will be defaulted to 7 days. For instance if you have specified a timeout of 20 days for a batch job, it will be stopped on the 7th day. For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days. |
WorkerType | WorkerType | undefined | The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, G.8X or G.025X for Spark jobs. Accepts the value Z.2X for Ray jobs.
|
StartJobRunCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
JobRunId | string | undefined | The ID assigned to this job run. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConcurrentRunsExceededException | client | Too many jobs are being run concurrently. |
EntityNotFoundException | client | A specified entity does not exist |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
OperationTimeoutException | client | The operation timed out. |
ResourceNumberLimitExceededException | client | A resource numerical limit was exceeded. |
GlueServiceException | Base exception class for all service exceptions from Glue service. |