Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Use GetJob
with an Amazon SDK or CLI
The following code examples show how to use GetJob
.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in
context in the following code example:
- CLI
-
- Amazon CLI
-
To retrieve information about a job
The following get-job
example retrieves information about a job.
aws glue get-job \
--job-name my-testing-job
Output:
{
"Job": {
"Name": "my-testing-job",
"Role": "Glue_DefaultRole",
"CreatedOn": 1602805698.167,
"LastModifiedOn": 1602805698.167,
"ExecutionProperty": {
"MaxConcurrentRuns": 1
},
"Command": {
"Name": "gluestreaming",
"ScriptLocation": "s3://janetst-bucket-01/Scripts/test_script.scala",
"PythonVersion": "2"
},
"DefaultArguments": {
"--class": "GlueApp",
"--job-language": "scala"
},
"MaxRetries": 0,
"AllocatedCapacity": 10,
"MaxCapacity": 10.0,
"GlueVersion": "1.0"
}
}
For more information, see Jobs in the Amazon Glue Developer Guide.
- JavaScript
-
- SDK for JavaScript (v3)
-
const getJob = (jobName) => {
const client = new GlueClient({});
const command = new GetJobCommand({
JobName: jobName,
});
return client.send(command);
};
For a complete list of Amazon SDK developer guides and code examples, see
Using this service with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.