aws_sdk_sagemaker/operation/create_processing_job/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_processing_job::_create_processing_job_output::CreateProcessingJobOutputBuilder;
3
4pub use crate::operation::create_processing_job::_create_processing_job_input::CreateProcessingJobInputBuilder;
5
6impl crate::operation::create_processing_job::builders::CreateProcessingJobInputBuilder {
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_processing_job::CreateProcessingJobOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_processing_job::CreateProcessingJobError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_processing_job();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateProcessingJob`.
24///
25/// <p>Creates a processing job.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateProcessingJobFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::create_processing_job::builders::CreateProcessingJobInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::create_processing_job::CreateProcessingJobOutput,
35        crate::operation::create_processing_job::CreateProcessingJobError,
36    > for CreateProcessingJobFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::create_processing_job::CreateProcessingJobOutput,
44            crate::operation::create_processing_job::CreateProcessingJobError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl CreateProcessingJobFluentBuilder {
51    /// Creates a new `CreateProcessingJobFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the CreateProcessingJob as a reference.
60    pub fn as_input(&self) -> &crate::operation::create_processing_job::builders::CreateProcessingJobInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::create_processing_job::CreateProcessingJobOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::create_processing_job::CreateProcessingJobError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::create_processing_job::CreateProcessingJob::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::create_processing_job::CreateProcessingJob::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::create_processing_job::CreateProcessingJobOutput,
97        crate::operation::create_processing_job::CreateProcessingJobError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    ///
112    /// Appends an item to `ProcessingInputs`.
113    ///
114    /// To override the contents of this collection use [`set_processing_inputs`](Self::set_processing_inputs).
115    ///
116    /// <p>An array of inputs configuring the data to download into the processing container.</p>
117    pub fn processing_inputs(mut self, input: crate::types::ProcessingInput) -> Self {
118        self.inner = self.inner.processing_inputs(input);
119        self
120    }
121    /// <p>An array of inputs configuring the data to download into the processing container.</p>
122    pub fn set_processing_inputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProcessingInput>>) -> Self {
123        self.inner = self.inner.set_processing_inputs(input);
124        self
125    }
126    /// <p>An array of inputs configuring the data to download into the processing container.</p>
127    pub fn get_processing_inputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProcessingInput>> {
128        self.inner.get_processing_inputs()
129    }
130    /// <p>Output configuration for the processing job.</p>
131    pub fn processing_output_config(mut self, input: crate::types::ProcessingOutputConfig) -> Self {
132        self.inner = self.inner.processing_output_config(input);
133        self
134    }
135    /// <p>Output configuration for the processing job.</p>
136    pub fn set_processing_output_config(mut self, input: ::std::option::Option<crate::types::ProcessingOutputConfig>) -> Self {
137        self.inner = self.inner.set_processing_output_config(input);
138        self
139    }
140    /// <p>Output configuration for the processing job.</p>
141    pub fn get_processing_output_config(&self) -> &::std::option::Option<crate::types::ProcessingOutputConfig> {
142        self.inner.get_processing_output_config()
143    }
144    /// <p>The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account.</p>
145    pub fn processing_job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.processing_job_name(input.into());
147        self
148    }
149    /// <p>The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account.</p>
150    pub fn set_processing_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_processing_job_name(input);
152        self
153    }
154    /// <p>The name of the processing job. The name must be unique within an Amazon Web Services Region in the Amazon Web Services account.</p>
155    pub fn get_processing_job_name(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_processing_job_name()
157    }
158    /// <p>Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance.</p>
159    pub fn processing_resources(mut self, input: crate::types::ProcessingResources) -> Self {
160        self.inner = self.inner.processing_resources(input);
161        self
162    }
163    /// <p>Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance.</p>
164    pub fn set_processing_resources(mut self, input: ::std::option::Option<crate::types::ProcessingResources>) -> Self {
165        self.inner = self.inner.set_processing_resources(input);
166        self
167    }
168    /// <p>Identifies the resources, ML compute instances, and ML storage volumes to deploy for a processing job. In distributed training, you specify more than one instance.</p>
169    pub fn get_processing_resources(&self) -> &::std::option::Option<crate::types::ProcessingResources> {
170        self.inner.get_processing_resources()
171    }
172    /// <p>The time limit for how long the processing job is allowed to run.</p>
173    pub fn stopping_condition(mut self, input: crate::types::ProcessingStoppingCondition) -> Self {
174        self.inner = self.inner.stopping_condition(input);
175        self
176    }
177    /// <p>The time limit for how long the processing job is allowed to run.</p>
178    pub fn set_stopping_condition(mut self, input: ::std::option::Option<crate::types::ProcessingStoppingCondition>) -> Self {
179        self.inner = self.inner.set_stopping_condition(input);
180        self
181    }
182    /// <p>The time limit for how long the processing job is allowed to run.</p>
183    pub fn get_stopping_condition(&self) -> &::std::option::Option<crate::types::ProcessingStoppingCondition> {
184        self.inner.get_stopping_condition()
185    }
186    /// <p>Configures the processing job to run a specified Docker container image.</p>
187    pub fn app_specification(mut self, input: crate::types::AppSpecification) -> Self {
188        self.inner = self.inner.app_specification(input);
189        self
190    }
191    /// <p>Configures the processing job to run a specified Docker container image.</p>
192    pub fn set_app_specification(mut self, input: ::std::option::Option<crate::types::AppSpecification>) -> Self {
193        self.inner = self.inner.set_app_specification(input);
194        self
195    }
196    /// <p>Configures the processing job to run a specified Docker container image.</p>
197    pub fn get_app_specification(&self) -> &::std::option::Option<crate::types::AppSpecification> {
198        self.inner.get_app_specification()
199    }
200    ///
201    /// Adds a key-value pair to `Environment`.
202    ///
203    /// To override the contents of this collection use [`set_environment`](Self::set_environment).
204    ///
205    /// <p>The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported.</p><important>
206    /// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
207    /// </important>
208    pub fn environment(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.inner = self.inner.environment(k.into(), v.into());
210        self
211    }
212    /// <p>The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported.</p><important>
213    /// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
214    /// </important>
215    pub fn set_environment(
216        mut self,
217        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
218    ) -> Self {
219        self.inner = self.inner.set_environment(input);
220        self
221    }
222    /// <p>The environment variables to set in the Docker container. Up to 100 key and values entries in the map are supported.</p><important>
223    /// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any environment fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request environment variable or plain text fields.</p>
224    /// </important>
225    pub fn get_environment(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
226        self.inner.get_environment()
227    }
228    /// <p>Networking options for a processing job, such as whether to allow inbound and outbound network calls to and from processing containers, and the VPC subnets and security groups to use for VPC-enabled processing jobs.</p>
229    pub fn network_config(mut self, input: crate::types::NetworkConfig) -> Self {
230        self.inner = self.inner.network_config(input);
231        self
232    }
233    /// <p>Networking options for a processing job, such as whether to allow inbound and outbound network calls to and from processing containers, and the VPC subnets and security groups to use for VPC-enabled processing jobs.</p>
234    pub fn set_network_config(mut self, input: ::std::option::Option<crate::types::NetworkConfig>) -> Self {
235        self.inner = self.inner.set_network_config(input);
236        self
237    }
238    /// <p>Networking options for a processing job, such as whether to allow inbound and outbound network calls to and from processing containers, and the VPC subnets and security groups to use for VPC-enabled processing jobs.</p>
239    pub fn get_network_config(&self) -> &::std::option::Option<crate::types::NetworkConfig> {
240        self.inner.get_network_config()
241    }
242    /// <p>The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.</p>
243    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244        self.inner = self.inner.role_arn(input.into());
245        self
246    }
247    /// <p>The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.</p>
248    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249        self.inner = self.inner.set_role_arn(input);
250        self
251    }
252    /// <p>The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.</p>
253    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
254        self.inner.get_role_arn()
255    }
256    ///
257    /// Appends an item to `Tags`.
258    ///
259    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
260    ///
261    /// <p>(Optional) An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>.</p><important>
262    /// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request tag variable or plain text fields.</p>
263    /// </important>
264    pub fn tags(mut self, input: crate::types::Tag) -> Self {
265        self.inner = self.inner.tags(input);
266        self
267    }
268    /// <p>(Optional) An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>.</p><important>
269    /// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request tag variable or plain text fields.</p>
270    /// </important>
271    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
272        self.inner = self.inner.set_tags(input);
273        self
274    }
275    /// <p>(Optional) An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-whatURL">Using Cost Allocation Tags</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>.</p><important>
276    /// <p>Do not include any security-sensitive information including account access IDs, secrets, or tokens in any tags. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request tag variable or plain text fields.</p>
277    /// </important>
278    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
279        self.inner.get_tags()
280    }
281    /// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
282    /// <ul>
283    /// <li>
284    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
285    /// <li>
286    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
287    /// <li>
288    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
289    /// </ul>
290    pub fn experiment_config(mut self, input: crate::types::ExperimentConfig) -> Self {
291        self.inner = self.inner.experiment_config(input);
292        self
293    }
294    /// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
295    /// <ul>
296    /// <li>
297    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
298    /// <li>
299    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
300    /// <li>
301    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
302    /// </ul>
303    pub fn set_experiment_config(mut self, input: ::std::option::Option<crate::types::ExperimentConfig>) -> Self {
304        self.inner = self.inner.set_experiment_config(input);
305        self
306    }
307    /// <p>Associates a SageMaker job as a trial component with an experiment and trial. Specified when you call the following APIs:</p>
308    /// <ul>
309    /// <li>
310    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html">CreateProcessingJob</a></p></li>
311    /// <li>
312    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a></p></li>
313    /// <li>
314    /// <p><a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTransformJob.html">CreateTransformJob</a></p></li>
315    /// </ul>
316    pub fn get_experiment_config(&self) -> &::std::option::Option<crate::types::ExperimentConfig> {
317        self.inner.get_experiment_config()
318    }
319}