aws_sdk_glue/operation/create_job/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_job::_create_job_output::CreateJobOutputBuilder;
3
4pub use crate::operation::create_job::_create_job_input::CreateJobInputBuilder;
5
6impl crate::operation::create_job::builders::CreateJobInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_job::CreateJobOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_job::CreateJobError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_job();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateJob`.
24///
25/// <p>Creates a new job definition.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateJobFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_job::builders::CreateJobInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl crate::client::customize::internal::CustomizableSend<crate::operation::create_job::CreateJobOutput, crate::operation::create_job::CreateJobError>
33    for CreateJobFluentBuilder
34{
35    fn send(
36        self,
37        config_override: crate::config::Builder,
38    ) -> crate::client::customize::internal::BoxFuture<
39        crate::client::customize::internal::SendResult<crate::operation::create_job::CreateJobOutput, crate::operation::create_job::CreateJobError>,
40    > {
41        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
42    }
43}
44impl CreateJobFluentBuilder {
45    /// Creates a new `CreateJobFluentBuilder`.
46    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
47        Self {
48            handle,
49            inner: ::std::default::Default::default(),
50            config_override: ::std::option::Option::None,
51        }
52    }
53    /// Access the CreateJob as a reference.
54    pub fn as_input(&self) -> &crate::operation::create_job::builders::CreateJobInputBuilder {
55        &self.inner
56    }
57    /// Sends the request and returns the response.
58    ///
59    /// If an error occurs, an `SdkError` will be returned with additional details that
60    /// can be matched against.
61    ///
62    /// By default, any retryable failures will be retried twice. Retry behavior
63    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
64    /// set when configuring the client.
65    pub async fn send(
66        self,
67    ) -> ::std::result::Result<
68        crate::operation::create_job::CreateJobOutput,
69        ::aws_smithy_runtime_api::client::result::SdkError<
70            crate::operation::create_job::CreateJobError,
71            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
72        >,
73    > {
74        let input = self
75            .inner
76            .build()
77            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
78        let runtime_plugins = crate::operation::create_job::CreateJob::operation_runtime_plugins(
79            self.handle.runtime_plugins.clone(),
80            &self.handle.conf,
81            self.config_override,
82        );
83        crate::operation::create_job::CreateJob::orchestrate(&runtime_plugins, input).await
84    }
85
86    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
87    pub fn customize(
88        self,
89    ) -> crate::client::customize::CustomizableOperation<
90        crate::operation::create_job::CreateJobOutput,
91        crate::operation::create_job::CreateJobError,
92        Self,
93    > {
94        crate::client::customize::CustomizableOperation::new(self)
95    }
96    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
97        self.set_config_override(::std::option::Option::Some(config_override.into()));
98        self
99    }
100
101    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
102        self.config_override = config_override;
103        self
104    }
105    /// <p>The name you assign to this job definition. It must be unique in your account.</p>
106    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        self.inner = self.inner.name(input.into());
108        self
109    }
110    /// <p>The name you assign to this job definition. It must be unique in your account.</p>
111    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.inner = self.inner.set_name(input);
113        self
114    }
115    /// <p>The name you assign to this job definition. It must be unique in your account.</p>
116    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
117        self.inner.get_name()
118    }
119    /// <p>A mode that describes how a job was created. Valid values are:</p>
120    /// <ul>
121    /// <li>
122    /// <p><code>SCRIPT</code> - The job was created using the Glue Studio script editor.</p></li>
123    /// <li>
124    /// <p><code>VISUAL</code> - The job was created using the Glue Studio visual editor.</p></li>
125    /// <li>
126    /// <p><code>NOTEBOOK</code> - The job was created using an interactive sessions notebook.</p></li>
127    /// </ul>
128    /// <p>When the <code>JobMode</code> field is missing or null, <code>SCRIPT</code> is assigned as the default value.</p>
129    pub fn job_mode(mut self, input: crate::types::JobMode) -> Self {
130        self.inner = self.inner.job_mode(input);
131        self
132    }
133    /// <p>A mode that describes how a job was created. Valid values are:</p>
134    /// <ul>
135    /// <li>
136    /// <p><code>SCRIPT</code> - The job was created using the Glue Studio script editor.</p></li>
137    /// <li>
138    /// <p><code>VISUAL</code> - The job was created using the Glue Studio visual editor.</p></li>
139    /// <li>
140    /// <p><code>NOTEBOOK</code> - The job was created using an interactive sessions notebook.</p></li>
141    /// </ul>
142    /// <p>When the <code>JobMode</code> field is missing or null, <code>SCRIPT</code> is assigned as the default value.</p>
143    pub fn set_job_mode(mut self, input: ::std::option::Option<crate::types::JobMode>) -> Self {
144        self.inner = self.inner.set_job_mode(input);
145        self
146    }
147    /// <p>A mode that describes how a job was created. Valid values are:</p>
148    /// <ul>
149    /// <li>
150    /// <p><code>SCRIPT</code> - The job was created using the Glue Studio script editor.</p></li>
151    /// <li>
152    /// <p><code>VISUAL</code> - The job was created using the Glue Studio visual editor.</p></li>
153    /// <li>
154    /// <p><code>NOTEBOOK</code> - The job was created using an interactive sessions notebook.</p></li>
155    /// </ul>
156    /// <p>When the <code>JobMode</code> field is missing or null, <code>SCRIPT</code> is assigned as the default value.</p>
157    pub fn get_job_mode(&self) -> &::std::option::Option<crate::types::JobMode> {
158        self.inner.get_job_mode()
159    }
160    /// <p>Specifies whether job run queuing is enabled for the job runs for this job.</p>
161    /// <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>
162    /// <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>
163    pub fn job_run_queuing_enabled(mut self, input: bool) -> Self {
164        self.inner = self.inner.job_run_queuing_enabled(input);
165        self
166    }
167    /// <p>Specifies whether job run queuing is enabled for the job runs for this job.</p>
168    /// <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>
169    /// <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>
170    pub fn set_job_run_queuing_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
171        self.inner = self.inner.set_job_run_queuing_enabled(input);
172        self
173    }
174    /// <p>Specifies whether job run queuing is enabled for the job runs for this job.</p>
175    /// <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>
176    /// <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>
177    pub fn get_job_run_queuing_enabled(&self) -> &::std::option::Option<bool> {
178        self.inner.get_job_run_queuing_enabled()
179    }
180    /// <p>Description of the job being defined.</p>
181    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.inner = self.inner.description(input.into());
183        self
184    }
185    /// <p>Description of the job being defined.</p>
186    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.inner = self.inner.set_description(input);
188        self
189    }
190    /// <p>Description of the job being defined.</p>
191    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
192        self.inner.get_description()
193    }
194    /// <p>This field is reserved for future use.</p>
195    pub fn log_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.inner = self.inner.log_uri(input.into());
197        self
198    }
199    /// <p>This field is reserved for future use.</p>
200    pub fn set_log_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201        self.inner = self.inner.set_log_uri(input);
202        self
203    }
204    /// <p>This field is reserved for future use.</p>
205    pub fn get_log_uri(&self) -> &::std::option::Option<::std::string::String> {
206        self.inner.get_log_uri()
207    }
208    /// <p>The name or Amazon Resource Name (ARN) of the IAM role associated with this job.</p>
209    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.inner = self.inner.role(input.into());
211        self
212    }
213    /// <p>The name or Amazon Resource Name (ARN) of the IAM role associated with this job.</p>
214    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
215        self.inner = self.inner.set_role(input);
216        self
217    }
218    /// <p>The name or Amazon Resource Name (ARN) of the IAM role associated with this job.</p>
219    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
220        self.inner.get_role()
221    }
222    /// <p>An <code>ExecutionProperty</code> specifying the maximum number of concurrent runs allowed for this job.</p>
223    pub fn execution_property(mut self, input: crate::types::ExecutionProperty) -> Self {
224        self.inner = self.inner.execution_property(input);
225        self
226    }
227    /// <p>An <code>ExecutionProperty</code> specifying the maximum number of concurrent runs allowed for this job.</p>
228    pub fn set_execution_property(mut self, input: ::std::option::Option<crate::types::ExecutionProperty>) -> Self {
229        self.inner = self.inner.set_execution_property(input);
230        self
231    }
232    /// <p>An <code>ExecutionProperty</code> specifying the maximum number of concurrent runs allowed for this job.</p>
233    pub fn get_execution_property(&self) -> &::std::option::Option<crate::types::ExecutionProperty> {
234        self.inner.get_execution_property()
235    }
236    /// <p>The <code>JobCommand</code> that runs this job.</p>
237    pub fn command(mut self, input: crate::types::JobCommand) -> Self {
238        self.inner = self.inner.command(input);
239        self
240    }
241    /// <p>The <code>JobCommand</code> that runs this job.</p>
242    pub fn set_command(mut self, input: ::std::option::Option<crate::types::JobCommand>) -> Self {
243        self.inner = self.inner.set_command(input);
244        self
245    }
246    /// <p>The <code>JobCommand</code> that runs this job.</p>
247    pub fn get_command(&self) -> &::std::option::Option<crate::types::JobCommand> {
248        self.inner.get_command()
249    }
250    ///
251    /// Adds a key-value pair to `DefaultArguments`.
252    ///
253    /// To override the contents of this collection use [`set_default_arguments`](Self::set_default_arguments).
254    ///
255    /// <p>The default arguments for every run of this job, specified as name-value pairs.</p>
256    /// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
257    /// <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>
258    /// <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>
259    /// <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>
260    /// <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>
261    pub fn default_arguments(
262        mut self,
263        k: impl ::std::convert::Into<::std::string::String>,
264        v: impl ::std::convert::Into<::std::string::String>,
265    ) -> Self {
266        self.inner = self.inner.default_arguments(k.into(), v.into());
267        self
268    }
269    /// <p>The default arguments for every run of this job, specified as name-value pairs.</p>
270    /// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
271    /// <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>
272    /// <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>
273    /// <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>
274    /// <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>
275    pub fn set_default_arguments(
276        mut self,
277        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
278    ) -> Self {
279        self.inner = self.inner.set_default_arguments(input);
280        self
281    }
282    /// <p>The default arguments for every run of this job, specified as name-value pairs.</p>
283    /// <p>You can specify arguments here that your own job-execution script consumes, as well as arguments that Glue itself consumes.</p>
284    /// <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>
285    /// <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>
286    /// <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>
287    /// <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>
288    pub fn get_default_arguments(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
289        self.inner.get_default_arguments()
290    }
291    ///
292    /// Adds a key-value pair to `NonOverridableArguments`.
293    ///
294    /// To override the contents of this collection use [`set_non_overridable_arguments`](Self::set_non_overridable_arguments).
295    ///
296    /// <p>Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs.</p>
297    pub fn non_overridable_arguments(
298        mut self,
299        k: impl ::std::convert::Into<::std::string::String>,
300        v: impl ::std::convert::Into<::std::string::String>,
301    ) -> Self {
302        self.inner = self.inner.non_overridable_arguments(k.into(), v.into());
303        self
304    }
305    /// <p>Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs.</p>
306    pub fn set_non_overridable_arguments(
307        mut self,
308        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
309    ) -> Self {
310        self.inner = self.inner.set_non_overridable_arguments(input);
311        self
312    }
313    /// <p>Arguments for this job that are not overridden when providing job arguments in a job run, specified as name-value pairs.</p>
314    pub fn get_non_overridable_arguments(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
315        self.inner.get_non_overridable_arguments()
316    }
317    /// <p>The connections used for this job.</p>
318    pub fn connections(mut self, input: crate::types::ConnectionsList) -> Self {
319        self.inner = self.inner.connections(input);
320        self
321    }
322    /// <p>The connections used for this job.</p>
323    pub fn set_connections(mut self, input: ::std::option::Option<crate::types::ConnectionsList>) -> Self {
324        self.inner = self.inner.set_connections(input);
325        self
326    }
327    /// <p>The connections used for this job.</p>
328    pub fn get_connections(&self) -> &::std::option::Option<crate::types::ConnectionsList> {
329        self.inner.get_connections()
330    }
331    /// <p>The maximum number of times to retry this job if it fails.</p>
332    pub fn max_retries(mut self, input: i32) -> Self {
333        self.inner = self.inner.max_retries(input);
334        self
335    }
336    /// <p>The maximum number of times to retry this job if it fails.</p>
337    pub fn set_max_retries(mut self, input: ::std::option::Option<i32>) -> Self {
338        self.inner = self.inner.set_max_retries(input);
339        self
340    }
341    /// <p>The maximum number of times to retry this job if it fails.</p>
342    pub fn get_max_retries(&self) -> &::std::option::Option<i32> {
343        self.inner.get_max_retries()
344    }
345    /// <p>This parameter is deprecated. Use <code>MaxCapacity</code> instead.</p>
346    /// <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>
347    #[deprecated(note = "This property is deprecated, use MaxCapacity instead.")]
348    pub fn allocated_capacity(mut self, input: i32) -> Self {
349        self.inner = self.inner.allocated_capacity(input);
350        self
351    }
352    /// <p>This parameter is deprecated. Use <code>MaxCapacity</code> instead.</p>
353    /// <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>
354    #[deprecated(note = "This property is deprecated, use MaxCapacity instead.")]
355    pub fn set_allocated_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
356        self.inner = self.inner.set_allocated_capacity(input);
357        self
358    }
359    /// <p>This parameter is deprecated. Use <code>MaxCapacity</code> instead.</p>
360    /// <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>
361    #[deprecated(note = "This property is deprecated, use MaxCapacity instead.")]
362    pub fn get_allocated_capacity(&self) -> &::std::option::Option<i32> {
363        self.inner.get_allocated_capacity()
364    }
365    /// <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>
366    /// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
367    /// <p>When the value is left blank, the timeout is defaulted to 2880 minutes.</p>
368    /// <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>
369    /// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
370    pub fn timeout(mut self, input: i32) -> Self {
371        self.inner = self.inner.timeout(input);
372        self
373    }
374    /// <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>
375    /// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
376    /// <p>When the value is left blank, the timeout is defaulted to 2880 minutes.</p>
377    /// <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>
378    /// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
379    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
380        self.inner = self.inner.set_timeout(input);
381        self
382    }
383    /// <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>
384    /// <p>Jobs must have timeout values less than 7 days or 10080 minutes. Otherwise, the jobs will throw an exception.</p>
385    /// <p>When the value is left blank, the timeout is defaulted to 2880 minutes.</p>
386    /// <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>
387    /// <p>For streaming jobs, if you have set up a maintenance window, it will be restarted during the maintenance window after 7 days.</p>
388    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
389        self.inner.get_timeout()
390    }
391    /// <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>
392    /// <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>
393    /// <p>Do not set <code>MaxCapacity</code> if using <code>WorkerType</code> and <code>NumberOfWorkers</code>.</p>
394    /// <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>
395    /// <ul>
396    /// <li>
397    /// <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>
398    /// <li>
399    /// <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>
400    /// </ul>
401    pub fn max_capacity(mut self, input: f64) -> Self {
402        self.inner = self.inner.max_capacity(input);
403        self
404    }
405    /// <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>
406    /// <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>
407    /// <p>Do not set <code>MaxCapacity</code> if using <code>WorkerType</code> and <code>NumberOfWorkers</code>.</p>
408    /// <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>
409    /// <ul>
410    /// <li>
411    /// <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>
412    /// <li>
413    /// <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>
414    /// </ul>
415    pub fn set_max_capacity(mut self, input: ::std::option::Option<f64>) -> Self {
416        self.inner = self.inner.set_max_capacity(input);
417        self
418    }
419    /// <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>
420    /// <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>
421    /// <p>Do not set <code>MaxCapacity</code> if using <code>WorkerType</code> and <code>NumberOfWorkers</code>.</p>
422    /// <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>
423    /// <ul>
424    /// <li>
425    /// <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>
426    /// <li>
427    /// <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>
428    /// </ul>
429    pub fn get_max_capacity(&self) -> &::std::option::Option<f64> {
430        self.inner.get_max_capacity()
431    }
432    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this job.</p>
433    pub fn security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
434        self.inner = self.inner.security_configuration(input.into());
435        self
436    }
437    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this job.</p>
438    pub fn set_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
439        self.inner = self.inner.set_security_configuration(input);
440        self
441    }
442    /// <p>The name of the <code>SecurityConfiguration</code> structure to be used with this job.</p>
443    pub fn get_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
444        self.inner.get_security_configuration()
445    }
446    ///
447    /// Adds a key-value pair to `Tags`.
448    ///
449    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
450    ///
451    /// <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>
452    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
453        self.inner = self.inner.tags(k.into(), v.into());
454        self
455    }
456    /// <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>
457    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
458        self.inner = self.inner.set_tags(input);
459        self
460    }
461    /// <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>
462    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
463        self.inner.get_tags()
464    }
465    /// <p>Specifies configuration properties of a job notification.</p>
466    pub fn notification_property(mut self, input: crate::types::NotificationProperty) -> Self {
467        self.inner = self.inner.notification_property(input);
468        self
469    }
470    /// <p>Specifies configuration properties of a job notification.</p>
471    pub fn set_notification_property(mut self, input: ::std::option::Option<crate::types::NotificationProperty>) -> Self {
472        self.inner = self.inner.set_notification_property(input);
473        self
474    }
475    /// <p>Specifies configuration properties of a job notification.</p>
476    pub fn get_notification_property(&self) -> &::std::option::Option<crate::types::NotificationProperty> {
477        self.inner.get_notification_property()
478    }
479    /// <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>
480    /// <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>
481    /// <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>
482    /// <p>Jobs that are created without specifying a Glue version default to Glue 0.9.</p>
483    pub fn glue_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
484        self.inner = self.inner.glue_version(input.into());
485        self
486    }
487    /// <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>
488    /// <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>
489    /// <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>
490    /// <p>Jobs that are created without specifying a Glue version default to Glue 0.9.</p>
491    pub fn set_glue_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
492        self.inner = self.inner.set_glue_version(input);
493        self
494    }
495    /// <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>
496    /// <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>
497    /// <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>
498    /// <p>Jobs that are created without specifying a Glue version default to Glue 0.9.</p>
499    pub fn get_glue_version(&self) -> &::std::option::Option<::std::string::String> {
500        self.inner.get_glue_version()
501    }
502    /// <p>The number of workers of a defined <code>workerType</code> that are allocated when a job runs.</p>
503    pub fn number_of_workers(mut self, input: i32) -> Self {
504        self.inner = self.inner.number_of_workers(input);
505        self
506    }
507    /// <p>The number of workers of a defined <code>workerType</code> that are allocated when a job runs.</p>
508    pub fn set_number_of_workers(mut self, input: ::std::option::Option<i32>) -> Self {
509        self.inner = self.inner.set_number_of_workers(input);
510        self
511    }
512    /// <p>The number of workers of a defined <code>workerType</code> that are allocated when a job runs.</p>
513    pub fn get_number_of_workers(&self) -> &::std::option::Option<i32> {
514        self.inner.get_number_of_workers()
515    }
516    /// <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>
517    /// <ul>
518    /// <li>
519    /// <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>
520    /// <li>
521    /// <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>
522    /// <li>
523    /// <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>
524    /// <li>
525    /// <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>
526    /// <li>
527    /// <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>
528    /// <li>
529    /// <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>
530    /// </ul>
531    pub fn worker_type(mut self, input: crate::types::WorkerType) -> Self {
532        self.inner = self.inner.worker_type(input);
533        self
534    }
535    /// <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>
536    /// <ul>
537    /// <li>
538    /// <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>
539    /// <li>
540    /// <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>
541    /// <li>
542    /// <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>
543    /// <li>
544    /// <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>
545    /// <li>
546    /// <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>
547    /// <li>
548    /// <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>
549    /// </ul>
550    pub fn set_worker_type(mut self, input: ::std::option::Option<crate::types::WorkerType>) -> Self {
551        self.inner = self.inner.set_worker_type(input);
552        self
553    }
554    /// <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>
555    /// <ul>
556    /// <li>
557    /// <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>
558    /// <li>
559    /// <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>
560    /// <li>
561    /// <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>
562    /// <li>
563    /// <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>
564    /// <li>
565    /// <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>
566    /// <li>
567    /// <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>
568    /// </ul>
569    pub fn get_worker_type(&self) -> &::std::option::Option<crate::types::WorkerType> {
570        self.inner.get_worker_type()
571    }
572    ///
573    /// Adds a key-value pair to `CodeGenConfigurationNodes`.
574    ///
575    /// To override the contents of this collection use [`set_code_gen_configuration_nodes`](Self::set_code_gen_configuration_nodes).
576    ///
577    /// <p>The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.</p>
578    pub fn code_gen_configuration_nodes(
579        mut self,
580        k: impl ::std::convert::Into<::std::string::String>,
581        v: crate::types::CodeGenConfigurationNode,
582    ) -> Self {
583        self.inner = self.inner.code_gen_configuration_nodes(k.into(), v);
584        self
585    }
586    /// <p>The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.</p>
587    pub fn set_code_gen_configuration_nodes(
588        mut self,
589        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::CodeGenConfigurationNode>>,
590    ) -> Self {
591        self.inner = self.inner.set_code_gen_configuration_nodes(input);
592        self
593    }
594    /// <p>The representation of a directed acyclic graph on which both the Glue Studio visual component and Glue Studio code generation is based.</p>
595    pub fn get_code_gen_configuration_nodes(
596        &self,
597    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::CodeGenConfigurationNode>> {
598        self.inner.get_code_gen_configuration_nodes()
599    }
600    /// <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>
601    /// <p>The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary.</p>
602    /// <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>
603    pub fn execution_class(mut self, input: crate::types::ExecutionClass) -> Self {
604        self.inner = self.inner.execution_class(input);
605        self
606    }
607    /// <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>
608    /// <p>The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary.</p>
609    /// <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>
610    pub fn set_execution_class(mut self, input: ::std::option::Option<crate::types::ExecutionClass>) -> Self {
611        self.inner = self.inner.set_execution_class(input);
612        self
613    }
614    /// <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>
615    /// <p>The flexible execution class is appropriate for time-insensitive jobs whose start and completion times may vary.</p>
616    /// <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>
617    pub fn get_execution_class(&self) -> &::std::option::Option<crate::types::ExecutionClass> {
618        self.inner.get_execution_class()
619    }
620    /// <p>The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.</p>
621    pub fn source_control_details(mut self, input: crate::types::SourceControlDetails) -> Self {
622        self.inner = self.inner.source_control_details(input);
623        self
624    }
625    /// <p>The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.</p>
626    pub fn set_source_control_details(mut self, input: ::std::option::Option<crate::types::SourceControlDetails>) -> Self {
627        self.inner = self.inner.set_source_control_details(input);
628        self
629    }
630    /// <p>The details for a source control configuration for a job, allowing synchronization of job artifacts to or from a remote repository.</p>
631    pub fn get_source_control_details(&self) -> &::std::option::Option<crate::types::SourceControlDetails> {
632        self.inner.get_source_control_details()
633    }
634    /// <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>
635    /// <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>
636    pub fn maintenance_window(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
637        self.inner = self.inner.maintenance_window(input.into());
638        self
639    }
640    /// <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>
641    /// <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>
642    pub fn set_maintenance_window(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
643        self.inner = self.inner.set_maintenance_window(input);
644        self
645    }
646    /// <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>
647    /// <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>
648    pub fn get_maintenance_window(&self) -> &::std::option::Option<::std::string::String> {
649        self.inner.get_maintenance_window()
650    }
651}