aws_sdk_kinesisanalyticsv2/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 an existing Managed Service for Apache Flink application. Using this operation, you can update application code, input configuration, and output configuration.</p>
26/// <p>Managed Service for Apache Flink updates the <code>ApplicationVersionId</code> each time you update your application.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateApplicationFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::update_application::builders::UpdateApplicationInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::update_application::UpdateApplicationOutput,
36        crate::operation::update_application::UpdateApplicationError,
37    > for UpdateApplicationFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::update_application::UpdateApplicationOutput,
45            crate::operation::update_application::UpdateApplicationError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl UpdateApplicationFluentBuilder {
52    /// Creates a new `UpdateApplicationFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the UpdateApplication as a reference.
61    pub fn as_input(&self) -> &crate::operation::update_application::builders::UpdateApplicationInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::update_application::UpdateApplicationOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::update_application::UpdateApplicationError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::update_application::UpdateApplication::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::update_application::UpdateApplication::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::update_application::UpdateApplicationOutput,
98        crate::operation::update_application::UpdateApplicationError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The name of the application to update.</p>
113    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.application_name(input.into());
115        self
116    }
117    /// <p>The name of the application to update.</p>
118    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_application_name(input);
120        self
121    }
122    /// <p>The name of the application to update.</p>
123    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_application_name()
125    }
126    /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
127    pub fn current_application_version_id(mut self, input: i64) -> Self {
128        self.inner = self.inner.current_application_version_id(input);
129        self
130    }
131    /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
132    pub fn set_current_application_version_id(mut self, input: ::std::option::Option<i64>) -> Self {
133        self.inner = self.inner.set_current_application_version_id(input);
134        self
135    }
136    /// <p>The current application version ID. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>.You can retrieve the application version ID using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
137    pub fn get_current_application_version_id(&self) -> &::std::option::Option<i64> {
138        self.inner.get_current_application_version_id()
139    }
140    /// <p>Describes application configuration updates.</p>
141    pub fn application_configuration_update(mut self, input: crate::types::ApplicationConfigurationUpdate) -> Self {
142        self.inner = self.inner.application_configuration_update(input);
143        self
144    }
145    /// <p>Describes application configuration updates.</p>
146    pub fn set_application_configuration_update(mut self, input: ::std::option::Option<crate::types::ApplicationConfigurationUpdate>) -> Self {
147        self.inner = self.inner.set_application_configuration_update(input);
148        self
149    }
150    /// <p>Describes application configuration updates.</p>
151    pub fn get_application_configuration_update(&self) -> &::std::option::Option<crate::types::ApplicationConfigurationUpdate> {
152        self.inner.get_application_configuration_update()
153    }
154    /// <p>Describes updates to the service execution role.</p>
155    pub fn service_execution_role_update(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.inner = self.inner.service_execution_role_update(input.into());
157        self
158    }
159    /// <p>Describes updates to the service execution role.</p>
160    pub fn set_service_execution_role_update(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161        self.inner = self.inner.set_service_execution_role_update(input);
162        self
163    }
164    /// <p>Describes updates to the service execution role.</p>
165    pub fn get_service_execution_role_update(&self) -> &::std::option::Option<::std::string::String> {
166        self.inner.get_service_execution_role_update()
167    }
168    /// <p>Describes updates to the application's starting parameters.</p>
169    pub fn run_configuration_update(mut self, input: crate::types::RunConfigurationUpdate) -> Self {
170        self.inner = self.inner.run_configuration_update(input);
171        self
172    }
173    /// <p>Describes updates to the application's starting parameters.</p>
174    pub fn set_run_configuration_update(mut self, input: ::std::option::Option<crate::types::RunConfigurationUpdate>) -> Self {
175        self.inner = self.inner.set_run_configuration_update(input);
176        self
177    }
178    /// <p>Describes updates to the application's starting parameters.</p>
179    pub fn get_run_configuration_update(&self) -> &::std::option::Option<crate::types::RunConfigurationUpdate> {
180        self.inner.get_run_configuration_update()
181    }
182    ///
183    /// Appends an item to `CloudWatchLoggingOptionUpdates`.
184    ///
185    /// To override the contents of this collection use [`set_cloud_watch_logging_option_updates`](Self::set_cloud_watch_logging_option_updates).
186    ///
187    /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
188    pub fn cloud_watch_logging_option_updates(mut self, input: crate::types::CloudWatchLoggingOptionUpdate) -> Self {
189        self.inner = self.inner.cloud_watch_logging_option_updates(input);
190        self
191    }
192    /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
193    pub fn set_cloud_watch_logging_option_updates(
194        mut self,
195        input: ::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOptionUpdate>>,
196    ) -> Self {
197        self.inner = self.inner.set_cloud_watch_logging_option_updates(input);
198        self
199    }
200    /// <p>Describes application Amazon CloudWatch logging option updates. You can only update existing CloudWatch logging options with this action. To add a new CloudWatch logging option, use <code>AddApplicationCloudWatchLoggingOption</code>.</p>
201    pub fn get_cloud_watch_logging_option_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CloudWatchLoggingOptionUpdate>> {
202        self.inner.get_cloud_watch_logging_option_updates()
203    }
204    /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
205    pub fn conditional_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.inner = self.inner.conditional_token(input.into());
207        self
208    }
209    /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
210    pub fn set_conditional_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_conditional_token(input);
212        self
213    }
214    /// <p>A value you use to implement strong concurrency for application updates. You must provide the <code>CurrentApplicationVersionId</code> or the <code>ConditionalToken</code>. You get the application's current <code>ConditionalToken</code> using <code>DescribeApplication</code>. For better concurrency support, use the <code>ConditionalToken</code> parameter instead of <code>CurrentApplicationVersionId</code>.</p>
215    pub fn get_conditional_token(&self) -> &::std::option::Option<::std::string::String> {
216        self.inner.get_conditional_token()
217    }
218    /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
219    /// <ul>
220    /// <li>
221    /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
222    /// <li>
223    /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
224    /// </ul>
225    pub fn runtime_environment_update(mut self, input: crate::types::RuntimeEnvironment) -> Self {
226        self.inner = self.inner.runtime_environment_update(input);
227        self
228    }
229    /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
230    /// <ul>
231    /// <li>
232    /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
233    /// <li>
234    /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
235    /// </ul>
236    pub fn set_runtime_environment_update(mut self, input: ::std::option::Option<crate::types::RuntimeEnvironment>) -> Self {
237        self.inner = self.inner.set_runtime_environment_update(input);
238        self
239    }
240    /// <p>Updates the Managed Service for Apache Flink runtime environment used to run your code. To avoid issues you must:</p>
241    /// <ul>
242    /// <li>
243    /// <p>Ensure your new jar and dependencies are compatible with the new runtime selected.</p></li>
244    /// <li>
245    /// <p>Ensure your new code's state is compatible with the snapshot from which your application will start</p></li>
246    /// </ul>
247    pub fn get_runtime_environment_update(&self) -> &::std::option::Option<crate::types::RuntimeEnvironment> {
248        self.inner.get_runtime_environment_update()
249    }
250}