aws_sdk_sagemaker/operation/create_auto_ml_job/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_auto_ml_job::_create_auto_ml_job_output::CreateAutoMlJobOutputBuilder;
3
4pub use crate::operation::create_auto_ml_job::_create_auto_ml_job_input::CreateAutoMlJobInputBuilder;
5
6impl crate::operation::create_auto_ml_job::builders::CreateAutoMlJobInputBuilder {
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::create_auto_ml_job::CreateAutoMlJobOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_auto_ml_job::CreateAutoMLJobError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_auto_ml_job();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateAutoMLJob`.
24///
25/// <p>Creates an Autopilot job also referred to as Autopilot experiment or AutoML job.</p>
26/// <p>An AutoML job in SageMaker AI is a fully automated process that allows you to build machine learning models with minimal effort and machine learning expertise. When initiating an AutoML job, you provide your data and optionally specify parameters tailored to your use case. SageMaker AI then automates the entire model development lifecycle, including data preprocessing, model training, tuning, and evaluation. AutoML jobs are designed to simplify and accelerate the model building process by automating various tasks and exploring different combinations of machine learning algorithms, data preprocessing techniques, and hyperparameter values. The output of an AutoML job comprises one or more trained models ready for deployment and inference. Additionally, SageMaker AI AutoML jobs generate a candidate model leaderboard, allowing you to select the best-performing model for deployment.</p>
27/// <p>For more information about AutoML jobs, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html">https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html</a> in the SageMaker AI developer guide.</p><note>
28/// <p>We recommend using the new versions <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJobV2.html">CreateAutoMLJobV2</a> and <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html">DescribeAutoMLJobV2</a>, which offer backward compatibility.</p>
29/// <p><code>CreateAutoMLJobV2</code> can manage tabular problem types identical to those of its previous version <code>CreateAutoMLJob</code>, as well as time-series forecasting, non-tabular problem types such as image or text classification, and text generation (LLMs fine-tuning).</p>
30/// <p>Find guidelines about how to migrate a <code>CreateAutoMLJob</code> to <code>CreateAutoMLJobV2</code> in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment.html#autopilot-create-experiment-api-migrate-v1-v2">Migrate a CreateAutoMLJob to CreateAutoMLJobV2</a>.</p>
31/// </note>
32/// <p>You can find the best-performing model after you run an AutoML job by calling <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html">DescribeAutoMLJobV2</a> (recommended) or <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJob.html">DescribeAutoMLJob</a>.</p>
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct CreateAutoMLJobFluentBuilder {
35    handle: ::std::sync::Arc<crate::client::Handle>,
36    inner: crate::operation::create_auto_ml_job::builders::CreateAutoMlJobInputBuilder,
37    config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40    crate::client::customize::internal::CustomizableSend<
41        crate::operation::create_auto_ml_job::CreateAutoMlJobOutput,
42        crate::operation::create_auto_ml_job::CreateAutoMLJobError,
43    > for CreateAutoMLJobFluentBuilder
44{
45    fn send(
46        self,
47        config_override: crate::config::Builder,
48    ) -> crate::client::customize::internal::BoxFuture<
49        crate::client::customize::internal::SendResult<
50            crate::operation::create_auto_ml_job::CreateAutoMlJobOutput,
51            crate::operation::create_auto_ml_job::CreateAutoMLJobError,
52        >,
53    > {
54        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55    }
56}
57impl CreateAutoMLJobFluentBuilder {
58    /// Creates a new `CreateAutoMLJobFluentBuilder`.
59    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60        Self {
61            handle,
62            inner: ::std::default::Default::default(),
63            config_override: ::std::option::Option::None,
64        }
65    }
66    /// Access the CreateAutoMLJob as a reference.
67    pub fn as_input(&self) -> &crate::operation::create_auto_ml_job::builders::CreateAutoMlJobInputBuilder {
68        &self.inner
69    }
70    /// Sends the request and returns the response.
71    ///
72    /// If an error occurs, an `SdkError` will be returned with additional details that
73    /// can be matched against.
74    ///
75    /// By default, any retryable failures will be retried twice. Retry behavior
76    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77    /// set when configuring the client.
78    pub async fn send(
79        self,
80    ) -> ::std::result::Result<
81        crate::operation::create_auto_ml_job::CreateAutoMlJobOutput,
82        ::aws_smithy_runtime_api::client::result::SdkError<
83            crate::operation::create_auto_ml_job::CreateAutoMLJobError,
84            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85        >,
86    > {
87        let input = self
88            .inner
89            .build()
90            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91        let runtime_plugins = crate::operation::create_auto_ml_job::CreateAutoMLJob::operation_runtime_plugins(
92            self.handle.runtime_plugins.clone(),
93            &self.handle.conf,
94            self.config_override,
95        );
96        crate::operation::create_auto_ml_job::CreateAutoMLJob::orchestrate(&runtime_plugins, input).await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::create_auto_ml_job::CreateAutoMlJobOutput,
104        crate::operation::create_auto_ml_job::CreateAutoMLJobError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// <p>Identifies an Autopilot job. The name must be unique to your account and is case insensitive.</p>
119    pub fn auto_ml_job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.auto_ml_job_name(input.into());
121        self
122    }
123    /// <p>Identifies an Autopilot job. The name must be unique to your account and is case insensitive.</p>
124    pub fn set_auto_ml_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.inner = self.inner.set_auto_ml_job_name(input);
126        self
127    }
128    /// <p>Identifies an Autopilot job. The name must be unique to your account and is case insensitive.</p>
129    pub fn get_auto_ml_job_name(&self) -> &::std::option::Option<::std::string::String> {
130        self.inner.get_auto_ml_job_name()
131    }
132    ///
133    /// Appends an item to `InputDataConfig`.
134    ///
135    /// To override the contents of this collection use [`set_input_data_config`](Self::set_input_data_config).
136    ///
137    /// <p>An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to <code>InputDataConfig</code> supported by <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTrainingJobDefinition.html">HyperParameterTrainingJobDefinition</a>. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for the training dataset. There is not a minimum number of rows required for the validation dataset.</p>
138    pub fn input_data_config(mut self, input: crate::types::AutoMlChannel) -> Self {
139        self.inner = self.inner.input_data_config(input);
140        self
141    }
142    /// <p>An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to <code>InputDataConfig</code> supported by <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTrainingJobDefinition.html">HyperParameterTrainingJobDefinition</a>. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for the training dataset. There is not a minimum number of rows required for the validation dataset.</p>
143    pub fn set_input_data_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AutoMlChannel>>) -> Self {
144        self.inner = self.inner.set_input_data_config(input);
145        self
146    }
147    /// <p>An array of channel objects that describes the input data and its location. Each channel is a named input source. Similar to <code>InputDataConfig</code> supported by <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_HyperParameterTrainingJobDefinition.html">HyperParameterTrainingJobDefinition</a>. Format(s) supported: CSV, Parquet. A minimum of 500 rows is required for the training dataset. There is not a minimum number of rows required for the validation dataset.</p>
148    pub fn get_input_data_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AutoMlChannel>> {
149        self.inner.get_input_data_config()
150    }
151    /// <p>Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV.</p>
152    pub fn output_data_config(mut self, input: crate::types::AutoMlOutputDataConfig) -> Self {
153        self.inner = self.inner.output_data_config(input);
154        self
155    }
156    /// <p>Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV.</p>
157    pub fn set_output_data_config(mut self, input: ::std::option::Option<crate::types::AutoMlOutputDataConfig>) -> Self {
158        self.inner = self.inner.set_output_data_config(input);
159        self
160    }
161    /// <p>Provides information about encryption and the Amazon S3 output path needed to store artifacts from an AutoML job. Format(s) supported: CSV.</p>
162    pub fn get_output_data_config(&self) -> &::std::option::Option<crate::types::AutoMlOutputDataConfig> {
163        self.inner.get_output_data_config()
164    }
165    /// <p>Defines the type of supervised learning problem available for the candidates. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-datasets-problem-types.html#autopilot-problem-types"> SageMaker Autopilot problem types</a>.</p>
166    pub fn problem_type(mut self, input: crate::types::ProblemType) -> Self {
167        self.inner = self.inner.problem_type(input);
168        self
169    }
170    /// <p>Defines the type of supervised learning problem available for the candidates. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-datasets-problem-types.html#autopilot-problem-types"> SageMaker Autopilot problem types</a>.</p>
171    pub fn set_problem_type(mut self, input: ::std::option::Option<crate::types::ProblemType>) -> Self {
172        self.inner = self.inner.set_problem_type(input);
173        self
174    }
175    /// <p>Defines the type of supervised learning problem available for the candidates. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-datasets-problem-types.html#autopilot-problem-types"> SageMaker Autopilot problem types</a>.</p>
176    pub fn get_problem_type(&self) -> &::std::option::Option<crate::types::ProblemType> {
177        self.inner.get_problem_type()
178    }
179    /// <p>Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. See <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AutoMLJobObjective.html">AutoMLJobObjective</a> for the default values.</p>
180    pub fn auto_ml_job_objective(mut self, input: crate::types::AutoMlJobObjective) -> Self {
181        self.inner = self.inner.auto_ml_job_objective(input);
182        self
183    }
184    /// <p>Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. See <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AutoMLJobObjective.html">AutoMLJobObjective</a> for the default values.</p>
185    pub fn set_auto_ml_job_objective(mut self, input: ::std::option::Option<crate::types::AutoMlJobObjective>) -> Self {
186        self.inner = self.inner.set_auto_ml_job_objective(input);
187        self
188    }
189    /// <p>Specifies a metric to minimize or maximize as the objective of a job. If not specified, the default objective metric depends on the problem type. See <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AutoMLJobObjective.html">AutoMLJobObjective</a> for the default values.</p>
190    pub fn get_auto_ml_job_objective(&self) -> &::std::option::Option<crate::types::AutoMlJobObjective> {
191        self.inner.get_auto_ml_job_objective()
192    }
193    /// <p>A collection of settings used to configure an AutoML job.</p>
194    pub fn auto_ml_job_config(mut self, input: crate::types::AutoMlJobConfig) -> Self {
195        self.inner = self.inner.auto_ml_job_config(input);
196        self
197    }
198    /// <p>A collection of settings used to configure an AutoML job.</p>
199    pub fn set_auto_ml_job_config(mut self, input: ::std::option::Option<crate::types::AutoMlJobConfig>) -> Self {
200        self.inner = self.inner.set_auto_ml_job_config(input);
201        self
202    }
203    /// <p>A collection of settings used to configure an AutoML job.</p>
204    pub fn get_auto_ml_job_config(&self) -> &::std::option::Option<crate::types::AutoMlJobConfig> {
205        self.inner.get_auto_ml_job_config()
206    }
207    /// <p>The ARN of the role that is used to access the data.</p>
208    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.inner = self.inner.role_arn(input.into());
210        self
211    }
212    /// <p>The ARN of the role that is used to access the data.</p>
213    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214        self.inner = self.inner.set_role_arn(input);
215        self
216    }
217    /// <p>The ARN of the role that is used to access the data.</p>
218    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
219        self.inner.get_role_arn()
220    }
221    /// <p>Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.</p>
222    pub fn generate_candidate_definitions_only(mut self, input: bool) -> Self {
223        self.inner = self.inner.generate_candidate_definitions_only(input);
224        self
225    }
226    /// <p>Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.</p>
227    pub fn set_generate_candidate_definitions_only(mut self, input: ::std::option::Option<bool>) -> Self {
228        self.inner = self.inner.set_generate_candidate_definitions_only(input);
229        self
230    }
231    /// <p>Generates possible candidates without training the models. A candidate is a combination of data preprocessors, algorithms, and algorithm parameter settings.</p>
232    pub fn get_generate_candidate_definitions_only(&self) -> &::std::option::Option<bool> {
233        self.inner.get_generate_candidate_definitions_only()
234    }
235    ///
236    /// Appends an item to `Tags`.
237    ///
238    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
239    ///
240    /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web ServicesResources</a>. Tag keys must be unique per resource.</p>
241    pub fn tags(mut self, input: crate::types::Tag) -> Self {
242        self.inner = self.inner.tags(input);
243        self
244    }
245    /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web ServicesResources</a>. Tag keys must be unique per resource.</p>
246    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
247        self.inner = self.inner.set_tags(input);
248        self
249    }
250    /// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web ServicesResources</a>. Tag keys must be unique per resource.</p>
251    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
252        self.inner.get_tags()
253    }
254    /// <p>Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.</p>
255    pub fn model_deploy_config(mut self, input: crate::types::ModelDeployConfig) -> Self {
256        self.inner = self.inner.model_deploy_config(input);
257        self
258    }
259    /// <p>Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.</p>
260    pub fn set_model_deploy_config(mut self, input: ::std::option::Option<crate::types::ModelDeployConfig>) -> Self {
261        self.inner = self.inner.set_model_deploy_config(input);
262        self
263    }
264    /// <p>Specifies how to generate the endpoint name for an automatic one-click Autopilot model deployment.</p>
265    pub fn get_model_deploy_config(&self) -> &::std::option::Option<crate::types::ModelDeployConfig> {
266        self.inner.get_model_deploy_config()
267    }
268}