aws_sdk_glue/operation/update_ml_transform/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_ml_transform::_update_ml_transform_output::UpdateMlTransformOutputBuilder;
3
4pub use crate::operation::update_ml_transform::_update_ml_transform_input::UpdateMlTransformInputBuilder;
5
6impl crate::operation::update_ml_transform::builders::UpdateMlTransformInputBuilder {
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_ml_transform::UpdateMlTransformOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_ml_transform::UpdateMLTransformError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_ml_transform();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateMLTransform`.
24///
25/// <p>Updates an existing machine learning transform. Call this operation to tune the algorithm parameters to achieve better results.</p>
26/// <p>After calling this operation, you can call the <code>StartMLEvaluationTaskRun</code> operation to assess how well your new parameters achieved your goals (such as improving the quality of your machine learning transform, or making it more cost-effective).</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateMLTransformFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::update_ml_transform::builders::UpdateMlTransformInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::update_ml_transform::UpdateMlTransformOutput,
36 crate::operation::update_ml_transform::UpdateMLTransformError,
37 > for UpdateMLTransformFluentBuilder
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_ml_transform::UpdateMlTransformOutput,
45 crate::operation::update_ml_transform::UpdateMLTransformError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl UpdateMLTransformFluentBuilder {
52 /// Creates a new `UpdateMLTransformFluentBuilder`.
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 UpdateMLTransform as a reference.
61 pub fn as_input(&self) -> &crate::operation::update_ml_transform::builders::UpdateMlTransformInputBuilder {
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_ml_transform::UpdateMlTransformOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::update_ml_transform::UpdateMLTransformError,
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_ml_transform::UpdateMLTransform::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::update_ml_transform::UpdateMLTransform::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_ml_transform::UpdateMlTransformOutput,
98 crate::operation::update_ml_transform::UpdateMLTransformError,
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>A unique identifier that was generated when the transform was created.</p>
113 pub fn transform_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.transform_id(input.into());
115 self
116 }
117 /// <p>A unique identifier that was generated when the transform was created.</p>
118 pub fn set_transform_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_transform_id(input);
120 self
121 }
122 /// <p>A unique identifier that was generated when the transform was created.</p>
123 pub fn get_transform_id(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_transform_id()
125 }
126 /// <p>The unique name that you gave the transform when you created it.</p>
127 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.name(input.into());
129 self
130 }
131 /// <p>The unique name that you gave the transform when you created it.</p>
132 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_name(input);
134 self
135 }
136 /// <p>The unique name that you gave the transform when you created it.</p>
137 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_name()
139 }
140 /// <p>A description of the transform. The default is an empty string.</p>
141 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.inner = self.inner.description(input.into());
143 self
144 }
145 /// <p>A description of the transform. The default is an empty string.</p>
146 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.inner = self.inner.set_description(input);
148 self
149 }
150 /// <p>A description of the transform. The default is an empty string.</p>
151 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
152 self.inner.get_description()
153 }
154 /// <p>The configuration parameters that are specific to the transform type (algorithm) used. Conditionally dependent on the transform type.</p>
155 pub fn parameters(mut self, input: crate::types::TransformParameters) -> Self {
156 self.inner = self.inner.parameters(input);
157 self
158 }
159 /// <p>The configuration parameters that are specific to the transform type (algorithm) used. Conditionally dependent on the transform type.</p>
160 pub fn set_parameters(mut self, input: ::std::option::Option<crate::types::TransformParameters>) -> Self {
161 self.inner = self.inner.set_parameters(input);
162 self
163 }
164 /// <p>The configuration parameters that are specific to the transform type (algorithm) used. Conditionally dependent on the transform type.</p>
165 pub fn get_parameters(&self) -> &::std::option::Option<crate::types::TransformParameters> {
166 self.inner.get_parameters()
167 }
168 /// <p>The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.</p>
169 pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170 self.inner = self.inner.role(input.into());
171 self
172 }
173 /// <p>The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.</p>
174 pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175 self.inner = self.inner.set_role(input);
176 self
177 }
178 /// <p>The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.</p>
179 pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
180 self.inner.get_role()
181 }
182 /// <p>This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions">Glue Versions</a> in the developer guide.</p>
183 pub fn glue_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184 self.inner = self.inner.glue_version(input.into());
185 self
186 }
187 /// <p>This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions">Glue Versions</a> in the developer guide.</p>
188 pub fn set_glue_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.inner = self.inner.set_glue_version(input);
190 self
191 }
192 /// <p>This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see <a href="https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions">Glue Versions</a> in the developer guide.</p>
193 pub fn get_glue_version(&self) -> &::std::option::Option<::std::string::String> {
194 self.inner.get_glue_version()
195 }
196 /// <p>The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the <a href="https://aws.amazon.com/glue/pricing/">Glue pricing page</a>.</p>
197 /// <p>When the <code>WorkerType</code> field is set to a value other than <code>Standard</code>, the <code>MaxCapacity</code> field is set automatically and becomes read-only.</p>
198 pub fn max_capacity(mut self, input: f64) -> Self {
199 self.inner = self.inner.max_capacity(input);
200 self
201 }
202 /// <p>The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the <a href="https://aws.amazon.com/glue/pricing/">Glue pricing page</a>.</p>
203 /// <p>When the <code>WorkerType</code> field is set to a value other than <code>Standard</code>, the <code>MaxCapacity</code> field is set automatically and becomes read-only.</p>
204 pub fn set_max_capacity(mut self, input: ::std::option::Option<f64>) -> Self {
205 self.inner = self.inner.set_max_capacity(input);
206 self
207 }
208 /// <p>The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the <a href="https://aws.amazon.com/glue/pricing/">Glue pricing page</a>.</p>
209 /// <p>When the <code>WorkerType</code> field is set to a value other than <code>Standard</code>, the <code>MaxCapacity</code> field is set automatically and becomes read-only.</p>
210 pub fn get_max_capacity(&self) -> &::std::option::Option<f64> {
211 self.inner.get_max_capacity()
212 }
213 /// <p>The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.</p>
214 /// <ul>
215 /// <li>
216 /// <p>For the <code>Standard</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.</p></li>
217 /// <li>
218 /// <p>For the <code>G.1X</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.</p></li>
219 /// <li>
220 /// <p>For the <code>G.2X</code> worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.</p></li>
221 /// </ul>
222 pub fn worker_type(mut self, input: crate::types::WorkerType) -> Self {
223 self.inner = self.inner.worker_type(input);
224 self
225 }
226 /// <p>The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.</p>
227 /// <ul>
228 /// <li>
229 /// <p>For the <code>Standard</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.</p></li>
230 /// <li>
231 /// <p>For the <code>G.1X</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.</p></li>
232 /// <li>
233 /// <p>For the <code>G.2X</code> worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.</p></li>
234 /// </ul>
235 pub fn set_worker_type(mut self, input: ::std::option::Option<crate::types::WorkerType>) -> Self {
236 self.inner = self.inner.set_worker_type(input);
237 self
238 }
239 /// <p>The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.</p>
240 /// <ul>
241 /// <li>
242 /// <p>For the <code>Standard</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.</p></li>
243 /// <li>
244 /// <p>For the <code>G.1X</code> worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.</p></li>
245 /// <li>
246 /// <p>For the <code>G.2X</code> worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.</p></li>
247 /// </ul>
248 pub fn get_worker_type(&self) -> &::std::option::Option<crate::types::WorkerType> {
249 self.inner.get_worker_type()
250 }
251 /// <p>The number of workers of a defined <code>workerType</code> that are allocated when this task runs.</p>
252 pub fn number_of_workers(mut self, input: i32) -> Self {
253 self.inner = self.inner.number_of_workers(input);
254 self
255 }
256 /// <p>The number of workers of a defined <code>workerType</code> that are allocated when this task runs.</p>
257 pub fn set_number_of_workers(mut self, input: ::std::option::Option<i32>) -> Self {
258 self.inner = self.inner.set_number_of_workers(input);
259 self
260 }
261 /// <p>The number of workers of a defined <code>workerType</code> that are allocated when this task runs.</p>
262 pub fn get_number_of_workers(&self) -> &::std::option::Option<i32> {
263 self.inner.get_number_of_workers()
264 }
265 /// <p>The timeout for a task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
266 pub fn timeout(mut self, input: i32) -> Self {
267 self.inner = self.inner.timeout(input);
268 self
269 }
270 /// <p>The timeout for a task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
271 pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
272 self.inner = self.inner.set_timeout(input);
273 self
274 }
275 /// <p>The timeout for a task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters <code>TIMEOUT</code> status. The default is 2,880 minutes (48 hours).</p>
276 pub fn get_timeout(&self) -> &::std::option::Option<i32> {
277 self.inner.get_timeout()
278 }
279 /// <p>The maximum number of times to retry a task for this transform after a task run fails.</p>
280 pub fn max_retries(mut self, input: i32) -> Self {
281 self.inner = self.inner.max_retries(input);
282 self
283 }
284 /// <p>The maximum number of times to retry a task for this transform after a task run fails.</p>
285 pub fn set_max_retries(mut self, input: ::std::option::Option<i32>) -> Self {
286 self.inner = self.inner.set_max_retries(input);
287 self
288 }
289 /// <p>The maximum number of times to retry a task for this transform after a task run fails.</p>
290 pub fn get_max_retries(&self) -> &::std::option::Option<i32> {
291 self.inner.get_max_retries()
292 }
293}