Skip to content

Commit

Permalink
feat(client-transfer): AWS Transfer Family now supports SetStat serve…
Browse files Browse the repository at this point in the history
…r configuration option, which provides the ability to ignore SetStat command issued by file transfer clients, enabling customers to upload files without any errors.
  • Loading branch information
awstools committed May 18, 2022
1 parent 4320da0 commit 59da2d5
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 49 deletions.
109 changes: 64 additions & 45 deletions clients/client-transfer/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,11 @@ export enum IdentityProviderType {
SERVICE_MANAGED = "SERVICE_MANAGED",
}

export enum SetStatOption {
DEFAULT = "DEFAULT",
ENABLE_NO_OP = "ENABLE_NO_OP",
}

export enum TlsSessionResumptionMode {
DISABLED = "DISABLED",
ENABLED = "ENABLED",
Expand Down Expand Up @@ -704,6 +709,20 @@ export interface ProtocolDetails {
* </ul>
*/
TlsSessionResumptionMode?: TlsSessionResumptionMode | string;

/**
* <p>Use the <code>SetStatOption</code> to ignore the error that is generated when the client attempts to use SETSTAT on a file you are uploading to an S3 bucket.</p>
* <p>Some SFTP file transfer clients can attempt to change the attributes of remote files, including timestamp and permissions, using commands, such as SETSTAT when uploading the file.
* However, these commands are not compatible with object storage systems, such as Amazon S3. Due to this incompatibility, file uploads from these clients can result in errors even when
* the file is otherwise successfully uploaded.</p>
* <p>Set the value to <code>ENABLE_NO_OP</code> to have the Transfer Family server ignore the SETSTAT command, and upload files without needing to make any changes to your SFTP client.
* While the <code>SetStatOption</code>
* <code>ENABLE_NO_OP</code> setting ignores the error, it does generate a log entry in CloudWatch Logs, so you can determine when the client is making a SETSTAT call.</p>
* <note>
* <p>If you want to preserve the original timestamp for your file, and modify other file attributes using SETSTAT, you can use Amazon EFS as backend storage with Transfer Family.</p>
* </note>
*/
SetStatOption?: SetStatOption | string;
}

export namespace ProtocolDetails {
Expand Down Expand Up @@ -885,19 +904,8 @@ export interface CreateServerRequest {
EndpointType?: EndpointType | string;

/**
* <p>The RSA or ECDSA private key to use for your server.</p>
*
* <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
* <p>
* <code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
* <p>Use a minimum value of 2048 for the <code>-b</code> option: you can create a stronger key using 3072 or 4096.</p>
*
* <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
* <p>
* <code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
* <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
*
* <p>For both of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p>
* <p>The RSA private key as generated by the <code>ssh-keygen -N "" -m PEM -f
* my-new-server-key</code> command.</p>
*
* <important>
* <p>If you aren't planning to migrate existing users from an existing SFTP-enabled
Expand Down Expand Up @@ -1005,12 +1013,24 @@ export interface CreateServerRequest {

/**
* <p>The protocol settings that are configured for your server.</p>
* <p>
* Use the <code>PassiveIp</code> parameter to indicate passive mode (for FTP and FTPS protocols).
* Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
* </p>
* <p>Use the <code>TlsSessionResumptionMode</code> parameter to determine whether or not your Transfer server
* resumes recent, negotiated sessions through a unique session ID.</p>
* <ul>
* <li>
* <p>
* Use the <code>PassiveIp</code> parameter to indicate passive mode (for FTP and FTPS protocols).
* Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
* </p>
* </li>
* <li>
* <p>Use the <code>SetStatOption</code> to ignore the error that is generated when the client attempts to use SETSTAT on a file you are uploading to an S3 bucket.
* Set the value to <code>ENABLE_NO_OP</code> to have the Transfer Family server ignore the SETSTAT command, and upload files without needing to make any changes to your SFTP client.
* Note that with <code>SetStatOption</code> set to <code>ENABLE_NO_OP</code>, Transfer generates a log entry to CloudWatch Logs, so you can determine when the client
* is making a SETSTAT call.</p>
* </li>
* <li>
* <p>Use the <code>TlsSessionResumptionMode</code> parameter to determine whether or not your Transfer server
* resumes recent, negotiated sessions through a unique session ID.</p>
* </li>
* </ul>
*/
ProtocolDetails?: ProtocolDetails;

Expand Down Expand Up @@ -3872,15 +3892,25 @@ export interface UpdateServerRequest {
Certificate?: string;

/**
* <p>
* The protocol settings that are configured for your server.
* </p>
* <p>
* Use the <code>PassiveIp</code> parameter to indicate passive mode (for FTP and FTPS protocols).
* Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
* </p>
* <p>Use the <code>TlsSessionResumptionMode</code> parameter to determine whether or not your Transfer server
* resumes recent, negotiated sessions through a unique session ID.</p>
* <p>The protocol settings that are configured for your server.</p>
* <ul>
* <li>
* <p>
* Use the <code>PassiveIp</code> parameter to indicate passive mode (for FTP and FTPS protocols).
* Enter a single dotted-quad IPv4 address, such as the external IP address of a firewall, router, or load balancer.
* </p>
* </li>
* <li>
* <p>Use the <code>SetStatOption</code> to ignore the error that is generated when the client attempts to use SETSTAT on a file you are uploading to an S3 bucket.
* Set the value to <code>ENABLE_NO_OP</code> to have the Transfer Family server ignore the SETSTAT command, and upload files without needing to make any changes to your SFTP client.
* Note that with <code>SetStatOption</code> set to <code>ENABLE_NO_OP</code>, Transfer generates a log entry to CloudWatch Logs, so you can determine when the client
* is making a SETSTAT call.</p>
* </li>
* <li>
* <p>Use the <code>TlsSessionResumptionMode</code> parameter to determine whether or not your Transfer server
* resumes recent, negotiated sessions through a unique session ID.</p>
* </li>
* </ul>
*/
ProtocolDetails?: ProtocolDetails;

Expand Down Expand Up @@ -3917,29 +3947,18 @@ export interface UpdateServerRequest {
EndpointType?: EndpointType | string;

/**
* <p>The RSA or ECDSA private key to use for your server.</p>
*
* <p>Use the following command to generate an RSA 2048 bit key with no passphrase:</p>
* <p>
* <code>ssh-keygen -t rsa -b 2048 -N "" -m PEM -f my-new-server-key</code>.</p>
* <p>Use a minimum value of 2048 for the <code>-b</code> option: you can create a stronger key using 3072 or 4096.</p>
*
* <p>Use the following command to generate an ECDSA 256 bit key with no passphrase:</p>
* <p>
* <code>ssh-keygen -t ecdsa -b 256 -N "" -m PEM -f my-new-server-key</code>.</p>
* <p>Valid values for the <code>-b</code> option for ECDSA are 256, 384, and 521.</p>
*
* <p>For both of these commands, you can replace <i>my-new-server-key</i> with a string of your choice.</p>
* <p>The RSA private key as generated by <code>ssh-keygen -N "" -m PEM -f
* my-new-server-key</code>.</p>
*
* <important>
* <p>If you aren't planning to migrate existing users from an existing SFTP-enabled
* server to a new server, don't update the host key. Accidentally changing a
* server's host key can be disruptive.</p>
* <p>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.</p>
* </important>
*
*
*
* <p>For more information, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key">Change the host key for your SFTP-enabled server</a> in the <i>Amazon Web Services Transfer
* <p>For more information, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key">Change the host key for your SFTP-enabled server</a> in the <i>Amazon Web ServicesTransfer
* Family User Guide</i>.</p>
*/
HostKey?: string;
Expand Down
2 changes: 2 additions & 0 deletions clients/client-transfer/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2797,6 +2797,7 @@ const serializeAws_json1_1PosixProfile = (input: PosixProfile, context: __SerdeC
const serializeAws_json1_1ProtocolDetails = (input: ProtocolDetails, context: __SerdeContext): any => {
return {
...(input.PassiveIp !== undefined && input.PassiveIp !== null && { PassiveIp: input.PassiveIp }),
...(input.SetStatOption !== undefined && input.SetStatOption !== null && { SetStatOption: input.SetStatOption }),
...(input.TlsSessionResumptionMode !== undefined &&
input.TlsSessionResumptionMode !== null && { TlsSessionResumptionMode: input.TlsSessionResumptionMode }),
};
Expand Down Expand Up @@ -3770,6 +3771,7 @@ const deserializeAws_json1_1PosixProfile = (output: any, context: __SerdeContext
const deserializeAws_json1_1ProtocolDetails = (output: any, context: __SerdeContext): ProtocolDetails => {
return {
PassiveIp: __expectString(output.PassiveIp),
SetStatOption: __expectString(output.SetStatOption),
TlsSessionResumptionMode: __expectString(output.TlsSessionResumptionMode),
} as any;
};
Expand Down
Loading

0 comments on commit 59da2d5

Please sign in to comment.