
software.amazon.awssdk.services.transfer.model.UpdateServerRequest Maven / Gradle / Ivy
/*
* 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 PROTOCOL_DETAILS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("ProtocolDetails")
.getter(getter(UpdateServerRequest::protocolDetails)).setter(setter(Builder::protocolDetails))
.constructor(ProtocolDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProtocolDetails").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 POST_AUTHENTICATION_LOGIN_BANNER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("PostAuthenticationLoginBanner")
.getter(getter(UpdateServerRequest::postAuthenticationLoginBanner))
.setter(setter(Builder::postAuthenticationLoginBanner))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PostAuthenticationLoginBanner")
.build()).build();
private static final SdkField PRE_AUTHENTICATION_LOGIN_BANNER_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("PreAuthenticationLoginBanner")
.getter(getter(UpdateServerRequest::preAuthenticationLoginBanner))
.setter(setter(Builder::preAuthenticationLoginBanner))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PreAuthenticationLoginBanner")
.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 SdkField WORKFLOW_DETAILS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("WorkflowDetails")
.getter(getter(UpdateServerRequest::workflowDetails)).setter(setter(Builder::workflowDetails))
.constructor(WorkflowDetails::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WorkflowDetails").build()).build();
private static final SdkField> STRUCTURED_LOG_DESTINATIONS_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("StructuredLogDestinations")
.getter(getter(UpdateServerRequest::structuredLogDestinations))
.setter(setter(Builder::structuredLogDestinations))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StructuredLogDestinations").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 S3_STORAGE_OPTIONS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("S3StorageOptions")
.getter(getter(UpdateServerRequest::s3StorageOptions)).setter(setter(Builder::s3StorageOptions))
.constructor(S3StorageOptions::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("S3StorageOptions").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CERTIFICATE_FIELD,
PROTOCOL_DETAILS_FIELD, ENDPOINT_DETAILS_FIELD, ENDPOINT_TYPE_FIELD, HOST_KEY_FIELD, IDENTITY_PROVIDER_DETAILS_FIELD,
LOGGING_ROLE_FIELD, POST_AUTHENTICATION_LOGIN_BANNER_FIELD, PRE_AUTHENTICATION_LOGIN_BANNER_FIELD, PROTOCOLS_FIELD,
SECURITY_POLICY_NAME_FIELD, SERVER_ID_FIELD, WORKFLOW_DETAILS_FIELD, STRUCTURED_LOG_DESTINATIONS_FIELD,
S3_STORAGE_OPTIONS_FIELD));
private final String certificate;
private final ProtocolDetails protocolDetails;
private final EndpointDetails endpointDetails;
private final String endpointType;
private final String hostKey;
private final IdentityProviderDetails identityProviderDetails;
private final String loggingRole;
private final String postAuthenticationLoginBanner;
private final String preAuthenticationLoginBanner;
private final List protocols;
private final String securityPolicyName;
private final String serverId;
private final WorkflowDetails workflowDetails;
private final List structuredLogDestinations;
private final S3StorageOptions s3StorageOptions;
private UpdateServerRequest(BuilderImpl builder) {
super(builder);
this.certificate = builder.certificate;
this.protocolDetails = builder.protocolDetails;
this.endpointDetails = builder.endpointDetails;
this.endpointType = builder.endpointType;
this.hostKey = builder.hostKey;
this.identityProviderDetails = builder.identityProviderDetails;
this.loggingRole = builder.loggingRole;
this.postAuthenticationLoginBanner = builder.postAuthenticationLoginBanner;
this.preAuthenticationLoginBanner = builder.preAuthenticationLoginBanner;
this.protocols = builder.protocols;
this.securityPolicyName = builder.securityPolicyName;
this.serverId = builder.serverId;
this.workflowDetails = builder.workflowDetails;
this.structuredLogDestinations = builder.structuredLogDestinations;
this.s3StorageOptions = builder.s3StorageOptions;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon Web ServicesCertificate Manager (ACM) certificate. Required when
* Protocols
is set to FTPS
.
*
*
* To request a new public certificate, see Request a public
* certificate in the Amazon Web ServicesCertificate Manager User Guide.
*
*
* To import an existing certificate into ACM, see Importing certificates into
* ACM in the Amazon Web ServicesCertificate Manager User Guide.
*
*
* To request a private certificate to use FTPS through private IP addresses, see Request a private
* certificate in the Amazon Web ServicesCertificate 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 Amazon Web ServicesCertificate Manager (ACM) certificate. Required
* when Protocols
is set to FTPS
.
*
* To request a new public certificate, see Request a public
* certificate in the Amazon Web ServicesCertificate Manager User Guide.
*
*
* To import an existing certificate into ACM, see Importing certificates
* into ACM in the Amazon Web ServicesCertificate Manager User Guide.
*
*
* To request a private certificate to use FTPS through private IP addresses, see Request a private
* certificate in the Amazon Web ServicesCertificate 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 protocol settings that are configured for your server.
*
*
* -
*
* To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp
parameter. Enter a single
* dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
*
*
* -
*
* To ignore the error that is generated when the client attempts to use the SETSTAT
command on a file
* that you are uploading to an Amazon S3 bucket, use the SetStatOption
parameter. To have the Transfer
* Family server ignore the SETSTAT
command and upload files without needing to make any changes to
* your SFTP client, set the value to ENABLE_NO_OP
. If you set the SetStatOption
parameter
* to ENABLE_NO_OP
, Transfer Family generates a log entry to Amazon CloudWatch Logs, so that you can
* determine when the client is making a SETSTAT
call.
*
*
* -
*
* To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session ID,
* use the TlsSessionResumptionMode
parameter.
*
*
* -
*
* As2Transports
indicates the transport method for the AS2 messages. Currently, only HTTP is
* supported.
*
*
*
*
* @return The protocol settings that are configured for your server.
*
* -
*
* To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp
parameter. Enter a
* single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
*
*
* -
*
* To ignore the error that is generated when the client attempts to use the SETSTAT
command on
* a file that you are uploading to an Amazon S3 bucket, use the SetStatOption
parameter. To
* have the Transfer Family server ignore the SETSTAT
command and upload files without needing
* to make any changes to your SFTP client, set the value to ENABLE_NO_OP
. If you set the
* SetStatOption
parameter to ENABLE_NO_OP
, Transfer Family generates a log entry
* to Amazon CloudWatch Logs, so that you can determine when the client is making a SETSTAT
* call.
*
*
* -
*
* To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique
* session ID, use the TlsSessionResumptionMode
parameter.
*
*
* -
*
* As2Transports
indicates the transport method for the AS2 messages. Currently, only HTTP is
* supported.
*
*
*/
public final ProtocolDetails protocolDetails() {
return protocolDetails;
}
/**
*
* 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.
*
*
* @return 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.
*/
public final EndpointDetails endpointDetails() {
return endpointDetails;
}
/**
*
* 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.
*
*
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
in your
* Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already
* created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web Servicesaccount on or before May
* 19, 2021, you will not be affected. After this date, use EndpointType
=VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*
*
* 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 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.
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
in
* your Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have
* already created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web Servicesaccount on
* or before May 19, 2021, you will not be affected. After this date, use EndpointType
=
* VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*
*
* 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 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.
*
*
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
in your
* Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already
* created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web Servicesaccount on or before May
* 19, 2021, you will not be affected. After this date, use EndpointType
=VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*
*
* 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 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.
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
in
* your Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have
* already created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web Servicesaccount on
* or before May 19, 2021, you will not be affected. After this date, use EndpointType
=
* VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*
*
* 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, 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.
*
*
* Use the following command to generate an RSA 2048 bit key with no passphrase:
*
*
* ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key
.
*
*
* Use a minimum value of 2048 for the -b
option. You can create a stronger key by using 3072 or 4096.
*
*
* Use the following command to generate an ECDSA 256 bit key with no passphrase:
*
*
* ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key
.
*
*
* Valid values for the -b
option for ECDSA are 256, 384, and 521.
*
*
* Use the following command to generate an ED25519 key with no passphrase:
*
*
* ssh-keygen -t ed25519 -N "" -f my-new-server-key
.
*
*
* For all of these commands, you can replace my-new-server-key with a string of your choice.
*
*
*
* 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.
*
*
*
* For more information, see Manage host keys for your SFTP-enabled server in the Transfer Family User Guide.
*
*
* @return 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.
*
* Use the following command to generate an RSA 2048 bit key with no passphrase:
*
*
* ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key
.
*
*
* Use a minimum value of 2048 for the -b
option. You can create a stronger key by using 3072
* or 4096.
*
*
* Use the following command to generate an ECDSA 256 bit key with no passphrase:
*
*
* ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key
.
*
*
* Valid values for the -b
option for ECDSA are 256, 384, and 521.
*
*
* Use the following command to generate an ED25519 key with no passphrase:
*
*
* ssh-keygen -t ed25519 -N "" -f my-new-server-key
.
*
*
* For all of these commands, you can replace my-new-server-key with a string of your choice.
*
*
*
* 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.
*
*
*
* For more information, see Manage host keys for your SFTP-enabled server in the 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;
}
/**
*
* 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.
*
*
* @return 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.
*/
public final String loggingRole() {
return loggingRole;
}
/**
*
* Specifies a string to display when users connect to a server. This string is displayed after the user
* authenticates.
*
*
*
* The SFTP protocol does not support post-authentication display banners.
*
*
*
* @return Specifies a string to display when users connect to a server. This string is displayed after the user
* authenticates.
*
* The SFTP protocol does not support post-authentication display banners.
*
*/
public final String postAuthenticationLoginBanner() {
return postAuthenticationLoginBanner;
}
/**
*
* 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:
*
*
* 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.
*
*
* @return 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:
*
* 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.
*/
public final String preAuthenticationLoginBanner() {
return preAuthenticationLoginBanner;
}
/**
*
* 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:
*
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which is 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 either
* AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity types:
* SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be VPC
,
* and domain must be Amazon S3.
*
*
*
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasProtocols} method.
*
*
* @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:
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which
* is 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
* either AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity
* types: SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
*/
public final List protocols() {
return ProtocolsCopier.copyStringToEnum(protocols);
}
/**
* For responses, this returns true if the service returned a value for the Protocols property. This DOES NOT check
* that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is
* useful because the SDK will never return a null collection or map, but you may need to differentiate between the
* service returning nothing (or null) and the service returning an empty collection or map. For requests, this
* returns true if a value for the property was specified in the request builder, and false if a value was not
* specified.
*/
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:
*
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which is 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 either
* AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity types:
* SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be VPC
,
* and domain must be Amazon S3.
*
*
*
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasProtocols} method.
*
*
* @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:
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which
* is 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
* either AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity
* types: SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
*/
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 Transfer Family user is assigned to.
*
*
* @return A system-assigned unique identifier for a server instance that the Transfer Family user is assigned to.
*/
public final String serverId() {
return serverId;
}
/**
*
* Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the
* workflow.
*
*
* In addition to a workflow to execute when a file is uploaded completely, WorkflowDetails
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.
*
*
* To remove an associated workflow from a server, you can provide an empty OnUpload
object, as in the
* following example.
*
*
* aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'
*
*
* @return Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the
* workflow.
*
* In addition to a workflow to execute when a file is uploaded completely, WorkflowDetails
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.
*
*
* To remove an associated workflow from a server, you can provide an empty OnUpload
object, as
* in the following example.
*
*
* aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'
*/
public final WorkflowDetails workflowDetails() {
return workflowDetails;
}
/**
* For responses, this returns true if the service returned a value for the StructuredLogDestinations property. This
* DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the
* property). This is useful because the SDK will never return a null collection or map, but you may need to
* differentiate between the service returning nothing (or null) and the service returning an empty collection or
* map. For requests, this returns true if a value for the property was specified in the request builder, and false
* if a value was not specified.
*/
public final boolean hasStructuredLogDestinations() {
return structuredLogDestinations != null && !(structuredLogDestinations instanceof SdkAutoConstructList);
}
/**
*
* Specifies the log groups to which your server logs are sent.
*
*
* 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:
*
*
* arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*
*
*
* For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
*
*
* 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 update-server
call. For example:
*
*
* update-server --server-id s-1234567890abcdef0 --structured-log-destinations
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasStructuredLogDestinations} method.
*
*
* @return Specifies the log groups to which your server logs are sent.
*
* 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:
*
*
* arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*
*
*
* For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
*
*
* 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 update-server
call.
* For example:
*
*
* update-server --server-id s-1234567890abcdef0 --structured-log-destinations
*/
public final List structuredLogDestinations() {
return structuredLogDestinations;
}
/**
*
* Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by default.
*
*
* By default, home directory mappings have a TYPE
of DIRECTORY
. If you enable this
* option, you would then need to explicitly set the HomeDirectoryMapEntry
Type
to
* FILE
if you want a mapping to have a file target.
*
*
* @return Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by
* default.
*
* By default, home directory mappings have a TYPE
of DIRECTORY
. If you enable
* this option, you would then need to explicitly set the HomeDirectoryMapEntry
* Type
to FILE
if you want a mapping to have a file target.
*/
public final S3StorageOptions s3StorageOptions() {
return s3StorageOptions;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> 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(protocolDetails());
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(postAuthenticationLoginBanner());
hashCode = 31 * hashCode + Objects.hashCode(preAuthenticationLoginBanner());
hashCode = 31 * hashCode + Objects.hashCode(hasProtocols() ? protocolsAsStrings() : null);
hashCode = 31 * hashCode + Objects.hashCode(securityPolicyName());
hashCode = 31 * hashCode + Objects.hashCode(serverId());
hashCode = 31 * hashCode + Objects.hashCode(workflowDetails());
hashCode = 31 * hashCode + Objects.hashCode(hasStructuredLogDestinations() ? structuredLogDestinations() : null);
hashCode = 31 * hashCode + Objects.hashCode(s3StorageOptions());
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(protocolDetails(), other.protocolDetails())
&& 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())
&& Objects.equals(postAuthenticationLoginBanner(), other.postAuthenticationLoginBanner())
&& Objects.equals(preAuthenticationLoginBanner(), other.preAuthenticationLoginBanner())
&& hasProtocols() == other.hasProtocols() && Objects.equals(protocolsAsStrings(), other.protocolsAsStrings())
&& Objects.equals(securityPolicyName(), other.securityPolicyName())
&& Objects.equals(serverId(), other.serverId()) && Objects.equals(workflowDetails(), other.workflowDetails())
&& hasStructuredLogDestinations() == other.hasStructuredLogDestinations()
&& Objects.equals(structuredLogDestinations(), other.structuredLogDestinations())
&& Objects.equals(s3StorageOptions(), other.s3StorageOptions());
}
/**
* 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("ProtocolDetails", protocolDetails()).add("EndpointDetails", endpointDetails())
.add("EndpointType", endpointTypeAsString())
.add("HostKey", hostKey() == null ? null : "*** Sensitive Data Redacted ***")
.add("IdentityProviderDetails", identityProviderDetails()).add("LoggingRole", loggingRole())
.add("PostAuthenticationLoginBanner", postAuthenticationLoginBanner())
.add("PreAuthenticationLoginBanner", preAuthenticationLoginBanner())
.add("Protocols", hasProtocols() ? protocolsAsStrings() : null).add("SecurityPolicyName", securityPolicyName())
.add("ServerId", serverId()).add("WorkflowDetails", workflowDetails())
.add("StructuredLogDestinations", hasStructuredLogDestinations() ? structuredLogDestinations() : null)
.add("S3StorageOptions", s3StorageOptions()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Certificate":
return Optional.ofNullable(clazz.cast(certificate()));
case "ProtocolDetails":
return Optional.ofNullable(clazz.cast(protocolDetails()));
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 "PostAuthenticationLoginBanner":
return Optional.ofNullable(clazz.cast(postAuthenticationLoginBanner()));
case "PreAuthenticationLoginBanner":
return Optional.ofNullable(clazz.cast(preAuthenticationLoginBanner()));
case "Protocols":
return Optional.ofNullable(clazz.cast(protocolsAsStrings()));
case "SecurityPolicyName":
return Optional.ofNullable(clazz.cast(securityPolicyName()));
case "ServerId":
return Optional.ofNullable(clazz.cast(serverId()));
case "WorkflowDetails":
return Optional.ofNullable(clazz.cast(workflowDetails()));
case "StructuredLogDestinations":
return Optional.ofNullable(clazz.cast(structuredLogDestinations()));
case "S3StorageOptions":
return Optional.ofNullable(clazz.cast(s3StorageOptions()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function
*
* To request a new public certificate, see Request a public
* certificate in the Amazon Web ServicesCertificate Manager User Guide.
*
*
* To import an existing certificate into ACM, see Importing certificates
* into ACM in the Amazon Web ServicesCertificate Manager User Guide.
*
*
* To request a private certificate to use FTPS through private IP addresses, see Request a private
* certificate in the Amazon Web ServicesCertificate 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 protocol settings that are configured for your server.
*
*
* -
*
* To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp
parameter. Enter a
* single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
*
*
* -
*
* To ignore the error that is generated when the client attempts to use the SETSTAT
command on a
* file that you are uploading to an Amazon S3 bucket, use the SetStatOption
parameter. To have the
* Transfer Family server ignore the SETSTAT
command and upload files without needing to make any
* changes to your SFTP client, set the value to ENABLE_NO_OP
. If you set the
* SetStatOption
parameter to ENABLE_NO_OP
, Transfer Family generates a log entry to
* Amazon CloudWatch Logs, so that you can determine when the client is making a SETSTAT
call.
*
*
* -
*
* To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session
* ID, use the TlsSessionResumptionMode
parameter.
*
*
* -
*
* As2Transports
indicates the transport method for the AS2 messages. Currently, only HTTP is
* supported.
*
*
*
*
* @param protocolDetails
* The protocol settings that are configured for your server.
*
* -
*
* To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp
parameter. Enter
* a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load
* balancer.
*
*
* -
*
* To ignore the error that is generated when the client attempts to use the SETSTAT
command
* on a file that you are uploading to an Amazon S3 bucket, use the SetStatOption
parameter.
* To have the Transfer Family server ignore the SETSTAT
command and upload files without
* needing to make any changes to your SFTP client, set the value to ENABLE_NO_OP
. If you
* set the SetStatOption
parameter to ENABLE_NO_OP
, Transfer Family generates a
* log entry to Amazon CloudWatch Logs, so that you can determine when the client is making a
* SETSTAT
call.
*
*
* -
*
* To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique
* session ID, use the TlsSessionResumptionMode
parameter.
*
*
* -
*
* As2Transports
indicates the transport method for the AS2 messages. Currently, only HTTP
* is supported.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder protocolDetails(ProtocolDetails protocolDetails);
/**
*
* The protocol settings that are configured for your server.
*
*
* -
*
* To indicate passive mode (for FTP and FTPS protocols), use the PassiveIp
parameter. Enter a
* single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
*
*
* -
*
* To ignore the error that is generated when the client attempts to use the SETSTAT
command on a
* file that you are uploading to an Amazon S3 bucket, use the SetStatOption
parameter. To have the
* Transfer Family server ignore the SETSTAT
command and upload files without needing to make any
* changes to your SFTP client, set the value to ENABLE_NO_OP
. If you set the
* SetStatOption
parameter to ENABLE_NO_OP
, Transfer Family generates a log entry to
* Amazon CloudWatch Logs, so that you can determine when the client is making a SETSTAT
call.
*
*
* -
*
* To determine whether your Transfer Family server resumes recent, negotiated sessions through a unique session
* ID, use the TlsSessionResumptionMode
parameter.
*
*
* -
*
* As2Transports
indicates the transport method for the AS2 messages. Currently, only HTTP is
* supported.
*
*
*
* This is a convenience method that creates an instance of the {@link ProtocolDetails.Builder} avoiding the
* need to create one manually via {@link ProtocolDetails#builder()}.
*
*
* When the {@link Consumer} completes, {@link ProtocolDetails.Builder#build()} is called immediately and its
* result is passed to {@link #protocolDetails(ProtocolDetails)}.
*
* @param protocolDetails
* a consumer that will call methods on {@link ProtocolDetails.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #protocolDetails(ProtocolDetails)
*/
default Builder protocolDetails(Consumer protocolDetails) {
return protocolDetails(ProtocolDetails.builder().applyMutation(protocolDetails).build());
}
/**
*
* 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.
*
*
* @param endpointDetails
* 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.
* @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. 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.
*
* This is a convenience method 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 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.
*
*
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
in your
* Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already
* created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web Servicesaccount on or before
* May 19, 2021, you will not be affected. After this date, use EndpointType
=VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*
*
* 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 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.
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
* in your Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you
* have already created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web
* Servicesaccount on or before May 19, 2021, you will not be affected. After this date, use
* EndpointType
=VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html
* #deprecate-vpc-endpoint.
*
*
* 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 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.
*
*
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
in your
* Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you have already
* created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web Servicesaccount on or before
* May 19, 2021, you will not be affected. After this date, use EndpointType
=VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint.
*
*
* 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 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.
*
* After May 19, 2021, you won't be able to create a server using EndpointType=VPC_ENDPOINT
* in your Amazon Web Servicesaccount if your account hasn't already done so before May 19, 2021. If you
* have already created servers with EndpointType=VPC_ENDPOINT
in your Amazon Web
* Servicesaccount on or before May 19, 2021, you will not be affected. After this date, use
* EndpointType
=VPC
.
*
*
* For more information, see
* https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html
* #deprecate-vpc-endpoint.
*
*
* 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, 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.
*
*
* Use the following command to generate an RSA 2048 bit key with no passphrase:
*
*
* ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key
.
*
*
* Use a minimum value of 2048 for the -b
option. You can create a stronger key by using 3072 or
* 4096.
*
*
* Use the following command to generate an ECDSA 256 bit key with no passphrase:
*
*
* ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key
.
*
*
* Valid values for the -b
option for ECDSA are 256, 384, and 521.
*
*
* Use the following command to generate an ED25519 key with no passphrase:
*
*
* ssh-keygen -t ed25519 -N "" -f my-new-server-key
.
*
*
* For all of these commands, you can replace my-new-server-key with a string of your choice.
*
*
*
* 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.
*
*
*
* For more information, see Manage host keys for your SFTP-enabled server in the Transfer Family User Guide.
*
*
* @param hostKey
* 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.
*
* Use the following command to generate an RSA 2048 bit key with no passphrase:
*
*
* ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key
.
*
*
* Use a minimum value of 2048 for the -b
option. You can create a stronger key by using
* 3072 or 4096.
*
*
* Use the following command to generate an ECDSA 256 bit key with no passphrase:
*
*
* ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key
.
*
*
* Valid values for the -b
option for ECDSA are 256, 384, and 521.
*
*
* Use the following command to generate an ED25519 key with no passphrase:
*
*
* ssh-keygen -t ed25519 -N "" -f my-new-server-key
.
*
*
* For all of these commands, you can replace my-new-server-key with a string of your choice.
*
*
*
* 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.
*
*
*
* For more information, see Manage host keys for your SFTP-enabled server in the 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 method 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());
}
/**
*
* 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.
*
*
* @param loggingRole
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder loggingRole(String loggingRole);
/**
*
* Specifies a string to display when users connect to a server. This string is displayed after the user
* authenticates.
*
*
*
* The SFTP protocol does not support post-authentication display banners.
*
*
*
* @param postAuthenticationLoginBanner
* Specifies a string to display when users connect to a server. This string is displayed after the user
* authenticates.
*
* The SFTP protocol does not support post-authentication display banners.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder postAuthenticationLoginBanner(String postAuthenticationLoginBanner);
/**
*
* 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:
*
*
* 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.
*
*
* @param preAuthenticationLoginBanner
* 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:
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder preAuthenticationLoginBanner(String preAuthenticationLoginBanner);
/**
*
* 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:
*
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which is
* 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 either
* AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity types:
* SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
*
*
* @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:
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business
* data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM)
* which is 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
* either AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity
* types: SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
* @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:
*
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which is
* 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 either
* AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity types:
* SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
*
*
* @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:
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business
* data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM)
* which is 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
* either AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity
* types: SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
* @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:
*
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which is
* 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 either
* AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity types:
* SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
*
*
* @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:
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business
* data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM)
* which is 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
* either AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity
* types: SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
* @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:
*
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM) which is
* 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 either
* AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity types:
* SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
*
*
* @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:
*
* -
*
* SFTP
(Secure Shell (SSH) File Transfer Protocol): File transfer over SSH
*
*
* -
*
* FTPS
(File Transfer Protocol Secure): File transfer with TLS encryption
*
*
* -
*
* FTP
(File Transfer Protocol): Unencrypted file transfer
*
*
* -
*
* AS2
(Applicability Statement 2): used for transporting structured business-to-business
* data
*
*
*
*
*
* -
*
* If you select FTPS
, you must choose a certificate stored in Certificate Manager (ACM)
* which is 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
* either AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or 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 any of the supported identity
* types: SERVICE_MANAGED
, AWS_DIRECTORY_SERVICE
, AWS_LAMBDA
, or
* API_GATEWAY
.
*
*
* -
*
* If Protocol
includes AS2
, then the EndpointType
must be
* VPC
, and domain must be Amazon S3.
*
*
*
* @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 Transfer Family user is assigned to.
*
*
* @param serverId
* A system-assigned unique identifier for a server instance that the Transfer Family user is assigned
* to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder serverId(String serverId);
/**
*
* Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the
* workflow.
*
*
* In addition to a workflow to execute when a file is uploaded completely, WorkflowDetails
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.
*
*
* To remove an associated workflow from a server, you can provide an empty OnUpload
object, as in
* the following example.
*
*
* aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'
*
*
* @param workflowDetails
* Specifies the workflow ID for the workflow to assign and the execution role that's used for executing
* the workflow.
*
* In addition to a workflow to execute when a file is uploaded completely, WorkflowDetails
* 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.
*
*
* To remove an associated workflow from a server, you can provide an empty OnUpload
object,
* as in the following example.
*
*
* aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder workflowDetails(WorkflowDetails workflowDetails);
/**
*
* Specifies the workflow ID for the workflow to assign and the execution role that's used for executing the
* workflow.
*
*
* In addition to a workflow to execute when a file is uploaded completely, WorkflowDetails
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.
*
*
* To remove an associated workflow from a server, you can provide an empty OnUpload
object, as in
* the following example.
*
*
* aws transfer update-server --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}'
*
* This is a convenience method that creates an instance of the {@link WorkflowDetails.Builder} avoiding the
* need to create one manually via {@link WorkflowDetails#builder()}.
*
*
* When the {@link Consumer} completes, {@link WorkflowDetails.Builder#build()} is called immediately and its
* result is passed to {@link #workflowDetails(WorkflowDetails)}.
*
* @param workflowDetails
* a consumer that will call methods on {@link WorkflowDetails.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #workflowDetails(WorkflowDetails)
*/
default Builder workflowDetails(Consumer workflowDetails) {
return workflowDetails(WorkflowDetails.builder().applyMutation(workflowDetails).build());
}
/**
*
* Specifies the log groups to which your server logs are sent.
*
*
* 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:
*
*
* arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*
*
*
* For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
*
*
* 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 update-server
call. For
* example:
*
*
* update-server --server-id s-1234567890abcdef0 --structured-log-destinations
*
*
* @param structuredLogDestinations
* Specifies the log groups to which your server logs are sent.
*
* 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:
*
*
* arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*
*
*
* For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
*
*
* 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 update-server
* call. For example:
*
*
* update-server --server-id s-1234567890abcdef0 --structured-log-destinations
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder structuredLogDestinations(Collection structuredLogDestinations);
/**
*
* Specifies the log groups to which your server logs are sent.
*
*
* 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:
*
*
* arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*
*
*
* For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
*
*
* 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 update-server
call. For
* example:
*
*
* update-server --server-id s-1234567890abcdef0 --structured-log-destinations
*
*
* @param structuredLogDestinations
* Specifies the log groups to which your server logs are sent.
*
* 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:
*
*
* arn:aws:logs:region-name:amazon-account-id:log-group:log-group-name:*
*
*
* For example, arn:aws:logs:us-east-1:111122223333:log-group:mytestgroup:*
*
*
* 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 update-server
* call. For example:
*
*
* update-server --server-id s-1234567890abcdef0 --structured-log-destinations
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder structuredLogDestinations(String... structuredLogDestinations);
/**
*
* Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by
* default.
*
*
* By default, home directory mappings have a TYPE
of DIRECTORY
. If you enable this
* option, you would then need to explicitly set the HomeDirectoryMapEntry
Type
to
* FILE
if you want a mapping to have a file target.
*
*
* @param s3StorageOptions
* Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by
* default.
*
* By default, home directory mappings have a TYPE
of DIRECTORY
. If you enable
* this option, you would then need to explicitly set the HomeDirectoryMapEntry
* Type
to FILE
if you want a mapping to have a file target.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder s3StorageOptions(S3StorageOptions s3StorageOptions);
/**
*
* Specifies whether or not performance for your Amazon S3 directories is optimized. This is disabled by
* default.
*
*
* By default, home directory mappings have a TYPE
of DIRECTORY
. If you enable this
* option, you would then need to explicitly set the HomeDirectoryMapEntry
Type
to
* FILE
if you want a mapping to have a file target.
*
* This is a convenience method that creates an instance of the {@link S3StorageOptions.Builder} avoiding the
* need to create one manually via {@link S3StorageOptions#builder()}.
*
*
* When the {@link Consumer} completes, {@link S3StorageOptions.Builder#build()} is called immediately and its
* result is passed to {@link #s3StorageOptions(S3StorageOptions)}.
*
* @param s3StorageOptions
* a consumer that will call methods on {@link S3StorageOptions.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #s3StorageOptions(S3StorageOptions)
*/
default Builder s3StorageOptions(Consumer s3StorageOptions) {
return s3StorageOptions(S3StorageOptions.builder().applyMutation(s3StorageOptions).build());
}
@Override
Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration);
@Override
Builder overrideConfiguration(Consumer builderConsumer);
}
static final class BuilderImpl extends TransferRequest.BuilderImpl implements Builder {
private String certificate;
private ProtocolDetails protocolDetails;
private EndpointDetails endpointDetails;
private String endpointType;
private String hostKey;
private IdentityProviderDetails identityProviderDetails;
private String loggingRole;
private String postAuthenticationLoginBanner;
private String preAuthenticationLoginBanner;
private List protocols = DefaultSdkAutoConstructList.getInstance();
private String securityPolicyName;
private String serverId;
private WorkflowDetails workflowDetails;
private List structuredLogDestinations = DefaultSdkAutoConstructList.getInstance();
private S3StorageOptions s3StorageOptions;
private BuilderImpl() {
}
private BuilderImpl(UpdateServerRequest model) {
super(model);
certificate(model.certificate);
protocolDetails(model.protocolDetails);
endpointDetails(model.endpointDetails);
endpointType(model.endpointType);
hostKey(model.hostKey);
identityProviderDetails(model.identityProviderDetails);
loggingRole(model.loggingRole);
postAuthenticationLoginBanner(model.postAuthenticationLoginBanner);
preAuthenticationLoginBanner(model.preAuthenticationLoginBanner);
protocolsWithStrings(model.protocols);
securityPolicyName(model.securityPolicyName);
serverId(model.serverId);
workflowDetails(model.workflowDetails);
structuredLogDestinations(model.structuredLogDestinations);
s3StorageOptions(model.s3StorageOptions);
}
public final String getCertificate() {
return certificate;
}
public final void setCertificate(String certificate) {
this.certificate = certificate;
}
@Override
public final Builder certificate(String certificate) {
this.certificate = certificate;
return this;
}
public final ProtocolDetails.Builder getProtocolDetails() {
return protocolDetails != null ? protocolDetails.toBuilder() : null;
}
public final void setProtocolDetails(ProtocolDetails.BuilderImpl protocolDetails) {
this.protocolDetails = protocolDetails != null ? protocolDetails.build() : null;
}
@Override
public final Builder protocolDetails(ProtocolDetails protocolDetails) {
this.protocolDetails = protocolDetails;
return this;
}
public final EndpointDetails.Builder getEndpointDetails() {
return endpointDetails != null ? endpointDetails.toBuilder() : null;
}
public final void setEndpointDetails(EndpointDetails.BuilderImpl endpointDetails) {
this.endpointDetails = endpointDetails != null ? endpointDetails.build() : null;
}
@Override
public final Builder endpointDetails(EndpointDetails endpointDetails) {
this.endpointDetails = endpointDetails;
return this;
}
public final String getEndpointType() {
return endpointType;
}
public final void setEndpointType(String endpointType) {
this.endpointType = 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 String getHostKey() {
return hostKey;
}
public final void setHostKey(String hostKey) {
this.hostKey = hostKey;
}
@Override
public final Builder hostKey(String hostKey) {
this.hostKey = hostKey;
return this;
}
public final IdentityProviderDetails.Builder getIdentityProviderDetails() {
return identityProviderDetails != null ? identityProviderDetails.toBuilder() : null;
}
public final void setIdentityProviderDetails(IdentityProviderDetails.BuilderImpl identityProviderDetails) {
this.identityProviderDetails = identityProviderDetails != null ? identityProviderDetails.build() : null;
}
@Override
public final Builder identityProviderDetails(IdentityProviderDetails identityProviderDetails) {
this.identityProviderDetails = identityProviderDetails;
return this;
}
public final String getLoggingRole() {
return loggingRole;
}
public final void setLoggingRole(String loggingRole) {
this.loggingRole = loggingRole;
}
@Override
public final Builder loggingRole(String loggingRole) {
this.loggingRole = loggingRole;
return this;
}
public final String getPostAuthenticationLoginBanner() {
return postAuthenticationLoginBanner;
}
public final void setPostAuthenticationLoginBanner(String postAuthenticationLoginBanner) {
this.postAuthenticationLoginBanner = postAuthenticationLoginBanner;
}
@Override
public final Builder postAuthenticationLoginBanner(String postAuthenticationLoginBanner) {
this.postAuthenticationLoginBanner = postAuthenticationLoginBanner;
return this;
}
public final String getPreAuthenticationLoginBanner() {
return preAuthenticationLoginBanner;
}
public final void setPreAuthenticationLoginBanner(String preAuthenticationLoginBanner) {
this.preAuthenticationLoginBanner = preAuthenticationLoginBanner;
}
@Override
public final Builder preAuthenticationLoginBanner(String preAuthenticationLoginBanner) {
this.preAuthenticationLoginBanner = preAuthenticationLoginBanner;
return this;
}
public final Collection getProtocols() {
if (protocols instanceof SdkAutoConstructList) {
return null;
}
return protocols;
}
public final void setProtocols(Collection protocols) {
this.protocols = ProtocolsCopier.copy(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 String getSecurityPolicyName() {
return securityPolicyName;
}
public final void setSecurityPolicyName(String securityPolicyName) {
this.securityPolicyName = securityPolicyName;
}
@Override
public final Builder securityPolicyName(String securityPolicyName) {
this.securityPolicyName = securityPolicyName;
return this;
}
public final String getServerId() {
return serverId;
}
public final void setServerId(String serverId) {
this.serverId = serverId;
}
@Override
public final Builder serverId(String serverId) {
this.serverId = serverId;
return this;
}
public final WorkflowDetails.Builder getWorkflowDetails() {
return workflowDetails != null ? workflowDetails.toBuilder() : null;
}
public final void setWorkflowDetails(WorkflowDetails.BuilderImpl workflowDetails) {
this.workflowDetails = workflowDetails != null ? workflowDetails.build() : null;
}
@Override
public final Builder workflowDetails(WorkflowDetails workflowDetails) {
this.workflowDetails = workflowDetails;
return this;
}
public final Collection getStructuredLogDestinations() {
if (structuredLogDestinations instanceof SdkAutoConstructList) {
return null;
}
return structuredLogDestinations;
}
public final void setStructuredLogDestinations(Collection structuredLogDestinations) {
this.structuredLogDestinations = StructuredLogDestinationsCopier.copy(structuredLogDestinations);
}
@Override
public final Builder structuredLogDestinations(Collection structuredLogDestinations) {
this.structuredLogDestinations = StructuredLogDestinationsCopier.copy(structuredLogDestinations);
return this;
}
@Override
@SafeVarargs
public final Builder structuredLogDestinations(String... structuredLogDestinations) {
structuredLogDestinations(Arrays.asList(structuredLogDestinations));
return this;
}
public final S3StorageOptions.Builder getS3StorageOptions() {
return s3StorageOptions != null ? s3StorageOptions.toBuilder() : null;
}
public final void setS3StorageOptions(S3StorageOptions.BuilderImpl s3StorageOptions) {
this.s3StorageOptions = s3StorageOptions != null ? s3StorageOptions.build() : null;
}
@Override
public final Builder s3StorageOptions(S3StorageOptions s3StorageOptions) {
this.s3StorageOptions = s3StorageOptions;
return this;
}
@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;
}
}
}