aws_sdk_transfer/operation/update_connector/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_connector::_update_connector_output::UpdateConnectorOutputBuilder;
3
4pub use crate::operation::update_connector::_update_connector_input::UpdateConnectorInputBuilder;
5
6impl crate::operation::update_connector::builders::UpdateConnectorInputBuilder {
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_connector::UpdateConnectorOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_connector::UpdateConnectorError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_connector();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateConnector`.
24///
25/// <p>Updates some of the parameters for an existing connector. Provide the <code>ConnectorId</code> for the connector that you want to update, along with the new values for the parameters to update.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateConnectorFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::update_connector::builders::UpdateConnectorInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::update_connector::UpdateConnectorOutput,
35 crate::operation::update_connector::UpdateConnectorError,
36 > for UpdateConnectorFluentBuilder
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::update_connector::UpdateConnectorOutput,
44 crate::operation::update_connector::UpdateConnectorError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl UpdateConnectorFluentBuilder {
51 /// Creates a new `UpdateConnectorFluentBuilder`.
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 UpdateConnector as a reference.
60 pub fn as_input(&self) -> &crate::operation::update_connector::builders::UpdateConnectorInputBuilder {
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::update_connector::UpdateConnectorOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::update_connector::UpdateConnectorError,
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::update_connector::UpdateConnector::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::update_connector::UpdateConnector::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::update_connector::UpdateConnectorOutput,
97 crate::operation::update_connector::UpdateConnectorError,
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 /// <p>The unique identifier for the connector.</p>
112 pub fn connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.connector_id(input.into());
114 self
115 }
116 /// <p>The unique identifier for the connector.</p>
117 pub fn set_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_connector_id(input);
119 self
120 }
121 /// <p>The unique identifier for the connector.</p>
122 pub fn get_connector_id(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_connector_id()
124 }
125 /// <p>The URL of the partner's AS2 or SFTP endpoint.</p>
126 /// <p>When creating AS2 connectors or service-managed SFTP connectors (connectors without egress configuration), you must provide a URL to specify the remote server endpoint. For VPC Lattice type connectors, the URL must be null.</p>
127 pub fn url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.url(input.into());
129 self
130 }
131 /// <p>The URL of the partner's AS2 or SFTP endpoint.</p>
132 /// <p>When creating AS2 connectors or service-managed SFTP connectors (connectors without egress configuration), you must provide a URL to specify the remote server endpoint. For VPC Lattice type connectors, the URL must be null.</p>
133 pub fn set_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.inner = self.inner.set_url(input);
135 self
136 }
137 /// <p>The URL of the partner's AS2 or SFTP endpoint.</p>
138 /// <p>When creating AS2 connectors or service-managed SFTP connectors (connectors without egress configuration), you must provide a URL to specify the remote server endpoint. For VPC Lattice type connectors, the URL must be null.</p>
139 pub fn get_url(&self) -> &::std::option::Option<::std::string::String> {
140 self.inner.get_url()
141 }
142 /// <p>A structure that contains the parameters for an AS2 connector object.</p>
143 pub fn as2_config(mut self, input: crate::types::As2ConnectorConfig) -> Self {
144 self.inner = self.inner.as2_config(input);
145 self
146 }
147 /// <p>A structure that contains the parameters for an AS2 connector object.</p>
148 pub fn set_as2_config(mut self, input: ::std::option::Option<crate::types::As2ConnectorConfig>) -> Self {
149 self.inner = self.inner.set_as2_config(input);
150 self
151 }
152 /// <p>A structure that contains the parameters for an AS2 connector object.</p>
153 pub fn get_as2_config(&self) -> &::std::option::Option<crate::types::As2ConnectorConfig> {
154 self.inner.get_as2_config()
155 }
156 /// <p>Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.</p>
157 /// <p><b>For AS2 connectors</b></p>
158 /// <p>With AS2, you can send files by calling <code>StartFileTransfer</code> and specifying the file paths in the request parameter, <code>SendFilePaths</code>. We use the file’s parent directory (for example, for <code>--send-file-paths /bucket/dir/file.txt</code>, parent directory is <code>/bucket/dir/</code>) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the <code>AccessRole</code> needs to provide read and write access to the parent directory of the file location used in the <code>StartFileTransfer</code> request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with <code>StartFileTransfer</code>.</p>
159 /// <p>If you are using Basic authentication for your AS2 connector, the access role requires the <code>secretsmanager:GetSecretValue</code> permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the <code>kms:Decrypt</code> permission for that key.</p>
160 /// <p><b>For SFTP connectors</b></p>
161 /// <p>Make sure that the access role provides read and write access to the parent directory of the file location that's used in the <code>StartFileTransfer</code> request. Additionally, make sure that the role provides <code>secretsmanager:GetSecretValue</code> permission to Secrets Manager.</p>
162 pub fn access_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163 self.inner = self.inner.access_role(input.into());
164 self
165 }
166 /// <p>Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.</p>
167 /// <p><b>For AS2 connectors</b></p>
168 /// <p>With AS2, you can send files by calling <code>StartFileTransfer</code> and specifying the file paths in the request parameter, <code>SendFilePaths</code>. We use the file’s parent directory (for example, for <code>--send-file-paths /bucket/dir/file.txt</code>, parent directory is <code>/bucket/dir/</code>) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the <code>AccessRole</code> needs to provide read and write access to the parent directory of the file location used in the <code>StartFileTransfer</code> request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with <code>StartFileTransfer</code>.</p>
169 /// <p>If you are using Basic authentication for your AS2 connector, the access role requires the <code>secretsmanager:GetSecretValue</code> permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the <code>kms:Decrypt</code> permission for that key.</p>
170 /// <p><b>For SFTP connectors</b></p>
171 /// <p>Make sure that the access role provides read and write access to the parent directory of the file location that's used in the <code>StartFileTransfer</code> request. Additionally, make sure that the role provides <code>secretsmanager:GetSecretValue</code> permission to Secrets Manager.</p>
172 pub fn set_access_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.inner = self.inner.set_access_role(input);
174 self
175 }
176 /// <p>Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.</p>
177 /// <p><b>For AS2 connectors</b></p>
178 /// <p>With AS2, you can send files by calling <code>StartFileTransfer</code> and specifying the file paths in the request parameter, <code>SendFilePaths</code>. We use the file’s parent directory (for example, for <code>--send-file-paths /bucket/dir/file.txt</code>, parent directory is <code>/bucket/dir/</code>) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the <code>AccessRole</code> needs to provide read and write access to the parent directory of the file location used in the <code>StartFileTransfer</code> request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with <code>StartFileTransfer</code>.</p>
179 /// <p>If you are using Basic authentication for your AS2 connector, the access role requires the <code>secretsmanager:GetSecretValue</code> permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the <code>kms:Decrypt</code> permission for that key.</p>
180 /// <p><b>For SFTP connectors</b></p>
181 /// <p>Make sure that the access role provides read and write access to the parent directory of the file location that's used in the <code>StartFileTransfer</code> request. Additionally, make sure that the role provides <code>secretsmanager:GetSecretValue</code> permission to Secrets Manager.</p>
182 pub fn get_access_role(&self) -> &::std::option::Option<::std::string::String> {
183 self.inner.get_access_role()
184 }
185 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.</p>
186 pub fn logging_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187 self.inner = self.inner.logging_role(input.into());
188 self
189 }
190 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.</p>
191 pub fn set_logging_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192 self.inner = self.inner.set_logging_role(input);
193 self
194 }
195 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.</p>
196 pub fn get_logging_role(&self) -> &::std::option::Option<::std::string::String> {
197 self.inner.get_logging_role()
198 }
199 /// <p>A structure that contains the parameters for an SFTP connector object.</p>
200 pub fn sftp_config(mut self, input: crate::types::SftpConnectorConfig) -> Self {
201 self.inner = self.inner.sftp_config(input);
202 self
203 }
204 /// <p>A structure that contains the parameters for an SFTP connector object.</p>
205 pub fn set_sftp_config(mut self, input: ::std::option::Option<crate::types::SftpConnectorConfig>) -> Self {
206 self.inner = self.inner.set_sftp_config(input);
207 self
208 }
209 /// <p>A structure that contains the parameters for an SFTP connector object.</p>
210 pub fn get_sftp_config(&self) -> &::std::option::Option<crate::types::SftpConnectorConfig> {
211 self.inner.get_sftp_config()
212 }
213 /// <p>Specifies the name of the security policy for the connector.</p>
214 pub fn security_policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215 self.inner = self.inner.security_policy_name(input.into());
216 self
217 }
218 /// <p>Specifies the name of the security policy for the connector.</p>
219 pub fn set_security_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220 self.inner = self.inner.set_security_policy_name(input);
221 self
222 }
223 /// <p>Specifies the name of the security policy for the connector.</p>
224 pub fn get_security_policy_name(&self) -> &::std::option::Option<::std::string::String> {
225 self.inner.get_security_policy_name()
226 }
227 /// <p>Updates the egress configuration for the connector, allowing you to modify how traffic is routed from the connector to the SFTP server. Changes to VPC configuration may require connector restart.</p>
228 pub fn egress_config(mut self, input: crate::types::UpdateConnectorEgressConfig) -> Self {
229 self.inner = self.inner.egress_config(input);
230 self
231 }
232 /// <p>Updates the egress configuration for the connector, allowing you to modify how traffic is routed from the connector to the SFTP server. Changes to VPC configuration may require connector restart.</p>
233 pub fn set_egress_config(mut self, input: ::std::option::Option<crate::types::UpdateConnectorEgressConfig>) -> Self {
234 self.inner = self.inner.set_egress_config(input);
235 self
236 }
237 /// <p>Updates the egress configuration for the connector, allowing you to modify how traffic is routed from the connector to the SFTP server. Changes to VPC configuration may require connector restart.</p>
238 pub fn get_egress_config(&self) -> &::std::option::Option<crate::types::UpdateConnectorEgressConfig> {
239 self.inner.get_egress_config()
240 }
241}