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