aws_sdk_apprunner/operation/update_service/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_service::_update_service_output::UpdateServiceOutputBuilder;
3
4pub use crate::operation::update_service::_update_service_input::UpdateServiceInputBuilder;
5
6impl crate::operation::update_service::builders::UpdateServiceInputBuilder {
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_service::UpdateServiceOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_service::UpdateServiceError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_service();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateService`.
24///
25/// <p>Update an App Runner service. You can update the source configuration and instance configuration of the service. You can also update the ARN of the auto scaling configuration resource that's associated with the service. However, you can't change the name or the encryption configuration of the service. These can be set only when you create the service.</p>
26/// <p>To update the tags applied to your service, use the separate actions <code>TagResource</code> and <code>UntagResource</code>.</p>
27/// <p>This is an asynchronous operation. On a successful call, you can use the returned <code>OperationId</code> and the <code>ListOperations</code> call to track the operation's progress.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct UpdateServiceFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::update_service::builders::UpdateServiceInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::update_service::UpdateServiceOutput,
37        crate::operation::update_service::UpdateServiceError,
38    > for UpdateServiceFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::update_service::UpdateServiceOutput,
46            crate::operation::update_service::UpdateServiceError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl UpdateServiceFluentBuilder {
53    /// Creates a new `UpdateServiceFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the UpdateService as a reference.
62    pub fn as_input(&self) -> &crate::operation::update_service::builders::UpdateServiceInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::update_service::UpdateServiceOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::update_service::UpdateServiceError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins = crate::operation::update_service::UpdateService::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::update_service::UpdateService::orchestrate(&runtime_plugins, input).await
92    }
93
94    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95    pub fn customize(
96        self,
97    ) -> crate::client::customize::CustomizableOperation<
98        crate::operation::update_service::UpdateServiceOutput,
99        crate::operation::update_service::UpdateServiceError,
100        Self,
101    > {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
114    pub fn service_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.inner = self.inner.service_arn(input.into());
116        self
117    }
118    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
119    pub fn set_service_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.inner = self.inner.set_service_arn(input);
121        self
122    }
123    /// <p>The Amazon Resource Name (ARN) of the App Runner service that you want to update.</p>
124    pub fn get_service_arn(&self) -> &::std::option::Option<::std::string::String> {
125        self.inner.get_service_arn()
126    }
127    /// <p>The source configuration to apply to the App Runner service.</p>
128    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
129    pub fn source_configuration(mut self, input: crate::types::SourceConfiguration) -> Self {
130        self.inner = self.inner.source_configuration(input);
131        self
132    }
133    /// <p>The source configuration to apply to the App Runner service.</p>
134    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
135    pub fn set_source_configuration(mut self, input: ::std::option::Option<crate::types::SourceConfiguration>) -> Self {
136        self.inner = self.inner.set_source_configuration(input);
137        self
138    }
139    /// <p>The source configuration to apply to the App Runner service.</p>
140    /// <p>You can change the configuration of the code or image repository that the service uses. However, you can't switch from code to image or the other way around. This means that you must provide the same structure member of <code>SourceConfiguration</code> that you originally included when you created the service. Specifically, you can include either <code>CodeRepository</code> or <code>ImageRepository</code>. To update the source configuration, set the values to members of the structure that you include.</p>
141    pub fn get_source_configuration(&self) -> &::std::option::Option<crate::types::SourceConfiguration> {
142        self.inner.get_source_configuration()
143    }
144    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
145    pub fn instance_configuration(mut self, input: crate::types::InstanceConfiguration) -> Self {
146        self.inner = self.inner.instance_configuration(input);
147        self
148    }
149    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
150    pub fn set_instance_configuration(mut self, input: ::std::option::Option<crate::types::InstanceConfiguration>) -> Self {
151        self.inner = self.inner.set_instance_configuration(input);
152        self
153    }
154    /// <p>The runtime configuration to apply to instances (scaling units) of your service.</p>
155    pub fn get_instance_configuration(&self) -> &::std::option::Option<crate::types::InstanceConfiguration> {
156        self.inner.get_instance_configuration()
157    }
158    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
159    pub fn auto_scaling_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.inner = self.inner.auto_scaling_configuration_arn(input.into());
161        self
162    }
163    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
164    pub fn set_auto_scaling_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.inner = self.inner.set_auto_scaling_configuration_arn(input);
166        self
167    }
168    /// <p>The Amazon Resource Name (ARN) of an App Runner automatic scaling configuration resource that you want to associate with the App Runner service.</p>
169    pub fn get_auto_scaling_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
170        self.inner.get_auto_scaling_configuration_arn()
171    }
172    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
173    pub fn health_check_configuration(mut self, input: crate::types::HealthCheckConfiguration) -> Self {
174        self.inner = self.inner.health_check_configuration(input);
175        self
176    }
177    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
178    pub fn set_health_check_configuration(mut self, input: ::std::option::Option<crate::types::HealthCheckConfiguration>) -> Self {
179        self.inner = self.inner.set_health_check_configuration(input);
180        self
181    }
182    /// <p>The settings for the health check that App Runner performs to monitor the health of the App Runner service.</p>
183    pub fn get_health_check_configuration(&self) -> &::std::option::Option<crate::types::HealthCheckConfiguration> {
184        self.inner.get_health_check_configuration()
185    }
186    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
187    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
188        self.inner = self.inner.network_configuration(input);
189        self
190    }
191    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
192    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
193        self.inner = self.inner.set_network_configuration(input);
194        self
195    }
196    /// <p>Configuration settings related to network traffic of the web application that the App Runner service runs.</p>
197    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
198        self.inner.get_network_configuration()
199    }
200    /// <p>The observability configuration of your service.</p>
201    pub fn observability_configuration(mut self, input: crate::types::ServiceObservabilityConfiguration) -> Self {
202        self.inner = self.inner.observability_configuration(input);
203        self
204    }
205    /// <p>The observability configuration of your service.</p>
206    pub fn set_observability_configuration(mut self, input: ::std::option::Option<crate::types::ServiceObservabilityConfiguration>) -> Self {
207        self.inner = self.inner.set_observability_configuration(input);
208        self
209    }
210    /// <p>The observability configuration of your service.</p>
211    pub fn get_observability_configuration(&self) -> &::std::option::Option<crate::types::ServiceObservabilityConfiguration> {
212        self.inner.get_observability_configuration()
213    }
214}