/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartJobRunRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the job definition to use. *

*/ private String jobName; /** *

* The ID of a previous JobRun to retry. *

*/ private String jobRunId; /** *

* 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. *

*/ private java.util.Map arguments; /** *

* This field is deprecated. Use MaxCapacity instead. *

*

* The number of Glue data processing units (DPUs) to allocate to this JobRun. 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. *

*/ @Deprecated private Integer allocatedCapacity; /** *

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

*

* Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours). *

*/ private Integer timeout; /** *

* 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: *

* */ private Double maxCapacity; /** *

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

*/ private String securityConfiguration; /** *

* Specifies configuration properties of a job run notification. *

*/ private NotificationProperty notificationProperty; /** *

* 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. *

* */ private String workerType; /** *

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

*/ private Integer numberOfWorkers; /** *

* 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. *

*/ private String executionClass; /** *

* The name of the job definition to use. *

* * @param jobName * The name of the job definition to use. */ public void setJobName(String jobName) { this.jobName = jobName; } /** *

* The name of the job definition to use. *

* * @return The name of the job definition to use. */ public String getJobName() { return this.jobName; } /** *

* The name of the job definition to use. *

* * @param jobName * The name of the job definition to use. * @return Returns a reference to this object so that method calls can be chained together. */ public StartJobRunRequest withJobName(String jobName) { setJobName(jobName); return this; } /** *

* The ID of a previous JobRun to retry. *

* * @param jobRunId * The ID of a previous JobRun to retry. */ public void setJobRunId(String jobRunId) { this.jobRunId = jobRunId; } /** *

* The ID of a previous JobRun to retry. *

* * @return The ID of a previous JobRun to retry. */ public String getJobRunId() { return this.jobRunId; } /** *

* The ID of a previous JobRun to retry. *

* * @param jobRunId * The ID of a previous JobRun to retry. * @return Returns a reference to this object so that method calls can be chained together. */ public StartJobRunRequest withJobRunId(String jobRunId) { setJobRunId(jobRunId); return this; } /** *

* 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. *

* * @return 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. */ public java.util.Map getArguments() { return arguments; } /** *

* 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. *

* * @param arguments * 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. */ public void setArguments(java.util.Map arguments) { this.arguments = arguments; } /** *

* 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. *

* * @param arguments * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public StartJobRunRequest withArguments(java.util.Map arguments) { setArguments(arguments); return this; } /** * Add a single Arguments entry * * @see StartJobRunRequest#withArguments * @returns a reference to this object so that method calls can be chained together. */ public StartJobRunRequest addArgumentsEntry(String key, String value) { if (null == this.arguments) { this.arguments = new java.util.HashMap(); } if (this.arguments.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.arguments.put(key, value); return this; } /** * Removes all the entries added into Arguments. * * @return Returns a reference to this object so that method calls can be chained together. */ public StartJobRunRequest clearArgumentsEntries() { this.arguments = null; return this; } /** *

* This field is deprecated. Use MaxCapacity instead. *

*

* The number of Glue data processing units (DPUs) to allocate to this JobRun. 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. *

* * @param allocatedCapacity * This field is deprecated. Use MaxCapacity instead.

*

* The number of Glue data processing units (DPUs) to allocate to this JobRun. 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. */ @Deprecated public void setAllocatedCapacity(Integer allocatedCapacity) { this.allocatedCapacity = allocatedCapacity; } /** *

* This field is deprecated. Use MaxCapacity instead. *

*

* The number of Glue data processing units (DPUs) to allocate to this JobRun. 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. *

* * @return This field is deprecated. Use MaxCapacity instead.

*

* The number of Glue data processing units (DPUs) to allocate to this JobRun. 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. */ @Deprecated public Integer getAllocatedCapacity() { return this.allocatedCapacity; } /** *

* This field is deprecated. Use MaxCapacity instead. *

*

* The number of Glue data processing units (DPUs) to allocate to this JobRun. 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. *

* * @param allocatedCapacity * This field is deprecated. Use MaxCapacity instead.

*

* The number of Glue data processing units (DPUs) to allocate to this JobRun. 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. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public StartJobRunRequest withAllocatedCapacity(Integer allocatedCapacity) { setAllocatedCapacity(allocatedCapacity); return this; } /** *

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

*

* Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours). *

* * @param timeout * The JobRun timeout in minutes. This is the maximum time that a job run can consume resources * before it is terminated and enters TIMEOUT status. This value overrides the timeout value set * in the parent job.

*

* Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours). */ public void setTimeout(Integer timeout) { this.timeout = timeout; } /** *

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

*

* Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours). *

* * @return The JobRun timeout in minutes. This is the maximum time that a job run can consume resources * before it is terminated and enters TIMEOUT status. This value overrides the timeout value * set in the parent job.

*

* Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours). */ public Integer getTimeout() { return this.timeout; } /** *

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

*

* Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours). *

* * @param timeout * The JobRun timeout in minutes. This is the maximum time that a job run can consume resources * before it is terminated and enters TIMEOUT status. This value overrides the timeout value set * in the parent job.

*

* Streaming jobs do not have a timeout. The default for non-streaming jobs is 2,880 minutes (48 hours). * @return Returns a reference to this object so that method calls can be chained together. */ public StartJobRunRequest withTimeout(Integer timeout) { setTimeout(timeout); return this; } /** *

* 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: *

* * * @param maxCapacity * 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: *

*