aws_sdk_datasync/operation/create_location_hdfs/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_location_hdfs::_create_location_hdfs_output::CreateLocationHdfsOutputBuilder;
3
4pub use crate::operation::create_location_hdfs::_create_location_hdfs_input::CreateLocationHdfsInputBuilder;
5
6impl crate::operation::create_location_hdfs::builders::CreateLocationHdfsInputBuilder {
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_location_hdfs::CreateLocationHdfsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_location_hdfs::CreateLocationHdfsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_location_hdfs();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateLocationHdfs`.
24///
25/// <p>Creates a transfer <i>location</i> for a Hadoop Distributed File System (HDFS). DataSync can use this location as a source or destination for transferring data.</p>
26/// <p>Before you begin, make sure that you understand how DataSync <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-hdfs-location.html#accessing-hdfs">accesses HDFS clusters</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateLocationHdfsFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::create_location_hdfs::builders::CreateLocationHdfsInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::create_location_hdfs::CreateLocationHdfsOutput,
36        crate::operation::create_location_hdfs::CreateLocationHdfsError,
37    > for CreateLocationHdfsFluentBuilder
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::create_location_hdfs::CreateLocationHdfsOutput,
45            crate::operation::create_location_hdfs::CreateLocationHdfsError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl CreateLocationHdfsFluentBuilder {
52    /// Creates a new `CreateLocationHdfsFluentBuilder`.
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 CreateLocationHdfs as a reference.
61    pub fn as_input(&self) -> &crate::operation::create_location_hdfs::builders::CreateLocationHdfsInputBuilder {
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::create_location_hdfs::CreateLocationHdfsOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::create_location_hdfs::CreateLocationHdfsError,
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::create_location_hdfs::CreateLocationHdfs::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::create_location_hdfs::CreateLocationHdfs::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::create_location_hdfs::CreateLocationHdfsOutput,
98        crate::operation::create_location_hdfs::CreateLocationHdfsError,
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 subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to <code>/</code>.</p>
113    pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.subdirectory(input.into());
115        self
116    }
117    /// <p>A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to <code>/</code>.</p>
118    pub fn set_subdirectory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_subdirectory(input);
120        self
121    }
122    /// <p>A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to <code>/</code>.</p>
123    pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_subdirectory()
125    }
126    ///
127    /// Appends an item to `NameNodes`.
128    ///
129    /// To override the contents of this collection use [`set_name_nodes`](Self::set_name_nodes).
130    ///
131    /// <p>The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.</p>
132    pub fn name_nodes(mut self, input: crate::types::HdfsNameNode) -> Self {
133        self.inner = self.inner.name_nodes(input);
134        self
135    }
136    /// <p>The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.</p>
137    pub fn set_name_nodes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HdfsNameNode>>) -> Self {
138        self.inner = self.inner.set_name_nodes(input);
139        self
140    }
141    /// <p>The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.</p>
142    pub fn get_name_nodes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HdfsNameNode>> {
143        self.inner.get_name_nodes()
144    }
145    /// <p>The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).</p>
146    pub fn block_size(mut self, input: i32) -> Self {
147        self.inner = self.inner.block_size(input);
148        self
149    }
150    /// <p>The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).</p>
151    pub fn set_block_size(mut self, input: ::std::option::Option<i32>) -> Self {
152        self.inner = self.inner.set_block_size(input);
153        self
154    }
155    /// <p>The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).</p>
156    pub fn get_block_size(&self) -> &::std::option::Option<i32> {
157        self.inner.get_block_size()
158    }
159    /// <p>The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.</p>
160    pub fn replication_factor(mut self, input: i32) -> Self {
161        self.inner = self.inner.replication_factor(input);
162        self
163    }
164    /// <p>The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.</p>
165    pub fn set_replication_factor(mut self, input: ::std::option::Option<i32>) -> Self {
166        self.inner = self.inner.set_replication_factor(input);
167        self
168    }
169    /// <p>The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.</p>
170    pub fn get_replication_factor(&self) -> &::std::option::Option<i32> {
171        self.inner.get_replication_factor()
172    }
173    /// <p>The URI of the HDFS cluster's Key Management Server (KMS).</p>
174    pub fn kms_key_provider_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        self.inner = self.inner.kms_key_provider_uri(input.into());
176        self
177    }
178    /// <p>The URI of the HDFS cluster's Key Management Server (KMS).</p>
179    pub fn set_kms_key_provider_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.inner = self.inner.set_kms_key_provider_uri(input);
181        self
182    }
183    /// <p>The URI of the HDFS cluster's Key Management Server (KMS).</p>
184    pub fn get_kms_key_provider_uri(&self) -> &::std::option::Option<::std::string::String> {
185        self.inner.get_kms_key_provider_uri()
186    }
187    /// <p>The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If <code>QopConfiguration</code> isn't specified, <code>RpcProtection</code> and <code>DataTransferProtection</code> default to <code>PRIVACY</code>. If you set <code>RpcProtection</code> or <code>DataTransferProtection</code>, the other parameter assumes the same value.</p>
188    pub fn qop_configuration(mut self, input: crate::types::QopConfiguration) -> Self {
189        self.inner = self.inner.qop_configuration(input);
190        self
191    }
192    /// <p>The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If <code>QopConfiguration</code> isn't specified, <code>RpcProtection</code> and <code>DataTransferProtection</code> default to <code>PRIVACY</code>. If you set <code>RpcProtection</code> or <code>DataTransferProtection</code>, the other parameter assumes the same value.</p>
193    pub fn set_qop_configuration(mut self, input: ::std::option::Option<crate::types::QopConfiguration>) -> Self {
194        self.inner = self.inner.set_qop_configuration(input);
195        self
196    }
197    /// <p>The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If <code>QopConfiguration</code> isn't specified, <code>RpcProtection</code> and <code>DataTransferProtection</code> default to <code>PRIVACY</code>. If you set <code>RpcProtection</code> or <code>DataTransferProtection</code>, the other parameter assumes the same value.</p>
198    pub fn get_qop_configuration(&self) -> &::std::option::Option<crate::types::QopConfiguration> {
199        self.inner.get_qop_configuration()
200    }
201    /// <p>The type of authentication used to determine the identity of the user.</p>
202    pub fn authentication_type(mut self, input: crate::types::HdfsAuthenticationType) -> Self {
203        self.inner = self.inner.authentication_type(input);
204        self
205    }
206    /// <p>The type of authentication used to determine the identity of the user.</p>
207    pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::HdfsAuthenticationType>) -> Self {
208        self.inner = self.inner.set_authentication_type(input);
209        self
210    }
211    /// <p>The type of authentication used to determine the identity of the user.</p>
212    pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::HdfsAuthenticationType> {
213        self.inner.get_authentication_type()
214    }
215    /// <p>The user name used to identify the client on the host operating system.</p><note>
216    /// <p>If <code>SIMPLE</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
217    /// </note>
218    pub fn simple_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
219        self.inner = self.inner.simple_user(input.into());
220        self
221    }
222    /// <p>The user name used to identify the client on the host operating system.</p><note>
223    /// <p>If <code>SIMPLE</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
224    /// </note>
225    pub fn set_simple_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226        self.inner = self.inner.set_simple_user(input);
227        self
228    }
229    /// <p>The user name used to identify the client on the host operating system.</p><note>
230    /// <p>If <code>SIMPLE</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
231    /// </note>
232    pub fn get_simple_user(&self) -> &::std::option::Option<::std::string::String> {
233        self.inner.get_simple_user()
234    }
235    /// <p>The Kerberos principal with access to the files and folders on the HDFS cluster.</p><note>
236    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
237    /// </note>
238    pub fn kerberos_principal(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239        self.inner = self.inner.kerberos_principal(input.into());
240        self
241    }
242    /// <p>The Kerberos principal with access to the files and folders on the HDFS cluster.</p><note>
243    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
244    /// </note>
245    pub fn set_kerberos_principal(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246        self.inner = self.inner.set_kerberos_principal(input);
247        self
248    }
249    /// <p>The Kerberos principal with access to the files and folders on the HDFS cluster.</p><note>
250    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
251    /// </note>
252    pub fn get_kerberos_principal(&self) -> &::std::option::Option<::std::string::String> {
253        self.inner.get_kerberos_principal()
254    }
255    /// <p>The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address.</p><note>
256    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
257    /// </note>
258    pub fn kerberos_keytab(mut self, input: ::aws_smithy_types::Blob) -> Self {
259        self.inner = self.inner.kerberos_keytab(input);
260        self
261    }
262    /// <p>The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address.</p><note>
263    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
264    /// </note>
265    pub fn set_kerberos_keytab(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
266        self.inner = self.inner.set_kerberos_keytab(input);
267        self
268    }
269    /// <p>The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address.</p><note>
270    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
271    /// </note>
272    pub fn get_kerberos_keytab(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
273        self.inner.get_kerberos_keytab()
274    }
275    /// <p>The <code>krb5.conf</code> file that contains the Kerberos configuration information. You can load the <code>krb5.conf</code> file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.</p><note>
276    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
277    /// </note>
278    pub fn kerberos_krb5_conf(mut self, input: ::aws_smithy_types::Blob) -> Self {
279        self.inner = self.inner.kerberos_krb5_conf(input);
280        self
281    }
282    /// <p>The <code>krb5.conf</code> file that contains the Kerberos configuration information. You can load the <code>krb5.conf</code> file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.</p><note>
283    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
284    /// </note>
285    pub fn set_kerberos_krb5_conf(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
286        self.inner = self.inner.set_kerberos_krb5_conf(input);
287        self
288    }
289    /// <p>The <code>krb5.conf</code> file that contains the Kerberos configuration information. You can load the <code>krb5.conf</code> file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.</p><note>
290    /// <p>If <code>KERBEROS</code> is specified for <code>AuthenticationType</code>, this parameter is required.</p>
291    /// </note>
292    pub fn get_kerberos_krb5_conf(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
293        self.inner.get_kerberos_krb5_conf()
294    }
295    ///
296    /// Appends an item to `AgentArns`.
297    ///
298    /// To override the contents of this collection use [`set_agent_arns`](Self::set_agent_arns).
299    ///
300    /// <p>The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.</p>
301    pub fn agent_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
302        self.inner = self.inner.agent_arns(input.into());
303        self
304    }
305    /// <p>The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.</p>
306    pub fn set_agent_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
307        self.inner = self.inner.set_agent_arns(input);
308        self
309    }
310    /// <p>The Amazon Resource Names (ARNs) of the DataSync agents that can connect to your HDFS cluster.</p>
311    pub fn get_agent_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
312        self.inner.get_agent_arns()
313    }
314    ///
315    /// Appends an item to `Tags`.
316    ///
317    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
318    ///
319    /// <p>The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.</p>
320    pub fn tags(mut self, input: crate::types::TagListEntry) -> Self {
321        self.inner = self.inner.tags(input);
322        self
323    }
324    /// <p>The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.</p>
325    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>) -> Self {
326        self.inner = self.inner.set_tags(input);
327        self
328    }
329    /// <p>The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.</p>
330    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>> {
331        self.inner.get_tags()
332    }
333}