All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.transfer.model.UpdateServerRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Transfer module holds the client classes that are used for communicating with Transfer.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.transfer.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class UpdateServerRequest extends TransferRequest implements
        ToCopyableBuilder {
    private static final SdkField CERTIFICATE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Certificate").getter(getter(UpdateServerRequest::certificate)).setter(setter(Builder::certificate))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Certificate").build()).build();

    private static final SdkField ENDPOINT_DETAILS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("EndpointDetails")
            .getter(getter(UpdateServerRequest::endpointDetails)).setter(setter(Builder::endpointDetails))
            .constructor(EndpointDetails::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointDetails").build()).build();

    private static final SdkField ENDPOINT_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("EndpointType").getter(getter(UpdateServerRequest::endpointTypeAsString))
            .setter(setter(Builder::endpointType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EndpointType").build()).build();

    private static final SdkField HOST_KEY_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("HostKey").getter(getter(UpdateServerRequest::hostKey)).setter(setter(Builder::hostKey))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HostKey").build()).build();

    private static final SdkField IDENTITY_PROVIDER_DETAILS_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("IdentityProviderDetails")
            .getter(getter(UpdateServerRequest::identityProviderDetails)).setter(setter(Builder::identityProviderDetails))
            .constructor(IdentityProviderDetails::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IdentityProviderDetails").build())
            .build();

    private static final SdkField LOGGING_ROLE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("LoggingRole").getter(getter(UpdateServerRequest::loggingRole)).setter(setter(Builder::loggingRole))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LoggingRole").build()).build();

    private static final SdkField> PROTOCOLS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("Protocols")
            .getter(getter(UpdateServerRequest::protocolsAsStrings))
            .setter(setter(Builder::protocolsWithStrings))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Protocols").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final SdkField SECURITY_POLICY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("SecurityPolicyName").getter(getter(UpdateServerRequest::securityPolicyName))
            .setter(setter(Builder::securityPolicyName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SecurityPolicyName").build())
            .build();

    private static final SdkField SERVER_ID_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ServerId").getter(getter(UpdateServerRequest::serverId)).setter(setter(Builder::serverId))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServerId").build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CERTIFICATE_FIELD,
            ENDPOINT_DETAILS_FIELD, ENDPOINT_TYPE_FIELD, HOST_KEY_FIELD, IDENTITY_PROVIDER_DETAILS_FIELD, LOGGING_ROLE_FIELD,
            PROTOCOLS_FIELD, SECURITY_POLICY_NAME_FIELD, SERVER_ID_FIELD));

    private final String certificate;

    private final EndpointDetails endpointDetails;

    private final String endpointType;

    private final String hostKey;

    private final IdentityProviderDetails identityProviderDetails;

    private final String loggingRole;

    private final List protocols;

    private final String securityPolicyName;

    private final String serverId;

    private UpdateServerRequest(BuilderImpl builder) {
        super(builder);
        this.certificate = builder.certificate;
        this.endpointDetails = builder.endpointDetails;
        this.endpointType = builder.endpointType;
        this.hostKey = builder.hostKey;
        this.identityProviderDetails = builder.identityProviderDetails;
        this.loggingRole = builder.loggingRole;
        this.protocols = builder.protocols;
        this.securityPolicyName = builder.securityPolicyName;
        this.serverId = builder.serverId;
    }

    /**
     * 

* The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS. *

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates into * ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and * information about the issuer. *

*
* * @return The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS.

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates * into ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and * information about the issuer. *

*/ public final String certificate() { return certificate; } /** *

* The virtual private cloud (VPC) endpoint settings that are configured for your server. With a VPC endpoint, you * can restrict access to your server to resources only within your VPC. To control incoming internet traffic, you * will need to associate one or more Elastic IP addresses with your server's endpoint. *

* * @return The virtual private cloud (VPC) endpoint settings that are configured for your server. With a VPC * endpoint, you can restrict access to your server to resources only within your VPC. To control incoming * internet traffic, you will need to associate one or more Elastic IP addresses with your server's * endpoint. */ public final EndpointDetails endpointDetails() { return endpointDetails; } /** *

* The type of endpoint that you want your server to connect to. You can choose to connect to the public internet or * a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only within your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

*
*

* If the service returns an enum value that is not available in the current SDK version, {@link #endpointType} will * return {@link EndpointType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #endpointTypeAsString}. *

* * @return The type of endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources * only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

* @see EndpointType */ public final EndpointType endpointType() { return EndpointType.fromValue(endpointType); } /** *

* The type of endpoint that you want your server to connect to. You can choose to connect to the public internet or * a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only within your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

*
*

* If the service returns an enum value that is not available in the current SDK version, {@link #endpointType} will * return {@link EndpointType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #endpointTypeAsString}. *

* * @return The type of endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources * only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

* @see EndpointType */ public final String endpointTypeAsString() { return endpointType; } /** *

* The RSA private key as generated by ssh-keygen -N "" -m PEM -f my-new-server-key. *

* *

* If you aren't planning to migrate existing users from an existing server to a new server, don't update the host * key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. *

* * @return The RSA private key as generated by ssh-keygen -N "" -m PEM -f my-new-server-key.

* *

* If you aren't planning to migrate existing users from an existing server to a new server, don't update * the host key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. */ public final String hostKey() { return hostKey; } /** *

* An array containing all of the information required to call a customer's authentication API method. *

* * @return An array containing all of the information required to call a customer's authentication API method. */ public final IdentityProviderDetails identityProviderDetails() { return identityProviderDetails; } /** *

* Changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged in Amazon * CloudWatch, turning logging on or off. *

* * @return Changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged in * Amazon CloudWatch, turning logging on or off. */ public final String loggingRole() { return loggingRole; } /** *

* 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: *

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which will * be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasProtocols()} to see if a value was sent in this field. *

* * @return 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:

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*/ public final List protocols() { return ProtocolsCopier.copyStringToEnum(protocols); } /** * Returns true if the Protocols property was specified by the sender (it may be empty), or false if the sender did * not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public final boolean hasProtocols() { return protocols != null && !(protocols instanceof SdkAutoConstructList); } /** *

* 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: *

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which will * be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* You can use {@link #hasProtocols()} to see if a value was sent in this field. *

* * @return 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:

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*/ public final List protocolsAsStrings() { return protocols; } /** *

* Specifies the name of the security policy that is attached to the server. *

* * @return Specifies the name of the security policy that is attached to the server. */ public final String securityPolicyName() { return securityPolicyName; } /** *

* A system-assigned unique identifier for a server instance that the user account is assigned to. *

* * @return A system-assigned unique identifier for a server instance that the user account is assigned to. */ public final String serverId() { return serverId; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(certificate()); hashCode = 31 * hashCode + Objects.hashCode(endpointDetails()); hashCode = 31 * hashCode + Objects.hashCode(endpointTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(hostKey()); hashCode = 31 * hashCode + Objects.hashCode(identityProviderDetails()); hashCode = 31 * hashCode + Objects.hashCode(loggingRole()); hashCode = 31 * hashCode + Objects.hashCode(hasProtocols() ? protocolsAsStrings() : null); hashCode = 31 * hashCode + Objects.hashCode(securityPolicyName()); hashCode = 31 * hashCode + Objects.hashCode(serverId()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof UpdateServerRequest)) { return false; } UpdateServerRequest other = (UpdateServerRequest) obj; return Objects.equals(certificate(), other.certificate()) && Objects.equals(endpointDetails(), other.endpointDetails()) && Objects.equals(endpointTypeAsString(), other.endpointTypeAsString()) && Objects.equals(hostKey(), other.hostKey()) && Objects.equals(identityProviderDetails(), other.identityProviderDetails()) && Objects.equals(loggingRole(), other.loggingRole()) && hasProtocols() == other.hasProtocols() && Objects.equals(protocolsAsStrings(), other.protocolsAsStrings()) && Objects.equals(securityPolicyName(), other.securityPolicyName()) && Objects.equals(serverId(), other.serverId()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("UpdateServerRequest").add("Certificate", certificate()) .add("EndpointDetails", endpointDetails()).add("EndpointType", endpointTypeAsString()) .add("HostKey", hostKey() == null ? null : "*** Sensitive Data Redacted ***") .add("IdentityProviderDetails", identityProviderDetails()).add("LoggingRole", loggingRole()) .add("Protocols", hasProtocols() ? protocolsAsStrings() : null).add("SecurityPolicyName", securityPolicyName()) .add("ServerId", serverId()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Certificate": return Optional.ofNullable(clazz.cast(certificate())); case "EndpointDetails": return Optional.ofNullable(clazz.cast(endpointDetails())); case "EndpointType": return Optional.ofNullable(clazz.cast(endpointTypeAsString())); case "HostKey": return Optional.ofNullable(clazz.cast(hostKey())); case "IdentityProviderDetails": return Optional.ofNullable(clazz.cast(identityProviderDetails())); case "LoggingRole": return Optional.ofNullable(clazz.cast(loggingRole())); case "Protocols": return Optional.ofNullable(clazz.cast(protocolsAsStrings())); case "SecurityPolicyName": return Optional.ofNullable(clazz.cast(securityPolicyName())); case "ServerId": return Optional.ofNullable(clazz.cast(serverId())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateServerRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends TransferRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS. *

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates into * ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified and * information about the issuer. *

*
* * @param certificate * The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate. Required when * Protocols is set to FTPS.

*

* To request a new public certificate, see Request a public * certificate in the AWS Certificate Manager User Guide. *

*

* To import an existing certificate into ACM, see Importing certificates * into ACM in the AWS Certificate Manager User Guide. *

*

* To request a private certificate to use FTPS through private IP addresses, see Request a private * certificate in the AWS Certificate Manager User Guide. *

*

* Certificates with the following cryptographic algorithms and key sizes are supported: *

*
    *
  • *

    * 2048-bit RSA (RSA_2048) *

    *
  • *
  • *

    * 4096-bit RSA (RSA_4096) *

    *
  • *
  • *

    * Elliptic Prime Curve 256 bit (EC_prime256v1) *

    *
  • *
  • *

    * Elliptic Prime Curve 384 bit (EC_secp384r1) *

    *
  • *
  • *

    * Elliptic Prime Curve 521 bit (EC_secp521r1) *

    *
  • *
* *

* The certificate must be a valid SSL/TLS X.509 version 3 certificate with FQDN or IP address specified * and information about the issuer. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder certificate(String certificate); /** *

* The virtual private cloud (VPC) endpoint settings that are configured for your server. With a VPC endpoint, * you can restrict access to your server to resources only within your VPC. To control incoming internet * traffic, you will need to associate one or more Elastic IP addresses with your server's endpoint. *

* * @param endpointDetails * The virtual private cloud (VPC) endpoint settings that are configured for your server. With a VPC * endpoint, you can restrict access to your server to resources only within your VPC. To control * incoming internet traffic, you will need to associate one or more Elastic IP addresses with your * server's endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder endpointDetails(EndpointDetails endpointDetails); /** *

* The virtual private cloud (VPC) endpoint settings that are configured for your server. With a VPC endpoint, * you can restrict access to your server to resources only within your VPC. To control incoming internet * traffic, you will need to associate one or more Elastic IP addresses with your server's endpoint. *

* This is a convenience that creates an instance of the {@link EndpointDetails.Builder} avoiding the need to * create one manually via {@link EndpointDetails#builder()}. * * When the {@link Consumer} completes, {@link EndpointDetails.Builder#build()} is called immediately and its * result is passed to {@link #endpointDetails(EndpointDetails)}. * * @param endpointDetails * a consumer that will call methods on {@link EndpointDetails.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #endpointDetails(EndpointDetails) */ default Builder endpointDetails(Consumer endpointDetails) { return endpointDetails(EndpointDetails.builder().applyMutation(endpointDetails).build()); } /** *

* The type of endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only * within your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

*
* * @param endpointType * The type of endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources * only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

* @see EndpointType * @return Returns a reference to this object so that method calls can be chained together. * @see EndpointType */ Builder endpointType(String endpointType); /** *

* The type of endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources only * within your VPC. *

* *

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

*
* * @param endpointType * The type of endpoint that you want your server to connect to. You can choose to connect to the public * internet or a VPC endpoint. With a VPC endpoint, you can restrict access to your server and resources * only within your VPC.

*

* It is recommended that you use VPC as the EndpointType. 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 EndpointType set to VPC_ENDPOINT. *

* @see EndpointType * @return Returns a reference to this object so that method calls can be chained together. * @see EndpointType */ Builder endpointType(EndpointType endpointType); /** *

* The RSA private key as generated by ssh-keygen -N "" -m PEM -f my-new-server-key. *

* *

* If you aren't planning to migrate existing users from an existing server to a new server, don't update the * host key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. *

* * @param hostKey * The RSA private key as generated by ssh-keygen -N "" -m PEM -f my-new-server-key.

* *

* If you aren't planning to migrate existing users from an existing server to a new server, don't update * the host key. Accidentally changing a server's host key can be disruptive. *

*
*

* For more information, see Change the host key for your SFTP-enabled server in the AWS Transfer Family User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hostKey(String hostKey); /** *

* An array containing all of the information required to call a customer's authentication API method. *

* * @param identityProviderDetails * An array containing all of the information required to call a customer's authentication API method. * @return Returns a reference to this object so that method calls can be chained together. */ Builder identityProviderDetails(IdentityProviderDetails identityProviderDetails); /** *

* An array containing all of the information required to call a customer's authentication API method. *

* This is a convenience that creates an instance of the {@link IdentityProviderDetails.Builder} avoiding the * need to create one manually via {@link IdentityProviderDetails#builder()}. * * When the {@link Consumer} completes, {@link IdentityProviderDetails.Builder#build()} is called immediately * and its result is passed to {@link #identityProviderDetails(IdentityProviderDetails)}. * * @param identityProviderDetails * a consumer that will call methods on {@link IdentityProviderDetails.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #identityProviderDetails(IdentityProviderDetails) */ default Builder identityProviderDetails(Consumer identityProviderDetails) { return identityProviderDetails(IdentityProviderDetails.builder().applyMutation(identityProviderDetails).build()); } /** *

* Changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged in Amazon * CloudWatch, turning logging on or off. *

* * @param loggingRole * Changes the AWS Identity and Access Management (IAM) role that allows Amazon S3 events to be logged in * Amazon CloudWatch, turning logging on or off. * @return Returns a reference to this object so that method calls can be chained together. */ Builder loggingRole(String loggingRole); /** *

* 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: *

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * 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:

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder protocolsWithStrings(Collection protocols); /** *

* 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: *

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * 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:

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder protocolsWithStrings(String... protocols); /** *

* 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: *

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * 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:

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder protocols(Collection protocols); /** *

* 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: *

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) which * will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to SERVICE_MANAGED. *

*
* * @param protocols * 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:

*
    *
  • *

    * Secure Shell (SSH) File Transfer Protocol (SFTP): File transfer over SSH *

    *
  • *
  • *

    * File Transfer Protocol Secure (FTPS): File transfer with TLS encryption *

    *
  • *
  • *

    * File Transfer Protocol (FTP): Unencrypted file transfer *

    *
  • *
* *

* If you select FTPS, you must choose a certificate stored in AWS Certificate Manager (ACM) * which will be used to identify your server when clients connect to it over FTPS. *

*

* If Protocol includes either FTP or FTPS, then the * EndpointType must be VPC and the IdentityProviderType must be * API_GATEWAY. *

*

* If Protocol includes FTP, then AddressAllocationIds cannot be * associated. *

*

* If Protocol is set only to SFTP, the EndpointType can be set to * PUBLIC and the IdentityProviderType can be set to * SERVICE_MANAGED. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder protocols(Protocol... protocols); /** *

* Specifies the name of the security policy that is attached to the server. *

* * @param securityPolicyName * Specifies the name of the security policy that is attached to the server. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityPolicyName(String securityPolicyName); /** *

* A system-assigned unique identifier for a server instance that the user account is assigned to. *

* * @param serverId * A system-assigned unique identifier for a server instance that the user account is assigned to. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serverId(String serverId); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends TransferRequest.BuilderImpl implements Builder { private String certificate; private EndpointDetails endpointDetails; private String endpointType; private String hostKey; private IdentityProviderDetails identityProviderDetails; private String loggingRole; private List protocols = DefaultSdkAutoConstructList.getInstance(); private String securityPolicyName; private String serverId; private BuilderImpl() { } private BuilderImpl(UpdateServerRequest model) { super(model); certificate(model.certificate); endpointDetails(model.endpointDetails); endpointType(model.endpointType); hostKey(model.hostKey); identityProviderDetails(model.identityProviderDetails); loggingRole(model.loggingRole); protocolsWithStrings(model.protocols); securityPolicyName(model.securityPolicyName); serverId(model.serverId); } public final String getCertificate() { return certificate; } @Override public final Builder certificate(String certificate) { this.certificate = certificate; return this; } public final void setCertificate(String certificate) { this.certificate = certificate; } public final EndpointDetails.Builder getEndpointDetails() { return endpointDetails != null ? endpointDetails.toBuilder() : null; } @Override public final Builder endpointDetails(EndpointDetails endpointDetails) { this.endpointDetails = endpointDetails; return this; } public final void setEndpointDetails(EndpointDetails.BuilderImpl endpointDetails) { this.endpointDetails = endpointDetails != null ? endpointDetails.build() : null; } public final String getEndpointType() { return endpointType; } @Override public final Builder endpointType(String endpointType) { this.endpointType = endpointType; return this; } @Override public final Builder endpointType(EndpointType endpointType) { this.endpointType(endpointType == null ? null : endpointType.toString()); return this; } public final void setEndpointType(String endpointType) { this.endpointType = endpointType; } public final String getHostKey() { return hostKey; } @Override public final Builder hostKey(String hostKey) { this.hostKey = hostKey; return this; } public final void setHostKey(String hostKey) { this.hostKey = hostKey; } public final IdentityProviderDetails.Builder getIdentityProviderDetails() { return identityProviderDetails != null ? identityProviderDetails.toBuilder() : null; } @Override public final Builder identityProviderDetails(IdentityProviderDetails identityProviderDetails) { this.identityProviderDetails = identityProviderDetails; return this; } public final void setIdentityProviderDetails(IdentityProviderDetails.BuilderImpl identityProviderDetails) { this.identityProviderDetails = identityProviderDetails != null ? identityProviderDetails.build() : null; } public final String getLoggingRole() { return loggingRole; } @Override public final Builder loggingRole(String loggingRole) { this.loggingRole = loggingRole; return this; } public final void setLoggingRole(String loggingRole) { this.loggingRole = loggingRole; } public final Collection getProtocols() { if (protocols instanceof SdkAutoConstructList) { return null; } return protocols; } @Override public final Builder protocolsWithStrings(Collection protocols) { this.protocols = ProtocolsCopier.copy(protocols); return this; } @Override @SafeVarargs public final Builder protocolsWithStrings(String... protocols) { protocolsWithStrings(Arrays.asList(protocols)); return this; } @Override public final Builder protocols(Collection protocols) { this.protocols = ProtocolsCopier.copyEnumToString(protocols); return this; } @Override @SafeVarargs public final Builder protocols(Protocol... protocols) { protocols(Arrays.asList(protocols)); return this; } public final void setProtocols(Collection protocols) { this.protocols = ProtocolsCopier.copy(protocols); } public final String getSecurityPolicyName() { return securityPolicyName; } @Override public final Builder securityPolicyName(String securityPolicyName) { this.securityPolicyName = securityPolicyName; return this; } public final void setSecurityPolicyName(String securityPolicyName) { this.securityPolicyName = securityPolicyName; } public final String getServerId() { return serverId; } @Override public final Builder serverId(String serverId) { this.serverId = serverId; return this; } public final void setServerId(String serverId) { this.serverId = serverId; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public UpdateServerRequest build() { return new UpdateServerRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy