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>
94 /// <ul>
95 /// <li>
96 /// <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>
97 /// <li>
98 /// <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>
99 /// <li>
100 /// <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>
101 /// <li>
102 /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
103 /// </ul>
104 pub protocol_details: ::std::option::Option<crate::types::ProtocolDetails>,
105 /// <p>Specifies the name of the security policy for the server.</p>
106 pub security_policy_name: ::std::option::Option<::std::string::String>,
107 /// <p>Key-value pairs that can be used to group and search for servers.</p>
108 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
109 /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
110 /// <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>
111 pub workflow_details: ::std::option::Option<crate::types::WorkflowDetails>,
112 /// <p>Specifies the log groups to which your server logs are sent.</p>
113 /// <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>
114 /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
115 /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
116 /// <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>
117 /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
118 pub structured_log_destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
119 /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
120 /// <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>
121 pub s3_storage_options: ::std::option::Option<crate::types::S3StorageOptions>,
122 /// <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>
123 /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
124 /// <ul>
125 /// <li>
126 /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
127 /// <li>
128 /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
129 /// </ul>
130 /// </important> <note>
131 /// <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>
132 /// </note>
133 pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
134}
135impl CreateServerInput {
136 /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
137 /// <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>
138 /// <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>
139 /// <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>
140 /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
141 /// <ul>
142 /// <li>
143 /// <p>2048-bit RSA (RSA_2048)</p></li>
144 /// <li>
145 /// <p>4096-bit RSA (RSA_4096)</p></li>
146 /// <li>
147 /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
148 /// <li>
149 /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
150 /// <li>
151 /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
152 /// </ul><note>
153 /// <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>
154 /// </note>
155 pub fn certificate(&self) -> ::std::option::Option<&str> {
156 self.certificate.as_deref()
157 }
158 /// <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>
159 /// <p>After the server is created, the domain cannot be changed.</p>
160 /// </note>
161 pub fn domain(&self) -> ::std::option::Option<&crate::types::Domain> {
162 self.domain.as_ref()
163 }
164 /// <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>
165 pub fn endpoint_details(&self) -> ::std::option::Option<&crate::types::EndpointDetails> {
166 self.endpoint_details.as_ref()
167 }
168 /// <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>
169 /// <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>
170 /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
171 /// <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>
172 /// </note>
173 pub fn endpoint_type(&self) -> ::std::option::Option<&crate::types::EndpointType> {
174 self.endpoint_type.as_ref()
175 }
176 /// <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>
177 /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
178 /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
179 /// <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>
180 /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
181 /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
182 /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
183 /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
184 /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
185 /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
186 /// <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>
187 /// </important>
188 /// <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>
189 pub fn host_key(&self) -> ::std::option::Option<&str> {
190 self.host_key.as_deref()
191 }
192 /// <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>
193 pub fn identity_provider_details(&self) -> ::std::option::Option<&crate::types::IdentityProviderDetails> {
194 self.identity_provider_details.as_ref()
195 }
196 /// <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>
197 /// <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>
198 /// <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>
199 /// <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>
200 pub fn identity_provider_type(&self) -> ::std::option::Option<&crate::types::IdentityProviderType> {
201 self.identity_provider_type.as_ref()
202 }
203 /// <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>
204 pub fn logging_role(&self) -> ::std::option::Option<&str> {
205 self.logging_role.as_deref()
206 }
207 /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
208 /// <p>The SFTP protocol does not support post-authentication display banners.</p>
209 /// </note>
210 pub fn post_authentication_login_banner(&self) -> ::std::option::Option<&str> {
211 self.post_authentication_login_banner.as_deref()
212 }
213 /// <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>
214 /// <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>
215 pub fn pre_authentication_login_banner(&self) -> ::std::option::Option<&str> {
216 self.pre_authentication_login_banner.as_deref()
217 }
218 /// <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>
219 /// <ul>
220 /// <li>
221 /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
222 /// <li>
223 /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
224 /// <li>
225 /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
226 /// <li>
227 /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
228 /// </ul><note>
229 /// <ul>
230 /// <li>
231 /// <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>
232 /// <li>
233 /// <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>
234 /// <li>
235 /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
236 /// <li>
237 /// <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>
238 /// <li>
239 /// <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>
240 /// </ul>
241 /// </note>
242 ///
243 /// 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()`.
244 pub fn protocols(&self) -> &[crate::types::Protocol] {
245 self.protocols.as_deref().unwrap_or_default()
246 }
247 /// <p>The protocol settings that are configured for your server.</p>
248 /// <ul>
249 /// <li>
250 /// <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>
251 /// <li>
252 /// <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>
253 /// <li>
254 /// <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>
255 /// <li>
256 /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
257 /// </ul>
258 pub fn protocol_details(&self) -> ::std::option::Option<&crate::types::ProtocolDetails> {
259 self.protocol_details.as_ref()
260 }
261 /// <p>Specifies the name of the security policy for the server.</p>
262 pub fn security_policy_name(&self) -> ::std::option::Option<&str> {
263 self.security_policy_name.as_deref()
264 }
265 /// <p>Key-value pairs that can be used to group and search for servers.</p>
266 ///
267 /// 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()`.
268 pub fn tags(&self) -> &[crate::types::Tag] {
269 self.tags.as_deref().unwrap_or_default()
270 }
271 /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
272 /// <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>
273 pub fn workflow_details(&self) -> ::std::option::Option<&crate::types::WorkflowDetails> {
274 self.workflow_details.as_ref()
275 }
276 /// <p>Specifies the log groups to which your server logs are sent.</p>
277 /// <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>
278 /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
279 /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
280 /// <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>
281 /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
282 ///
283 /// 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()`.
284 pub fn structured_log_destinations(&self) -> &[::std::string::String] {
285 self.structured_log_destinations.as_deref().unwrap_or_default()
286 }
287 /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
288 /// <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>
289 pub fn s3_storage_options(&self) -> ::std::option::Option<&crate::types::S3StorageOptions> {
290 self.s3_storage_options.as_ref()
291 }
292 /// <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>
293 /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
294 /// <ul>
295 /// <li>
296 /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
297 /// <li>
298 /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
299 /// </ul>
300 /// </important> <note>
301 /// <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>
302 /// </note>
303 pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
304 self.ip_address_type.as_ref()
305 }
306}
307impl ::std::fmt::Debug for CreateServerInput {
308 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
309 let mut formatter = f.debug_struct("CreateServerInput");
310 formatter.field("certificate", &self.certificate);
311 formatter.field("domain", &self.domain);
312 formatter.field("endpoint_details", &self.endpoint_details);
313 formatter.field("endpoint_type", &self.endpoint_type);
314 formatter.field("host_key", &"*** Sensitive Data Redacted ***");
315 formatter.field("identity_provider_details", &self.identity_provider_details);
316 formatter.field("identity_provider_type", &self.identity_provider_type);
317 formatter.field("logging_role", &self.logging_role);
318 formatter.field("post_authentication_login_banner", &self.post_authentication_login_banner);
319 formatter.field("pre_authentication_login_banner", &self.pre_authentication_login_banner);
320 formatter.field("protocols", &self.protocols);
321 formatter.field("protocol_details", &self.protocol_details);
322 formatter.field("security_policy_name", &self.security_policy_name);
323 formatter.field("tags", &self.tags);
324 formatter.field("workflow_details", &self.workflow_details);
325 formatter.field("structured_log_destinations", &self.structured_log_destinations);
326 formatter.field("s3_storage_options", &self.s3_storage_options);
327 formatter.field("ip_address_type", &self.ip_address_type);
328 formatter.finish()
329 }
330}
331impl CreateServerInput {
332 /// Creates a new builder-style object to manufacture [`CreateServerInput`](crate::operation::create_server::CreateServerInput).
333 pub fn builder() -> crate::operation::create_server::builders::CreateServerInputBuilder {
334 crate::operation::create_server::builders::CreateServerInputBuilder::default()
335 }
336}
337
338/// A builder for [`CreateServerInput`](crate::operation::create_server::CreateServerInput).
339#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
340#[non_exhaustive]
341pub struct CreateServerInputBuilder {
342 pub(crate) certificate: ::std::option::Option<::std::string::String>,
343 pub(crate) domain: ::std::option::Option<crate::types::Domain>,
344 pub(crate) endpoint_details: ::std::option::Option<crate::types::EndpointDetails>,
345 pub(crate) endpoint_type: ::std::option::Option<crate::types::EndpointType>,
346 pub(crate) host_key: ::std::option::Option<::std::string::String>,
347 pub(crate) identity_provider_details: ::std::option::Option<crate::types::IdentityProviderDetails>,
348 pub(crate) identity_provider_type: ::std::option::Option<crate::types::IdentityProviderType>,
349 pub(crate) logging_role: ::std::option::Option<::std::string::String>,
350 pub(crate) post_authentication_login_banner: ::std::option::Option<::std::string::String>,
351 pub(crate) pre_authentication_login_banner: ::std::option::Option<::std::string::String>,
352 pub(crate) protocols: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>,
353 pub(crate) protocol_details: ::std::option::Option<crate::types::ProtocolDetails>,
354 pub(crate) security_policy_name: ::std::option::Option<::std::string::String>,
355 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
356 pub(crate) workflow_details: ::std::option::Option<crate::types::WorkflowDetails>,
357 pub(crate) structured_log_destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
358 pub(crate) s3_storage_options: ::std::option::Option<crate::types::S3StorageOptions>,
359 pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
360}
361impl CreateServerInputBuilder {
362 /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
363 /// <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>
364 /// <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>
365 /// <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>
366 /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
367 /// <ul>
368 /// <li>
369 /// <p>2048-bit RSA (RSA_2048)</p></li>
370 /// <li>
371 /// <p>4096-bit RSA (RSA_4096)</p></li>
372 /// <li>
373 /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
374 /// <li>
375 /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
376 /// <li>
377 /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
378 /// </ul><note>
379 /// <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>
380 /// </note>
381 pub fn certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
382 self.certificate = ::std::option::Option::Some(input.into());
383 self
384 }
385 /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
386 /// <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>
387 /// <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>
388 /// <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>
389 /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
390 /// <ul>
391 /// <li>
392 /// <p>2048-bit RSA (RSA_2048)</p></li>
393 /// <li>
394 /// <p>4096-bit RSA (RSA_4096)</p></li>
395 /// <li>
396 /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
397 /// <li>
398 /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
399 /// <li>
400 /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
401 /// </ul><note>
402 /// <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>
403 /// </note>
404 pub fn set_certificate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
405 self.certificate = input;
406 self
407 }
408 /// <p>The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
409 /// <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>
410 /// <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>
411 /// <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>
412 /// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
413 /// <ul>
414 /// <li>
415 /// <p>2048-bit RSA (RSA_2048)</p></li>
416 /// <li>
417 /// <p>4096-bit RSA (RSA_4096)</p></li>
418 /// <li>
419 /// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
420 /// <li>
421 /// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
422 /// <li>
423 /// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
424 /// </ul><note>
425 /// <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>
426 /// </note>
427 pub fn get_certificate(&self) -> &::std::option::Option<::std::string::String> {
428 &self.certificate
429 }
430 /// <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>
431 /// <p>After the server is created, the domain cannot be changed.</p>
432 /// </note>
433 pub fn domain(mut self, input: crate::types::Domain) -> Self {
434 self.domain = ::std::option::Option::Some(input);
435 self
436 }
437 /// <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>
438 /// <p>After the server is created, the domain cannot be changed.</p>
439 /// </note>
440 pub fn set_domain(mut self, input: ::std::option::Option<crate::types::Domain>) -> Self {
441 self.domain = input;
442 self
443 }
444 /// <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>
445 /// <p>After the server is created, the domain cannot be changed.</p>
446 /// </note>
447 pub fn get_domain(&self) -> &::std::option::Option<crate::types::Domain> {
448 &self.domain
449 }
450 /// <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>
451 pub fn endpoint_details(mut self, input: crate::types::EndpointDetails) -> Self {
452 self.endpoint_details = ::std::option::Option::Some(input);
453 self
454 }
455 /// <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>
456 pub fn set_endpoint_details(mut self, input: ::std::option::Option<crate::types::EndpointDetails>) -> Self {
457 self.endpoint_details = input;
458 self
459 }
460 /// <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>
461 pub fn get_endpoint_details(&self) -> &::std::option::Option<crate::types::EndpointDetails> {
462 &self.endpoint_details
463 }
464 /// <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>
465 /// <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>
466 /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
467 /// <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>
468 /// </note>
469 pub fn endpoint_type(mut self, input: crate::types::EndpointType) -> Self {
470 self.endpoint_type = ::std::option::Option::Some(input);
471 self
472 }
473 /// <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>
474 /// <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>
475 /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
476 /// <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>
477 /// </note>
478 pub fn set_endpoint_type(mut self, input: ::std::option::Option<crate::types::EndpointType>) -> Self {
479 self.endpoint_type = input;
480 self
481 }
482 /// <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>
483 /// <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>
484 /// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
485 /// <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>
486 /// </note>
487 pub fn get_endpoint_type(&self) -> &::std::option::Option<crate::types::EndpointType> {
488 &self.endpoint_type
489 }
490 /// <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>
491 /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
492 /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
493 /// <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>
494 /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
495 /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
496 /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
497 /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
498 /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
499 /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
500 /// <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>
501 /// </important>
502 /// <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>
503 pub fn host_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
504 self.host_key = ::std::option::Option::Some(input.into());
505 self
506 }
507 /// <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>
508 /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
509 /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
510 /// <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>
511 /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
512 /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
513 /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
514 /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
515 /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
516 /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
517 /// <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>
518 /// </important>
519 /// <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>
520 pub fn set_host_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
521 self.host_key = input;
522 self
523 }
524 /// <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>
525 /// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
526 /// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
527 /// <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>
528 /// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
529 /// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
530 /// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
531 /// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
532 /// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
533 /// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
534 /// <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>
535 /// </important>
536 /// <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>
537 pub fn get_host_key(&self) -> &::std::option::Option<::std::string::String> {
538 &self.host_key
539 }
540 /// <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>
541 pub fn identity_provider_details(mut self, input: crate::types::IdentityProviderDetails) -> Self {
542 self.identity_provider_details = ::std::option::Option::Some(input);
543 self
544 }
545 /// <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>
546 pub fn set_identity_provider_details(mut self, input: ::std::option::Option<crate::types::IdentityProviderDetails>) -> Self {
547 self.identity_provider_details = input;
548 self
549 }
550 /// <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>
551 pub fn get_identity_provider_details(&self) -> &::std::option::Option<crate::types::IdentityProviderDetails> {
552 &self.identity_provider_details
553 }
554 /// <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>
555 /// <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>
556 /// <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>
557 /// <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>
558 pub fn identity_provider_type(mut self, input: crate::types::IdentityProviderType) -> Self {
559 self.identity_provider_type = ::std::option::Option::Some(input);
560 self
561 }
562 /// <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>
563 /// <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>
564 /// <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>
565 /// <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>
566 pub fn set_identity_provider_type(mut self, input: ::std::option::Option<crate::types::IdentityProviderType>) -> Self {
567 self.identity_provider_type = input;
568 self
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 get_identity_provider_type(&self) -> &::std::option::Option<crate::types::IdentityProviderType> {
575 &self.identity_provider_type
576 }
577 /// <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>
578 pub fn logging_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
579 self.logging_role = ::std::option::Option::Some(input.into());
580 self
581 }
582 /// <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>
583 pub fn set_logging_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
584 self.logging_role = input;
585 self
586 }
587 /// <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>
588 pub fn get_logging_role(&self) -> &::std::option::Option<::std::string::String> {
589 &self.logging_role
590 }
591 /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
592 /// <p>The SFTP protocol does not support post-authentication display banners.</p>
593 /// </note>
594 pub fn post_authentication_login_banner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
595 self.post_authentication_login_banner = ::std::option::Option::Some(input.into());
596 self
597 }
598 /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
599 /// <p>The SFTP protocol does not support post-authentication display banners.</p>
600 /// </note>
601 pub fn set_post_authentication_login_banner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
602 self.post_authentication_login_banner = input;
603 self
604 }
605 /// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
606 /// <p>The SFTP protocol does not support post-authentication display banners.</p>
607 /// </note>
608 pub fn get_post_authentication_login_banner(&self) -> &::std::option::Option<::std::string::String> {
609 &self.post_authentication_login_banner
610 }
611 /// <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>
612 /// <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>
613 pub fn pre_authentication_login_banner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
614 self.pre_authentication_login_banner = ::std::option::Option::Some(input.into());
615 self
616 }
617 /// <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>
618 /// <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>
619 pub fn set_pre_authentication_login_banner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
620 self.pre_authentication_login_banner = input;
621 self
622 }
623 /// <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>
624 /// <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>
625 pub fn get_pre_authentication_login_banner(&self) -> &::std::option::Option<::std::string::String> {
626 &self.pre_authentication_login_banner
627 }
628 /// Appends an item to `protocols`.
629 ///
630 /// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
631 ///
632 /// <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>
633 /// <ul>
634 /// <li>
635 /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
636 /// <li>
637 /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
638 /// <li>
639 /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
640 /// <li>
641 /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
642 /// </ul><note>
643 /// <ul>
644 /// <li>
645 /// <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>
646 /// <li>
647 /// <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>
648 /// <li>
649 /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
650 /// <li>
651 /// <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>
652 /// <li>
653 /// <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>
654 /// </ul>
655 /// </note>
656 pub fn protocols(mut self, input: crate::types::Protocol) -> Self {
657 let mut v = self.protocols.unwrap_or_default();
658 v.push(input);
659 self.protocols = ::std::option::Option::Some(v);
660 self
661 }
662 /// <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>
663 /// <ul>
664 /// <li>
665 /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
666 /// <li>
667 /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
668 /// <li>
669 /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
670 /// <li>
671 /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
672 /// </ul><note>
673 /// <ul>
674 /// <li>
675 /// <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>
676 /// <li>
677 /// <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>
678 /// <li>
679 /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
680 /// <li>
681 /// <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>
682 /// <li>
683 /// <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>
684 /// </ul>
685 /// </note>
686 pub fn set_protocols(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>) -> Self {
687 self.protocols = input;
688 self
689 }
690 /// <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>
691 /// <ul>
692 /// <li>
693 /// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
694 /// <li>
695 /// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
696 /// <li>
697 /// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
698 /// <li>
699 /// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
700 /// </ul><note>
701 /// <ul>
702 /// <li>
703 /// <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>
704 /// <li>
705 /// <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>
706 /// <li>
707 /// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
708 /// <li>
709 /// <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>
710 /// <li>
711 /// <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>
712 /// </ul>
713 /// </note>
714 pub fn get_protocols(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Protocol>> {
715 &self.protocols
716 }
717 /// <p>The protocol settings that are configured for your server.</p>
718 /// <ul>
719 /// <li>
720 /// <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>
721 /// <li>
722 /// <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>
723 /// <li>
724 /// <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>
725 /// <li>
726 /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
727 /// </ul>
728 pub fn protocol_details(mut self, input: crate::types::ProtocolDetails) -> Self {
729 self.protocol_details = ::std::option::Option::Some(input);
730 self
731 }
732 /// <p>The protocol settings that are configured for your server.</p>
733 /// <ul>
734 /// <li>
735 /// <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>
736 /// <li>
737 /// <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>
738 /// <li>
739 /// <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>
740 /// <li>
741 /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
742 /// </ul>
743 pub fn set_protocol_details(mut self, input: ::std::option::Option<crate::types::ProtocolDetails>) -> Self {
744 self.protocol_details = input;
745 self
746 }
747 /// <p>The protocol settings that are configured for your server.</p>
748 /// <ul>
749 /// <li>
750 /// <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>
751 /// <li>
752 /// <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>
753 /// <li>
754 /// <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>
755 /// <li>
756 /// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
757 /// </ul>
758 pub fn get_protocol_details(&self) -> &::std::option::Option<crate::types::ProtocolDetails> {
759 &self.protocol_details
760 }
761 /// <p>Specifies the name of the security policy for the server.</p>
762 pub fn security_policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
763 self.security_policy_name = ::std::option::Option::Some(input.into());
764 self
765 }
766 /// <p>Specifies the name of the security policy for the server.</p>
767 pub fn set_security_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
768 self.security_policy_name = input;
769 self
770 }
771 /// <p>Specifies the name of the security policy for the server.</p>
772 pub fn get_security_policy_name(&self) -> &::std::option::Option<::std::string::String> {
773 &self.security_policy_name
774 }
775 /// Appends an item to `tags`.
776 ///
777 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
778 ///
779 /// <p>Key-value pairs that can be used to group and search for servers.</p>
780 pub fn tags(mut self, input: crate::types::Tag) -> Self {
781 let mut v = self.tags.unwrap_or_default();
782 v.push(input);
783 self.tags = ::std::option::Option::Some(v);
784 self
785 }
786 /// <p>Key-value pairs that can be used to group and search for servers.</p>
787 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
788 self.tags = input;
789 self
790 }
791 /// <p>Key-value pairs that can be used to group and search for servers.</p>
792 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
793 &self.tags
794 }
795 /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
796 /// <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>
797 pub fn workflow_details(mut self, input: crate::types::WorkflowDetails) -> Self {
798 self.workflow_details = ::std::option::Option::Some(input);
799 self
800 }
801 /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
802 /// <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>
803 pub fn set_workflow_details(mut self, input: ::std::option::Option<crate::types::WorkflowDetails>) -> Self {
804 self.workflow_details = input;
805 self
806 }
807 /// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
808 /// <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>
809 pub fn get_workflow_details(&self) -> &::std::option::Option<crate::types::WorkflowDetails> {
810 &self.workflow_details
811 }
812 /// Appends an item to `structured_log_destinations`.
813 ///
814 /// To override the contents of this collection use [`set_structured_log_destinations`](Self::set_structured_log_destinations).
815 ///
816 /// <p>Specifies the log groups to which your server logs are sent.</p>
817 /// <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>
818 /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
819 /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
820 /// <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>
821 /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
822 pub fn structured_log_destinations(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
823 let mut v = self.structured_log_destinations.unwrap_or_default();
824 v.push(input.into());
825 self.structured_log_destinations = ::std::option::Option::Some(v);
826 self
827 }
828 /// <p>Specifies the log groups to which your server logs are sent.</p>
829 /// <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>
830 /// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
831 /// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
832 /// <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>
833 /// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
834 pub fn set_structured_log_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
835 self.structured_log_destinations = input;
836 self
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 get_structured_log_destinations(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
845 &self.structured_log_destinations
846 }
847 /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
848 /// <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>
849 pub fn s3_storage_options(mut self, input: crate::types::S3StorageOptions) -> Self {
850 self.s3_storage_options = ::std::option::Option::Some(input);
851 self
852 }
853 /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
854 /// <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>
855 pub fn set_s3_storage_options(mut self, input: ::std::option::Option<crate::types::S3StorageOptions>) -> Self {
856 self.s3_storage_options = input;
857 self
858 }
859 /// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
860 /// <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>
861 pub fn get_s3_storage_options(&self) -> &::std::option::Option<crate::types::S3StorageOptions> {
862 &self.s3_storage_options
863 }
864 /// <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>
865 /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
866 /// <ul>
867 /// <li>
868 /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
869 /// <li>
870 /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
871 /// </ul>
872 /// </important> <note>
873 /// <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>
874 /// </note>
875 pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
876 self.ip_address_type = ::std::option::Option::Some(input);
877 self
878 }
879 /// <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>
880 /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
881 /// <ul>
882 /// <li>
883 /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
884 /// <li>
885 /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
886 /// </ul>
887 /// </important> <note>
888 /// <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>
889 /// </note>
890 pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
891 self.ip_address_type = input;
892 self
893 }
894 /// <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>
895 /// <p>The <code>IpAddressType</code> parameter has the following limitations:</p>
896 /// <ul>
897 /// <li>
898 /// <p>It cannot be changed while the server is online. You must stop the server before modifying this parameter.</p></li>
899 /// <li>
900 /// <p>It cannot be updated to <code>DUALSTACK</code> if the server has <code>AddressAllocationIds</code> specified.</p></li>
901 /// </ul>
902 /// </important> <note>
903 /// <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>
904 /// </note>
905 pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
906 &self.ip_address_type
907 }
908 /// Consumes the builder and constructs a [`CreateServerInput`](crate::operation::create_server::CreateServerInput).
909 pub fn build(
910 self,
911 ) -> ::std::result::Result<crate::operation::create_server::CreateServerInput, ::aws_smithy_types::error::operation::BuildError> {
912 ::std::result::Result::Ok(crate::operation::create_server::CreateServerInput {
913 certificate: self.certificate,
914 domain: self.domain,
915 endpoint_details: self.endpoint_details,
916 endpoint_type: self.endpoint_type,
917 host_key: self.host_key,
918 identity_provider_details: self.identity_provider_details,
919 identity_provider_type: self.identity_provider_type,
920 logging_role: self.logging_role,
921 post_authentication_login_banner: self.post_authentication_login_banner,
922 pre_authentication_login_banner: self.pre_authentication_login_banner,
923 protocols: self.protocols,
924 protocol_details: self.protocol_details,
925 security_policy_name: self.security_policy_name,
926 tags: self.tags,
927 workflow_details: self.workflow_details,
928 structured_log_destinations: self.structured_log_destinations,
929 s3_storage_options: self.s3_storage_options,
930 ip_address_type: self.ip_address_type,
931 })
932 }
933}
934impl ::std::fmt::Debug for CreateServerInputBuilder {
935 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
936 let mut formatter = f.debug_struct("CreateServerInputBuilder");
937 formatter.field("certificate", &self.certificate);
938 formatter.field("domain", &self.domain);
939 formatter.field("endpoint_details", &self.endpoint_details);
940 formatter.field("endpoint_type", &self.endpoint_type);
941 formatter.field("host_key", &"*** Sensitive Data Redacted ***");
942 formatter.field("identity_provider_details", &self.identity_provider_details);
943 formatter.field("identity_provider_type", &self.identity_provider_type);
944 formatter.field("logging_role", &self.logging_role);
945 formatter.field("post_authentication_login_banner", &self.post_authentication_login_banner);
946 formatter.field("pre_authentication_login_banner", &self.pre_authentication_login_banner);
947 formatter.field("protocols", &self.protocols);
948 formatter.field("protocol_details", &self.protocol_details);
949 formatter.field("security_policy_name", &self.security_policy_name);
950 formatter.field("tags", &self.tags);
951 formatter.field("workflow_details", &self.workflow_details);
952 formatter.field("structured_log_destinations", &self.structured_log_destinations);
953 formatter.field("s3_storage_options", &self.s3_storage_options);
954 formatter.field("ip_address_type", &self.ip_address_type);
955 formatter.finish()
956 }
957}