Skip to main content

aws_sdk_glue/operation/create_session/
_create_session_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to create a new session.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateSessionInput {
7    /// <p>The ID of the session request.</p>
8    pub id: ::std::option::Option<::std::string::String>,
9    /// <p>The description of the session.</p>
10    pub description: ::std::option::Option<::std::string::String>,
11    /// <p>The IAM Role ARN</p>
12    pub role: ::std::option::Option<::std::string::String>,
13    /// <p>The <code>SessionCommand</code> that runs the job.</p>
14    pub command: ::std::option::Option<crate::types::SessionCommand>,
15    /// <p>The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.</p>
16    pub timeout: ::std::option::Option<i32>,
17    /// <p>The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.</p>
18    pub idle_timeout: ::std::option::Option<i32>,
19    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
20    pub default_arguments: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
21    /// <p>The number of connections to use for the session.</p>
22    pub connections: ::std::option::Option<crate::types::ConnectionsList>,
23    /// <p>The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.</p>
24    pub max_capacity: ::std::option::Option<f64>,
25    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
26    pub number_of_workers: ::std::option::Option<i32>,
27    /// <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, G.12X, G.16X, R.1X, R.2X, R.4X, or R.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
28    /// <ul>
29    /// <li>
30    /// <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>
31    /// <li>
32    /// <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>
33    /// <li>
34    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
35    /// <li>
36    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
37    /// <li>
38    /// <p>For the <code>G.12X</code> worker type, each worker maps to 12 DPU (48 vCPUs, 192 GB of memory) with 768GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
39    /// <li>
40    /// <p>For the <code>G.16X</code> worker type, each worker maps to 16 DPU (64 vCPUs, 256 GB of memory) with 1024GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
41    /// <li>
42    /// <p>For the <code>R.1X</code> worker type, each worker maps to 1 M-DPU (4 vCPUs, 32 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
43    /// <li>
44    /// <p>For the <code>R.2X</code> worker type, each worker maps to 2 M-DPU (8 vCPUs, 64 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
45    /// <li>
46    /// <p>For the <code>R.4X</code> worker type, each worker maps to 4 M-DPU (16 vCPUs, 128 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
47    /// <li>
48    /// <p>For the <code>R.8X</code> worker type, each worker maps to 8 M-DPU (32 vCPUs, 256 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
49    /// <li>
50    /// <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>
51    /// </ul>
52    pub worker_type: ::std::option::Option<crate::types::WorkerType>,
53    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
54    pub security_configuration: ::std::option::Option<::std::string::String>,
55    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
56    pub glue_version: ::std::option::Option<::std::string::String>,
57    /// <p>The map of key value pairs (tags) belonging to the session.</p>
58    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
59    /// <p>The origin of the request.</p>
60    pub request_origin: ::std::option::Option<::std::string::String>,
61    /// <p>The type of session to create.</p>
62    pub session_type: ::std::option::Option<crate::types::SessionType>,
63}
64impl CreateSessionInput {
65    /// <p>The ID of the session request.</p>
66    pub fn id(&self) -> ::std::option::Option<&str> {
67        self.id.as_deref()
68    }
69    /// <p>The description of the session.</p>
70    pub fn description(&self) -> ::std::option::Option<&str> {
71        self.description.as_deref()
72    }
73    /// <p>The IAM Role ARN</p>
74    pub fn role(&self) -> ::std::option::Option<&str> {
75        self.role.as_deref()
76    }
77    /// <p>The <code>SessionCommand</code> that runs the job.</p>
78    pub fn command(&self) -> ::std::option::Option<&crate::types::SessionCommand> {
79        self.command.as_ref()
80    }
81    /// <p>The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.</p>
82    pub fn timeout(&self) -> ::std::option::Option<i32> {
83        self.timeout
84    }
85    /// <p>The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.</p>
86    pub fn idle_timeout(&self) -> ::std::option::Option<i32> {
87        self.idle_timeout
88    }
89    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
90    pub fn default_arguments(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
91        self.default_arguments.as_ref()
92    }
93    /// <p>The number of connections to use for the session.</p>
94    pub fn connections(&self) -> ::std::option::Option<&crate::types::ConnectionsList> {
95        self.connections.as_ref()
96    }
97    /// <p>The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.</p>
98    pub fn max_capacity(&self) -> ::std::option::Option<f64> {
99        self.max_capacity
100    }
101    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
102    pub fn number_of_workers(&self) -> ::std::option::Option<i32> {
103        self.number_of_workers
104    }
105    /// <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, G.12X, G.16X, R.1X, R.2X, R.4X, or R.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
106    /// <ul>
107    /// <li>
108    /// <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>
109    /// <li>
110    /// <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>
111    /// <li>
112    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
113    /// <li>
114    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
115    /// <li>
116    /// <p>For the <code>G.12X</code> worker type, each worker maps to 12 DPU (48 vCPUs, 192 GB of memory) with 768GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
117    /// <li>
118    /// <p>For the <code>G.16X</code> worker type, each worker maps to 16 DPU (64 vCPUs, 256 GB of memory) with 1024GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
119    /// <li>
120    /// <p>For the <code>R.1X</code> worker type, each worker maps to 1 M-DPU (4 vCPUs, 32 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
121    /// <li>
122    /// <p>For the <code>R.2X</code> worker type, each worker maps to 2 M-DPU (8 vCPUs, 64 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
123    /// <li>
124    /// <p>For the <code>R.4X</code> worker type, each worker maps to 4 M-DPU (16 vCPUs, 128 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
125    /// <li>
126    /// <p>For the <code>R.8X</code> worker type, each worker maps to 8 M-DPU (32 vCPUs, 256 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
127    /// <li>
128    /// <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>
129    /// </ul>
130    pub fn worker_type(&self) -> ::std::option::Option<&crate::types::WorkerType> {
131        self.worker_type.as_ref()
132    }
133    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
134    pub fn security_configuration(&self) -> ::std::option::Option<&str> {
135        self.security_configuration.as_deref()
136    }
137    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
138    pub fn glue_version(&self) -> ::std::option::Option<&str> {
139        self.glue_version.as_deref()
140    }
141    /// <p>The map of key value pairs (tags) belonging to the session.</p>
142    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
143        self.tags.as_ref()
144    }
145    /// <p>The origin of the request.</p>
146    pub fn request_origin(&self) -> ::std::option::Option<&str> {
147        self.request_origin.as_deref()
148    }
149    /// <p>The type of session to create.</p>
150    pub fn session_type(&self) -> ::std::option::Option<&crate::types::SessionType> {
151        self.session_type.as_ref()
152    }
153}
154impl CreateSessionInput {
155    /// Creates a new builder-style object to manufacture [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
156    pub fn builder() -> crate::operation::create_session::builders::CreateSessionInputBuilder {
157        crate::operation::create_session::builders::CreateSessionInputBuilder::default()
158    }
159}
160
161/// A builder for [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
162#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
163#[non_exhaustive]
164pub struct CreateSessionInputBuilder {
165    pub(crate) id: ::std::option::Option<::std::string::String>,
166    pub(crate) description: ::std::option::Option<::std::string::String>,
167    pub(crate) role: ::std::option::Option<::std::string::String>,
168    pub(crate) command: ::std::option::Option<crate::types::SessionCommand>,
169    pub(crate) timeout: ::std::option::Option<i32>,
170    pub(crate) idle_timeout: ::std::option::Option<i32>,
171    pub(crate) default_arguments: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
172    pub(crate) connections: ::std::option::Option<crate::types::ConnectionsList>,
173    pub(crate) max_capacity: ::std::option::Option<f64>,
174    pub(crate) number_of_workers: ::std::option::Option<i32>,
175    pub(crate) worker_type: ::std::option::Option<crate::types::WorkerType>,
176    pub(crate) security_configuration: ::std::option::Option<::std::string::String>,
177    pub(crate) glue_version: ::std::option::Option<::std::string::String>,
178    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
179    pub(crate) request_origin: ::std::option::Option<::std::string::String>,
180    pub(crate) session_type: ::std::option::Option<crate::types::SessionType>,
181}
182impl CreateSessionInputBuilder {
183    /// <p>The ID of the session request.</p>
184    /// This field is required.
185    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186        self.id = ::std::option::Option::Some(input.into());
187        self
188    }
189    /// <p>The ID of the session request.</p>
190    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191        self.id = input;
192        self
193    }
194    /// <p>The ID of the session request.</p>
195    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
196        &self.id
197    }
198    /// <p>The description of the session.</p>
199    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.description = ::std::option::Option::Some(input.into());
201        self
202    }
203    /// <p>The description of the session.</p>
204    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.description = input;
206        self
207    }
208    /// <p>The description of the session.</p>
209    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
210        &self.description
211    }
212    /// <p>The IAM Role ARN</p>
213    /// This field is required.
214    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215        self.role = ::std::option::Option::Some(input.into());
216        self
217    }
218    /// <p>The IAM Role ARN</p>
219    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.role = input;
221        self
222    }
223    /// <p>The IAM Role ARN</p>
224    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
225        &self.role
226    }
227    /// <p>The <code>SessionCommand</code> that runs the job.</p>
228    /// This field is required.
229    pub fn command(mut self, input: crate::types::SessionCommand) -> Self {
230        self.command = ::std::option::Option::Some(input);
231        self
232    }
233    /// <p>The <code>SessionCommand</code> that runs the job.</p>
234    pub fn set_command(mut self, input: ::std::option::Option<crate::types::SessionCommand>) -> Self {
235        self.command = input;
236        self
237    }
238    /// <p>The <code>SessionCommand</code> that runs the job.</p>
239    pub fn get_command(&self) -> &::std::option::Option<crate::types::SessionCommand> {
240        &self.command
241    }
242    /// <p>The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.</p>
243    pub fn timeout(mut self, input: i32) -> Self {
244        self.timeout = ::std::option::Option::Some(input);
245        self
246    }
247    /// <p>The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.</p>
248    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
249        self.timeout = input;
250        self
251    }
252    /// <p>The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes). Consult the documentation for other job types.</p>
253    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
254        &self.timeout
255    }
256    /// <p>The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.</p>
257    pub fn idle_timeout(mut self, input: i32) -> Self {
258        self.idle_timeout = ::std::option::Option::Some(input);
259        self
260    }
261    /// <p>The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.</p>
262    pub fn set_idle_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
263        self.idle_timeout = input;
264        self
265    }
266    /// <p>The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.</p>
267    pub fn get_idle_timeout(&self) -> &::std::option::Option<i32> {
268        &self.idle_timeout
269    }
270    /// Adds a key-value pair to `default_arguments`.
271    ///
272    /// To override the contents of this collection use [`set_default_arguments`](Self::set_default_arguments).
273    ///
274    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
275    pub fn default_arguments(
276        mut self,
277        k: impl ::std::convert::Into<::std::string::String>,
278        v: impl ::std::convert::Into<::std::string::String>,
279    ) -> Self {
280        let mut hash_map = self.default_arguments.unwrap_or_default();
281        hash_map.insert(k.into(), v.into());
282        self.default_arguments = ::std::option::Option::Some(hash_map);
283        self
284    }
285    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
286    pub fn set_default_arguments(
287        mut self,
288        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
289    ) -> Self {
290        self.default_arguments = input;
291        self
292    }
293    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
294    pub fn get_default_arguments(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
295        &self.default_arguments
296    }
297    /// <p>The number of connections to use for the session.</p>
298    pub fn connections(mut self, input: crate::types::ConnectionsList) -> Self {
299        self.connections = ::std::option::Option::Some(input);
300        self
301    }
302    /// <p>The number of connections to use for the session.</p>
303    pub fn set_connections(mut self, input: ::std::option::Option<crate::types::ConnectionsList>) -> Self {
304        self.connections = input;
305        self
306    }
307    /// <p>The number of connections to use for the session.</p>
308    pub fn get_connections(&self) -> &::std::option::Option<crate::types::ConnectionsList> {
309        &self.connections
310    }
311    /// <p>The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.</p>
312    pub fn max_capacity(mut self, input: f64) -> Self {
313        self.max_capacity = ::std::option::Option::Some(input);
314        self
315    }
316    /// <p>The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.</p>
317    pub fn set_max_capacity(mut self, input: ::std::option::Option<f64>) -> Self {
318        self.max_capacity = input;
319        self
320    }
321    /// <p>The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.</p>
322    pub fn get_max_capacity(&self) -> &::std::option::Option<f64> {
323        &self.max_capacity
324    }
325    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
326    pub fn number_of_workers(mut self, input: i32) -> Self {
327        self.number_of_workers = ::std::option::Option::Some(input);
328        self
329    }
330    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
331    pub fn set_number_of_workers(mut self, input: ::std::option::Option<i32>) -> Self {
332        self.number_of_workers = input;
333        self
334    }
335    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
336    pub fn get_number_of_workers(&self) -> &::std::option::Option<i32> {
337        &self.number_of_workers
338    }
339    /// <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, G.12X, G.16X, R.1X, R.2X, R.4X, or R.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
340    /// <ul>
341    /// <li>
342    /// <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>
343    /// <li>
344    /// <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>
345    /// <li>
346    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
347    /// <li>
348    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
349    /// <li>
350    /// <p>For the <code>G.12X</code> worker type, each worker maps to 12 DPU (48 vCPUs, 192 GB of memory) with 768GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
351    /// <li>
352    /// <p>For the <code>G.16X</code> worker type, each worker maps to 16 DPU (64 vCPUs, 256 GB of memory) with 1024GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
353    /// <li>
354    /// <p>For the <code>R.1X</code> worker type, each worker maps to 1 M-DPU (4 vCPUs, 32 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
355    /// <li>
356    /// <p>For the <code>R.2X</code> worker type, each worker maps to 2 M-DPU (8 vCPUs, 64 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
357    /// <li>
358    /// <p>For the <code>R.4X</code> worker type, each worker maps to 4 M-DPU (16 vCPUs, 128 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
359    /// <li>
360    /// <p>For the <code>R.8X</code> worker type, each worker maps to 8 M-DPU (32 vCPUs, 256 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
361    /// <li>
362    /// <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>
363    /// </ul>
364    pub fn worker_type(mut self, input: crate::types::WorkerType) -> Self {
365        self.worker_type = ::std::option::Option::Some(input);
366        self
367    }
368    /// <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, G.12X, G.16X, R.1X, R.2X, R.4X, or R.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
369    /// <ul>
370    /// <li>
371    /// <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>
372    /// <li>
373    /// <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>
374    /// <li>
375    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
376    /// <li>
377    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
378    /// <li>
379    /// <p>For the <code>G.12X</code> worker type, each worker maps to 12 DPU (48 vCPUs, 192 GB of memory) with 768GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
380    /// <li>
381    /// <p>For the <code>G.16X</code> worker type, each worker maps to 16 DPU (64 vCPUs, 256 GB of memory) with 1024GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
382    /// <li>
383    /// <p>For the <code>R.1X</code> worker type, each worker maps to 1 M-DPU (4 vCPUs, 32 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
384    /// <li>
385    /// <p>For the <code>R.2X</code> worker type, each worker maps to 2 M-DPU (8 vCPUs, 64 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
386    /// <li>
387    /// <p>For the <code>R.4X</code> worker type, each worker maps to 4 M-DPU (16 vCPUs, 128 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
388    /// <li>
389    /// <p>For the <code>R.8X</code> worker type, each worker maps to 8 M-DPU (32 vCPUs, 256 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
390    /// <li>
391    /// <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>
392    /// </ul>
393    pub fn set_worker_type(mut self, input: ::std::option::Option<crate::types::WorkerType>) -> Self {
394        self.worker_type = input;
395        self
396    }
397    /// <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, G.12X, G.16X, R.1X, R.2X, R.4X, or R.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
398    /// <ul>
399    /// <li>
400    /// <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>
401    /// <li>
402    /// <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>
403    /// <li>
404    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
405    /// <li>
406    /// <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 select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
407    /// <li>
408    /// <p>For the <code>G.12X</code> worker type, each worker maps to 12 DPU (48 vCPUs, 192 GB of memory) with 768GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
409    /// <li>
410    /// <p>For the <code>G.16X</code> worker type, each worker maps to 16 DPU (64 vCPUs, 256 GB of memory) with 1024GB disk, and provides 1 executor per worker. We recommend this worker type for jobs with very large workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
411    /// <li>
412    /// <p>For the <code>R.1X</code> worker type, each worker maps to 1 M-DPU (4 vCPUs, 32 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
413    /// <li>
414    /// <p>For the <code>R.2X</code> worker type, each worker maps to 2 M-DPU (8 vCPUs, 64 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
415    /// <li>
416    /// <p>For the <code>R.4X</code> worker type, each worker maps to 4 M-DPU (16 vCPUs, 128 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
417    /// <li>
418    /// <p>For the <code>R.8X</code> worker type, each worker maps to 8 M-DPU (32 vCPUs, 256 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for memory-intensive workloads. This worker type is available only for Glue version 4.0 or later Spark ETL jobs in select Amazon Web Services Regions. For the supported Regions, see <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html">Configuring job properties for Spark jobs</a> in the developer guide.</p></li>
419    /// <li>
420    /// <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>
421    /// </ul>
422    pub fn get_worker_type(&self) -> &::std::option::Option<crate::types::WorkerType> {
423        &self.worker_type
424    }
425    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
426    pub fn security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
427        self.security_configuration = ::std::option::Option::Some(input.into());
428        self
429    }
430    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
431    pub fn set_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
432        self.security_configuration = input;
433        self
434    }
435    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
436    pub fn get_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
437        &self.security_configuration
438    }
439    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
440    pub fn glue_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
441        self.glue_version = ::std::option::Option::Some(input.into());
442        self
443    }
444    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
445    pub fn set_glue_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
446        self.glue_version = input;
447        self
448    }
449    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
450    pub fn get_glue_version(&self) -> &::std::option::Option<::std::string::String> {
451        &self.glue_version
452    }
453    /// Adds a key-value pair to `tags`.
454    ///
455    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
456    ///
457    /// <p>The map of key value pairs (tags) belonging to the session.</p>
458    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
459        let mut hash_map = self.tags.unwrap_or_default();
460        hash_map.insert(k.into(), v.into());
461        self.tags = ::std::option::Option::Some(hash_map);
462        self
463    }
464    /// <p>The map of key value pairs (tags) belonging to the session.</p>
465    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
466        self.tags = input;
467        self
468    }
469    /// <p>The map of key value pairs (tags) belonging to the session.</p>
470    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
471        &self.tags
472    }
473    /// <p>The origin of the request.</p>
474    pub fn request_origin(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
475        self.request_origin = ::std::option::Option::Some(input.into());
476        self
477    }
478    /// <p>The origin of the request.</p>
479    pub fn set_request_origin(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
480        self.request_origin = input;
481        self
482    }
483    /// <p>The origin of the request.</p>
484    pub fn get_request_origin(&self) -> &::std::option::Option<::std::string::String> {
485        &self.request_origin
486    }
487    /// <p>The type of session to create.</p>
488    pub fn session_type(mut self, input: crate::types::SessionType) -> Self {
489        self.session_type = ::std::option::Option::Some(input);
490        self
491    }
492    /// <p>The type of session to create.</p>
493    pub fn set_session_type(mut self, input: ::std::option::Option<crate::types::SessionType>) -> Self {
494        self.session_type = input;
495        self
496    }
497    /// <p>The type of session to create.</p>
498    pub fn get_session_type(&self) -> &::std::option::Option<crate::types::SessionType> {
499        &self.session_type
500    }
501    /// Consumes the builder and constructs a [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
502    pub fn build(
503        self,
504    ) -> ::std::result::Result<crate::operation::create_session::CreateSessionInput, ::aws_smithy_types::error::operation::BuildError> {
505        ::std::result::Result::Ok(crate::operation::create_session::CreateSessionInput {
506            id: self.id,
507            description: self.description,
508            role: self.role,
509            command: self.command,
510            timeout: self.timeout,
511            idle_timeout: self.idle_timeout,
512            default_arguments: self.default_arguments,
513            connections: self.connections,
514            max_capacity: self.max_capacity,
515            number_of_workers: self.number_of_workers,
516            worker_type: self.worker_type,
517            security_configuration: self.security_configuration,
518            glue_version: self.glue_version,
519            tags: self.tags,
520            request_origin: self.request_origin,
521            session_type: self.session_type,
522        })
523    }
524}