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