aws_sdk_datasync/operation/update_location_object_storage/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_location_object_storage::_update_location_object_storage_output::UpdateLocationObjectStorageOutputBuilder;
3
4pub use crate::operation::update_location_object_storage::_update_location_object_storage_input::UpdateLocationObjectStorageInputBuilder;
5
6impl crate::operation::update_location_object_storage::builders::UpdateLocationObjectStorageInputBuilder {
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_location_object_storage::UpdateLocationObjectStorageOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_location_object_storage::UpdateLocationObjectStorageError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_location_object_storage();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateLocationObjectStorage`.
24///
25/// <p>Modifies the following configuration parameters of the object storage transfer location that you're using with DataSync.</p>
26/// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html">Configuring DataSync transfers with an object storage system</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct UpdateLocationObjectStorageFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::update_location_object_storage::builders::UpdateLocationObjectStorageInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::update_location_object_storage::UpdateLocationObjectStorageOutput,
36 crate::operation::update_location_object_storage::UpdateLocationObjectStorageError,
37 > for UpdateLocationObjectStorageFluentBuilder
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_location_object_storage::UpdateLocationObjectStorageOutput,
45 crate::operation::update_location_object_storage::UpdateLocationObjectStorageError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl UpdateLocationObjectStorageFluentBuilder {
52 /// Creates a new `UpdateLocationObjectStorageFluentBuilder`.
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 UpdateLocationObjectStorage as a reference.
61 pub fn as_input(&self) -> &crate::operation::update_location_object_storage::builders::UpdateLocationObjectStorageInputBuilder {
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_location_object_storage::UpdateLocationObjectStorageOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::update_location_object_storage::UpdateLocationObjectStorageError,
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_location_object_storage::UpdateLocationObjectStorage::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::update_location_object_storage::UpdateLocationObjectStorage::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_location_object_storage::UpdateLocationObjectStorageOutput,
98 crate::operation::update_location_object_storage::UpdateLocationObjectStorageError,
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>Specifies the ARN of the object storage system location that you're updating.</p>
113 pub fn location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.location_arn(input.into());
115 self
116 }
117 /// <p>Specifies the ARN of the object storage system location that you're updating.</p>
118 pub fn set_location_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_location_arn(input);
120 self
121 }
122 /// <p>Specifies the ARN of the object storage system location that you're updating.</p>
123 pub fn get_location_arn(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_location_arn()
125 }
126 /// <p>Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).</p>
127 pub fn server_port(mut self, input: i32) -> Self {
128 self.inner = self.inner.server_port(input);
129 self
130 }
131 /// <p>Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).</p>
132 pub fn set_server_port(mut self, input: ::std::option::Option<i32>) -> Self {
133 self.inner = self.inner.set_server_port(input);
134 self
135 }
136 /// <p>Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443).</p>
137 pub fn get_server_port(&self) -> &::std::option::Option<i32> {
138 self.inner.get_server_port()
139 }
140 /// <p>Specifies the protocol that your object storage server uses to communicate.</p>
141 pub fn server_protocol(mut self, input: crate::types::ObjectStorageServerProtocol) -> Self {
142 self.inner = self.inner.server_protocol(input);
143 self
144 }
145 /// <p>Specifies the protocol that your object storage server uses to communicate.</p>
146 pub fn set_server_protocol(mut self, input: ::std::option::Option<crate::types::ObjectStorageServerProtocol>) -> Self {
147 self.inner = self.inner.set_server_protocol(input);
148 self
149 }
150 /// <p>Specifies the protocol that your object storage server uses to communicate.</p>
151 pub fn get_server_protocol(&self) -> &::std::option::Option<crate::types::ObjectStorageServerProtocol> {
152 self.inner.get_server_protocol()
153 }
154 /// <p>Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix.</p>
155 pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.subdirectory(input.into());
157 self
158 }
159 /// <p>Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix.</p>
160 pub fn set_subdirectory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.inner = self.inner.set_subdirectory(input);
162 self
163 }
164 /// <p>Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix.</p>
165 pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> {
166 self.inner.get_subdirectory()
167 }
168 /// <p>Specifies the domain name or IP address (IPv4 or IPv6) of the object storage server that your DataSync agent connects to.</p>
169 pub fn server_hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170 self.inner = self.inner.server_hostname(input.into());
171 self
172 }
173 /// <p>Specifies the domain name or IP address (IPv4 or IPv6) of the object storage server that your DataSync agent connects to.</p>
174 pub fn set_server_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175 self.inner = self.inner.set_server_hostname(input);
176 self
177 }
178 /// <p>Specifies the domain name or IP address (IPv4 or IPv6) of the object storage server that your DataSync agent connects to.</p>
179 pub fn get_server_hostname(&self) -> &::std::option::Option<::std::string::String> {
180 self.inner.get_server_hostname()
181 }
182 /// <p>Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server.</p>
183 pub fn access_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184 self.inner = self.inner.access_key(input.into());
185 self
186 }
187 /// <p>Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server.</p>
188 pub fn set_access_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.inner = self.inner.set_access_key(input);
190 self
191 }
192 /// <p>Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server.</p>
193 pub fn get_access_key(&self) -> &::std::option::Option<::std::string::String> {
194 self.inner.get_access_key()
195 }
196 /// <p>Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.</p><note>
197 /// <p>If you provide a secret using <code>SecretKey</code>, but do not provide secret configuration details using <code>CmkSecretConfig</code> or <code>CustomSecretConfig</code>, then DataSync stores the token using your Amazon Web Services account's Secrets Manager secret.</p>
198 /// </note>
199 pub fn secret_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.inner = self.inner.secret_key(input.into());
201 self
202 }
203 /// <p>Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.</p><note>
204 /// <p>If you provide a secret using <code>SecretKey</code>, but do not provide secret configuration details using <code>CmkSecretConfig</code> or <code>CustomSecretConfig</code>, then DataSync stores the token using your Amazon Web Services account's Secrets Manager secret.</p>
205 /// </note>
206 pub fn set_secret_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.inner = self.inner.set_secret_key(input);
208 self
209 }
210 /// <p>Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server.</p><note>
211 /// <p>If you provide a secret using <code>SecretKey</code>, but do not provide secret configuration details using <code>CmkSecretConfig</code> or <code>CustomSecretConfig</code>, then DataSync stores the token using your Amazon Web Services account's Secrets Manager secret.</p>
212 /// </note>
213 pub fn get_secret_key(&self) -> &::std::option::Option<::std::string::String> {
214 self.inner.get_secret_key()
215 }
216 ///
217 /// Appends an item to `AgentArns`.
218 ///
219 /// To override the contents of this collection use [`set_agent_arns`](Self::set_agent_arns).
220 ///
221 /// <p>(Optional) Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can connect with your object storage system. If you are setting up an agentless cross-cloud transfer, you do not need to specify a value for this parameter.</p><note>
222 /// <p>You cannot add or remove agents from a storage location after you initially create it.</p>
223 /// </note>
224 pub fn agent_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.inner = self.inner.agent_arns(input.into());
226 self
227 }
228 /// <p>(Optional) Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can connect with your object storage system. If you are setting up an agentless cross-cloud transfer, you do not need to specify a value for this parameter.</p><note>
229 /// <p>You cannot add or remove agents from a storage location after you initially create it.</p>
230 /// </note>
231 pub fn set_agent_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
232 self.inner = self.inner.set_agent_arns(input);
233 self
234 }
235 /// <p>(Optional) Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can connect with your object storage system. If you are setting up an agentless cross-cloud transfer, you do not need to specify a value for this parameter.</p><note>
236 /// <p>You cannot add or remove agents from a storage location after you initially create it.</p>
237 /// </note>
238 pub fn get_agent_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
239 self.inner.get_agent_arns()
240 }
241 /// <p>Specifies a certificate chain for DataSync to authenticate with your object storage system if the system uses a private or self-signed certificate authority (CA). You must specify a single <code>.pem</code> file with a full certificate chain (for example, <code>file:///home/user/.ssh/object_storage_certificates.pem</code>).</p>
242 /// <p>The certificate chain might include:</p>
243 /// <ul>
244 /// <li>
245 /// <p>The object storage system's certificate</p></li>
246 /// <li>
247 /// <p>All intermediate certificates (if there are any)</p></li>
248 /// <li>
249 /// <p>The root certificate of the signing CA</p></li>
250 /// </ul>
251 /// <p>You can concatenate your certificates into a <code>.pem</code> file (which can be up to 32768 bytes before base64 encoding). The following example <code>cat</code> command creates an <code>object_storage_certificates.pem</code> file that includes three certificates:</p>
252 /// <p><code>cat object_server_certificate.pem intermediate_certificate.pem ca_root_certificate.pem > object_storage_certificates.pem</code></p>
253 /// <p>To use this parameter, configure <code>ServerProtocol</code> to <code>HTTPS</code>.</p>
254 /// <p>Updating this parameter doesn't interfere with tasks that you have in progress.</p>
255 pub fn server_certificate(mut self, input: ::aws_smithy_types::Blob) -> Self {
256 self.inner = self.inner.server_certificate(input);
257 self
258 }
259 /// <p>Specifies a certificate chain for DataSync to authenticate with your object storage system if the system uses a private or self-signed certificate authority (CA). You must specify a single <code>.pem</code> file with a full certificate chain (for example, <code>file:///home/user/.ssh/object_storage_certificates.pem</code>).</p>
260 /// <p>The certificate chain might include:</p>
261 /// <ul>
262 /// <li>
263 /// <p>The object storage system's certificate</p></li>
264 /// <li>
265 /// <p>All intermediate certificates (if there are any)</p></li>
266 /// <li>
267 /// <p>The root certificate of the signing CA</p></li>
268 /// </ul>
269 /// <p>You can concatenate your certificates into a <code>.pem</code> file (which can be up to 32768 bytes before base64 encoding). The following example <code>cat</code> command creates an <code>object_storage_certificates.pem</code> file that includes three certificates:</p>
270 /// <p><code>cat object_server_certificate.pem intermediate_certificate.pem ca_root_certificate.pem > object_storage_certificates.pem</code></p>
271 /// <p>To use this parameter, configure <code>ServerProtocol</code> to <code>HTTPS</code>.</p>
272 /// <p>Updating this parameter doesn't interfere with tasks that you have in progress.</p>
273 pub fn set_server_certificate(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
274 self.inner = self.inner.set_server_certificate(input);
275 self
276 }
277 /// <p>Specifies a certificate chain for DataSync to authenticate with your object storage system if the system uses a private or self-signed certificate authority (CA). You must specify a single <code>.pem</code> file with a full certificate chain (for example, <code>file:///home/user/.ssh/object_storage_certificates.pem</code>).</p>
278 /// <p>The certificate chain might include:</p>
279 /// <ul>
280 /// <li>
281 /// <p>The object storage system's certificate</p></li>
282 /// <li>
283 /// <p>All intermediate certificates (if there are any)</p></li>
284 /// <li>
285 /// <p>The root certificate of the signing CA</p></li>
286 /// </ul>
287 /// <p>You can concatenate your certificates into a <code>.pem</code> file (which can be up to 32768 bytes before base64 encoding). The following example <code>cat</code> command creates an <code>object_storage_certificates.pem</code> file that includes three certificates:</p>
288 /// <p><code>cat object_server_certificate.pem intermediate_certificate.pem ca_root_certificate.pem > object_storage_certificates.pem</code></p>
289 /// <p>To use this parameter, configure <code>ServerProtocol</code> to <code>HTTPS</code>.</p>
290 /// <p>Updating this parameter doesn't interfere with tasks that you have in progress.</p>
291 pub fn get_server_certificate(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
292 self.inner.get_server_certificate()
293 }
294 /// <p>Specifies configuration information for a DataSync-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.</p>
295 pub fn cmk_secret_config(mut self, input: crate::types::CmkSecretConfig) -> Self {
296 self.inner = self.inner.cmk_secret_config(input);
297 self
298 }
299 /// <p>Specifies configuration information for a DataSync-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.</p>
300 pub fn set_cmk_secret_config(mut self, input: ::std::option::Option<crate::types::CmkSecretConfig>) -> Self {
301 self.inner = self.inner.set_cmk_secret_config(input);
302 self
303 }
304 /// <p>Specifies configuration information for a DataSync-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.</p>
305 pub fn get_cmk_secret_config(&self) -> &::std::option::Option<crate::types::CmkSecretConfig> {
306 self.inner.get_cmk_secret_config()
307 }
308 /// <p>Specifies configuration information for a customer-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.</p>
309 pub fn custom_secret_config(mut self, input: crate::types::CustomSecretConfig) -> Self {
310 self.inner = self.inner.custom_secret_config(input);
311 self
312 }
313 /// <p>Specifies configuration information for a customer-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.</p>
314 pub fn set_custom_secret_config(mut self, input: ::std::option::Option<crate::types::CustomSecretConfig>) -> Self {
315 self.inner = self.inner.set_custom_secret_config(input);
316 self
317 }
318 /// <p>Specifies configuration information for a customer-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.</p>
319 pub fn get_custom_secret_config(&self) -> &::std::option::Option<crate::types::CustomSecretConfig> {
320 self.inner.get_custom_secret_config()
321 }
322}