aws_sdk_proton/operation/update_service_instance/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_service_instance::_update_service_instance_output::UpdateServiceInstanceOutputBuilder;
3
4pub use crate::operation::update_service_instance::_update_service_instance_input::UpdateServiceInstanceInputBuilder;
5
6impl crate::operation::update_service_instance::builders::UpdateServiceInstanceInputBuilder {
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_instance::UpdateServiceInstanceOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_service_instance::UpdateServiceInstanceError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_service_instance();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateServiceInstance`.
24///
25/// <p>Update a service instance.</p>
26/// <p>There are a few modes for updating a service instance. The <code>deploymentType</code> field defines the mode.</p><note>
27/// <p>You can't update a service instance while its deployment status, or the deployment status of a component attached to it, is <code>IN_PROGRESS</code>.</p>
28/// <p>For more information about components, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/ag-components.html">Proton components</a> in the <i>Proton User Guide</i>.</p>
29/// </note>
30#[deprecated(note = "AWS Proton is not accepting new customers.", since = "10/07/2025")]
31#[derive(::std::clone::Clone, ::std::fmt::Debug)]
32pub struct UpdateServiceInstanceFluentBuilder {
33 handle: ::std::sync::Arc<crate::client::Handle>,
34 inner: crate::operation::update_service_instance::builders::UpdateServiceInstanceInputBuilder,
35 config_override: ::std::option::Option<crate::config::Builder>,
36}
37impl
38 crate::client::customize::internal::CustomizableSend<
39 crate::operation::update_service_instance::UpdateServiceInstanceOutput,
40 crate::operation::update_service_instance::UpdateServiceInstanceError,
41 > for UpdateServiceInstanceFluentBuilder
42{
43 fn send(
44 self,
45 config_override: crate::config::Builder,
46 ) -> crate::client::customize::internal::BoxFuture<
47 crate::client::customize::internal::SendResult<
48 crate::operation::update_service_instance::UpdateServiceInstanceOutput,
49 crate::operation::update_service_instance::UpdateServiceInstanceError,
50 >,
51 > {
52 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
53 }
54}
55impl UpdateServiceInstanceFluentBuilder {
56 /// Creates a new `UpdateServiceInstanceFluentBuilder`.
57 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
58 Self {
59 handle,
60 inner: ::std::default::Default::default(),
61 config_override: ::std::option::Option::None,
62 }
63 }
64 /// Access the UpdateServiceInstance as a reference.
65 pub fn as_input(&self) -> &crate::operation::update_service_instance::builders::UpdateServiceInstanceInputBuilder {
66 &self.inner
67 }
68 /// Sends the request and returns the response.
69 ///
70 /// If an error occurs, an `SdkError` will be returned with additional details that
71 /// can be matched against.
72 ///
73 /// By default, any retryable failures will be retried twice. Retry behavior
74 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
75 /// set when configuring the client.
76 pub async fn send(
77 self,
78 ) -> ::std::result::Result<
79 crate::operation::update_service_instance::UpdateServiceInstanceOutput,
80 ::aws_smithy_runtime_api::client::result::SdkError<
81 crate::operation::update_service_instance::UpdateServiceInstanceError,
82 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
83 >,
84 > {
85 let input = self
86 .inner
87 .build()
88 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
89 let runtime_plugins = crate::operation::update_service_instance::UpdateServiceInstance::operation_runtime_plugins(
90 self.handle.runtime_plugins.clone(),
91 &self.handle.conf,
92 self.config_override,
93 );
94 crate::operation::update_service_instance::UpdateServiceInstance::orchestrate(&runtime_plugins, input).await
95 }
96
97 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
98 pub fn customize(
99 self,
100 ) -> crate::client::customize::CustomizableOperation<
101 crate::operation::update_service_instance::UpdateServiceInstanceOutput,
102 crate::operation::update_service_instance::UpdateServiceInstanceError,
103 Self,
104 > {
105 crate::client::customize::CustomizableOperation::new(self)
106 }
107 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
108 self.set_config_override(::std::option::Option::Some(config_override.into()));
109 self
110 }
111
112 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
113 self.config_override = config_override;
114 self
115 }
116 /// <p>The name of the service instance to update.</p>
117 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.inner = self.inner.name(input.into());
119 self
120 }
121 /// <p>The name of the service instance to update.</p>
122 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.inner = self.inner.set_name(input);
124 self
125 }
126 /// <p>The name of the service instance to update.</p>
127 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
128 self.inner.get_name()
129 }
130 /// <p>The name of the service that the service instance belongs to.</p>
131 pub fn service_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.inner = self.inner.service_name(input.into());
133 self
134 }
135 /// <p>The name of the service that the service instance belongs to.</p>
136 pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.inner = self.inner.set_service_name(input);
138 self
139 }
140 /// <p>The name of the service that the service instance belongs to.</p>
141 pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
142 self.inner.get_service_name()
143 }
144 /// <p>The deployment type. It defines the mode for updating a service instance, as follows:</p>
145 /// <dl>
146 /// <dt></dt>
147 /// <dd>
148 /// <p><code>NONE</code></p>
149 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated.</p>
150 /// </dd>
151 /// <dt></dt>
152 /// <dd>
153 /// <p><code>CURRENT_VERSION</code></p>
154 /// <p>In this mode, the service instance is deployed and updated with the new spec that you provide. Only requested parameters are updated. <i>Don’t</i> include major or minor version parameters when you use this deployment type.</p>
155 /// </dd>
156 /// <dt></dt>
157 /// <dd>
158 /// <p><code>MINOR_VERSION</code></p>
159 /// <p>In this mode, the service instance is deployed and updated with the published, recommended (latest) minor version of the current major version in use, by default. You can also specify a different minor version of the current major version in use.</p>
160 /// </dd>
161 /// <dt></dt>
162 /// <dd>
163 /// <p><code>MAJOR_VERSION</code></p>
164 /// <p>In this mode, the service instance is deployed and updated with the published, recommended (latest) major and minor version of the current template, by default. You can specify a different major version that's higher than the major version in use and a minor version.</p>
165 /// </dd>
166 /// </dl>
167 pub fn deployment_type(mut self, input: crate::types::DeploymentUpdateType) -> Self {
168 self.inner = self.inner.deployment_type(input);
169 self
170 }
171 /// <p>The deployment type. It defines the mode for updating a service instance, as follows:</p>
172 /// <dl>
173 /// <dt></dt>
174 /// <dd>
175 /// <p><code>NONE</code></p>
176 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated.</p>
177 /// </dd>
178 /// <dt></dt>
179 /// <dd>
180 /// <p><code>CURRENT_VERSION</code></p>
181 /// <p>In this mode, the service instance is deployed and updated with the new spec that you provide. Only requested parameters are updated. <i>Don’t</i> include major or minor version parameters when you use this deployment type.</p>
182 /// </dd>
183 /// <dt></dt>
184 /// <dd>
185 /// <p><code>MINOR_VERSION</code></p>
186 /// <p>In this mode, the service instance is deployed and updated with the published, recommended (latest) minor version of the current major version in use, by default. You can also specify a different minor version of the current major version in use.</p>
187 /// </dd>
188 /// <dt></dt>
189 /// <dd>
190 /// <p><code>MAJOR_VERSION</code></p>
191 /// <p>In this mode, the service instance is deployed and updated with the published, recommended (latest) major and minor version of the current template, by default. You can specify a different major version that's higher than the major version in use and a minor version.</p>
192 /// </dd>
193 /// </dl>
194 pub fn set_deployment_type(mut self, input: ::std::option::Option<crate::types::DeploymentUpdateType>) -> Self {
195 self.inner = self.inner.set_deployment_type(input);
196 self
197 }
198 /// <p>The deployment type. It defines the mode for updating a service instance, as follows:</p>
199 /// <dl>
200 /// <dt></dt>
201 /// <dd>
202 /// <p><code>NONE</code></p>
203 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated.</p>
204 /// </dd>
205 /// <dt></dt>
206 /// <dd>
207 /// <p><code>CURRENT_VERSION</code></p>
208 /// <p>In this mode, the service instance is deployed and updated with the new spec that you provide. Only requested parameters are updated. <i>Don’t</i> include major or minor version parameters when you use this deployment type.</p>
209 /// </dd>
210 /// <dt></dt>
211 /// <dd>
212 /// <p><code>MINOR_VERSION</code></p>
213 /// <p>In this mode, the service instance is deployed and updated with the published, recommended (latest) minor version of the current major version in use, by default. You can also specify a different minor version of the current major version in use.</p>
214 /// </dd>
215 /// <dt></dt>
216 /// <dd>
217 /// <p><code>MAJOR_VERSION</code></p>
218 /// <p>In this mode, the service instance is deployed and updated with the published, recommended (latest) major and minor version of the current template, by default. You can specify a different major version that's higher than the major version in use and a minor version.</p>
219 /// </dd>
220 /// </dl>
221 pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::DeploymentUpdateType> {
222 self.inner.get_deployment_type()
223 }
224 /// <p>The formatted specification that defines the service instance update.</p>
225 pub fn spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226 self.inner = self.inner.spec(input.into());
227 self
228 }
229 /// <p>The formatted specification that defines the service instance update.</p>
230 pub fn set_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231 self.inner = self.inner.set_spec(input);
232 self
233 }
234 /// <p>The formatted specification that defines the service instance update.</p>
235 pub fn get_spec(&self) -> &::std::option::Option<::std::string::String> {
236 self.inner.get_spec()
237 }
238 /// <p>The major version of the service template to update.</p>
239 pub fn template_major_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 self.inner = self.inner.template_major_version(input.into());
241 self
242 }
243 /// <p>The major version of the service template to update.</p>
244 pub fn set_template_major_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245 self.inner = self.inner.set_template_major_version(input);
246 self
247 }
248 /// <p>The major version of the service template to update.</p>
249 pub fn get_template_major_version(&self) -> &::std::option::Option<::std::string::String> {
250 self.inner.get_template_major_version()
251 }
252 /// <p>The minor version of the service template to update.</p>
253 pub fn template_minor_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
254 self.inner = self.inner.template_minor_version(input.into());
255 self
256 }
257 /// <p>The minor version of the service template to update.</p>
258 pub fn set_template_minor_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
259 self.inner = self.inner.set_template_minor_version(input);
260 self
261 }
262 /// <p>The minor version of the service template to update.</p>
263 pub fn get_template_minor_version(&self) -> &::std::option::Option<::std::string::String> {
264 self.inner.get_template_minor_version()
265 }
266 /// <p>The client token of the service instance to update.</p>
267 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268 self.inner = self.inner.client_token(input.into());
269 self
270 }
271 /// <p>The client token of the service instance to update.</p>
272 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273 self.inner = self.inner.set_client_token(input);
274 self
275 }
276 /// <p>The client token of the service instance to update.</p>
277 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
278 self.inner.get_client_token()
279 }
280}