aws_sdk_transfer/operation/create_server/
_create_server_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateServerInput {
6    /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
7    /// <p>To request a new public certificate, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html">Request a public certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
8    /// <p>To import an existing certificate into ACM, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html">Importing certificates into ACM</a> in the <i>Certificate Manager User Guide</i>.</p>
9    /// <p>To request a private certificate to use FTPS through private IP addresses, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html">Request a private certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
10    /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
11    /// <ul>
12    /// <li>
13    /// <p>2048-bit RSA (RSA_2048)</p></li>
14    /// <li>
15    /// <p>4096-bit RSA (RSA_4096)</p></li>
16    /// <li>
17    /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
18    /// <li>
19    /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
20    /// <li>
21    /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
22    /// </ul><note>
23    /// <p>The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and information about the issuer.</p>
24    /// </note>
25    pub certificate: ::std::option::Option<::std::string::String>,
26    /// <p>The domain of the storage system that is used for file transfers. There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.</p><note>
27    /// <p>After the server is created, the domain cannot be changed.</p>
28    /// </note>
29    pub domain: ::std::option::Option<crate::types::Domain>,
30    /// <p>The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.</p>
31    pub endpoint_details: ::std::option::Option<crate::types::EndpointDetails>,
32    /// <p>The type of endpoint that you want your server to use. You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it.</p><note>
33    /// <p>After May 19, 2021, you won't be able to create a server using <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account if your account hasn't already done so before May 19, 2021. If you have already created servers with <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use <code>EndpointType</code>=<code>VPC</code>.</p>
34    /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
35    /// <p>It is recommended that you use <code>VPC</code> as the <code>EndpointType</code>. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with <code>EndpointType</code> set to <code>VPC_ENDPOINT</code>.</p>
36    /// </note>
37    pub endpoint_type: ::std::option::Option<crate::types::EndpointType>,
38    /// <p>The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.</p>
39    /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
40    /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
41    /// <p>Use a minimum value of 2048 for the <code>-b</code> option. You can create a stronger key by using 3072 or 4096.</p>
42    /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
43    /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
44    /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
45    /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
46    /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
47    /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
48    /// <p>If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't update the host key. Accidentally changing a server's host key can be disruptive.</p>
49    /// </important>
50    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key">Manage host keys for your SFTP-enabled server</a> in the <i>Transfer Family User Guide</i>.</p>
51    pub host_key: ::std::option::Option<::std::string::String>,
52    /// <p>Required when <code>IdentityProviderType</code> is set to <code>AWS_DIRECTORY_SERVICE</code>, <code>Amazon Web Services_LAMBDA</code> or <code>API_GATEWAY</code>. Accepts an array containing all of the information required to use a directory in <code>AWS_DIRECTORY_SERVICE</code> or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified when <code>IdentityProviderType</code> is set to <code>SERVICE_MANAGED</code>.</p>
53    pub identity_provider_details: ::std::option::Option<crate::types::IdentityProviderDetails>,
54    /// <p>The mode of authentication for a server. The default value is <code>SERVICE_MANAGED</code>, which allows you to store and access user credentials within the Transfer Family service.</p>
55    /// <p>Use <code>AWS_DIRECTORY_SERVICE</code> to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services using AD Connector. This option also requires you to provide a Directory ID by using the <code>IdentityProviderDetails</code> parameter.</p>
56    /// <p>Use the <code>API_GATEWAY</code> value to integrate with an identity provider of your choosing. The <code>API_GATEWAY</code> setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the <code>IdentityProviderDetails</code> parameter.</p>
57    /// <p>Use the <code>AWS_LAMBDA</code> value to directly use an Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the <code>Function</code> parameter for the <code>IdentityProviderDetails</code> data type.</p>
58    pub identity_provider_type: ::std::option::Option<crate::types::IdentityProviderType>,
59    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events. When set, you can view user activity in your CloudWatch logs.</p>
60    pub logging_role: ::std::option::Option<::std::string::String>,
61    /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
62    /// <p>The SFTP protocol does not support post-authentication display banners.</p>
63    /// </note>
64    pub post_authentication_login_banner: ::std::option::Option<::std::string::String>,
65    /// <p>Specifies a string to display when users connect to a server. This string is displayed before the user authenticates. For example, the following banner displays details about using the system:</p>
66    /// <p><code>This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.</code></p>
67    pub pre_authentication_login_banner: ::std::option::Option<::std::string::String>,
68    /// <p>Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. The available protocols are:</p>
69    /// <ul>
70    /// <li>
71    /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
72    /// <li>
73    /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
74    /// <li>
75    /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
76    /// <li>
77    /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
78    /// </ul><note>
79    /// <ul>
80    /// <li>
81    /// <p>If you select <code>FTPS</code>, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.</p></li>
82    /// <li>
83    /// <p>If <code>Protocol</code> includes either <code>FTP</code> or <code>FTPS</code>, then the <code>EndpointType</code> must be <code>VPC</code> and the <code>IdentityProviderType</code> must be either <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
84    /// <li>
85    /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
86    /// <li>
87    /// <p>If <code>Protocol</code> is set only to <code>SFTP</code>, the <code>EndpointType</code> can be set to <code>PUBLIC</code> and the <code>IdentityProviderType</code> can be set any of the supported identity types: <code>SERVICE_MANAGED</code>, <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
88    /// <li>
89    /// <p>If <code>Protocol</code> includes <code>AS2</code>, then the <code>EndpointType</code> must be <code>VPC</code>, and domain must be Amazon S3.</p></li>
90    /// </ul>
91    /// </note>
92    pub protocols: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>,
93    /// <p>The protocol settings that are configured for your server.</p><note>
94    /// <p>Avoid placing Network Load Balancers (NLBs) or NAT gateways in front of Transfer Family servers, as this increases costs and can cause performance issues, including reduced connection limits for FTPS. For more details, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/infrastructure-security.html#nlb-considerations"> Avoid placing NLBs and NATs in front of Transfer Family</a>.</p>
95    /// </note>
96    /// <ul>
97    /// <li>
98    /// <p>To indicate passive mode (for FTP and FTPS protocols), use the <code>PassiveIp</code> parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.</p></li>
99    /// <li>
100    /// <p>To ignore the error that is generated when the client attempts to use the <code>SETSTAT</code> command on a file that you are uploading to an Amazon S3 bucket, use the <code>SetStatOption</code> parameter. To have the Transfer Family server ignore the <code>SETSTAT</code> command and upload files without needing to make any changes to your SFTP client, set the value to <code>ENABLE_NO_OP</code>. If you set the <code>SetStatOption</code> parameter to <code>ENABLE_NO_OP</code>, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a <code>SETSTAT</code> call.</p></li>
101    /// <li>
102    /// <p>To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the <code>TlsSessionResumptionMode</code> parameter.</p></li>
103    /// <li>
104    /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
105    /// </ul>
106    pub protocol_details: ::std::option::Option<crate::types::ProtocolDetails>,
107    /// <p>Specifies the name of the security policy for the server.</p>
108    pub security_policy_name: ::std::option::Option<::std::string::String>,
109    /// <p>Key-value pairs that can be used to group and search for servers.</p>
110    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
111    /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
112    /// <p>In addition to a workflow to execute when a file is uploaded completely, <code>WorkflowDetails</code> can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when the server session disconnects while the file is still being uploaded.</p>
113    pub workflow_details: ::std::option::Option<crate::types::WorkflowDetails>,
114    /// <p>Specifies the log groups to which your server logs are sent.</p>
115    /// <p>To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:</p>
116    /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
117    /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
118    /// <p>If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an <code>update-server</code> call. For example:</p>
119    /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
120    pub structured_log_destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
121    /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized.</p>
122    /// <ul>
123    /// <li>
124    /// <p>If using the console, this is enabled by default.</p></li>
125    /// <li>
126    /// <p>If using the API or CLI, this is disabled by default.</p></li>
127    /// </ul>
128    /// <p>By default, home directory mappings have a <code>TYPE</code> of <code>DIRECTORY</code>. If you enable this option, you would then need to explicitly set the <code>HomeDirectoryMapEntry</code> <code>Type</code> to <code>FILE</code> if you want a mapping to have a file target.</p>
129    pub s3_storage_options: ::std::option::Option<crate::types::S3StorageOptions>,
130    /// <p>Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your Transfer Family endpoint. The default value is <code>IPV4</code>.</p><important>
131    /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
132    /// <ul>
133    /// <li>
134    /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
135    /// <li>
136    /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
137    /// </ul>
138    /// </important> <note>
139    /// <p>When using <code>DUALSTACK</code> as the <code>IpAddressType</code>, you cannot set the <code>AddressAllocationIds</code> parameter for the <a href="https://docs.aws.amazon.com/transfer/latest/APIReference/API_EndpointDetails.html">EndpointDetails</a> for the server.</p>
140    /// </note>
141    pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
142}
143impl CreateServerInput {
144    /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
145    /// <p>To request a new public certificate, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html">Request a public certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
146    /// <p>To import an existing certificate into ACM, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html">Importing certificates into ACM</a> in the <i>Certificate Manager User Guide</i>.</p>
147    /// <p>To request a private certificate to use FTPS through private IP addresses, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html">Request a private certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
148    /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
149    /// <ul>
150    /// <li>
151    /// <p>2048-bit RSA (RSA_2048)</p></li>
152    /// <li>
153    /// <p>4096-bit RSA (RSA_4096)</p></li>
154    /// <li>
155    /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
156    /// <li>
157    /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
158    /// <li>
159    /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
160    /// </ul><note>
161    /// <p>The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and information about the issuer.</p>
162    /// </note>
163    pub fn certificate(&self) -> ::std::option::Option<&str> {
164        self.certificate.as_deref()
165    }
166    /// <p>The domain of the storage system that is used for file transfers. There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.</p><note>
167    /// <p>After the server is created, the domain cannot be changed.</p>
168    /// </note>
169    pub fn domain(&self) -> ::std::option::Option<&crate::types::Domain> {
170        self.domain.as_ref()
171    }
172    /// <p>The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.</p>
173    pub fn endpoint_details(&self) -> ::std::option::Option<&crate::types::EndpointDetails> {
174        self.endpoint_details.as_ref()
175    }
176    /// <p>The type of endpoint that you want your server to use. You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it.</p><note>
177    /// <p>After May 19, 2021, you won't be able to create a server using <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account if your account hasn't already done so before May 19, 2021. If you have already created servers with <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use <code>EndpointType</code>=<code>VPC</code>.</p>
178    /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
179    /// <p>It is recommended that you use <code>VPC</code> as the <code>EndpointType</code>. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with <code>EndpointType</code> set to <code>VPC_ENDPOINT</code>.</p>
180    /// </note>
181    pub fn endpoint_type(&self) -> ::std::option::Option<&crate::types::EndpointType> {
182        self.endpoint_type.as_ref()
183    }
184    /// <p>The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.</p>
185    /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
186    /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
187    /// <p>Use a minimum value of 2048 for the <code>-b</code> option. You can create a stronger key by using 3072 or 4096.</p>
188    /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
189    /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
190    /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
191    /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
192    /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
193    /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
194    /// <p>If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't update the host key. Accidentally changing a server's host key can be disruptive.</p>
195    /// </important>
196    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key">Manage host keys for your SFTP-enabled server</a> in the <i>Transfer Family User Guide</i>.</p>
197    pub fn host_key(&self) -> ::std::option::Option<&str> {
198        self.host_key.as_deref()
199    }
200    /// <p>Required when <code>IdentityProviderType</code> is set to <code>AWS_DIRECTORY_SERVICE</code>, <code>Amazon Web Services_LAMBDA</code> or <code>API_GATEWAY</code>. Accepts an array containing all of the information required to use a directory in <code>AWS_DIRECTORY_SERVICE</code> or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified when <code>IdentityProviderType</code> is set to <code>SERVICE_MANAGED</code>.</p>
201    pub fn identity_provider_details(&self) -> ::std::option::Option<&crate::types::IdentityProviderDetails> {
202        self.identity_provider_details.as_ref()
203    }
204    /// <p>The mode of authentication for a server. The default value is <code>SERVICE_MANAGED</code>, which allows you to store and access user credentials within the Transfer Family service.</p>
205    /// <p>Use <code>AWS_DIRECTORY_SERVICE</code> to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services using AD Connector. This option also requires you to provide a Directory ID by using the <code>IdentityProviderDetails</code> parameter.</p>
206    /// <p>Use the <code>API_GATEWAY</code> value to integrate with an identity provider of your choosing. The <code>API_GATEWAY</code> setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the <code>IdentityProviderDetails</code> parameter.</p>
207    /// <p>Use the <code>AWS_LAMBDA</code> value to directly use an Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the <code>Function</code> parameter for the <code>IdentityProviderDetails</code> data type.</p>
208    pub fn identity_provider_type(&self) -> ::std::option::Option<&crate::types::IdentityProviderType> {
209        self.identity_provider_type.as_ref()
210    }
211    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events. When set, you can view user activity in your CloudWatch logs.</p>
212    pub fn logging_role(&self) -> ::std::option::Option<&str> {
213        self.logging_role.as_deref()
214    }
215    /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
216    /// <p>The SFTP protocol does not support post-authentication display banners.</p>
217    /// </note>
218    pub fn post_authentication_login_banner(&self) -> ::std::option::Option<&str> {
219        self.post_authentication_login_banner.as_deref()
220    }
221    /// <p>Specifies a string to display when users connect to a server. This string is displayed before the user authenticates. For example, the following banner displays details about using the system:</p>
222    /// <p><code>This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.</code></p>
223    pub fn pre_authentication_login_banner(&self) -> ::std::option::Option<&str> {
224        self.pre_authentication_login_banner.as_deref()
225    }
226    /// <p>Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. The available protocols are:</p>
227    /// <ul>
228    /// <li>
229    /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
230    /// <li>
231    /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
232    /// <li>
233    /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
234    /// <li>
235    /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
236    /// </ul><note>
237    /// <ul>
238    /// <li>
239    /// <p>If you select <code>FTPS</code>, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.</p></li>
240    /// <li>
241    /// <p>If <code>Protocol</code> includes either <code>FTP</code> or <code>FTPS</code>, then the <code>EndpointType</code> must be <code>VPC</code> and the <code>IdentityProviderType</code> must be either <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
242    /// <li>
243    /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
244    /// <li>
245    /// <p>If <code>Protocol</code> is set only to <code>SFTP</code>, the <code>EndpointType</code> can be set to <code>PUBLIC</code> and the <code>IdentityProviderType</code> can be set any of the supported identity types: <code>SERVICE_MANAGED</code>, <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
246    /// <li>
247    /// <p>If <code>Protocol</code> includes <code>AS2</code>, then the <code>EndpointType</code> must be <code>VPC</code>, and domain must be Amazon S3.</p></li>
248    /// </ul>
249    /// </note>
250    ///
251    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.protocols.is_none()`.
252    pub fn protocols(&self) -> &[crate::types::Protocol] {
253        self.protocols.as_deref().unwrap_or_default()
254    }
255    /// <p>The protocol settings that are configured for your server.</p><note>
256    /// <p>Avoid placing Network Load Balancers (NLBs) or NAT gateways in front of Transfer Family servers, as this increases costs and can cause performance issues, including reduced connection limits for FTPS. For more details, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/infrastructure-security.html#nlb-considerations"> Avoid placing NLBs and NATs in front of Transfer Family</a>.</p>
257    /// </note>
258    /// <ul>
259    /// <li>
260    /// <p>To indicate passive mode (for FTP and FTPS protocols), use the <code>PassiveIp</code> parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.</p></li>
261    /// <li>
262    /// <p>To ignore the error that is generated when the client attempts to use the <code>SETSTAT</code> command on a file that you are uploading to an Amazon S3 bucket, use the <code>SetStatOption</code> parameter. To have the Transfer Family server ignore the <code>SETSTAT</code> command and upload files without needing to make any changes to your SFTP client, set the value to <code>ENABLE_NO_OP</code>. If you set the <code>SetStatOption</code> parameter to <code>ENABLE_NO_OP</code>, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a <code>SETSTAT</code> call.</p></li>
263    /// <li>
264    /// <p>To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the <code>TlsSessionResumptionMode</code> parameter.</p></li>
265    /// <li>
266    /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
267    /// </ul>
268    pub fn protocol_details(&self) -> ::std::option::Option<&crate::types::ProtocolDetails> {
269        self.protocol_details.as_ref()
270    }
271    /// <p>Specifies the name of the security policy for the server.</p>
272    pub fn security_policy_name(&self) -> ::std::option::Option<&str> {
273        self.security_policy_name.as_deref()
274    }
275    /// <p>Key-value pairs that can be used to group and search for servers.</p>
276    ///
277    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
278    pub fn tags(&self) -> &[crate::types::Tag] {
279        self.tags.as_deref().unwrap_or_default()
280    }
281    /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
282    /// <p>In addition to a workflow to execute when a file is uploaded completely, <code>WorkflowDetails</code> can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when the server session disconnects while the file is still being uploaded.</p>
283    pub fn workflow_details(&self) -> ::std::option::Option<&crate::types::WorkflowDetails> {
284        self.workflow_details.as_ref()
285    }
286    /// <p>Specifies the log groups to which your server logs are sent.</p>
287    /// <p>To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:</p>
288    /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
289    /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
290    /// <p>If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an <code>update-server</code> call. For example:</p>
291    /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
292    ///
293    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.structured_log_destinations.is_none()`.
294    pub fn structured_log_destinations(&self) -> &[::std::string::String] {
295        self.structured_log_destinations.as_deref().unwrap_or_default()
296    }
297    /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized.</p>
298    /// <ul>
299    /// <li>
300    /// <p>If using the console, this is enabled by default.</p></li>
301    /// <li>
302    /// <p>If using the API or CLI, this is disabled by default.</p></li>
303    /// </ul>
304    /// <p>By default, home directory mappings have a <code>TYPE</code> of <code>DIRECTORY</code>. If you enable this option, you would then need to explicitly set the <code>HomeDirectoryMapEntry</code> <code>Type</code> to <code>FILE</code> if you want a mapping to have a file target.</p>
305    pub fn s3_storage_options(&self) -> ::std::option::Option<&crate::types::S3StorageOptions> {
306        self.s3_storage_options.as_ref()
307    }
308    /// <p>Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your Transfer Family endpoint. The default value is <code>IPV4</code>.</p><important>
309    /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
310    /// <ul>
311    /// <li>
312    /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
313    /// <li>
314    /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
315    /// </ul>
316    /// </important> <note>
317    /// <p>When using <code>DUALSTACK</code> as the <code>IpAddressType</code>, you cannot set the <code>AddressAllocationIds</code> parameter for the <a href="https://docs.aws.amazon.com/transfer/latest/APIReference/API_EndpointDetails.html">EndpointDetails</a> for the server.</p>
318    /// </note>
319    pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
320        self.ip_address_type.as_ref()
321    }
322}
323impl ::std::fmt::Debug for CreateServerInput {
324    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
325        let mut formatter = f.debug_struct("CreateServerInput");
326        formatter.field("certificate", &self.certificate);
327        formatter.field("domain", &self.domain);
328        formatter.field("endpoint_details", &self.endpoint_details);
329        formatter.field("endpoint_type", &self.endpoint_type);
330        formatter.field("host_key", &"*** Sensitive Data Redacted ***");
331        formatter.field("identity_provider_details", &self.identity_provider_details);
332        formatter.field("identity_provider_type", &self.identity_provider_type);
333        formatter.field("logging_role", &self.logging_role);
334        formatter.field("post_authentication_login_banner", &self.post_authentication_login_banner);
335        formatter.field("pre_authentication_login_banner", &self.pre_authentication_login_banner);
336        formatter.field("protocols", &self.protocols);
337        formatter.field("protocol_details", &self.protocol_details);
338        formatter.field("security_policy_name", &self.security_policy_name);
339        formatter.field("tags", &self.tags);
340        formatter.field("workflow_details", &self.workflow_details);
341        formatter.field("structured_log_destinations", &self.structured_log_destinations);
342        formatter.field("s3_storage_options", &self.s3_storage_options);
343        formatter.field("ip_address_type", &self.ip_address_type);
344        formatter.finish()
345    }
346}
347impl CreateServerInput {
348    /// Creates a new builder-style object to manufacture [`CreateServerInput`](crate::operation::create_server::CreateServerInput).
349    pub fn builder() -> crate::operation::create_server::builders::CreateServerInputBuilder {
350        crate::operation::create_server::builders::CreateServerInputBuilder::default()
351    }
352}
353
354/// A builder for [`CreateServerInput`](crate::operation::create_server::CreateServerInput).
355#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
356#[non_exhaustive]
357pub struct CreateServerInputBuilder {
358    pub(crate) certificate: ::std::option::Option<::std::string::String>,
359    pub(crate) domain: ::std::option::Option<crate::types::Domain>,
360    pub(crate) endpoint_details: ::std::option::Option<crate::types::EndpointDetails>,
361    pub(crate) endpoint_type: ::std::option::Option<crate::types::EndpointType>,
362    pub(crate) host_key: ::std::option::Option<::std::string::String>,
363    pub(crate) identity_provider_details: ::std::option::Option<crate::types::IdentityProviderDetails>,
364    pub(crate) identity_provider_type: ::std::option::Option<crate::types::IdentityProviderType>,
365    pub(crate) logging_role: ::std::option::Option<::std::string::String>,
366    pub(crate) post_authentication_login_banner: ::std::option::Option<::std::string::String>,
367    pub(crate) pre_authentication_login_banner: ::std::option::Option<::std::string::String>,
368    pub(crate) protocols: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>,
369    pub(crate) protocol_details: ::std::option::Option<crate::types::ProtocolDetails>,
370    pub(crate) security_policy_name: ::std::option::Option<::std::string::String>,
371    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
372    pub(crate) workflow_details: ::std::option::Option<crate::types::WorkflowDetails>,
373    pub(crate) structured_log_destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
374    pub(crate) s3_storage_options: ::std::option::Option<crate::types::S3StorageOptions>,
375    pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
376}
377impl CreateServerInputBuilder {
378    /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
379    /// <p>To request a new public certificate, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html">Request a public certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
380    /// <p>To import an existing certificate into ACM, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html">Importing certificates into ACM</a> in the <i>Certificate Manager User Guide</i>.</p>
381    /// <p>To request a private certificate to use FTPS through private IP addresses, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html">Request a private certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
382    /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
383    /// <ul>
384    /// <li>
385    /// <p>2048-bit RSA (RSA_2048)</p></li>
386    /// <li>
387    /// <p>4096-bit RSA (RSA_4096)</p></li>
388    /// <li>
389    /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
390    /// <li>
391    /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
392    /// <li>
393    /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
394    /// </ul><note>
395    /// <p>The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and information about the issuer.</p>
396    /// </note>
397    pub fn certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
398        self.certificate = ::std::option::Option::Some(input.into());
399        self
400    }
401    /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
402    /// <p>To request a new public certificate, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html">Request a public certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
403    /// <p>To import an existing certificate into ACM, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html">Importing certificates into ACM</a> in the <i>Certificate Manager User Guide</i>.</p>
404    /// <p>To request a private certificate to use FTPS through private IP addresses, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html">Request a private certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
405    /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
406    /// <ul>
407    /// <li>
408    /// <p>2048-bit RSA (RSA_2048)</p></li>
409    /// <li>
410    /// <p>4096-bit RSA (RSA_4096)</p></li>
411    /// <li>
412    /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
413    /// <li>
414    /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
415    /// <li>
416    /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
417    /// </ul><note>
418    /// <p>The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and information about the issuer.</p>
419    /// </note>
420    pub fn set_certificate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
421        self.certificate = input;
422        self
423    }
424    /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
425    /// <p>To request a new public certificate, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html">Request a public certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
426    /// <p>To import an existing certificate into ACM, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html">Importing certificates into ACM</a> in the <i>Certificate Manager User Guide</i>.</p>
427    /// <p>To request a private certificate to use FTPS through private IP addresses, see <a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html">Request a private certificate</a> in the <i>Certificate Manager User Guide</i>.</p>
428    /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
429    /// <ul>
430    /// <li>
431    /// <p>2048-bit RSA (RSA_2048)</p></li>
432    /// <li>
433    /// <p>4096-bit RSA (RSA_4096)</p></li>
434    /// <li>
435    /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
436    /// <li>
437    /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
438    /// <li>
439    /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
440    /// </ul><note>
441    /// <p>The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and information about the issuer.</p>
442    /// </note>
443    pub fn get_certificate(&self) -> &::std::option::Option<::std::string::String> {
444        &self.certificate
445    }
446    /// <p>The domain of the storage system that is used for file transfers. There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.</p><note>
447    /// <p>After the server is created, the domain cannot be changed.</p>
448    /// </note>
449    pub fn domain(mut self, input: crate::types::Domain) -> Self {
450        self.domain = ::std::option::Option::Some(input);
451        self
452    }
453    /// <p>The domain of the storage system that is used for file transfers. There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.</p><note>
454    /// <p>After the server is created, the domain cannot be changed.</p>
455    /// </note>
456    pub fn set_domain(mut self, input: ::std::option::Option<crate::types::Domain>) -> Self {
457        self.domain = input;
458        self
459    }
460    /// <p>The domain of the storage system that is used for file transfers. There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.</p><note>
461    /// <p>After the server is created, the domain cannot be changed.</p>
462    /// </note>
463    pub fn get_domain(&self) -> &::std::option::Option<crate::types::Domain> {
464        &self.domain
465    }
466    /// <p>The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.</p>
467    pub fn endpoint_details(mut self, input: crate::types::EndpointDetails) -> Self {
468        self.endpoint_details = ::std::option::Option::Some(input);
469        self
470    }
471    /// <p>The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.</p>
472    pub fn set_endpoint_details(mut self, input: ::std::option::Option<crate::types::EndpointDetails>) -> Self {
473        self.endpoint_details = input;
474        self
475    }
476    /// <p>The virtual private cloud (VPC) endpoint settings that are configured for your server. When you host your endpoint within your VPC, you can make your endpoint accessible only to resources within your VPC, or you can attach Elastic IP addresses and make your endpoint accessible to clients over the internet. Your VPC's default security groups are automatically assigned to your endpoint.</p>
477    pub fn get_endpoint_details(&self) -> &::std::option::Option<crate::types::EndpointDetails> {
478        &self.endpoint_details
479    }
480    /// <p>The type of endpoint that you want your server to use. You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it.</p><note>
481    /// <p>After May 19, 2021, you won't be able to create a server using <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account if your account hasn't already done so before May 19, 2021. If you have already created servers with <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use <code>EndpointType</code>=<code>VPC</code>.</p>
482    /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
483    /// <p>It is recommended that you use <code>VPC</code> as the <code>EndpointType</code>. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with <code>EndpointType</code> set to <code>VPC_ENDPOINT</code>.</p>
484    /// </note>
485    pub fn endpoint_type(mut self, input: crate::types::EndpointType) -> Self {
486        self.endpoint_type = ::std::option::Option::Some(input);
487        self
488    }
489    /// <p>The type of endpoint that you want your server to use. You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it.</p><note>
490    /// <p>After May 19, 2021, you won't be able to create a server using <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account if your account hasn't already done so before May 19, 2021. If you have already created servers with <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use <code>EndpointType</code>=<code>VPC</code>.</p>
491    /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
492    /// <p>It is recommended that you use <code>VPC</code> as the <code>EndpointType</code>. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with <code>EndpointType</code> set to <code>VPC_ENDPOINT</code>.</p>
493    /// </note>
494    pub fn set_endpoint_type(mut self, input: ::std::option::Option<crate::types::EndpointType>) -> Self {
495        self.endpoint_type = input;
496        self
497    }
498    /// <p>The type of endpoint that you want your server to use. You can choose to make your server's endpoint publicly accessible (PUBLIC) or host it inside your VPC. With an endpoint that is hosted in a VPC, you can restrict access to your server and resources only within your VPC or choose to make it internet facing by attaching Elastic IP addresses directly to it.</p><note>
499    /// <p>After May 19, 2021, you won't be able to create a server using <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account if your account hasn't already done so before May 19, 2021. If you have already created servers with <code>EndpointType=VPC_ENDPOINT</code> in your Amazon Web Services account on or before May 19, 2021, you will not be affected. After this date, use <code>EndpointType</code>=<code>VPC</code>.</p>
500    /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
501    /// <p>It is recommended that you use <code>VPC</code> as the <code>EndpointType</code>. With this endpoint type, you have the option to directly associate up to three Elastic IPv4 addresses (BYO IP included) with your server's endpoint and use VPC security groups to restrict traffic by the client's public IP address. This is not possible with <code>EndpointType</code> set to <code>VPC_ENDPOINT</code>.</p>
502    /// </note>
503    pub fn get_endpoint_type(&self) -> &::std::option::Option<crate::types::EndpointType> {
504        &self.endpoint_type
505    }
506    /// <p>The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.</p>
507    /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
508    /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
509    /// <p>Use a minimum value of 2048 for the <code>-b</code> option. You can create a stronger key by using 3072 or 4096.</p>
510    /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
511    /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
512    /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
513    /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
514    /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
515    /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
516    /// <p>If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't update the host key. Accidentally changing a server's host key can be disruptive.</p>
517    /// </important>
518    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key">Manage host keys for your SFTP-enabled server</a> in the <i>Transfer Family User Guide</i>.</p>
519    pub fn host_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
520        self.host_key = ::std::option::Option::Some(input.into());
521        self
522    }
523    /// <p>The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.</p>
524    /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
525    /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
526    /// <p>Use a minimum value of 2048 for the <code>-b</code> option. You can create a stronger key by using 3072 or 4096.</p>
527    /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
528    /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
529    /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
530    /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
531    /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
532    /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
533    /// <p>If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't update the host key. Accidentally changing a server's host key can be disruptive.</p>
534    /// </important>
535    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key">Manage host keys for your SFTP-enabled server</a> in the <i>Transfer Family User Guide</i>.</p>
536    pub fn set_host_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
537        self.host_key = input;
538        self
539    }
540    /// <p>The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You can add multiple host keys, in case you want to rotate keys, or have a set of active keys that use different algorithms.</p>
541    /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
542    /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
543    /// <p>Use a minimum value of 2048 for the <code>-b</code> option. You can create a stronger key by using 3072 or 4096.</p>
544    /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
545    /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
546    /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
547    /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
548    /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
549    /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
550    /// <p>If you aren't planning to migrate existing users from an existing SFTP-enabled server to a new server, don't update the host key. Accidentally changing a server's host key can be disruptive.</p>
551    /// </important>
552    /// <p>For more information, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key">Manage host keys for your SFTP-enabled server</a> in the <i>Transfer Family User Guide</i>.</p>
553    pub fn get_host_key(&self) -> &::std::option::Option<::std::string::String> {
554        &self.host_key
555    }
556    /// <p>Required when <code>IdentityProviderType</code> is set to <code>AWS_DIRECTORY_SERVICE</code>, <code>Amazon Web Services_LAMBDA</code> or <code>API_GATEWAY</code>. Accepts an array containing all of the information required to use a directory in <code>AWS_DIRECTORY_SERVICE</code> or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified when <code>IdentityProviderType</code> is set to <code>SERVICE_MANAGED</code>.</p>
557    pub fn identity_provider_details(mut self, input: crate::types::IdentityProviderDetails) -> Self {
558        self.identity_provider_details = ::std::option::Option::Some(input);
559        self
560    }
561    /// <p>Required when <code>IdentityProviderType</code> is set to <code>AWS_DIRECTORY_SERVICE</code>, <code>Amazon Web Services_LAMBDA</code> or <code>API_GATEWAY</code>. Accepts an array containing all of the information required to use a directory in <code>AWS_DIRECTORY_SERVICE</code> or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified when <code>IdentityProviderType</code> is set to <code>SERVICE_MANAGED</code>.</p>
562    pub fn set_identity_provider_details(mut self, input: ::std::option::Option<crate::types::IdentityProviderDetails>) -> Self {
563        self.identity_provider_details = input;
564        self
565    }
566    /// <p>Required when <code>IdentityProviderType</code> is set to <code>AWS_DIRECTORY_SERVICE</code>, <code>Amazon Web Services_LAMBDA</code> or <code>API_GATEWAY</code>. Accepts an array containing all of the information required to use a directory in <code>AWS_DIRECTORY_SERVICE</code> or invoke a customer-supplied authentication API, including the API Gateway URL. Cannot be specified when <code>IdentityProviderType</code> is set to <code>SERVICE_MANAGED</code>.</p>
567    pub fn get_identity_provider_details(&self) -> &::std::option::Option<crate::types::IdentityProviderDetails> {
568        &self.identity_provider_details
569    }
570    /// <p>The mode of authentication for a server. The default value is <code>SERVICE_MANAGED</code>, which allows you to store and access user credentials within the Transfer Family service.</p>
571    /// <p>Use <code>AWS_DIRECTORY_SERVICE</code> to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services using AD Connector. This option also requires you to provide a Directory ID by using the <code>IdentityProviderDetails</code> parameter.</p>
572    /// <p>Use the <code>API_GATEWAY</code> value to integrate with an identity provider of your choosing. The <code>API_GATEWAY</code> setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the <code>IdentityProviderDetails</code> parameter.</p>
573    /// <p>Use the <code>AWS_LAMBDA</code> value to directly use an Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the <code>Function</code> parameter for the <code>IdentityProviderDetails</code> data type.</p>
574    pub fn identity_provider_type(mut self, input: crate::types::IdentityProviderType) -> Self {
575        self.identity_provider_type = ::std::option::Option::Some(input);
576        self
577    }
578    /// <p>The mode of authentication for a server. The default value is <code>SERVICE_MANAGED</code>, which allows you to store and access user credentials within the Transfer Family service.</p>
579    /// <p>Use <code>AWS_DIRECTORY_SERVICE</code> to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services using AD Connector. This option also requires you to provide a Directory ID by using the <code>IdentityProviderDetails</code> parameter.</p>
580    /// <p>Use the <code>API_GATEWAY</code> value to integrate with an identity provider of your choosing. The <code>API_GATEWAY</code> setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the <code>IdentityProviderDetails</code> parameter.</p>
581    /// <p>Use the <code>AWS_LAMBDA</code> value to directly use an Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the <code>Function</code> parameter for the <code>IdentityProviderDetails</code> data type.</p>
582    pub fn set_identity_provider_type(mut self, input: ::std::option::Option<crate::types::IdentityProviderType>) -> Self {
583        self.identity_provider_type = input;
584        self
585    }
586    /// <p>The mode of authentication for a server. The default value is <code>SERVICE_MANAGED</code>, which allows you to store and access user credentials within the Transfer Family service.</p>
587    /// <p>Use <code>AWS_DIRECTORY_SERVICE</code> to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services using AD Connector. This option also requires you to provide a Directory ID by using the <code>IdentityProviderDetails</code> parameter.</p>
588    /// <p>Use the <code>API_GATEWAY</code> value to integrate with an identity provider of your choosing. The <code>API_GATEWAY</code> setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the <code>IdentityProviderDetails</code> parameter.</p>
589    /// <p>Use the <code>AWS_LAMBDA</code> value to directly use an Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the <code>Function</code> parameter for the <code>IdentityProviderDetails</code> data type.</p>
590    pub fn get_identity_provider_type(&self) -> &::std::option::Option<crate::types::IdentityProviderType> {
591        &self.identity_provider_type
592    }
593    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events. When set, you can view user activity in your CloudWatch logs.</p>
594    pub fn logging_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
595        self.logging_role = ::std::option::Option::Some(input.into());
596        self
597    }
598    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events. When set, you can view user activity in your CloudWatch logs.</p>
599    pub fn set_logging_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
600        self.logging_role = input;
601        self
602    }
603    /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events. When set, you can view user activity in your CloudWatch logs.</p>
604    pub fn get_logging_role(&self) -> &::std::option::Option<::std::string::String> {
605        &self.logging_role
606    }
607    /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
608    /// <p>The SFTP protocol does not support post-authentication display banners.</p>
609    /// </note>
610    pub fn post_authentication_login_banner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
611        self.post_authentication_login_banner = ::std::option::Option::Some(input.into());
612        self
613    }
614    /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
615    /// <p>The SFTP protocol does not support post-authentication display banners.</p>
616    /// </note>
617    pub fn set_post_authentication_login_banner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
618        self.post_authentication_login_banner = input;
619        self
620    }
621    /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
622    /// <p>The SFTP protocol does not support post-authentication display banners.</p>
623    /// </note>
624    pub fn get_post_authentication_login_banner(&self) -> &::std::option::Option<::std::string::String> {
625        &self.post_authentication_login_banner
626    }
627    /// <p>Specifies a string to display when users connect to a server. This string is displayed before the user authenticates. For example, the following banner displays details about using the system:</p>
628    /// <p><code>This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.</code></p>
629    pub fn pre_authentication_login_banner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
630        self.pre_authentication_login_banner = ::std::option::Option::Some(input.into());
631        self
632    }
633    /// <p>Specifies a string to display when users connect to a server. This string is displayed before the user authenticates. For example, the following banner displays details about using the system:</p>
634    /// <p><code>This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.</code></p>
635    pub fn set_pre_authentication_login_banner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
636        self.pre_authentication_login_banner = input;
637        self
638    }
639    /// <p>Specifies a string to display when users connect to a server. This string is displayed before the user authenticates. For example, the following banner displays details about using the system:</p>
640    /// <p><code>This system is for the use of authorized users only. Individuals using this computer system without authority, or in excess of their authority, are subject to having all of their activities on this system monitored and recorded by system personnel.</code></p>
641    pub fn get_pre_authentication_login_banner(&self) -> &::std::option::Option<::std::string::String> {
642        &self.pre_authentication_login_banner
643    }
644    /// Appends an item to `protocols`.
645    ///
646    /// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
647    ///
648    /// <p>Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. The available protocols are:</p>
649    /// <ul>
650    /// <li>
651    /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
652    /// <li>
653    /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
654    /// <li>
655    /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
656    /// <li>
657    /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
658    /// </ul><note>
659    /// <ul>
660    /// <li>
661    /// <p>If you select <code>FTPS</code>, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.</p></li>
662    /// <li>
663    /// <p>If <code>Protocol</code> includes either <code>FTP</code> or <code>FTPS</code>, then the <code>EndpointType</code> must be <code>VPC</code> and the <code>IdentityProviderType</code> must be either <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
664    /// <li>
665    /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
666    /// <li>
667    /// <p>If <code>Protocol</code> is set only to <code>SFTP</code>, the <code>EndpointType</code> can be set to <code>PUBLIC</code> and the <code>IdentityProviderType</code> can be set any of the supported identity types: <code>SERVICE_MANAGED</code>, <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
668    /// <li>
669    /// <p>If <code>Protocol</code> includes <code>AS2</code>, then the <code>EndpointType</code> must be <code>VPC</code>, and domain must be Amazon S3.</p></li>
670    /// </ul>
671    /// </note>
672    pub fn protocols(mut self, input: crate::types::Protocol) -> Self {
673        let mut v = self.protocols.unwrap_or_default();
674        v.push(input);
675        self.protocols = ::std::option::Option::Some(v);
676        self
677    }
678    /// <p>Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. The available protocols are:</p>
679    /// <ul>
680    /// <li>
681    /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
682    /// <li>
683    /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
684    /// <li>
685    /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
686    /// <li>
687    /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
688    /// </ul><note>
689    /// <ul>
690    /// <li>
691    /// <p>If you select <code>FTPS</code>, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.</p></li>
692    /// <li>
693    /// <p>If <code>Protocol</code> includes either <code>FTP</code> or <code>FTPS</code>, then the <code>EndpointType</code> must be <code>VPC</code> and the <code>IdentityProviderType</code> must be either <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
694    /// <li>
695    /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
696    /// <li>
697    /// <p>If <code>Protocol</code> is set only to <code>SFTP</code>, the <code>EndpointType</code> can be set to <code>PUBLIC</code> and the <code>IdentityProviderType</code> can be set any of the supported identity types: <code>SERVICE_MANAGED</code>, <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
698    /// <li>
699    /// <p>If <code>Protocol</code> includes <code>AS2</code>, then the <code>EndpointType</code> must be <code>VPC</code>, and domain must be Amazon S3.</p></li>
700    /// </ul>
701    /// </note>
702    pub fn set_protocols(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>) -> Self {
703        self.protocols = input;
704        self
705    }
706    /// <p>Specifies the file transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. The available protocols are:</p>
707    /// <ul>
708    /// <li>
709    /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
710    /// <li>
711    /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
712    /// <li>
713    /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
714    /// <li>
715    /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
716    /// </ul><note>
717    /// <ul>
718    /// <li>
719    /// <p>If you select <code>FTPS</code>, you must choose a certificate stored in Certificate Manager (ACM) which is used to identify your server when clients connect to it over FTPS.</p></li>
720    /// <li>
721    /// <p>If <code>Protocol</code> includes either <code>FTP</code> or <code>FTPS</code>, then the <code>EndpointType</code> must be <code>VPC</code> and the <code>IdentityProviderType</code> must be either <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
722    /// <li>
723    /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
724    /// <li>
725    /// <p>If <code>Protocol</code> is set only to <code>SFTP</code>, the <code>EndpointType</code> can be set to <code>PUBLIC</code> and the <code>IdentityProviderType</code> can be set any of the supported identity types: <code>SERVICE_MANAGED</code>, <code>AWS_DIRECTORY_SERVICE</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p></li>
726    /// <li>
727    /// <p>If <code>Protocol</code> includes <code>AS2</code>, then the <code>EndpointType</code> must be <code>VPC</code>, and domain must be Amazon S3.</p></li>
728    /// </ul>
729    /// </note>
730    pub fn get_protocols(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Protocol>> {
731        &self.protocols
732    }
733    /// <p>The protocol settings that are configured for your server.</p><note>
734    /// <p>Avoid placing Network Load Balancers (NLBs) or NAT gateways in front of Transfer Family servers, as this increases costs and can cause performance issues, including reduced connection limits for FTPS. For more details, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/infrastructure-security.html#nlb-considerations"> Avoid placing NLBs and NATs in front of Transfer Family</a>.</p>
735    /// </note>
736    /// <ul>
737    /// <li>
738    /// <p>To indicate passive mode (for FTP and FTPS protocols), use the <code>PassiveIp</code> parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.</p></li>
739    /// <li>
740    /// <p>To ignore the error that is generated when the client attempts to use the <code>SETSTAT</code> command on a file that you are uploading to an Amazon S3 bucket, use the <code>SetStatOption</code> parameter. To have the Transfer Family server ignore the <code>SETSTAT</code> command and upload files without needing to make any changes to your SFTP client, set the value to <code>ENABLE_NO_OP</code>. If you set the <code>SetStatOption</code> parameter to <code>ENABLE_NO_OP</code>, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a <code>SETSTAT</code> call.</p></li>
741    /// <li>
742    /// <p>To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the <code>TlsSessionResumptionMode</code> parameter.</p></li>
743    /// <li>
744    /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
745    /// </ul>
746    pub fn protocol_details(mut self, input: crate::types::ProtocolDetails) -> Self {
747        self.protocol_details = ::std::option::Option::Some(input);
748        self
749    }
750    /// <p>The protocol settings that are configured for your server.</p><note>
751    /// <p>Avoid placing Network Load Balancers (NLBs) or NAT gateways in front of Transfer Family servers, as this increases costs and can cause performance issues, including reduced connection limits for FTPS. For more details, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/infrastructure-security.html#nlb-considerations"> Avoid placing NLBs and NATs in front of Transfer Family</a>.</p>
752    /// </note>
753    /// <ul>
754    /// <li>
755    /// <p>To indicate passive mode (for FTP and FTPS protocols), use the <code>PassiveIp</code> parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.</p></li>
756    /// <li>
757    /// <p>To ignore the error that is generated when the client attempts to use the <code>SETSTAT</code> command on a file that you are uploading to an Amazon S3 bucket, use the <code>SetStatOption</code> parameter. To have the Transfer Family server ignore the <code>SETSTAT</code> command and upload files without needing to make any changes to your SFTP client, set the value to <code>ENABLE_NO_OP</code>. If you set the <code>SetStatOption</code> parameter to <code>ENABLE_NO_OP</code>, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a <code>SETSTAT</code> call.</p></li>
758    /// <li>
759    /// <p>To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the <code>TlsSessionResumptionMode</code> parameter.</p></li>
760    /// <li>
761    /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
762    /// </ul>
763    pub fn set_protocol_details(mut self, input: ::std::option::Option<crate::types::ProtocolDetails>) -> Self {
764        self.protocol_details = input;
765        self
766    }
767    /// <p>The protocol settings that are configured for your server.</p><note>
768    /// <p>Avoid placing Network Load Balancers (NLBs) or NAT gateways in front of Transfer Family servers, as this increases costs and can cause performance issues, including reduced connection limits for FTPS. For more details, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/infrastructure-security.html#nlb-considerations"> Avoid placing NLBs and NATs in front of Transfer Family</a>.</p>
769    /// </note>
770    /// <ul>
771    /// <li>
772    /// <p>To indicate passive mode (for FTP and FTPS protocols), use the <code>PassiveIp</code> parameter. Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.</p></li>
773    /// <li>
774    /// <p>To ignore the error that is generated when the client attempts to use the <code>SETSTAT</code> command on a file that you are uploading to an Amazon S3 bucket, use the <code>SetStatOption</code> parameter. To have the Transfer Family server ignore the <code>SETSTAT</code> command and upload files without needing to make any changes to your SFTP client, set the value to <code>ENABLE_NO_OP</code>. If you set the <code>SetStatOption</code> parameter to <code>ENABLE_NO_OP</code>, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a <code>SETSTAT</code> call.</p></li>
775    /// <li>
776    /// <p>To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session ID, use the <code>TlsSessionResumptionMode</code> parameter.</p></li>
777    /// <li>
778    /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
779    /// </ul>
780    pub fn get_protocol_details(&self) -> &::std::option::Option<crate::types::ProtocolDetails> {
781        &self.protocol_details
782    }
783    /// <p>Specifies the name of the security policy for the server.</p>
784    pub fn security_policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
785        self.security_policy_name = ::std::option::Option::Some(input.into());
786        self
787    }
788    /// <p>Specifies the name of the security policy for the server.</p>
789    pub fn set_security_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
790        self.security_policy_name = input;
791        self
792    }
793    /// <p>Specifies the name of the security policy for the server.</p>
794    pub fn get_security_policy_name(&self) -> &::std::option::Option<::std::string::String> {
795        &self.security_policy_name
796    }
797    /// Appends an item to `tags`.
798    ///
799    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
800    ///
801    /// <p>Key-value pairs that can be used to group and search for servers.</p>
802    pub fn tags(mut self, input: crate::types::Tag) -> Self {
803        let mut v = self.tags.unwrap_or_default();
804        v.push(input);
805        self.tags = ::std::option::Option::Some(v);
806        self
807    }
808    /// <p>Key-value pairs that can be used to group and search for servers.</p>
809    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
810        self.tags = input;
811        self
812    }
813    /// <p>Key-value pairs that can be used to group and search for servers.</p>
814    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
815        &self.tags
816    }
817    /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
818    /// <p>In addition to a workflow to execute when a file is uploaded completely, <code>WorkflowDetails</code> can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when the server session disconnects while the file is still being uploaded.</p>
819    pub fn workflow_details(mut self, input: crate::types::WorkflowDetails) -> Self {
820        self.workflow_details = ::std::option::Option::Some(input);
821        self
822    }
823    /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
824    /// <p>In addition to a workflow to execute when a file is uploaded completely, <code>WorkflowDetails</code> can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when the server session disconnects while the file is still being uploaded.</p>
825    pub fn set_workflow_details(mut self, input: ::std::option::Option<crate::types::WorkflowDetails>) -> Self {
826        self.workflow_details = input;
827        self
828    }
829    /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
830    /// <p>In addition to a workflow to execute when a file is uploaded completely, <code>WorkflowDetails</code> can also contain a workflow ID (and execution role) for a workflow to execute on partial upload. A partial upload occurs when the server session disconnects while the file is still being uploaded.</p>
831    pub fn get_workflow_details(&self) -> &::std::option::Option<crate::types::WorkflowDetails> {
832        &self.workflow_details
833    }
834    /// Appends an item to `structured_log_destinations`.
835    ///
836    /// To override the contents of this collection use [`set_structured_log_destinations`](Self::set_structured_log_destinations).
837    ///
838    /// <p>Specifies the log groups to which your server logs are sent.</p>
839    /// <p>To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:</p>
840    /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
841    /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
842    /// <p>If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an <code>update-server</code> call. For example:</p>
843    /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
844    pub fn structured_log_destinations(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
845        let mut v = self.structured_log_destinations.unwrap_or_default();
846        v.push(input.into());
847        self.structured_log_destinations = ::std::option::Option::Some(v);
848        self
849    }
850    /// <p>Specifies the log groups to which your server logs are sent.</p>
851    /// <p>To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:</p>
852    /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
853    /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
854    /// <p>If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an <code>update-server</code> call. For example:</p>
855    /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
856    pub fn set_structured_log_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
857        self.structured_log_destinations = input;
858        self
859    }
860    /// <p>Specifies the log groups to which your server logs are sent.</p>
861    /// <p>To specify a log group, you must provide the ARN for an existing log group. In this case, the format of the log group is as follows:</p>
862    /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
863    /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
864    /// <p>If you have previously specified a log group for a server, you can clear it, and in effect turn off structured logging, by providing an empty value for this parameter in an <code>update-server</code> call. For example:</p>
865    /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
866    pub fn get_structured_log_destinations(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
867        &self.structured_log_destinations
868    }
869    /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized.</p>
870    /// <ul>
871    /// <li>
872    /// <p>If using the console, this is enabled by default.</p></li>
873    /// <li>
874    /// <p>If using the API or CLI, this is disabled by default.</p></li>
875    /// </ul>
876    /// <p>By default, home directory mappings have a <code>TYPE</code> of <code>DIRECTORY</code>. If you enable this option, you would then need to explicitly set the <code>HomeDirectoryMapEntry</code> <code>Type</code> to <code>FILE</code> if you want a mapping to have a file target.</p>
877    pub fn s3_storage_options(mut self, input: crate::types::S3StorageOptions) -> Self {
878        self.s3_storage_options = ::std::option::Option::Some(input);
879        self
880    }
881    /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized.</p>
882    /// <ul>
883    /// <li>
884    /// <p>If using the console, this is enabled by default.</p></li>
885    /// <li>
886    /// <p>If using the API or CLI, this is disabled by default.</p></li>
887    /// </ul>
888    /// <p>By default, home directory mappings have a <code>TYPE</code> of <code>DIRECTORY</code>. If you enable this option, you would then need to explicitly set the <code>HomeDirectoryMapEntry</code> <code>Type</code> to <code>FILE</code> if you want a mapping to have a file target.</p>
889    pub fn set_s3_storage_options(mut self, input: ::std::option::Option<crate::types::S3StorageOptions>) -> Self {
890        self.s3_storage_options = input;
891        self
892    }
893    /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized.</p>
894    /// <ul>
895    /// <li>
896    /// <p>If using the console, this is enabled by default.</p></li>
897    /// <li>
898    /// <p>If using the API or CLI, this is disabled by default.</p></li>
899    /// </ul>
900    /// <p>By default, home directory mappings have a <code>TYPE</code> of <code>DIRECTORY</code>. If you enable this option, you would then need to explicitly set the <code>HomeDirectoryMapEntry</code> <code>Type</code> to <code>FILE</code> if you want a mapping to have a file target.</p>
901    pub fn get_s3_storage_options(&self) -> &::std::option::Option<crate::types::S3StorageOptions> {
902        &self.s3_storage_options
903    }
904    /// <p>Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your Transfer Family endpoint. The default value is <code>IPV4</code>.</p><important>
905    /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
906    /// <ul>
907    /// <li>
908    /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
909    /// <li>
910    /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
911    /// </ul>
912    /// </important> <note>
913    /// <p>When using <code>DUALSTACK</code> as the <code>IpAddressType</code>, you cannot set the <code>AddressAllocationIds</code> parameter for the <a href="https://docs.aws.amazon.com/transfer/latest/APIReference/API_EndpointDetails.html">EndpointDetails</a> for the server.</p>
914    /// </note>
915    pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
916        self.ip_address_type = ::std::option::Option::Some(input);
917        self
918    }
919    /// <p>Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your Transfer Family endpoint. The default value is <code>IPV4</code>.</p><important>
920    /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
921    /// <ul>
922    /// <li>
923    /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
924    /// <li>
925    /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
926    /// </ul>
927    /// </important> <note>
928    /// <p>When using <code>DUALSTACK</code> as the <code>IpAddressType</code>, you cannot set the <code>AddressAllocationIds</code> parameter for the <a href="https://docs.aws.amazon.com/transfer/latest/APIReference/API_EndpointDetails.html">EndpointDetails</a> for the server.</p>
929    /// </note>
930    pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
931        self.ip_address_type = input;
932        self
933    }
934    /// <p>Specifies whether to use IPv4 only, or to use dual-stack (IPv4 and IPv6) for your Transfer Family endpoint. The default value is <code>IPV4</code>.</p><important>
935    /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
936    /// <ul>
937    /// <li>
938    /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
939    /// <li>
940    /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
941    /// </ul>
942    /// </important> <note>
943    /// <p>When using <code>DUALSTACK</code> as the <code>IpAddressType</code>, you cannot set the <code>AddressAllocationIds</code> parameter for the <a href="https://docs.aws.amazon.com/transfer/latest/APIReference/API_EndpointDetails.html">EndpointDetails</a> for the server.</p>
944    /// </note>
945    pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
946        &self.ip_address_type
947    }
948    /// Consumes the builder and constructs a [`CreateServerInput`](crate::operation::create_server::CreateServerInput).
949    pub fn build(
950        self,
951    ) -> ::std::result::Result<crate::operation::create_server::CreateServerInput, ::aws_smithy_types::error::operation::BuildError> {
952        ::std::result::Result::Ok(crate::operation::create_server::CreateServerInput {
953            certificate: self.certificate,
954            domain: self.domain,
955            endpoint_details: self.endpoint_details,
956            endpoint_type: self.endpoint_type,
957            host_key: self.host_key,
958            identity_provider_details: self.identity_provider_details,
959            identity_provider_type: self.identity_provider_type,
960            logging_role: self.logging_role,
961            post_authentication_login_banner: self.post_authentication_login_banner,
962            pre_authentication_login_banner: self.pre_authentication_login_banner,
963            protocols: self.protocols,
964            protocol_details: self.protocol_details,
965            security_policy_name: self.security_policy_name,
966            tags: self.tags,
967            workflow_details: self.workflow_details,
968            structured_log_destinations: self.structured_log_destinations,
969            s3_storage_options: self.s3_storage_options,
970            ip_address_type: self.ip_address_type,
971        })
972    }
973}
974impl ::std::fmt::Debug for CreateServerInputBuilder {
975    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
976        let mut formatter = f.debug_struct("CreateServerInputBuilder");
977        formatter.field("certificate", &self.certificate);
978        formatter.field("domain", &self.domain);
979        formatter.field("endpoint_details", &self.endpoint_details);
980        formatter.field("endpoint_type", &self.endpoint_type);
981        formatter.field("host_key", &"*** Sensitive Data Redacted ***");
982        formatter.field("identity_provider_details", &self.identity_provider_details);
983        formatter.field("identity_provider_type", &self.identity_provider_type);
984        formatter.field("logging_role", &self.logging_role);
985        formatter.field("post_authentication_login_banner", &self.post_authentication_login_banner);
986        formatter.field("pre_authentication_login_banner", &self.pre_authentication_login_banner);
987        formatter.field("protocols", &self.protocols);
988        formatter.field("protocol_details", &self.protocol_details);
989        formatter.field("security_policy_name", &self.security_policy_name);
990        formatter.field("tags", &self.tags);
991        formatter.field("workflow_details", &self.workflow_details);
992        formatter.field("structured_log_destinations", &self.structured_log_destinations);
993        formatter.field("s3_storage_options", &self.s3_storage_options);
994        formatter.field("ip_address_type", &self.ip_address_type);
995        formatter.finish()
996    }
997}