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