class_docstr: Create an AWS Glue Job.
  
  AWS Glue is a serverless Spark ETL service for running Spark Jobs on the AWS
  cloud. Language support: Python and Scala.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/operator:GlueJobOperator`
  
  :param job_name: unique job name per AWS Account
  :param script_location: location of ETL script. Must be a local or S3 path
  :param job_desc: job description details
  :param concurrent_run_limit: The maximum number of concurrent runs allowed for a job
  :param script_args: etl script arguments and AWS Glue arguments (templated)
  :param retry_limit: The maximum number of times to retry this job if it fails
  :param num_of_dpus: Number of AWS Glue DPUs to allocate to this Job.
  :param region_name: aws region name (example: us-east-1)
  :param s3_bucket: S3 bucket where logs and local etl script will be uploaded
  :param iam_role_name: AWS IAM Role for Glue Job Execution. If set `iam_role_arn` must equal None.
  :param iam_role_arn: AWS IAM ARN for Glue Job Execution. If set `iam_role_name` must equal None.
  :param create_job_kwargs: Extra arguments for Glue Job Creation
  :param run_job_kwargs: Extra arguments for Glue Job Run
  :param wait_for_completion: Whether to wait for job run completion. (default: True)
  :param deferrable: If True, the operator will wait asynchronously for the job to complete.
      This implies waiting for completion. This mode requires aiobotocore module to be installed.
      (default: False)
  :param verbose: If True, Glue Job Run logs show in the Airflow Task Logs.  (default: False)
  :param update_config: If True, Operator will update job configuration.  (default: False)
  :param stop_job_run_on_kill: If True, Operator will stop the job run when task is killed.
class_docstr_tok: ["Create","an","AWS","Glue","Job",".","AWS","Glue","is","a","serverless","Spark","ETL","service","for","running","Spark","Jobs","on","the","AWS","cloud",".","Language","support",":","Python","and","Scala",".","..","seealso",":",":","For","more","information","on","how","to","use","this","operator",",","take","a","look","at","the","guide",":",":","ref",":","`","howto\/operator",":","GlueJobOperator","`",":","param","job_name",":","unique","job","name","per","AWS","Account",":","param","script_location",":","location","of","ETL","script",".","Must","be","a","local","or","S3","path",":","param","job_desc",":","job","description","details",":","param","concurrent_run_limit",":","The","maximum","number","of","concurrent","runs","allowed","for","a","job",":","param","script_args",":","etl","script","arguments","and","AWS","Glue","arguments","(","templated",")",":","param","retry_limit",":","The","maximum","number","of","times","to","retry","this","job","if","it","fails",":","param","num_of_dpus",":","Number","of","AWS","Glue","DPUs","to","allocate","to","this","Job",".",":","param","region_name",":","aws","region","name","(","example",":","us-east-1",")",":","param","s3_bucket",":","S3","bucket","where","logs","and","local","etl","script","will","be","uploaded",":","param","iam_role_name",":","AWS","IAM","Role","for","Glue","Job","Execution",".","If","set","`","iam_role_arn","`","must","equal","None",".",":","param","iam_role_arn",":","AWS","IAM","ARN","for","Glue","Job","Execution",".","If","set","`","iam_role_name","`","must","equal","None",".",":","param","create_job_kwargs",":","Extra","arguments","for","Glue","Job","Creation",":","param","run_job_kwargs",":","Extra","arguments","for","Glue","Job","Run",":","param","wait_for_completion",":","Whether","to","wait","for","job","run","completion",".","(","default",":","True",")",":","param","deferrable",":","If","True",",","the","operator","will","wait","asynchronously","for","the","job","to","complete",".","This","implies","waiting","for","completion",".","This","mode","requires","aiobotocore","module","to","be","installed",".","(","default",":","False",")",":","param","verbose",":","If","True",",","Glue","Job","Run","logs","show","in","the","Airflow","Task","Logs",".","(","default",":","False",")",":","param","update_config",":","If","True",",","Operator","will","update","job","configuration",".","(","default",":","False",")",":","param","stop_job_run_on_kill",":","If","True",",","Operator","will","stop","the","job","run","when","task","is","killed","."]
docstr: Cancel the running AWS Glue Job.
docstr_tok: ["Cancel","the","running","AWS","Glue","Job","."]
code: def on_kill(self):
      """Cancel the running AWS Glue Job."""
      if self.stop_job_run_on_kill:
          self.log.info(
              "Stopping AWS Glue Job: %s. Run Id: %s",
              self.job_name,
              self._job_run_id,
          )
          response = self.glue_job_hook.conn.batch_stop_job_run(
              JobName=self.job_name,
              JobRunIds=[self._job_run_id],
          )
          if not response["SuccessfulSubmissions"]:
              self.log.error(
                  "Failed to stop AWS Glue Job: %s. Run Id: %s",
                  self.job_name,
                  self._job_run_id,
              )
  
file_path: airflow/airflow/providers/amazon/aws/operators/glue.py
imports: from __future__ import annotations
  import os
  import urllib.parse
  from functools import cached_property
  from typing import TYPE_CHECKING, Sequence
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException
  from airflow.models import BaseOperator
  from airflow.providers.amazon.aws.hooks.glue import GlueJobHook
  from airflow.providers.amazon.aws.hooks.s3 import S3Hook
  from airflow.providers.amazon.aws.links.glue import GlueJobRunDetailsLink
  from airflow.providers.amazon.aws.triggers.glue import GlueJobCompleteTrigger
label_desc: Use image node_id 5 for calling the GlueJobOperator obj's underlying member method code with example usage: obj.on_kill() without return types