Skip to content

create_job async

create_job(
    name: NameString,
    role: RoleString,
    command: JobCommand,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    job_mode: Optional[JobMode] = None,
    job_run_queuing_enabled: Optional[NullableBoolean] = None,
    description: Optional[DescriptionString] = None,
    log_uri: Optional[UriString] = None,
    execution_property: Optional[ExecutionProperty] = None,
    default_arguments: Optional[GenericMap] = None,
    non_overridable_arguments: Optional[GenericMap] = None,
    connections: Optional[ConnectionsList] = None,
    max_retries: Optional[MaxRetries] = None,
    allocated_capacity: Optional[IntegerValue] = None,
    timeout: Optional[Timeout] = None,
    max_capacity: Optional[NullableDouble] = None,
    security_configuration: Optional[NameString] = None,
    tags: Optional[TagsMap] = None,
    notification_property: Optional[NotificationProperty] = None,
    glue_version: Optional[GlueVersionString] = None,
    number_of_workers: Optional[NullableInteger] = None,
    worker_type: Optional[WorkerType] = None,
    code_gen_configuration_nodes: Optional[CodeGenConfigurationNodes] = None,
    execution_class: Optional[ExecutionClass] = None,
    source_control_details: Optional[SourceControlDetails] = None,
    maintenance_window: Optional[MaintenanceWindow] = None,
) -> CreateJobResponse

Creates a new job definition.

Parameters:

  • name (NameString) –

    The name you assign to this job definition. It must be unique in your account.

  • job_mode (Optional[JobMode], default: None ) –

    A mode that describes how a job was created. Valid values are:

    • SCRIPT - The job was created using the Glue Studio script editor.

    • VISUAL - The job was created using the Glue Studio visual editor.

    • NOTEBOOK - The job was created using an interactive sessions notebook.

    When the JobMode field is missing or null, SCRIPT is assigned as the default value.

  • job_run_queuing_enabled (Optional[NullableBoolean], default: None ) –

    Specifies whether job run queuing is enabled for the job runs for this job.

    A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing.

    If this field does not match the value set in the job run, then the value from the job run field will be used.

  • description (Optional[DescriptionString], default: None ) –

    Description of the job being defined.

  • log_uri (Optional[UriString], default: None ) –

    This field is reserved for future use.

  • role (RoleString) –

    The name or Amazon Resource Name (ARN) of the IAM role associated with this job.

  • execution_property (Optional[ExecutionProperty], default: None ) –

    An ExecutionProperty specifying the maximum number of concurrent runs allowed for this job.

  • command (JobCommand) –

    The JobCommand that runs this job.

  • default_arguments (Optional[GenericMap], default: None ) –

    The default arguments for every run of this job, specified as name-value pairs.

    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.

  • non_overridable_arguments (Optional[GenericMap], default: None ) –

    Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs.

  • connections (Optional[ConnectionsList], default: None ) –

    The connections used for this job.

  • max_retries (Optional[MaxRetries], default: None ) –

    The maximum number of times to retry this job if it fails.

  • allocated_capacity (Optional[IntegerValue], default: None ) –

    This parameter is deprecated. Use MaxCapacity instead.

    The number of Glue data processing units (DPUs) to allocate to this Job. You can allocate a minimum of 2 DPUs; the default is 10. 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.

  • timeout (Optional[Timeout], default: None ) –

    The job timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status.

    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 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later.

    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.

  • max_capacity (Optional[NullableDouble], default: None ) –

    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 Maximum capacity. Instead, you should specify a Worker type and the Number of workers.

    Do not set MaxCapacity if using WorkerType and NumberOfWorkers.

    The value that can be allocated for MaxCapacity depends on whether you are running a Python shell job, an Apache Spark ETL job, or an Apache Spark streaming ETL job:

    • When you specify a Python shell job (JobCommand.Name="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU.

    • When you specify an Apache Spark ETL job (JobCommand.Name="glueetl") or Apache Spark streaming ETL job (JobCommand.Name="gluestreaming"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation.

  • security_configuration (Optional[NameString], default: None ) –

    The name of the SecurityConfiguration structure to be used with this job.

  • tags (Optional[TagsMap], default: None ) –

    The tags to use with this job. You may use tags to limit access to the job. For more information about tags in Glue, see Amazon Web Services Tags in Glue in the developer guide.

  • notification_property (Optional[NotificationProperty], default: None ) –

    Specifies configuration properties of a job notification.

  • glue_version (Optional[GlueVersionString], default: None ) –

    In Spark jobs, GlueVersion determines the versions of Apache Spark and Python that Glue available in a job. The Python version indicates the version supported for jobs of type Spark.

    Ray jobs should set GlueVersion to 4.0 or greater. However, the versions of Ray, Python and additional libraries available in your Ray job are determined by the Runtime parameter of the Job command.

    For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.

    Jobs that are created without specifying a Glue version default to Glue 5.1.

  • number_of_workers (Optional[NullableInteger], default: None ) –

    The number of workers of a defined workerType that are allocated when a job runs.

  • worker_type (Optional[WorkerType], default: None ) –

    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.

    • For the G.1X worker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.

    • For the G.2X worker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.

    • For the G.4X worker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Mumbai), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), Europe (London), Europe (Spain), Europe (Stockholm), and South America (São Paulo).

    • For the G.8X worker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs, in the same Amazon Web Services Regions as supported for the G.4X worker type.

    • For the G.025X worker type, each worker maps to 0.25 DPU (2 vCPUs, 4 GB of memory) with 84GB disk, and provides 1 executor per worker. We recommend this worker type for low volume streaming jobs. This worker type is only available for Glue version 3.0 or later streaming jobs.

    • For the Z.2X worker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk, and provides up to 8 Ray workers based on the autoscaler.

  • code_gen_configuration_nodes (Optional[CodeGenConfigurationNodes], default: None ) –

    The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.

  • execution_class (Optional[ExecutionClass], default: None ) –

    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 glueetl will be allowed to set ExecutionClass to FLEX. The flexible execution class is available for Spark jobs.

  • source_control_details (Optional[SourceControlDetails], default: None ) –

    The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.

  • maintenance_window (Optional[MaintenanceWindow], default: None ) –

    This field specifies a day of the week and hour for a maintenance window for streaming jobs. Glue periodically performs maintenance activities. During these maintenance windows, Glue will need to restart your streaming jobs.

    Glue will restart the job within 3 hours of the specified maintenance window. For instance, if you set up the maintenance window for Monday at 10:00AM GMT, your jobs will be restarted between 10:00AM GMT to 1:00PM GMT.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def create_job(
    self,
    name: "capo_glue.types.name_string.NameString",
    role: "capo_glue.types.role_string.RoleString",
    command: "capo_glue.types.job_command.JobCommand",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    job_mode: Optional["capo_glue.types.job_mode.JobMode"] = None,
    job_run_queuing_enabled: Optional[
        "capo_glue.types.nullable_boolean.NullableBoolean"
    ] = None,
    description: Optional[
        "capo_glue.types.description_string.DescriptionString"
    ] = None,
    log_uri: Optional["capo_glue.types.uri_string.UriString"] = None,
    execution_property: Optional[
        "capo_glue.types.execution_property.ExecutionProperty"
    ] = None,
    default_arguments: Optional["capo_glue.types.generic_map.GenericMap"] = None,
    non_overridable_arguments: Optional[
        "capo_glue.types.generic_map.GenericMap"
    ] = None,
    connections: Optional[
        "capo_glue.types.connections_list.ConnectionsList"
    ] = None,
    max_retries: Optional["capo_glue.types.max_retries.MaxRetries"] = None,
    allocated_capacity: Optional[
        "capo_glue.types.integer_value.IntegerValue"
    ] = None,
    timeout: Optional["capo_glue.types.timeout.Timeout"] = None,
    max_capacity: Optional["capo_glue.types.nullable_double.NullableDouble"] = None,
    security_configuration: Optional[
        "capo_glue.types.name_string.NameString"
    ] = None,
    tags: Optional["capo_glue.types.tags_map.TagsMap"] = None,
    notification_property: Optional[
        "capo_glue.types.notification_property.NotificationProperty"
    ] = None,
    glue_version: Optional[
        "capo_glue.types.glue_version_string.GlueVersionString"
    ] = None,
    number_of_workers: Optional[
        "capo_glue.types.nullable_integer.NullableInteger"
    ] = None,
    worker_type: Optional["capo_glue.types.worker_type.WorkerType"] = None,
    code_gen_configuration_nodes: Optional[
        "capo_glue.types.code_gen_configuration_nodes.CodeGenConfigurationNodes"
    ] = None,
    execution_class: Optional[
        "capo_glue.types.execution_class.ExecutionClass"
    ] = None,
    source_control_details: Optional[
        "capo_glue.types.source_control_details.SourceControlDetails"
    ] = None,
    maintenance_window: Optional[
        "capo_glue.types.maintenance_window.MaintenanceWindow"
    ] = None,
) -> "capo_glue.types.create_job_response.CreateJobResponse":
    """<p>Creates a new job definition.</p>

    Args:
        name: <p>The name you assign to this job definition. It must be unique in your account.</p>
        job_mode: <p>A mode that describes how a job was created. Valid values are:</p> <ul> <li> <p> <code>SCRIPT</code> - The job was created using the Glue Studio script editor.</p> </li> <li> <p> <code>VISUAL</code> - The job was created using the Glue Studio visual editor.</p> </li> <li> <p> <code>NOTEBOOK</code> - The job was created using an interactive sessions notebook.</p> </li> </ul> <p>When the <code>JobMode</code> field is missing or null, <code>SCRIPT</code> is assigned as the default value.</p>
        job_run_queuing_enabled: <p>Specifies whether job run queuing is enabled for the job runs for this job.</p> <p>A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing.</p> <p>If this field does not match the value set in the job run, then the value from the job run field will be used.</p>
        description: <p>Description of the job being defined.</p>
        log_uri: <p>This field is reserved for future use.</p>
        role: <p>The name or Amazon Resource Name (ARN) of the IAM role associated with this job.</p>
        execution_property: <p>An <code>ExecutionProperty</code> specifying the maximum number of concurrent runs allowed for this job.</p>
        command: <p>The <code>JobCommand</code> that runs this job.</p>
        default_arguments: <p>The default arguments for every run of this job, specified as name-value pairs.</p> <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p> <p>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. </p> <p>For information about how to specify and consume your own Job arguments, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html">Calling Glue APIs in Python</a> topic in the developer guide.</p> <p>For information about the arguments you can provide to this field when configuring Spark jobs, see the <a href="https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html">Special Parameters Used by Glue</a> topic in the developer guide.</p> <p>For information about the arguments you can provide to this field when configuring Ray jobs, see <a href="https://docs.aws.amazon.com/glue/latest/dg/author-job-ray-job-parameters.html">Using job parameters in Ray jobs</a> in the developer guide.</p>
        non_overridable_arguments: <p>Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs.</p>
        connections: <p>The connections used for this job.</p>
        max_retries: <p>The maximum number of times to retry this job if it fails.</p>
        allocated_capacity: <p>This parameter is deprecated. Use <code>MaxCapacity</code> instead.</p> <p>The number of Glue data processing units (DPUs) to allocate to this Job. You can allocate a minimum of 2 DPUs; the default is 10. 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 <a href="https://aws.amazon.com/glue/pricing/">Glue pricing page</a>.</p>
        timeout: <p>The job timeout in minutes. This is the maximum time that a job run can consume resources before it is terminated and enters <code>TIMEOUT</code> status.</p> <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p> <p>When the value is left blank, the timeout is defaulted to 2,880 minutes for Glue version 4.0 and earlier, or 480 minutes for Glue version 5.0 and later.</p> <p>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.</p> <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
        max_capacity: <p>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 <a href="https://aws.amazon.com/glue/pricing/"> Glue pricing page</a>.</p> <p>For Glue version 2.0+ jobs, you cannot specify a <code>Maximum capacity</code>. Instead, you should specify a <code>Worker type</code> and the <code>Number of workers</code>.</p> <p>Do not set <code>MaxCapacity</code> if using <code>WorkerType</code> and <code>NumberOfWorkers</code>.</p> <p>The value that can be allocated for <code>MaxCapacity</code> depends on whether you are running a Python shell job, an Apache Spark ETL job, or an Apache Spark streaming ETL job:</p> <ul> <li> <p>When you specify a Python shell job (<code>JobCommand.Name</code>="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU.</p> </li> <li> <p>When you specify an Apache Spark ETL job (<code>JobCommand.Name</code>="glueetl") or Apache Spark streaming ETL job (<code>JobCommand.Name</code>="gluestreaming"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation.</p> </li> </ul>
        security_configuration: <p>The name of the <code>SecurityConfiguration</code> structure to be used with this job.</p>
        tags: <p>The tags to use with this job. You may use tags to limit access to the job. For more information about tags in Glue, see <a href="https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html">Amazon Web Services Tags in Glue</a> in the developer guide.</p>
        notification_property: <p>Specifies configuration properties of a job notification.</p>
        glue_version: <p>In Spark jobs, <code>GlueVersion</code> determines the versions of Apache Spark and Python that Glue available in a job. The Python version indicates the version supported for jobs of type Spark. </p> <p>Ray jobs should set <code>GlueVersion</code> to <code>4.0</code> or greater. However, the versions of Ray, Python and additional libraries available in your Ray job are determined by the <code>Runtime</code> parameter of the Job command.</p> <p>For more information about the available Glue versions and corresponding Spark and Python versions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Glue version</a> in the developer guide.</p> <p>Jobs that are created without specifying a Glue version default to Glue 5.1.</p>
        number_of_workers: <p>The number of workers of a defined <code>workerType</code> that are allocated when a job runs.</p>
        worker_type: <p>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.</p> <ul> <li> <p>For the <code>G.1X</code> worker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.</p> </li> <li> <p>For the <code>G.2X</code> worker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.</p> </li> <li> <p>For the <code>G.4X</code> worker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Mumbai), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), Europe (London), Europe (Spain), Europe (Stockholm), and South America (São Paulo).</p> </li> <li> <p>For the <code>G.8X</code> worker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs, in the same Amazon Web Services Regions as supported for the <code>G.4X</code> worker type.</p> </li> <li> <p>For the <code>G.025X</code> worker type, each worker maps to 0.25 DPU (2 vCPUs, 4 GB of memory) with 84GB disk, and provides 1 executor per worker. We recommend this worker type for low volume streaming jobs. This worker type is only available for Glue version 3.0 or later streaming jobs.</p> </li> <li> <p>For the <code>Z.2X</code> worker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk, and provides up to 8 Ray workers based on the autoscaler.</p> </li> </ul>
        code_gen_configuration_nodes: <p>The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.</p>
        execution_class: <p>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.</p> <p>The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary. </p> <p>Only jobs with Glue version 3.0 and above and command type <code>glueetl</code> will be allowed to set <code>ExecutionClass</code> to <code>FLEX</code>. The flexible execution class is available for Spark jobs.</p>
        source_control_details: <p>The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.</p>
        maintenance_window: <p>This field specifies a day of the week and hour for a maintenance window for streaming jobs. Glue periodically performs maintenance activities. During these maintenance windows, Glue will need to restart your streaming jobs.</p> <p>Glue will restart the job within 3 hours of the specified maintenance window. For instance, if you set up the maintenance window for Monday at 10:00AM GMT, your jobs will be restarted between 10:00AM GMT to 1:00PM GMT.</p>

    Raises:
        capo_glue.errors.already_exists_exception.AlreadyExistsException: <p>A resource to be created or added already exists.</p>
        capo_glue.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</p>
        capo_glue.errors.idempotent_parameter_mismatch_exception.IdempotentParameterMismatchException: <p>The same unique identifier was associated with two different records.</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.resource_number_limit_exceeded_exception.ResourceNumberLimitExceededException: <p>A resource numerical limit was exceeded.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.create_job_request.CreateJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.create_job_response.CreateJobResponse"
    ]:
        import capo_glue._operations.aws_glue.create_job

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.create_job.async_create_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_glue.types.create_job_request.CreateJobRequest",
    ) -> dict[str, Any]:
        import capo_glue.types.create_job_request

        return capo_glue.types.create_job_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateJob", redact_input=_redact_input)
    )
    input_: capo_glue.types.create_job_request.CreateJobRequest = {
        "name": name,
        "role": role,
        "command": command,
    }
    if job_mode is not None:
        input_["job_mode"] = job_mode
    if job_run_queuing_enabled is not None:
        input_["job_run_queuing_enabled"] = job_run_queuing_enabled
    if description is not None:
        input_["description"] = description
    if log_uri is not None:
        input_["log_uri"] = log_uri
    if execution_property is not None:
        input_["execution_property"] = execution_property
    if default_arguments is not None:
        input_["default_arguments"] = default_arguments
    if non_overridable_arguments is not None:
        input_["non_overridable_arguments"] = non_overridable_arguments
    if connections is not None:
        input_["connections"] = connections
    if max_retries is not None:
        input_["max_retries"] = max_retries
    if allocated_capacity is not None:
        input_["allocated_capacity"] = allocated_capacity
    if timeout is not None:
        input_["timeout"] = timeout
    if max_capacity is not None:
        input_["max_capacity"] = max_capacity
    if security_configuration is not None:
        input_["security_configuration"] = security_configuration
    if tags is not None:
        input_["tags"] = tags
    if notification_property is not None:
        input_["notification_property"] = notification_property
    if glue_version is not None:
        input_["glue_version"] = glue_version
    if number_of_workers is not None:
        input_["number_of_workers"] = number_of_workers
    if worker_type is not None:
        input_["worker_type"] = worker_type
    if code_gen_configuration_nodes is not None:
        input_["code_gen_configuration_nodes"] = code_gen_configuration_nodes
    if execution_class is not None:
        input_["execution_class"] = execution_class
    if source_control_details is not None:
        input_["source_control_details"] = source_control_details
    if maintenance_window is not None:
        input_["maintenance_window"] = maintenance_window

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output