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, or G.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 the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).</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 the same Amazon Web Services Regions as supported for the <code>G.4X</code> worker type.</p></li>
37    /// <li>
38    /// <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>
39    /// </ul>
40    pub worker_type: ::std::option::Option<crate::types::WorkerType>,
41    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
42    pub security_configuration: ::std::option::Option<::std::string::String>,
43    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
44    pub glue_version: ::std::option::Option<::std::string::String>,
45    /// <p>The map of key value pairs (tags) belonging to the session.</p>
46    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
47    /// <p>The origin of the request.</p>
48    pub request_origin: ::std::option::Option<::std::string::String>,
49    /// <p>The type of session to create.</p>
50    pub session_type: ::std::option::Option<crate::types::SessionType>,
51}
52impl CreateSessionInput {
53    /// <p>The ID of the session request.</p>
54    pub fn id(&self) -> ::std::option::Option<&str> {
55        self.id.as_deref()
56    }
57    /// <p>The description of the session.</p>
58    pub fn description(&self) -> ::std::option::Option<&str> {
59        self.description.as_deref()
60    }
61    /// <p>The IAM Role ARN</p>
62    pub fn role(&self) -> ::std::option::Option<&str> {
63        self.role.as_deref()
64    }
65    /// <p>The <code>SessionCommand</code> that runs the job.</p>
66    pub fn command(&self) -> ::std::option::Option<&crate::types::SessionCommand> {
67        self.command.as_ref()
68    }
69    /// <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>
70    pub fn timeout(&self) -> ::std::option::Option<i32> {
71        self.timeout
72    }
73    /// <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>
74    pub fn idle_timeout(&self) -> ::std::option::Option<i32> {
75        self.idle_timeout
76    }
77    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
78    pub fn default_arguments(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
79        self.default_arguments.as_ref()
80    }
81    /// <p>The number of connections to use for the session.</p>
82    pub fn connections(&self) -> ::std::option::Option<&crate::types::ConnectionsList> {
83        self.connections.as_ref()
84    }
85    /// <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>
86    pub fn max_capacity(&self) -> ::std::option::Option<f64> {
87        self.max_capacity
88    }
89    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
90    pub fn number_of_workers(&self) -> ::std::option::Option<i32> {
91        self.number_of_workers
92    }
93    /// <p>The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
94    /// <ul>
95    /// <li>
96    /// <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>
97    /// <li>
98    /// <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>
99    /// <li>
100    /// <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 (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).</p></li>
101    /// <li>
102    /// <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>
103    /// <li>
104    /// <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>
105    /// </ul>
106    pub fn worker_type(&self) -> ::std::option::Option<&crate::types::WorkerType> {
107        self.worker_type.as_ref()
108    }
109    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
110    pub fn security_configuration(&self) -> ::std::option::Option<&str> {
111        self.security_configuration.as_deref()
112    }
113    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
114    pub fn glue_version(&self) -> ::std::option::Option<&str> {
115        self.glue_version.as_deref()
116    }
117    /// <p>The map of key value pairs (tags) belonging to the session.</p>
118    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
119        self.tags.as_ref()
120    }
121    /// <p>The origin of the request.</p>
122    pub fn request_origin(&self) -> ::std::option::Option<&str> {
123        self.request_origin.as_deref()
124    }
125    /// <p>The type of session to create.</p>
126    pub fn session_type(&self) -> ::std::option::Option<&crate::types::SessionType> {
127        self.session_type.as_ref()
128    }
129}
130impl CreateSessionInput {
131    /// Creates a new builder-style object to manufacture [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
132    pub fn builder() -> crate::operation::create_session::builders::CreateSessionInputBuilder {
133        crate::operation::create_session::builders::CreateSessionInputBuilder::default()
134    }
135}
136
137/// A builder for [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
138#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
139#[non_exhaustive]
140pub struct CreateSessionInputBuilder {
141    pub(crate) id: ::std::option::Option<::std::string::String>,
142    pub(crate) description: ::std::option::Option<::std::string::String>,
143    pub(crate) role: ::std::option::Option<::std::string::String>,
144    pub(crate) command: ::std::option::Option<crate::types::SessionCommand>,
145    pub(crate) timeout: ::std::option::Option<i32>,
146    pub(crate) idle_timeout: ::std::option::Option<i32>,
147    pub(crate) default_arguments: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
148    pub(crate) connections: ::std::option::Option<crate::types::ConnectionsList>,
149    pub(crate) max_capacity: ::std::option::Option<f64>,
150    pub(crate) number_of_workers: ::std::option::Option<i32>,
151    pub(crate) worker_type: ::std::option::Option<crate::types::WorkerType>,
152    pub(crate) security_configuration: ::std::option::Option<::std::string::String>,
153    pub(crate) glue_version: ::std::option::Option<::std::string::String>,
154    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
155    pub(crate) request_origin: ::std::option::Option<::std::string::String>,
156    pub(crate) session_type: ::std::option::Option<crate::types::SessionType>,
157}
158impl CreateSessionInputBuilder {
159    /// <p>The ID of the session request.</p>
160    /// This field is required.
161    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.id = ::std::option::Option::Some(input.into());
163        self
164    }
165    /// <p>The ID of the session request.</p>
166    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.id = input;
168        self
169    }
170    /// <p>The ID of the session request.</p>
171    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
172        &self.id
173    }
174    /// <p>The description of the session.</p>
175    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176        self.description = ::std::option::Option::Some(input.into());
177        self
178    }
179    /// <p>The description of the session.</p>
180    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
181        self.description = input;
182        self
183    }
184    /// <p>The description of the session.</p>
185    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
186        &self.description
187    }
188    /// <p>The IAM Role ARN</p>
189    /// This field is required.
190    pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
191        self.role = ::std::option::Option::Some(input.into());
192        self
193    }
194    /// <p>The IAM Role ARN</p>
195    pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
196        self.role = input;
197        self
198    }
199    /// <p>The IAM Role ARN</p>
200    pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
201        &self.role
202    }
203    /// <p>The <code>SessionCommand</code> that runs the job.</p>
204    /// This field is required.
205    pub fn command(mut self, input: crate::types::SessionCommand) -> Self {
206        self.command = ::std::option::Option::Some(input);
207        self
208    }
209    /// <p>The <code>SessionCommand</code> that runs the job.</p>
210    pub fn set_command(mut self, input: ::std::option::Option<crate::types::SessionCommand>) -> Self {
211        self.command = input;
212        self
213    }
214    /// <p>The <code>SessionCommand</code> that runs the job.</p>
215    pub fn get_command(&self) -> &::std::option::Option<crate::types::SessionCommand> {
216        &self.command
217    }
218    /// <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>
219    pub fn timeout(mut self, input: i32) -> Self {
220        self.timeout = ::std::option::Option::Some(input);
221        self
222    }
223    /// <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>
224    pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
225        self.timeout = input;
226        self
227    }
228    /// <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>
229    pub fn get_timeout(&self) -> &::std::option::Option<i32> {
230        &self.timeout
231    }
232    /// <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>
233    pub fn idle_timeout(mut self, input: i32) -> Self {
234        self.idle_timeout = ::std::option::Option::Some(input);
235        self
236    }
237    /// <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>
238    pub fn set_idle_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
239        self.idle_timeout = input;
240        self
241    }
242    /// <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>
243    pub fn get_idle_timeout(&self) -> &::std::option::Option<i32> {
244        &self.idle_timeout
245    }
246    /// Adds a key-value pair to `default_arguments`.
247    ///
248    /// To override the contents of this collection use [`set_default_arguments`](Self::set_default_arguments).
249    ///
250    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
251    pub fn default_arguments(
252        mut self,
253        k: impl ::std::convert::Into<::std::string::String>,
254        v: impl ::std::convert::Into<::std::string::String>,
255    ) -> Self {
256        let mut hash_map = self.default_arguments.unwrap_or_default();
257        hash_map.insert(k.into(), v.into());
258        self.default_arguments = ::std::option::Option::Some(hash_map);
259        self
260    }
261    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
262    pub fn set_default_arguments(
263        mut self,
264        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
265    ) -> Self {
266        self.default_arguments = input;
267        self
268    }
269    /// <p>A map array of key-value pairs. Max is 75 pairs.</p>
270    pub fn get_default_arguments(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
271        &self.default_arguments
272    }
273    /// <p>The number of connections to use for the session.</p>
274    pub fn connections(mut self, input: crate::types::ConnectionsList) -> Self {
275        self.connections = ::std::option::Option::Some(input);
276        self
277    }
278    /// <p>The number of connections to use for the session.</p>
279    pub fn set_connections(mut self, input: ::std::option::Option<crate::types::ConnectionsList>) -> Self {
280        self.connections = input;
281        self
282    }
283    /// <p>The number of connections to use for the session.</p>
284    pub fn get_connections(&self) -> &::std::option::Option<crate::types::ConnectionsList> {
285        &self.connections
286    }
287    /// <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>
288    pub fn max_capacity(mut self, input: f64) -> Self {
289        self.max_capacity = ::std::option::Option::Some(input);
290        self
291    }
292    /// <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>
293    pub fn set_max_capacity(mut self, input: ::std::option::Option<f64>) -> Self {
294        self.max_capacity = input;
295        self
296    }
297    /// <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>
298    pub fn get_max_capacity(&self) -> &::std::option::Option<f64> {
299        &self.max_capacity
300    }
301    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
302    pub fn number_of_workers(mut self, input: i32) -> Self {
303        self.number_of_workers = ::std::option::Option::Some(input);
304        self
305    }
306    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
307    pub fn set_number_of_workers(mut self, input: ::std::option::Option<i32>) -> Self {
308        self.number_of_workers = input;
309        self
310    }
311    /// <p>The number of workers of a defined <code>WorkerType</code> to use for the session.</p>
312    pub fn get_number_of_workers(&self) -> &::std::option::Option<i32> {
313        &self.number_of_workers
314    }
315    /// <p>The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
316    /// <ul>
317    /// <li>
318    /// <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>
319    /// <li>
320    /// <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>
321    /// <li>
322    /// <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 (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).</p></li>
323    /// <li>
324    /// <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>
325    /// <li>
326    /// <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>
327    /// </ul>
328    pub fn worker_type(mut self, input: crate::types::WorkerType) -> Self {
329        self.worker_type = ::std::option::Option::Some(input);
330        self
331    }
332    /// <p>The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
333    /// <ul>
334    /// <li>
335    /// <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>
336    /// <li>
337    /// <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>
338    /// <li>
339    /// <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 (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).</p></li>
340    /// <li>
341    /// <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>
342    /// <li>
343    /// <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>
344    /// </ul>
345    pub fn set_worker_type(mut self, input: ::std::option::Option<crate::types::WorkerType>) -> Self {
346        self.worker_type = input;
347        self
348    }
349    /// <p>The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.</p>
350    /// <ul>
351    /// <li>
352    /// <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>
353    /// <li>
354    /// <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>
355    /// <li>
356    /// <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 (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).</p></li>
357    /// <li>
358    /// <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>
359    /// <li>
360    /// <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>
361    /// </ul>
362    pub fn get_worker_type(&self) -> &::std::option::Option<crate::types::WorkerType> {
363        &self.worker_type
364    }
365    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
366    pub fn security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
367        self.security_configuration = ::std::option::Option::Some(input.into());
368        self
369    }
370    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
371    pub fn set_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
372        self.security_configuration = input;
373        self
374    }
375    /// <p>The name of the SecurityConfiguration structure to be used with the session</p>
376    pub fn get_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
377        &self.security_configuration
378    }
379    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
380    pub fn glue_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
381        self.glue_version = ::std::option::Option::Some(input.into());
382        self
383    }
384    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
385    pub fn set_glue_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
386        self.glue_version = input;
387        self
388    }
389    /// <p>The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.</p>
390    pub fn get_glue_version(&self) -> &::std::option::Option<::std::string::String> {
391        &self.glue_version
392    }
393    /// Adds a key-value pair to `tags`.
394    ///
395    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
396    ///
397    /// <p>The map of key value pairs (tags) belonging to the session.</p>
398    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
399        let mut hash_map = self.tags.unwrap_or_default();
400        hash_map.insert(k.into(), v.into());
401        self.tags = ::std::option::Option::Some(hash_map);
402        self
403    }
404    /// <p>The map of key value pairs (tags) belonging to the session.</p>
405    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
406        self.tags = input;
407        self
408    }
409    /// <p>The map of key value pairs (tags) belonging to the session.</p>
410    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
411        &self.tags
412    }
413    /// <p>The origin of the request.</p>
414    pub fn request_origin(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
415        self.request_origin = ::std::option::Option::Some(input.into());
416        self
417    }
418    /// <p>The origin of the request.</p>
419    pub fn set_request_origin(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
420        self.request_origin = input;
421        self
422    }
423    /// <p>The origin of the request.</p>
424    pub fn get_request_origin(&self) -> &::std::option::Option<::std::string::String> {
425        &self.request_origin
426    }
427    /// <p>The type of session to create.</p>
428    pub fn session_type(mut self, input: crate::types::SessionType) -> Self {
429        self.session_type = ::std::option::Option::Some(input);
430        self
431    }
432    /// <p>The type of session to create.</p>
433    pub fn set_session_type(mut self, input: ::std::option::Option<crate::types::SessionType>) -> Self {
434        self.session_type = input;
435        self
436    }
437    /// <p>The type of session to create.</p>
438    pub fn get_session_type(&self) -> &::std::option::Option<crate::types::SessionType> {
439        &self.session_type
440    }
441    /// Consumes the builder and constructs a [`CreateSessionInput`](crate::operation::create_session::CreateSessionInput).
442    pub fn build(
443        self,
444    ) -> ::std::result::Result<crate::operation::create_session::CreateSessionInput, ::aws_smithy_types::error::operation::BuildError> {
445        ::std::result::Result::Ok(crate::operation::create_session::CreateSessionInput {
446            id: self.id,
447            description: self.description,
448            role: self.role,
449            command: self.command,
450            timeout: self.timeout,
451            idle_timeout: self.idle_timeout,
452            default_arguments: self.default_arguments,
453            connections: self.connections,
454            max_capacity: self.max_capacity,
455            number_of_workers: self.number_of_workers,
456            worker_type: self.worker_type,
457            security_configuration: self.security_configuration,
458            glue_version: self.glue_version,
459            tags: self.tags,
460            request_origin: self.request_origin,
461            session_type: self.session_type,
462        })
463    }
464}