aws_sdk_emrserverless/operation/update_application/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_application::_update_application_output::UpdateApplicationOutputBuilder;
3
4pub use crate::operation::update_application::_update_application_input::UpdateApplicationInputBuilder;
5
6impl crate::operation::update_application::builders::UpdateApplicationInputBuilder {
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::update_application::UpdateApplicationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_application::UpdateApplicationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_application();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateApplication`.
24///
25/// <p>Updates a specified application. An application has to be in a stopped or created state in order to be updated.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateApplicationFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_application::builders::UpdateApplicationInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_application::UpdateApplicationOutput,
35        crate::operation::update_application::UpdateApplicationError,
36    > for UpdateApplicationFluentBuilder
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::update_application::UpdateApplicationOutput,
44            crate::operation::update_application::UpdateApplicationError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateApplicationFluentBuilder {
51    /// Creates a new `UpdateApplicationFluentBuilder`.
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 UpdateApplication as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_application::builders::UpdateApplicationInputBuilder {
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::update_application::UpdateApplicationOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_application::UpdateApplicationError,
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::update_application::UpdateApplication::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_application::UpdateApplication::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::update_application::UpdateApplicationOutput,
97        crate::operation::update_application::UpdateApplicationError,
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>The ID of the application to update.</p>
112    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.application_id(input.into());
114        self
115    }
116    /// <p>The ID of the application to update.</p>
117    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_application_id(input);
119        self
120    }
121    /// <p>The ID of the application to update.</p>
122    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_application_id()
124    }
125    /// <p>The client idempotency token of the application to update. Its value must be unique for each request.</p>
126    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.client_token(input.into());
128        self
129    }
130    /// <p>The client idempotency token of the application to update. Its value must be unique for each request.</p>
131    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_client_token(input);
133        self
134    }
135    /// <p>The client idempotency token of the application to update. Its value must be unique for each request.</p>
136    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_client_token()
138    }
139    ///
140    /// Adds a key-value pair to `initialCapacity`.
141    ///
142    /// To override the contents of this collection use [`set_initial_capacity`](Self::set_initial_capacity).
143    ///
144    /// <p>The capacity to initialize when the application is updated.</p>
145    pub fn initial_capacity(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::InitialCapacityConfig) -> Self {
146        self.inner = self.inner.initial_capacity(k.into(), v);
147        self
148    }
149    /// <p>The capacity to initialize when the application is updated.</p>
150    pub fn set_initial_capacity(
151        mut self,
152        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InitialCapacityConfig>>,
153    ) -> Self {
154        self.inner = self.inner.set_initial_capacity(input);
155        self
156    }
157    /// <p>The capacity to initialize when the application is updated.</p>
158    pub fn get_initial_capacity(
159        &self,
160    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InitialCapacityConfig>> {
161        self.inner.get_initial_capacity()
162    }
163    /// <p>The maximum capacity to allocate when the application is updated. This is cumulative across all workers at any given point in time during the lifespan of the application. No new resources will be created once any one of the defined limits is hit.</p>
164    pub fn maximum_capacity(mut self, input: crate::types::MaximumAllowedResources) -> Self {
165        self.inner = self.inner.maximum_capacity(input);
166        self
167    }
168    /// <p>The maximum capacity to allocate when the application is updated. This is cumulative across all workers at any given point in time during the lifespan of the application. No new resources will be created once any one of the defined limits is hit.</p>
169    pub fn set_maximum_capacity(mut self, input: ::std::option::Option<crate::types::MaximumAllowedResources>) -> Self {
170        self.inner = self.inner.set_maximum_capacity(input);
171        self
172    }
173    /// <p>The maximum capacity to allocate when the application is updated. This is cumulative across all workers at any given point in time during the lifespan of the application. No new resources will be created once any one of the defined limits is hit.</p>
174    pub fn get_maximum_capacity(&self) -> &::std::option::Option<crate::types::MaximumAllowedResources> {
175        self.inner.get_maximum_capacity()
176    }
177    /// <p>The configuration for an application to automatically start on job submission.</p>
178    pub fn auto_start_configuration(mut self, input: crate::types::AutoStartConfig) -> Self {
179        self.inner = self.inner.auto_start_configuration(input);
180        self
181    }
182    /// <p>The configuration for an application to automatically start on job submission.</p>
183    pub fn set_auto_start_configuration(mut self, input: ::std::option::Option<crate::types::AutoStartConfig>) -> Self {
184        self.inner = self.inner.set_auto_start_configuration(input);
185        self
186    }
187    /// <p>The configuration for an application to automatically start on job submission.</p>
188    pub fn get_auto_start_configuration(&self) -> &::std::option::Option<crate::types::AutoStartConfig> {
189        self.inner.get_auto_start_configuration()
190    }
191    /// <p>The configuration for an application to automatically stop after a certain amount of time being idle.</p>
192    pub fn auto_stop_configuration(mut self, input: crate::types::AutoStopConfig) -> Self {
193        self.inner = self.inner.auto_stop_configuration(input);
194        self
195    }
196    /// <p>The configuration for an application to automatically stop after a certain amount of time being idle.</p>
197    pub fn set_auto_stop_configuration(mut self, input: ::std::option::Option<crate::types::AutoStopConfig>) -> Self {
198        self.inner = self.inner.set_auto_stop_configuration(input);
199        self
200    }
201    /// <p>The configuration for an application to automatically stop after a certain amount of time being idle.</p>
202    pub fn get_auto_stop_configuration(&self) -> &::std::option::Option<crate::types::AutoStopConfig> {
203        self.inner.get_auto_stop_configuration()
204    }
205    /// <p>The network configuration for customer VPC connectivity.</p>
206    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
207        self.inner = self.inner.network_configuration(input);
208        self
209    }
210    /// <p>The network configuration for customer VPC connectivity.</p>
211    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
212        self.inner = self.inner.set_network_configuration(input);
213        self
214    }
215    /// <p>The network configuration for customer VPC connectivity.</p>
216    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
217        self.inner.get_network_configuration()
218    }
219    /// <p>The CPU architecture of an application.</p>
220    pub fn architecture(mut self, input: crate::types::Architecture) -> Self {
221        self.inner = self.inner.architecture(input);
222        self
223    }
224    /// <p>The CPU architecture of an application.</p>
225    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::Architecture>) -> Self {
226        self.inner = self.inner.set_architecture(input);
227        self
228    }
229    /// <p>The CPU architecture of an application.</p>
230    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::Architecture> {
231        self.inner.get_architecture()
232    }
233    /// <p>The image configuration to be used for all worker types. You can either set this parameter or <code>imageConfiguration</code> for each worker type in <code>WorkerTypeSpecificationInput</code>.</p>
234    pub fn image_configuration(mut self, input: crate::types::ImageConfigurationInput) -> Self {
235        self.inner = self.inner.image_configuration(input);
236        self
237    }
238    /// <p>The image configuration to be used for all worker types. You can either set this parameter or <code>imageConfiguration</code> for each worker type in <code>WorkerTypeSpecificationInput</code>.</p>
239    pub fn set_image_configuration(mut self, input: ::std::option::Option<crate::types::ImageConfigurationInput>) -> Self {
240        self.inner = self.inner.set_image_configuration(input);
241        self
242    }
243    /// <p>The image configuration to be used for all worker types. You can either set this parameter or <code>imageConfiguration</code> for each worker type in <code>WorkerTypeSpecificationInput</code>.</p>
244    pub fn get_image_configuration(&self) -> &::std::option::Option<crate::types::ImageConfigurationInput> {
245        self.inner.get_image_configuration()
246    }
247    ///
248    /// Adds a key-value pair to `workerTypeSpecifications`.
249    ///
250    /// To override the contents of this collection use [`set_worker_type_specifications`](Self::set_worker_type_specifications).
251    ///
252    /// <p>The key-value pairs that specify worker type to <code>WorkerTypeSpecificationInput</code>. This parameter must contain all valid worker types for a Spark or Hive application. Valid worker types include <code>Driver</code> and <code>Executor</code> for Spark applications and <code>HiveDriver</code> and <code>TezTask</code> for Hive applications. You can either set image details in this parameter for each worker type, or in <code>imageConfiguration</code> for all worker types.</p>
253    pub fn worker_type_specifications(
254        mut self,
255        k: impl ::std::convert::Into<::std::string::String>,
256        v: crate::types::WorkerTypeSpecificationInput,
257    ) -> Self {
258        self.inner = self.inner.worker_type_specifications(k.into(), v);
259        self
260    }
261    /// <p>The key-value pairs that specify worker type to <code>WorkerTypeSpecificationInput</code>. This parameter must contain all valid worker types for a Spark or Hive application. Valid worker types include <code>Driver</code> and <code>Executor</code> for Spark applications and <code>HiveDriver</code> and <code>TezTask</code> for Hive applications. You can either set image details in this parameter for each worker type, or in <code>imageConfiguration</code> for all worker types.</p>
262    pub fn set_worker_type_specifications(
263        mut self,
264        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::WorkerTypeSpecificationInput>>,
265    ) -> Self {
266        self.inner = self.inner.set_worker_type_specifications(input);
267        self
268    }
269    /// <p>The key-value pairs that specify worker type to <code>WorkerTypeSpecificationInput</code>. This parameter must contain all valid worker types for a Spark or Hive application. Valid worker types include <code>Driver</code> and <code>Executor</code> for Spark applications and <code>HiveDriver</code> and <code>TezTask</code> for Hive applications. You can either set image details in this parameter for each worker type, or in <code>imageConfiguration</code> for all worker types.</p>
270    pub fn get_worker_type_specifications(
271        &self,
272    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::WorkerTypeSpecificationInput>> {
273        self.inner.get_worker_type_specifications()
274    }
275    /// <p>The interactive configuration object that contains new interactive use cases when the application is updated.</p>
276    pub fn interactive_configuration(mut self, input: crate::types::InteractiveConfiguration) -> Self {
277        self.inner = self.inner.interactive_configuration(input);
278        self
279    }
280    /// <p>The interactive configuration object that contains new interactive use cases when the application is updated.</p>
281    pub fn set_interactive_configuration(mut self, input: ::std::option::Option<crate::types::InteractiveConfiguration>) -> Self {
282        self.inner = self.inner.set_interactive_configuration(input);
283        self
284    }
285    /// <p>The interactive configuration object that contains new interactive use cases when the application is updated.</p>
286    pub fn get_interactive_configuration(&self) -> &::std::option::Option<crate::types::InteractiveConfiguration> {
287        self.inner.get_interactive_configuration()
288    }
289    /// <p>The Amazon EMR release label for the application. You can change the release label to use a different release of Amazon EMR.</p>
290    pub fn release_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291        self.inner = self.inner.release_label(input.into());
292        self
293    }
294    /// <p>The Amazon EMR release label for the application. You can change the release label to use a different release of Amazon EMR.</p>
295    pub fn set_release_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296        self.inner = self.inner.set_release_label(input);
297        self
298    }
299    /// <p>The Amazon EMR release label for the application. You can change the release label to use a different release of Amazon EMR.</p>
300    pub fn get_release_label(&self) -> &::std::option::Option<::std::string::String> {
301        self.inner.get_release_label()
302    }
303    ///
304    /// Appends an item to `runtimeConfiguration`.
305    ///
306    /// To override the contents of this collection use [`set_runtime_configuration`](Self::set_runtime_configuration).
307    ///
308    /// <p>The <a href="https://docs.aws.amazon.com/emr-serverless/latest/APIReference/API_Configuration.html">Configuration</a> specifications to use when updating an application. Each configuration consists of a classification and properties. This configuration is applied across all the job runs submitted under the application.</p>
309    pub fn runtime_configuration(mut self, input: crate::types::Configuration) -> Self {
310        self.inner = self.inner.runtime_configuration(input);
311        self
312    }
313    /// <p>The <a href="https://docs.aws.amazon.com/emr-serverless/latest/APIReference/API_Configuration.html">Configuration</a> specifications to use when updating an application. Each configuration consists of a classification and properties. This configuration is applied across all the job runs submitted under the application.</p>
314    pub fn set_runtime_configuration(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>) -> Self {
315        self.inner = self.inner.set_runtime_configuration(input);
316        self
317    }
318    /// <p>The <a href="https://docs.aws.amazon.com/emr-serverless/latest/APIReference/API_Configuration.html">Configuration</a> specifications to use when updating an application. Each configuration consists of a classification and properties. This configuration is applied across all the job runs submitted under the application.</p>
319    pub fn get_runtime_configuration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Configuration>> {
320        self.inner.get_runtime_configuration()
321    }
322    /// <p>The configuration setting for monitoring.</p>
323    pub fn monitoring_configuration(mut self, input: crate::types::MonitoringConfiguration) -> Self {
324        self.inner = self.inner.monitoring_configuration(input);
325        self
326    }
327    /// <p>The configuration setting for monitoring.</p>
328    pub fn set_monitoring_configuration(mut self, input: ::std::option::Option<crate::types::MonitoringConfiguration>) -> Self {
329        self.inner = self.inner.set_monitoring_configuration(input);
330        self
331    }
332    /// <p>The configuration setting for monitoring.</p>
333    pub fn get_monitoring_configuration(&self) -> &::std::option::Option<crate::types::MonitoringConfiguration> {
334        self.inner.get_monitoring_configuration()
335    }
336    /// <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
337    pub fn scheduler_configuration(mut self, input: crate::types::SchedulerConfiguration) -> Self {
338        self.inner = self.inner.scheduler_configuration(input);
339        self
340    }
341    /// <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
342    pub fn set_scheduler_configuration(mut self, input: ::std::option::Option<crate::types::SchedulerConfiguration>) -> Self {
343        self.inner = self.inner.set_scheduler_configuration(input);
344        self
345    }
346    /// <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
347    pub fn get_scheduler_configuration(&self) -> &::std::option::Option<crate::types::SchedulerConfiguration> {
348        self.inner.get_scheduler_configuration()
349    }
350    /// <p>Specifies the IAM Identity Center configuration used to enable or disable trusted identity propagation. When provided, this configuration determines how the application interacts with IAM Identity Center for user authentication and access control.</p>
351    pub fn identity_center_configuration(mut self, input: crate::types::IdentityCenterConfigurationInput) -> Self {
352        self.inner = self.inner.identity_center_configuration(input);
353        self
354    }
355    /// <p>Specifies the IAM Identity Center configuration used to enable or disable trusted identity propagation. When provided, this configuration determines how the application interacts with IAM Identity Center for user authentication and access control.</p>
356    pub fn set_identity_center_configuration(mut self, input: ::std::option::Option<crate::types::IdentityCenterConfigurationInput>) -> Self {
357        self.inner = self.inner.set_identity_center_configuration(input);
358        self
359    }
360    /// <p>Specifies the IAM Identity Center configuration used to enable or disable trusted identity propagation. When provided, this configuration determines how the application interacts with IAM Identity Center for user authentication and access control.</p>
361    pub fn get_identity_center_configuration(&self) -> &::std::option::Option<crate::types::IdentityCenterConfigurationInput> {
362        self.inner.get_identity_center_configuration()
363    }
364}