aws_sdk_databasemigration/operation/start_replication_task_assessment_run/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::start_replication_task_assessment_run::_start_replication_task_assessment_run_output::StartReplicationTaskAssessmentRunOutputBuilder;
3
4pub use crate::operation::start_replication_task_assessment_run::_start_replication_task_assessment_run_input::StartReplicationTaskAssessmentRunInputBuilder;
5
6impl crate::operation::start_replication_task_assessment_run::builders::StartReplicationTaskAssessmentRunInputBuilder {
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::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.start_replication_task_assessment_run();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `StartReplicationTaskAssessmentRun`.
24///
25/// <p>Starts a new premigration assessment run for one or more individual assessments of a migration task.</p>
26/// <p>The assessments that you can specify depend on the source and target database engine and the migration type defined for the given task. To run this operation, your migration task must already be created. After you run this operation, you can review the status of each individual assessment. You can also run the migration task manually after the assessment run and its individual assessments complete.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct StartReplicationTaskAssessmentRunFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::start_replication_task_assessment_run::builders::StartReplicationTaskAssessmentRunInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunOutput,
36 crate::operation::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunError,
37 > for StartReplicationTaskAssessmentRunFluentBuilder
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::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunOutput,
45 crate::operation::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl StartReplicationTaskAssessmentRunFluentBuilder {
52 /// Creates a new `StartReplicationTaskAssessmentRunFluentBuilder`.
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 StartReplicationTaskAssessmentRun as a reference.
61 pub fn as_input(&self) -> &crate::operation::start_replication_task_assessment_run::builders::StartReplicationTaskAssessmentRunInputBuilder {
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::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunError,
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::start_replication_task_assessment_run::StartReplicationTaskAssessmentRun::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::start_replication_task_assessment_run::StartReplicationTaskAssessmentRun::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::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunOutput,
98 crate::operation::start_replication_task_assessment_run::StartReplicationTaskAssessmentRunError,
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>Amazon Resource Name (ARN) of the migration task associated with the premigration assessment run that you want to start.</p>
113 pub fn replication_task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.replication_task_arn(input.into());
115 self
116 }
117 /// <p>Amazon Resource Name (ARN) of the migration task associated with the premigration assessment run that you want to start.</p>
118 pub fn set_replication_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_replication_task_arn(input);
120 self
121 }
122 /// <p>Amazon Resource Name (ARN) of the migration task associated with the premigration assessment run that you want to start.</p>
123 pub fn get_replication_task_arn(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_replication_task_arn()
125 }
126 /// <p>ARN of the service role needed to start the assessment run. The role must allow the <code>iam:PassRole</code> action.</p>
127 pub fn service_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.service_access_role_arn(input.into());
129 self
130 }
131 /// <p>ARN of the service role needed to start the assessment run. The role must allow the <code>iam:PassRole</code> action.</p>
132 pub fn set_service_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_service_access_role_arn(input);
134 self
135 }
136 /// <p>ARN of the service role needed to start the assessment run. The role must allow the <code>iam:PassRole</code> action.</p>
137 pub fn get_service_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_service_access_role_arn()
139 }
140 /// <p>Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
141 pub fn result_location_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.inner = self.inner.result_location_bucket(input.into());
143 self
144 }
145 /// <p>Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
146 pub fn set_result_location_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.inner = self.inner.set_result_location_bucket(input);
148 self
149 }
150 /// <p>Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
151 pub fn get_result_location_bucket(&self) -> &::std::option::Option<::std::string::String> {
152 self.inner.get_result_location_bucket()
153 }
154 /// <p>Folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
155 pub fn result_location_folder(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.result_location_folder(input.into());
157 self
158 }
159 /// <p>Folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
160 pub fn set_result_location_folder(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.inner = self.inner.set_result_location_folder(input);
162 self
163 }
164 /// <p>Folder within an Amazon S3 bucket where you want DMS to store the results of this assessment run.</p>
165 pub fn get_result_location_folder(&self) -> &::std::option::Option<::std::string::String> {
166 self.inner.get_result_location_folder()
167 }
168 /// <p>Encryption mode that you can specify to encrypt the results of this assessment run. If you don't specify this request parameter, DMS stores the assessment run results without encryption. You can specify one of the options following:</p>
169 /// <ul>
170 /// <li>
171 /// <p><code>"SSE_S3"</code> – The server-side encryption provided as a default by Amazon S3.</p></li>
172 /// <li>
173 /// <p><code>"SSE_KMS"</code> – Key Management Service (KMS) encryption. This encryption can use either a custom KMS encryption key that you specify or the default KMS encryption key that DMS provides.</p></li>
174 /// </ul>
175 pub fn result_encryption_mode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.inner = self.inner.result_encryption_mode(input.into());
177 self
178 }
179 /// <p>Encryption mode that you can specify to encrypt the results of this assessment run. If you don't specify this request parameter, DMS stores the assessment run results without encryption. You can specify one of the options following:</p>
180 /// <ul>
181 /// <li>
182 /// <p><code>"SSE_S3"</code> – The server-side encryption provided as a default by Amazon S3.</p></li>
183 /// <li>
184 /// <p><code>"SSE_KMS"</code> – Key Management Service (KMS) encryption. This encryption can use either a custom KMS encryption key that you specify or the default KMS encryption key that DMS provides.</p></li>
185 /// </ul>
186 pub fn set_result_encryption_mode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187 self.inner = self.inner.set_result_encryption_mode(input);
188 self
189 }
190 /// <p>Encryption mode that you can specify to encrypt the results of this assessment run. If you don't specify this request parameter, DMS stores the assessment run results without encryption. You can specify one of the options following:</p>
191 /// <ul>
192 /// <li>
193 /// <p><code>"SSE_S3"</code> – The server-side encryption provided as a default by Amazon S3.</p></li>
194 /// <li>
195 /// <p><code>"SSE_KMS"</code> – Key Management Service (KMS) encryption. This encryption can use either a custom KMS encryption key that you specify or the default KMS encryption key that DMS provides.</p></li>
196 /// </ul>
197 pub fn get_result_encryption_mode(&self) -> &::std::option::Option<::std::string::String> {
198 self.inner.get_result_encryption_mode()
199 }
200 /// <p>ARN of a custom KMS encryption key that you specify when you set <code>ResultEncryptionMode</code> to <code>"SSE_KMS</code>".</p>
201 pub fn result_kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202 self.inner = self.inner.result_kms_key_arn(input.into());
203 self
204 }
205 /// <p>ARN of a custom KMS encryption key that you specify when you set <code>ResultEncryptionMode</code> to <code>"SSE_KMS</code>".</p>
206 pub fn set_result_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.inner = self.inner.set_result_kms_key_arn(input);
208 self
209 }
210 /// <p>ARN of a custom KMS encryption key that you specify when you set <code>ResultEncryptionMode</code> to <code>"SSE_KMS</code>".</p>
211 pub fn get_result_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
212 self.inner.get_result_kms_key_arn()
213 }
214 /// <p>Unique name to identify the assessment run.</p>
215 pub fn assessment_run_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.inner = self.inner.assessment_run_name(input.into());
217 self
218 }
219 /// <p>Unique name to identify the assessment run.</p>
220 pub fn set_assessment_run_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.inner = self.inner.set_assessment_run_name(input);
222 self
223 }
224 /// <p>Unique name to identify the assessment run.</p>
225 pub fn get_assessment_run_name(&self) -> &::std::option::Option<::std::string::String> {
226 self.inner.get_assessment_run_name()
227 }
228 ///
229 /// Appends an item to `IncludeOnly`.
230 ///
231 /// To override the contents of this collection use [`set_include_only`](Self::set_include_only).
232 ///
233 /// <p>Space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p><note>
234 /// <p>You can't set a value for <code>IncludeOnly</code> if you also set a value for <code>Exclude</code> in the API operation.</p>
235 /// <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p>
236 /// </note>
237 pub fn include_only(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238 self.inner = self.inner.include_only(input.into());
239 self
240 }
241 /// <p>Space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p><note>
242 /// <p>You can't set a value for <code>IncludeOnly</code> if you also set a value for <code>Exclude</code> in the API operation.</p>
243 /// <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p>
244 /// </note>
245 pub fn set_include_only(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
246 self.inner = self.inner.set_include_only(input);
247 self
248 }
249 /// <p>Space-separated list of names for specific individual assessments that you want to include. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p><note>
250 /// <p>You can't set a value for <code>IncludeOnly</code> if you also set a value for <code>Exclude</code> in the API operation.</p>
251 /// <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p>
252 /// </note>
253 pub fn get_include_only(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
254 self.inner.get_include_only()
255 }
256 ///
257 /// Appends an item to `Exclude`.
258 ///
259 /// To override the contents of this collection use [`set_exclude`](Self::set_exclude).
260 ///
261 /// <p>Space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p><note>
262 /// <p>You can't set a value for <code>Exclude</code> if you also set a value for <code>IncludeOnly</code> in the API operation.</p>
263 /// <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p>
264 /// </note>
265 pub fn exclude(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266 self.inner = self.inner.exclude(input.into());
267 self
268 }
269 /// <p>Space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p><note>
270 /// <p>You can't set a value for <code>Exclude</code> if you also set a value for <code>IncludeOnly</code> in the API operation.</p>
271 /// <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p>
272 /// </note>
273 pub fn set_exclude(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
274 self.inner = self.inner.set_exclude(input);
275 self
276 }
277 /// <p>Space-separated list of names for specific individual assessments that you want to exclude. These names come from the default list of individual assessments that DMS supports for the associated migration task. This task is specified by <code>ReplicationTaskArn</code>.</p><note>
278 /// <p>You can't set a value for <code>Exclude</code> if you also set a value for <code>IncludeOnly</code> in the API operation.</p>
279 /// <p>To identify the names of the default individual assessments that DMS supports for the associated migration task, run the <code>DescribeApplicableIndividualAssessments</code> operation using its own <code>ReplicationTaskArn</code> request parameter.</p>
280 /// </note>
281 pub fn get_exclude(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
282 self.inner.get_exclude()
283 }
284 ///
285 /// Appends an item to `Tags`.
286 ///
287 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
288 ///
289 /// <p>One or more tags to be assigned to the premigration assessment run that you want to start.</p>
290 pub fn tags(mut self, input: crate::types::Tag) -> Self {
291 self.inner = self.inner.tags(input);
292 self
293 }
294 /// <p>One or more tags to be assigned to the premigration assessment run that you want to start.</p>
295 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
296 self.inner = self.inner.set_tags(input);
297 self
298 }
299 /// <p>One or more tags to be assigned to the premigration assessment run that you want to start.</p>
300 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
301 self.inner.get_tags()
302 }
303}