aws_sdk_datasync/operation/create_location_efs/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_location_efs::_create_location_efs_output::CreateLocationEfsOutputBuilder;
3
4pub use crate::operation::create_location_efs::_create_location_efs_input::CreateLocationEfsInputBuilder;
5
6impl crate::operation::create_location_efs::builders::CreateLocationEfsInputBuilder {
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_efs::CreateLocationEfsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_location_efs::CreateLocationEfsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_location_efs();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateLocationEfs`.
24///
25/// <p>Creates a transfer <i>location</i> for an Amazon EFS file system. 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-efs-location.html#create-efs-location-access">accesses Amazon EFS file systems</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateLocationEfsFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::create_location_efs::builders::CreateLocationEfsInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::create_location_efs::CreateLocationEfsOutput,
36 crate::operation::create_location_efs::CreateLocationEfsError,
37 > for CreateLocationEfsFluentBuilder
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_efs::CreateLocationEfsOutput,
45 crate::operation::create_location_efs::CreateLocationEfsError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl CreateLocationEfsFluentBuilder {
52 /// Creates a new `CreateLocationEfsFluentBuilder`.
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 CreateLocationEfs as a reference.
61 pub fn as_input(&self) -> &crate::operation::create_location_efs::builders::CreateLocationEfsInputBuilder {
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_efs::CreateLocationEfsOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::create_location_efs::CreateLocationEfsError,
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_efs::CreateLocationEfs::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::create_location_efs::CreateLocationEfs::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_efs::CreateLocationEfsOutput,
98 crate::operation::create_location_efs::CreateLocationEfsError,
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 a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).</p>
113 /// <p>By default, DataSync uses the root directory (or <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">access point</a> if you provide one by using <code>AccessPointArn</code>). You can also include subdirectories using forward slashes (for example, <code>/path/to/folder</code>).</p>
114 pub fn subdirectory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.subdirectory(input.into());
116 self
117 }
118 /// <p>Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).</p>
119 /// <p>By default, DataSync uses the root directory (or <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">access point</a> if you provide one by using <code>AccessPointArn</code>). You can also include subdirectories using forward slashes (for example, <code>/path/to/folder</code>).</p>
120 pub fn set_subdirectory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.inner = self.inner.set_subdirectory(input);
122 self
123 }
124 /// <p>Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).</p>
125 /// <p>By default, DataSync uses the root directory (or <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">access point</a> if you provide one by using <code>AccessPointArn</code>). You can also include subdirectories using forward slashes (for example, <code>/path/to/folder</code>).</p>
126 pub fn get_subdirectory(&self) -> &::std::option::Option<::std::string::String> {
127 self.inner.get_subdirectory()
128 }
129 /// <p>Specifies the ARN for your Amazon EFS file system.</p>
130 pub fn efs_filesystem_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.inner = self.inner.efs_filesystem_arn(input.into());
132 self
133 }
134 /// <p>Specifies the ARN for your Amazon EFS file system.</p>
135 pub fn set_efs_filesystem_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.inner = self.inner.set_efs_filesystem_arn(input);
137 self
138 }
139 /// <p>Specifies the ARN for your Amazon EFS file system.</p>
140 pub fn get_efs_filesystem_arn(&self) -> &::std::option::Option<::std::string::String> {
141 self.inner.get_efs_filesystem_arn()
142 }
143 /// <p>Specifies the subnet and security groups DataSync uses to connect to one of your Amazon EFS file system's <a href="https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html">mount targets</a>.</p>
144 pub fn ec2_config(mut self, input: crate::types::Ec2Config) -> Self {
145 self.inner = self.inner.ec2_config(input);
146 self
147 }
148 /// <p>Specifies the subnet and security groups DataSync uses to connect to one of your Amazon EFS file system's <a href="https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html">mount targets</a>.</p>
149 pub fn set_ec2_config(mut self, input: ::std::option::Option<crate::types::Ec2Config>) -> Self {
150 self.inner = self.inner.set_ec2_config(input);
151 self
152 }
153 /// <p>Specifies the subnet and security groups DataSync uses to connect to one of your Amazon EFS file system's <a href="https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html">mount targets</a>.</p>
154 pub fn get_ec2_config(&self) -> &::std::option::Option<crate::types::Ec2Config> {
155 self.inner.get_ec2_config()
156 }
157 ///
158 /// Appends an item to `Tags`.
159 ///
160 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
161 ///
162 /// <p>Specifies the key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.</p>
163 pub fn tags(mut self, input: crate::types::TagListEntry) -> Self {
164 self.inner = self.inner.tags(input);
165 self
166 }
167 /// <p>Specifies the key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.</p>
168 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>) -> Self {
169 self.inner = self.inner.set_tags(input);
170 self
171 }
172 /// <p>Specifies the key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.</p>
173 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>> {
174 self.inner.get_tags()
175 }
176 /// <p>Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.</p>
177 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam">Accessing restricted file systems</a>.</p>
178 pub fn access_point_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.inner = self.inner.access_point_arn(input.into());
180 self
181 }
182 /// <p>Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.</p>
183 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam">Accessing restricted file systems</a>.</p>
184 pub fn set_access_point_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185 self.inner = self.inner.set_access_point_arn(input);
186 self
187 }
188 /// <p>Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.</p>
189 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam">Accessing restricted file systems</a>.</p>
190 pub fn get_access_point_arn(&self) -> &::std::option::Option<::std::string::String> {
191 self.inner.get_access_point_arn()
192 }
193 /// <p>Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.</p>
194 /// <p>For information on creating this role, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam-role">Creating a DataSync IAM role for file system access</a>.</p>
195 pub fn file_system_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196 self.inner = self.inner.file_system_access_role_arn(input.into());
197 self
198 }
199 /// <p>Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.</p>
200 /// <p>For information on creating this role, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam-role">Creating a DataSync IAM role for file system access</a>.</p>
201 pub fn set_file_system_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202 self.inner = self.inner.set_file_system_access_role_arn(input);
203 self
204 }
205 /// <p>Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.</p>
206 /// <p>For information on creating this role, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-efs-location.html#create-efs-location-iam-role">Creating a DataSync IAM role for file system access</a>.</p>
207 pub fn get_file_system_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
208 self.inner.get_file_system_access_role_arn()
209 }
210 /// <p>Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.</p>
211 /// <p>If you specify an access point using <code>AccessPointArn</code> or an IAM role using <code>FileSystemAccessRoleArn</code>, you must set this parameter to <code>TLS1_2</code>.</p>
212 pub fn in_transit_encryption(mut self, input: crate::types::EfsInTransitEncryption) -> Self {
213 self.inner = self.inner.in_transit_encryption(input);
214 self
215 }
216 /// <p>Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.</p>
217 /// <p>If you specify an access point using <code>AccessPointArn</code> or an IAM role using <code>FileSystemAccessRoleArn</code>, you must set this parameter to <code>TLS1_2</code>.</p>
218 pub fn set_in_transit_encryption(mut self, input: ::std::option::Option<crate::types::EfsInTransitEncryption>) -> Self {
219 self.inner = self.inner.set_in_transit_encryption(input);
220 self
221 }
222 /// <p>Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.</p>
223 /// <p>If you specify an access point using <code>AccessPointArn</code> or an IAM role using <code>FileSystemAccessRoleArn</code>, you must set this parameter to <code>TLS1_2</code>.</p>
224 pub fn get_in_transit_encryption(&self) -> &::std::option::Option<crate::types::EfsInTransitEncryption> {
225 self.inner.get_in_transit_encryption()
226 }
227}