aws_sdk_emr/operation/create_studio/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_studio::_create_studio_output::CreateStudioOutputBuilder;
3
4pub use crate::operation::create_studio::_create_studio_input::CreateStudioInputBuilder;
5
6impl crate::operation::create_studio::builders::CreateStudioInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_studio::CreateStudioOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_studio::CreateStudioError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_studio();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateStudio`.
24///
25/// <p>Creates a new Amazon EMR Studio.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateStudioFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_studio::builders::CreateStudioInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_studio::CreateStudioOutput,
35        crate::operation::create_studio::CreateStudioError,
36    > for CreateStudioFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_studio::CreateStudioOutput,
44            crate::operation::create_studio::CreateStudioError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateStudioFluentBuilder {
51    /// Creates a new `CreateStudioFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateStudio as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_studio::builders::CreateStudioInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_studio::CreateStudioOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_studio::CreateStudioError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_studio::CreateStudio::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_studio::CreateStudio::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_studio::CreateStudioOutput,
97        crate::operation::create_studio::CreateStudioError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>A descriptive name for the Amazon EMR Studio.</p>
112    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.name(input.into());
114        self
115    }
116    /// <p>A descriptive name for the Amazon EMR Studio.</p>
117    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_name(input);
119        self
120    }
121    /// <p>A descriptive name for the Amazon EMR Studio.</p>
122    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_name()
124    }
125    /// <p>A detailed description of the Amazon EMR Studio.</p>
126    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.description(input.into());
128        self
129    }
130    /// <p>A detailed description of the Amazon EMR Studio.</p>
131    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_description(input);
133        self
134    }
135    /// <p>A detailed description of the Amazon EMR Studio.</p>
136    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_description()
138    }
139    /// <p>Specifies whether the Studio authenticates users using IAM or IAM Identity Center.</p>
140    pub fn auth_mode(mut self, input: crate::types::AuthMode) -> Self {
141        self.inner = self.inner.auth_mode(input);
142        self
143    }
144    /// <p>Specifies whether the Studio authenticates users using IAM or IAM Identity Center.</p>
145    pub fn set_auth_mode(mut self, input: ::std::option::Option<crate::types::AuthMode>) -> Self {
146        self.inner = self.inner.set_auth_mode(input);
147        self
148    }
149    /// <p>Specifies whether the Studio authenticates users using IAM or IAM Identity Center.</p>
150    pub fn get_auth_mode(&self) -> &::std::option::Option<crate::types::AuthMode> {
151        self.inner.get_auth_mode()
152    }
153    /// <p>The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.</p>
154    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.vpc_id(input.into());
156        self
157    }
158    /// <p>The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.</p>
159    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_vpc_id(input);
161        self
162    }
163    /// <p>The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.</p>
164    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_vpc_id()
166    }
167    ///
168    /// Appends an item to `SubnetIds`.
169    ///
170    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
171    ///
172    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The subnets must belong to the VPC specified by <code>VpcId</code>. Studio users can create a Workspace in any of the specified subnets.</p>
173    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.inner = self.inner.subnet_ids(input.into());
175        self
176    }
177    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The subnets must belong to the VPC specified by <code>VpcId</code>. Studio users can create a Workspace in any of the specified subnets.</p>
178    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
179        self.inner = self.inner.set_subnet_ids(input);
180        self
181    }
182    /// <p>A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The subnets must belong to the VPC specified by <code>VpcId</code>. Studio users can create a Workspace in any of the specified subnets.</p>
183    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
184        self.inner.get_subnet_ids()
185    }
186    /// <p>The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to interoperate with other Amazon Web Services services.</p>
187    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.inner = self.inner.service_role(input.into());
189        self
190    }
191    /// <p>The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to interoperate with other Amazon Web Services services.</p>
192    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.inner = self.inner.set_service_role(input);
194        self
195    }
196    /// <p>The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to interoperate with other Amazon Web Services services.</p>
197    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
198        self.inner.get_service_role()
199    }
200    /// <p>The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a <code>UserRole</code> when you use IAM Identity Center authentication. The permissions attached to the <code>UserRole</code> can be scoped down for each user or group using session policies.</p>
201    pub fn user_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.inner = self.inner.user_role(input.into());
203        self
204    }
205    /// <p>The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a <code>UserRole</code> when you use IAM Identity Center authentication. The permissions attached to the <code>UserRole</code> can be scoped down for each user or group using session policies.</p>
206    pub fn set_user_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.inner = self.inner.set_user_role(input);
208        self
209    }
210    /// <p>The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a <code>UserRole</code> when you use IAM Identity Center authentication. The permissions attached to the <code>UserRole</code> can be scoped down for each user or group using session policies.</p>
211    pub fn get_user_role(&self) -> &::std::option::Option<::std::string::String> {
212        self.inner.get_user_role()
213    }
214    /// <p>The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by <code>VpcId</code>.</p>
215    pub fn workspace_security_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216        self.inner = self.inner.workspace_security_group_id(input.into());
217        self
218    }
219    /// <p>The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by <code>VpcId</code>.</p>
220    pub fn set_workspace_security_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221        self.inner = self.inner.set_workspace_security_group_id(input);
222        self
223    }
224    /// <p>The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by <code>VpcId</code>.</p>
225    pub fn get_workspace_security_group_id(&self) -> &::std::option::Option<::std::string::String> {
226        self.inner.get_workspace_security_group_id()
227    }
228    /// <p>The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by <code>VpcId</code>.</p>
229    pub fn engine_security_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230        self.inner = self.inner.engine_security_group_id(input.into());
231        self
232    }
233    /// <p>The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by <code>VpcId</code>.</p>
234    pub fn set_engine_security_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235        self.inner = self.inner.set_engine_security_group_id(input);
236        self
237    }
238    /// <p>The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by <code>VpcId</code>.</p>
239    pub fn get_engine_security_group_id(&self) -> &::std::option::Option<::std::string::String> {
240        self.inner.get_engine_security_group_id()
241    }
242    /// <p>The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.</p>
243    pub fn default_s3_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244        self.inner = self.inner.default_s3_location(input.into());
245        self
246    }
247    /// <p>The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.</p>
248    pub fn set_default_s3_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249        self.inner = self.inner.set_default_s3_location(input);
250        self
251    }
252    /// <p>The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.</p>
253    pub fn get_default_s3_location(&self) -> &::std::option::Option<::std::string::String> {
254        self.inner.get_default_s3_location()
255    }
256    /// <p>The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.</p>
257    pub fn idp_auth_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
258        self.inner = self.inner.idp_auth_url(input.into());
259        self
260    }
261    /// <p>The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.</p>
262    pub fn set_idp_auth_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
263        self.inner = self.inner.set_idp_auth_url(input);
264        self
265    }
266    /// <p>The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.</p>
267    pub fn get_idp_auth_url(&self) -> &::std::option::Option<::std::string::String> {
268        self.inner.get_idp_auth_url()
269    }
270    /// <p>The name that your identity provider (IdP) uses for its <code>RelayState</code> parameter. For example, <code>RelayState</code> or <code>TargetSource</code>. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The <code>RelayState</code> parameter differs by IdP.</p>
271    pub fn idp_relay_state_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
272        self.inner = self.inner.idp_relay_state_parameter_name(input.into());
273        self
274    }
275    /// <p>The name that your identity provider (IdP) uses for its <code>RelayState</code> parameter. For example, <code>RelayState</code> or <code>TargetSource</code>. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The <code>RelayState</code> parameter differs by IdP.</p>
276    pub fn set_idp_relay_state_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
277        self.inner = self.inner.set_idp_relay_state_parameter_name(input);
278        self
279    }
280    /// <p>The name that your identity provider (IdP) uses for its <code>RelayState</code> parameter. For example, <code>RelayState</code> or <code>TargetSource</code>. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The <code>RelayState</code> parameter differs by IdP.</p>
281    pub fn get_idp_relay_state_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
282        self.inner.get_idp_relay_state_parameter_name()
283    }
284    ///
285    /// Appends an item to `Tags`.
286    ///
287    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
288    ///
289    /// <p>A list of tags to associate with the Amazon EMR Studio. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.</p>
290    pub fn tags(mut self, input: crate::types::Tag) -> Self {
291        self.inner = self.inner.tags(input);
292        self
293    }
294    /// <p>A list of tags to associate with the Amazon EMR Studio. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.</p>
295    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
296        self.inner = self.inner.set_tags(input);
297        self
298    }
299    /// <p>A list of tags to associate with the Amazon EMR Studio. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.</p>
300    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
301        self.inner.get_tags()
302    }
303    /// <p>A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is <code>false</code>.</p>
304    pub fn trusted_identity_propagation_enabled(mut self, input: bool) -> Self {
305        self.inner = self.inner.trusted_identity_propagation_enabled(input);
306        self
307    }
308    /// <p>A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is <code>false</code>.</p>
309    pub fn set_trusted_identity_propagation_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
310        self.inner = self.inner.set_trusted_identity_propagation_enabled(input);
311        self
312    }
313    /// <p>A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is <code>false</code>.</p>
314    pub fn get_trusted_identity_propagation_enabled(&self) -> &::std::option::Option<bool> {
315        self.inner.get_trusted_identity_propagation_enabled()
316    }
317    /// <p>Specifies whether IAM Identity Center user assignment is <code>REQUIRED</code> or <code>OPTIONAL</code>. If the value is set to <code>REQUIRED</code>, users must be explicitly assigned to the Studio application to access the Studio.</p>
318    pub fn idc_user_assignment(mut self, input: crate::types::IdcUserAssignment) -> Self {
319        self.inner = self.inner.idc_user_assignment(input);
320        self
321    }
322    /// <p>Specifies whether IAM Identity Center user assignment is <code>REQUIRED</code> or <code>OPTIONAL</code>. If the value is set to <code>REQUIRED</code>, users must be explicitly assigned to the Studio application to access the Studio.</p>
323    pub fn set_idc_user_assignment(mut self, input: ::std::option::Option<crate::types::IdcUserAssignment>) -> Self {
324        self.inner = self.inner.set_idc_user_assignment(input);
325        self
326    }
327    /// <p>Specifies whether IAM Identity Center user assignment is <code>REQUIRED</code> or <code>OPTIONAL</code>. If the value is set to <code>REQUIRED</code>, users must be explicitly assigned to the Studio application to access the Studio.</p>
328    pub fn get_idc_user_assignment(&self) -> &::std::option::Option<crate::types::IdcUserAssignment> {
329        self.inner.get_idc_user_assignment()
330    }
331    /// <p>The ARN of the IAM Identity Center instance to create the Studio application.</p>
332    pub fn idc_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
333        self.inner = self.inner.idc_instance_arn(input.into());
334        self
335    }
336    /// <p>The ARN of the IAM Identity Center instance to create the Studio application.</p>
337    pub fn set_idc_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
338        self.inner = self.inner.set_idc_instance_arn(input);
339        self
340    }
341    /// <p>The ARN of the IAM Identity Center instance to create the Studio application.</p>
342    pub fn get_idc_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
343        self.inner.get_idc_instance_arn()
344    }
345    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
346    pub fn encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
347        self.inner = self.inner.encryption_key_arn(input.into());
348        self
349    }
350    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
351    pub fn set_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
352        self.inner = self.inner.set_encryption_key_arn(input);
353        self
354    }
355    /// <p>The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.</p>
356    pub fn get_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
357        self.inner.get_encryption_key_arn()
358    }
359}