aws_sdk_transfer/operation/update_server/_update_server_input.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateServerInput {
/// <p>The Amazon Resource Name (ARN) of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
/// <ul>
/// <li>
/// <p>2048-bit RSA (RSA_2048)</p></li>
/// <li>
/// <p>4096-bit RSA (RSA_4096)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
/// </ul><note>
/// <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>
/// </note>
pub certificate: ::std::option::Option<::std::string::String>,
/// <p>The protocol settings that are configured for your server.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
/// </ul>
pub protocol_details: ::std::option::Option<crate::types::ProtocolDetails>,
/// <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>
pub endpoint_details: ::std::option::Option<crate::types::EndpointDetails>,
/// <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>
/// <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>
/// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
/// <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>
/// </note>
pub endpoint_type: ::std::option::Option<crate::types::EndpointType>,
/// <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>
/// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <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>
/// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
/// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
/// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
/// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
/// <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>
/// </important>
/// <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>
pub host_key: ::std::option::Option<::std::string::String>,
/// <p>An array containing all of the information required to call a customer's authentication API method.</p>
pub identity_provider_details: ::std::option::Option<crate::types::IdentityProviderDetails>,
/// <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 EFSevents. When set, you can view user activity in your CloudWatch logs.</p>
pub logging_role: ::std::option::Option<::std::string::String>,
/// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
/// <p>The SFTP protocol does not support post-authentication display banners.</p>
/// </note>
pub post_authentication_login_banner: ::std::option::Option<::std::string::String>,
/// <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>
/// <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>
pub pre_authentication_login_banner: ::std::option::Option<::std::string::String>,
/// <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>
/// <ul>
/// <li>
/// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
/// <li>
/// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
/// <li>
/// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
/// <li>
/// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
/// </ul><note>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
/// </note>
pub protocols: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>,
/// <p>Specifies the name of the security policy for the server.</p>
pub security_policy_name: ::std::option::Option<::std::string::String>,
/// <p>A system-assigned unique identifier for a server instance that the Transfer Family user is assigned to.</p>
pub server_id: ::std::option::Option<::std::string::String>,
/// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
/// <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>
/// <p>To remove an associated workflow from a server, you can provide an empty <code>OnUpload</code> object, as in the following example.</p>
/// <p><code>aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":\[\]}'</code></p>
pub workflow_details: ::std::option::Option<crate::types::WorkflowDetails>,
/// <p>Specifies the log groups to which your server logs are sent.</p>
/// <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>
/// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
/// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
/// <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>
/// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
pub structured_log_destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
/// <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>
pub s3_storage_options: ::std::option::Option<crate::types::S3StorageOptions>,
}
impl UpdateServerInput {
/// <p>The Amazon Resource Name (ARN) of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
/// <ul>
/// <li>
/// <p>2048-bit RSA (RSA_2048)</p></li>
/// <li>
/// <p>4096-bit RSA (RSA_4096)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
/// </ul><note>
/// <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>
/// </note>
pub fn certificate(&self) -> ::std::option::Option<&str> {
self.certificate.as_deref()
}
/// <p>The protocol settings that are configured for your server.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
/// </ul>
pub fn protocol_details(&self) -> ::std::option::Option<&crate::types::ProtocolDetails> {
self.protocol_details.as_ref()
}
/// <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>
pub fn endpoint_details(&self) -> ::std::option::Option<&crate::types::EndpointDetails> {
self.endpoint_details.as_ref()
}
/// <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>
/// <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>
/// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
/// <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>
/// </note>
pub fn endpoint_type(&self) -> ::std::option::Option<&crate::types::EndpointType> {
self.endpoint_type.as_ref()
}
/// <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>
/// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <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>
/// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
/// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
/// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
/// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
/// <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>
/// </important>
/// <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>
pub fn host_key(&self) -> ::std::option::Option<&str> {
self.host_key.as_deref()
}
/// <p>An array containing all of the information required to call a customer's authentication API method.</p>
pub fn identity_provider_details(&self) -> ::std::option::Option<&crate::types::IdentityProviderDetails> {
self.identity_provider_details.as_ref()
}
/// <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 EFSevents. When set, you can view user activity in your CloudWatch logs.</p>
pub fn logging_role(&self) -> ::std::option::Option<&str> {
self.logging_role.as_deref()
}
/// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
/// <p>The SFTP protocol does not support post-authentication display banners.</p>
/// </note>
pub fn post_authentication_login_banner(&self) -> ::std::option::Option<&str> {
self.post_authentication_login_banner.as_deref()
}
/// <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>
/// <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>
pub fn pre_authentication_login_banner(&self) -> ::std::option::Option<&str> {
self.pre_authentication_login_banner.as_deref()
}
/// <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>
/// <ul>
/// <li>
/// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
/// <li>
/// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
/// <li>
/// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
/// <li>
/// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
/// </ul><note>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
/// </note>
///
/// 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()`.
pub fn protocols(&self) -> &[crate::types::Protocol] {
self.protocols.as_deref().unwrap_or_default()
}
/// <p>Specifies the name of the security policy for the server.</p>
pub fn security_policy_name(&self) -> ::std::option::Option<&str> {
self.security_policy_name.as_deref()
}
/// <p>A system-assigned unique identifier for a server instance that the Transfer Family user is assigned to.</p>
pub fn server_id(&self) -> ::std::option::Option<&str> {
self.server_id.as_deref()
}
/// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
/// <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>
/// <p>To remove an associated workflow from a server, you can provide an empty <code>OnUpload</code> object, as in the following example.</p>
/// <p><code>aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":\[\]}'</code></p>
pub fn workflow_details(&self) -> ::std::option::Option<&crate::types::WorkflowDetails> {
self.workflow_details.as_ref()
}
/// <p>Specifies the log groups to which your server logs are sent.</p>
/// <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>
/// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
/// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
/// <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>
/// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
///
/// 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()`.
pub fn structured_log_destinations(&self) -> &[::std::string::String] {
self.structured_log_destinations.as_deref().unwrap_or_default()
}
/// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
/// <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>
pub fn s3_storage_options(&self) -> ::std::option::Option<&crate::types::S3StorageOptions> {
self.s3_storage_options.as_ref()
}
}
impl ::std::fmt::Debug for UpdateServerInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateServerInput");
formatter.field("certificate", &self.certificate);
formatter.field("protocol_details", &self.protocol_details);
formatter.field("endpoint_details", &self.endpoint_details);
formatter.field("endpoint_type", &self.endpoint_type);
formatter.field("host_key", &"*** Sensitive Data Redacted ***");
formatter.field("identity_provider_details", &self.identity_provider_details);
formatter.field("logging_role", &self.logging_role);
formatter.field("post_authentication_login_banner", &self.post_authentication_login_banner);
formatter.field("pre_authentication_login_banner", &self.pre_authentication_login_banner);
formatter.field("protocols", &self.protocols);
formatter.field("security_policy_name", &self.security_policy_name);
formatter.field("server_id", &self.server_id);
formatter.field("workflow_details", &self.workflow_details);
formatter.field("structured_log_destinations", &self.structured_log_destinations);
formatter.field("s3_storage_options", &self.s3_storage_options);
formatter.finish()
}
}
impl UpdateServerInput {
/// Creates a new builder-style object to manufacture [`UpdateServerInput`](crate::operation::update_server::UpdateServerInput).
pub fn builder() -> crate::operation::update_server::builders::UpdateServerInputBuilder {
crate::operation::update_server::builders::UpdateServerInputBuilder::default()
}
}
/// A builder for [`UpdateServerInput`](crate::operation::update_server::UpdateServerInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateServerInputBuilder {
pub(crate) certificate: ::std::option::Option<::std::string::String>,
pub(crate) protocol_details: ::std::option::Option<crate::types::ProtocolDetails>,
pub(crate) endpoint_details: ::std::option::Option<crate::types::EndpointDetails>,
pub(crate) endpoint_type: ::std::option::Option<crate::types::EndpointType>,
pub(crate) host_key: ::std::option::Option<::std::string::String>,
pub(crate) identity_provider_details: ::std::option::Option<crate::types::IdentityProviderDetails>,
pub(crate) logging_role: ::std::option::Option<::std::string::String>,
pub(crate) post_authentication_login_banner: ::std::option::Option<::std::string::String>,
pub(crate) pre_authentication_login_banner: ::std::option::Option<::std::string::String>,
pub(crate) protocols: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>,
pub(crate) security_policy_name: ::std::option::Option<::std::string::String>,
pub(crate) server_id: ::std::option::Option<::std::string::String>,
pub(crate) workflow_details: ::std::option::Option<crate::types::WorkflowDetails>,
pub(crate) structured_log_destinations: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) s3_storage_options: ::std::option::Option<crate::types::S3StorageOptions>,
}
impl UpdateServerInputBuilder {
/// <p>The Amazon Resource Name (ARN) of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
/// <ul>
/// <li>
/// <p>2048-bit RSA (RSA_2048)</p></li>
/// <li>
/// <p>4096-bit RSA (RSA_4096)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
/// </ul><note>
/// <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>
/// </note>
pub fn certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.certificate = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
/// <ul>
/// <li>
/// <p>2048-bit RSA (RSA_2048)</p></li>
/// <li>
/// <p>4096-bit RSA (RSA_4096)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
/// </ul><note>
/// <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>
/// </note>
pub fn set_certificate(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.certificate = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when <code>Protocols</code> is set to <code>FTPS</code>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <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> Amazon Web ServicesCertificate Manager User Guide</i>.</p>
/// <p>Certificates with the following cryptographic algorithms and key sizes are supported:</p>
/// <ul>
/// <li>
/// <p>2048-bit RSA (RSA_2048)</p></li>
/// <li>
/// <p>4096-bit RSA (RSA_4096)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 256 bit (EC_prime256v1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 384 bit (EC_secp384r1)</p></li>
/// <li>
/// <p>Elliptic Prime Curve 521 bit (EC_secp521r1)</p></li>
/// </ul><note>
/// <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>
/// </note>
pub fn get_certificate(&self) -> &::std::option::Option<::std::string::String> {
&self.certificate
}
/// <p>The protocol settings that are configured for your server.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
/// </ul>
pub fn protocol_details(mut self, input: crate::types::ProtocolDetails) -> Self {
self.protocol_details = ::std::option::Option::Some(input);
self
}
/// <p>The protocol settings that are configured for your server.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
/// </ul>
pub fn set_protocol_details(mut self, input: ::std::option::Option<crate::types::ProtocolDetails>) -> Self {
self.protocol_details = input;
self
}
/// <p>The protocol settings that are configured for your server.</p>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p><code>As2Transports</code> indicates the transport method for the AS2 messages. Currently, only HTTP is supported.</p></li>
/// </ul>
pub fn get_protocol_details(&self) -> &::std::option::Option<crate::types::ProtocolDetails> {
&self.protocol_details
}
/// <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>
pub fn endpoint_details(mut self, input: crate::types::EndpointDetails) -> Self {
self.endpoint_details = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_endpoint_details(mut self, input: ::std::option::Option<crate::types::EndpointDetails>) -> Self {
self.endpoint_details = input;
self
}
/// <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>
pub fn get_endpoint_details(&self) -> &::std::option::Option<crate::types::EndpointDetails> {
&self.endpoint_details
}
/// <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>
/// <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>
/// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
/// <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>
/// </note>
pub fn endpoint_type(mut self, input: crate::types::EndpointType) -> Self {
self.endpoint_type = ::std::option::Option::Some(input);
self
}
/// <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>
/// <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>
/// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
/// <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>
/// </note>
pub fn set_endpoint_type(mut self, input: ::std::option::Option<crate::types::EndpointType>) -> Self {
self.endpoint_type = input;
self
}
/// <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>
/// <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>
/// <p>For more information, see https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.</p>
/// <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>
/// </note>
pub fn get_endpoint_type(&self) -> &::std::option::Option<crate::types::EndpointType> {
&self.endpoint_type
}
/// <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>
/// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <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>
/// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
/// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
/// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
/// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
/// <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>
/// </important>
/// <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>
pub fn host_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.host_key = ::std::option::Option::Some(input.into());
self
}
/// <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>
/// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <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>
/// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
/// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
/// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
/// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
/// <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>
/// </important>
/// <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>
pub fn set_host_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.host_key = input;
self
}
/// <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>
/// <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <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>
/// <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
/// <p><code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
/// <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
/// <p>Use the following command to generate an ED25519 key with no passphrase:</p>
/// <p><code>ssh-keygen -t ed25519 -N "" -f my-new-server-key</code>.</p>
/// <p>For all of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p><important>
/// <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>
/// </important>
/// <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>
pub fn get_host_key(&self) -> &::std::option::Option<::std::string::String> {
&self.host_key
}
/// <p>An array containing all of the information required to call a customer's authentication API method.</p>
pub fn identity_provider_details(mut self, input: crate::types::IdentityProviderDetails) -> Self {
self.identity_provider_details = ::std::option::Option::Some(input);
self
}
/// <p>An array containing all of the information required to call a customer's authentication API method.</p>
pub fn set_identity_provider_details(mut self, input: ::std::option::Option<crate::types::IdentityProviderDetails>) -> Self {
self.identity_provider_details = input;
self
}
/// <p>An array containing all of the information required to call a customer's authentication API method.</p>
pub fn get_identity_provider_details(&self) -> &::std::option::Option<crate::types::IdentityProviderDetails> {
&self.identity_provider_details
}
/// <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 EFSevents. When set, you can view user activity in your CloudWatch logs.</p>
pub fn logging_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.logging_role = ::std::option::Option::Some(input.into());
self
}
/// <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 EFSevents. When set, you can view user activity in your CloudWatch logs.</p>
pub fn set_logging_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.logging_role = input;
self
}
/// <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 EFSevents. When set, you can view user activity in your CloudWatch logs.</p>
pub fn get_logging_role(&self) -> &::std::option::Option<::std::string::String> {
&self.logging_role
}
/// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
/// <p>The SFTP protocol does not support post-authentication display banners.</p>
/// </note>
pub fn post_authentication_login_banner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.post_authentication_login_banner = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
/// <p>The SFTP protocol does not support post-authentication display banners.</p>
/// </note>
pub fn set_post_authentication_login_banner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.post_authentication_login_banner = input;
self
}
/// <p>Specifies a string to display when users connect to a server. This string is displayed after the user authenticates.</p><note>
/// <p>The SFTP protocol does not support post-authentication display banners.</p>
/// </note>
pub fn get_post_authentication_login_banner(&self) -> &::std::option::Option<::std::string::String> {
&self.post_authentication_login_banner
}
/// <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>
/// <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>
pub fn pre_authentication_login_banner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.pre_authentication_login_banner = ::std::option::Option::Some(input.into());
self
}
/// <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>
/// <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>
pub fn set_pre_authentication_login_banner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.pre_authentication_login_banner = input;
self
}
/// <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>
/// <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>
pub fn get_pre_authentication_login_banner(&self) -> &::std::option::Option<::std::string::String> {
&self.pre_authentication_login_banner
}
/// Appends an item to `protocols`.
///
/// To override the contents of this collection use [`set_protocols`](Self::set_protocols).
///
/// <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>
/// <ul>
/// <li>
/// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
/// <li>
/// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
/// <li>
/// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
/// <li>
/// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
/// </ul><note>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
/// </note>
pub fn protocols(mut self, input: crate::types::Protocol) -> Self {
let mut v = self.protocols.unwrap_or_default();
v.push(input);
self.protocols = ::std::option::Option::Some(v);
self
}
/// <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>
/// <ul>
/// <li>
/// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
/// <li>
/// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
/// <li>
/// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
/// <li>
/// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
/// </ul><note>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
/// </note>
pub fn set_protocols(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Protocol>>) -> Self {
self.protocols = input;
self
}
/// <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>
/// <ul>
/// <li>
/// <p><code>SFTP</code> (Secure Shell (SSH) File Transfer Protocol): File transfer over SSH</p></li>
/// <li>
/// <p><code>FTPS</code> (File Transfer Protocol Secure): File transfer with TLS encryption</p></li>
/// <li>
/// <p><code>FTP</code> (File Transfer Protocol): Unencrypted file transfer</p></li>
/// <li>
/// <p><code>AS2</code> (Applicability Statement 2): used for transporting structured business-to-business data</p></li>
/// </ul><note>
/// <ul>
/// <li>
/// <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>
/// <li>
/// <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>
/// <li>
/// <p>If <code>Protocol</code> includes <code>FTP</code>, then <code>AddressAllocationIds</code> cannot be associated.</p></li>
/// <li>
/// <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>
/// <li>
/// <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>
/// </ul>
/// </note>
pub fn get_protocols(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Protocol>> {
&self.protocols
}
/// <p>Specifies the name of the security policy for the server.</p>
pub fn security_policy_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.security_policy_name = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the name of the security policy for the server.</p>
pub fn set_security_policy_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.security_policy_name = input;
self
}
/// <p>Specifies the name of the security policy for the server.</p>
pub fn get_security_policy_name(&self) -> &::std::option::Option<::std::string::String> {
&self.security_policy_name
}
/// <p>A system-assigned unique identifier for a server instance that the Transfer Family user is assigned to.</p>
/// This field is required.
pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.server_id = ::std::option::Option::Some(input.into());
self
}
/// <p>A system-assigned unique identifier for a server instance that the Transfer Family user is assigned to.</p>
pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.server_id = input;
self
}
/// <p>A system-assigned unique identifier for a server instance that the Transfer Family user is assigned to.</p>
pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
&self.server_id
}
/// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
/// <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>
/// <p>To remove an associated workflow from a server, you can provide an empty <code>OnUpload</code> object, as in the following example.</p>
/// <p><code>aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":\[\]}'</code></p>
pub fn workflow_details(mut self, input: crate::types::WorkflowDetails) -> Self {
self.workflow_details = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
/// <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>
/// <p>To remove an associated workflow from a server, you can provide an empty <code>OnUpload</code> object, as in the following example.</p>
/// <p><code>aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":\[\]}'</code></p>
pub fn set_workflow_details(mut self, input: ::std::option::Option<crate::types::WorkflowDetails>) -> Self {
self.workflow_details = input;
self
}
/// <p>Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the workflow.</p>
/// <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>
/// <p>To remove an associated workflow from a server, you can provide an empty <code>OnUpload</code> object, as in the following example.</p>
/// <p><code>aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":\[\]}'</code></p>
pub fn get_workflow_details(&self) -> &::std::option::Option<crate::types::WorkflowDetails> {
&self.workflow_details
}
/// Appends an item to `structured_log_destinations`.
///
/// To override the contents of this collection use [`set_structured_log_destinations`](Self::set_structured_log_destinations).
///
/// <p>Specifies the log groups to which your server logs are sent.</p>
/// <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>
/// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
/// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
/// <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>
/// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
pub fn structured_log_destinations(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.structured_log_destinations.unwrap_or_default();
v.push(input.into());
self.structured_log_destinations = ::std::option::Option::Some(v);
self
}
/// <p>Specifies the log groups to which your server logs are sent.</p>
/// <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>
/// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
/// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
/// <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>
/// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
pub fn set_structured_log_destinations(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.structured_log_destinations = input;
self
}
/// <p>Specifies the log groups to which your server logs are sent.</p>
/// <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>
/// <p><code>arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*</code></p>
/// <p>For example, <code>arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*</code></p>
/// <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>
/// <p><code>update-server --server-id s-1234567890abcdef0 --structured-log-destinations</code></p>
pub fn get_structured_log_destinations(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.structured_log_destinations
}
/// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
/// <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>
pub fn s3_storage_options(mut self, input: crate::types::S3StorageOptions) -> Self {
self.s3_storage_options = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
/// <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>
pub fn set_s3_storage_options(mut self, input: ::std::option::Option<crate::types::S3StorageOptions>) -> Self {
self.s3_storage_options = input;
self
}
/// <p>Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.</p>
/// <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>
pub fn get_s3_storage_options(&self) -> &::std::option::Option<crate::types::S3StorageOptions> {
&self.s3_storage_options
}
/// Consumes the builder and constructs a [`UpdateServerInput`](crate::operation::update_server::UpdateServerInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_server::UpdateServerInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_server::UpdateServerInput {
certificate: self.certificate,
protocol_details: self.protocol_details,
endpoint_details: self.endpoint_details,
endpoint_type: self.endpoint_type,
host_key: self.host_key,
identity_provider_details: self.identity_provider_details,
logging_role: self.logging_role,
post_authentication_login_banner: self.post_authentication_login_banner,
pre_authentication_login_banner: self.pre_authentication_login_banner,
protocols: self.protocols,
security_policy_name: self.security_policy_name,
server_id: self.server_id,
workflow_details: self.workflow_details,
structured_log_destinations: self.structured_log_destinations,
s3_storage_options: self.s3_storage_options,
})
}
}
impl ::std::fmt::Debug for UpdateServerInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateServerInputBuilder");
formatter.field("certificate", &self.certificate);
formatter.field("protocol_details", &self.protocol_details);
formatter.field("endpoint_details", &self.endpoint_details);
formatter.field("endpoint_type", &self.endpoint_type);
formatter.field("host_key", &"*** Sensitive Data Redacted ***");
formatter.field("identity_provider_details", &self.identity_provider_details);
formatter.field("logging_role", &self.logging_role);
formatter.field("post_authentication_login_banner", &self.post_authentication_login_banner);
formatter.field("pre_authentication_login_banner", &self.pre_authentication_login_banner);
formatter.field("protocols", &self.protocols);
formatter.field("security_policy_name", &self.security_policy_name);
formatter.field("server_id", &self.server_id);
formatter.field("workflow_details", &self.workflow_details);
formatter.field("structured_log_destinations", &self.structured_log_destinations);
formatter.field("s3_storage_options", &self.s3_storage_options);
formatter.finish()
}
}