AWS Transfer for SFTP
User Guide

UpdateServer

Updates the server properties after that server has been created.

The UpdateServer call returns the ServerId of the Secure File Transfer Protocol (SFTP) server you updated.

Request Syntax

{ "EndpointDetails": { "VpcEndpointId": "string" }, "EndpointType": "string", "HostKey": "string", "IdentityProviderDetails": { "InvocationRole": "string", "Url": "string" }, "LoggingRole": "string", "ServerId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

EndpointDetails

The virtual private cloud (VPC) endpoint settings that are configured for your SFTP server. With a VPC endpoint, your SFTP server isn't accessible over the public internet.

Type: EndpointDetails object

Required: No

EndpointType

The type of endpoint that you want your SFTP server to connect to. You can choose to connect to the public internet or a virtual private cloud (VPC) endpoint. With a VPC endpoint, your SFTP server isn't accessible over the public internet.

Type: String

Valid Values: PUBLIC | VPC_ENDPOINT

Required: No

HostKey

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

Important

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

For more information, see Changing the Host Key for Your AWS SFTP Server in the AWS SFTP User Guide.

Type: String

Length Constraints: Maximum length of 4096.

Required: No

IdentityProviderDetails

This response parameter is an array containing all of the information required to call a customer's authentication API method.

Type: IdentityProviderDetails object

Required: No

LoggingRole

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

Type: String

Pattern: ^$|arn:.*role/.*

Required: No

ServerId

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

Type: String

Pattern: ^s-([0-9a-f]{17})$

Required: Yes

Response Syntax

{ "ServerId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ServerId

A system-assigned unique identifier for an SFTP server that the user account is assigned to.

Type: String

Pattern: ^s-([0-9a-f]{17})$

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceError

This exception is thrown when an error occurs in the AWS Transfer for SFTP service.

HTTP Status Code: 500

InvalidRequestException

This exception is thrown when the client submits a malformed request.

HTTP Status Code: 400

ResourceNotFoundException

This exception is thrown when a resource is not found by the AWS Transfer for SFTP service.

HTTP Status Code: 400

ServiceUnavailableException

The request has failed because the AWS Transfer for SFTP service is not available.

HTTP Status Code: 500

Examples

Example

The following example updates the role of a server.

Sample Request

{ "EndpointDetails": { "VpcEndpointId": ""vpce-01234f056f3g13"" "LoggingRole": "CloudWatchS3Events", "ServerId": "s-01234567890abcdef" }

Example

Sample Response

{ "ServerId": "s-01234567890abcdef" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: