Class: AWS.Transfer

Inherits:
AWS.Service show all
Identifier:
transfer
API Version:
2018-11-05
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

AWS Transfer for SFTP is a fully managed service that enables the transfer of files directly into and out of Amazon S3 using the Secure File Transfer Protocol (SFTP)—also known as Secure Shell (SSH) File Transfer Protocol. AWS helps you seamlessly migrate your file transfer workflows to AWS Transfer for SFTP—by integrating with existing authentication systems, and providing DNS routing with Amazon Route 53—so nothing changes for your customers and partners, or their applications. With your data in S3, you can use it with AWS services for processing, analytics, machine learning, and archiving. Getting started with AWS Transfer for SFTP (AWS SFTP) is easy; there is no infrastructure to buy and setup.

Sending a Request Using Transfer

var transfer = new AWS.Transfer();
transfer.createServer(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Transfer object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var transfer = new AWS.Transfer({apiVersion: '2018-11-05'});

You can also set the API version globally in AWS.config.apiVersions using the transfer service identifier:

AWS.config.apiVersions = {
  transfer: '2018-11-05',
  // other service API versions
};

var transfer = new AWS.Transfer();

Version:

  • 2018-11-05

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Transfer(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Transfer object

var transfer = new AWS.Transfer({apiVersion: '2018-11-05'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Transfer.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Transfer.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Transfer.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createServer(params = {}, callback) ⇒ AWS.Request

Instantiates an autoscaling virtual server based on Secure File Transfer Protocol (SFTP) in AWS. The call returns the ServerId property assigned by the service to the newly created server. Reference this ServerId property when you make updates to your server, or work with users.

The response returns the ServerId value for the newly created server.

Service Reference:

Examples:

Calling the createServer operation

var params = {
  EndpointDetails: {
    VpcEndpointId: 'STRING_VALUE'
  },
  EndpointType: PUBLIC | VPC_ENDPOINT,
  HostKey: 'STRING_VALUE',
  IdentityProviderDetails: {
    InvocationRole: 'STRING_VALUE',
    Url: 'STRING_VALUE'
  },
  IdentityProviderType: SERVICE_MANAGED | API_GATEWAY,
  LoggingRole: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
transfer.createServer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EndpointDetails — (map)

      The virtual private cloud (VPC) endpoint settings that you want to configure for your SFTP server.

      • VpcEndpointId — (String)

        The ID of the VPC endpoint.

    • EndpointType — (String)

      The type of VPC endpoint that you want your SFTP server connect to. If you connect to a VPC endpoint, your SFTP server isn't accessible over the public internet.

      Possible values include:
      • "PUBLIC"
      • "VPC_ENDPOINT"
    • HostKey — (String)

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

      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 change-host-key in the AWS SFTP User Guide.

    • IdentityProviderDetails — (map)

      An array containing all of the information required to call a customer-supplied authentication API. This parameter is not required when the IdentityProviderType value of server that is created uses the SERVICE_MANAGED authentication method.

      • Url — (String)

        The IdentityProviderDetail parameter contains the location of the service endpoint used to authenticate users.

      • InvocationRole — (String)

        The Role parameter provides the type of InvocationRole used to authenticate the user account.

    • IdentityProviderType — (String)

      The mode of authentication enabled for this service. The default value is SERVICE_MANAGED, which allows you to store and access SFTP user credentials within the service. An IdentityProviderType value of API_GATEWAY indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.

      Possible values include:
      • "SERVICE_MANAGED"
      • "API_GATEWAY"
    • LoggingRole — (String)

      A value that allows the service to write your SFTP users' activity to your Amazon CloudWatch logs for monitoring and auditing purposes.

    • Tags — (Array<map>)

      Key-value pairs that can be used to group and search for servers.

      • Keyrequired — (String)

        The name assigned to the tag that you create.

      • Valuerequired — (String)

        This property contains one or more values that you assigned to the key name you create.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ServerId — (String)

        The service-assigned ID of the SFTP server that is created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createUser(params = {}, callback) ⇒ AWS.Request

Adds a user and associate them with an existing Secure File Transfer Protocol (SFTP) server. Using parameters for CreateUser, you can specify the user name, set the home directory, store the user's public key, and assign the user's AWS Identity and Access Management (IAM) role. You can also optionally add a scope-down policy, and assign metadata with tags that can be used to group and search for users.

The response returns the UserName and ServerId values of the new user for that server.

Service Reference:

Examples:

Calling the createUser operation

var params = {
  Role: 'STRING_VALUE', /* required */
  ServerId: 'STRING_VALUE', /* required */
  UserName: 'STRING_VALUE', /* required */
  HomeDirectory: 'STRING_VALUE',
  Policy: 'STRING_VALUE',
  SshPublicKeyBody: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
transfer.createUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • HomeDirectory — (String)

      The landing directory (folder) for a user when they log in to the server using their SFTP client. An example is /home/username .

    • Policy — (String)

      A scope-down policy for your user so you can use the same IAM role across multiple users. This policy scopes down user access to portions of their Amazon S3 bucket. Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

    • Role — (String)

      The IAM role that controls your user's access to your Amazon S3 bucket. The policies attached to this role will determine the level of access you want to provide your users when transferring files into and out of your Amazon S3 bucket or buckets. The IAM role should also contain a trust relationship that allows the SFTP server to access your resources when servicing your SFTP user's transfer requests.

    • ServerId — (String)

      A system-assigned unique identifier for an SFTP server instance. This is the specific SFTP server that you added your user to.

    • SshPublicKeyBody — (String)

      The public portion of the Secure Shall (SSH) key used to authenticate the user to the SFTP server.

    • Tags — (Array<map>)

      Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any purpose.

      • Keyrequired — (String)

        The name assigned to the tag that you create.

      • Valuerequired — (String)

        This property contains one or more values that you assigned to the key name you create.

    • UserName — (String)

      A unique string that identifies a user and is associated with a server as specified by the ServerId. This user name must be a minimum of 3 and a maximum of 32 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore, and hyphen. The user name can't start with a hyphen.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ServerId — (String)

        The ID of the SFTP server that the user is attached to.

      • UserName — (String)

        A unique string that identifies a user account associated with an SFTP server.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteServer(params = {}, callback) ⇒ AWS.Request

Deletes the Secure File Transfer Protocol (SFTP) server that you specify. If you used SERVICE_MANAGED as your IdentityProviderType, you need to delete all users associated with this server before deleting the server itself

No response returns from this call.

Service Reference:

Examples:

Calling the deleteServer operation

var params = {
  ServerId: 'STRING_VALUE' /* required */
};
transfer.deleteServer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A unique system-assigned identifier for an SFTP server instance.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSshPublicKey(params = {}, callback) ⇒ AWS.Request

Deletes a user's Secure Shell (SSH) public key.

No response is returned from this call.

Service Reference:

Examples:

Calling the deleteSshPublicKey operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  SshPublicKeyId: 'STRING_VALUE', /* required */
  UserName: 'STRING_VALUE' /* required */
};
transfer.deleteSshPublicKey(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) server instance that has the user assigned to it.

    • SshPublicKeyId — (String)

      A unique identifier used to reference your user's specific SSH key.

    • UserName — (String)

      A unique string that identifies a user whose public key is being deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteUser(params = {}, callback) ⇒ AWS.Request

Deletes the user belonging to the server you specify.

No response returns from this call.

Note: When you delete a user from a server, the user's information is lost.

Service Reference:

Examples:

Calling the deleteUser operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  UserName: 'STRING_VALUE' /* required */
};
transfer.deleteUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

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

    • UserName — (String)

      A unique string that identifies a user that is being deleted from the server.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeServer(params = {}, callback) ⇒ AWS.Request

Describes the server that you specify by passing the ServerId parameter.

The response contains a description of the server's properties.

Service Reference:

Examples:

Calling the describeServer operation

var params = {
  ServerId: 'STRING_VALUE' /* required */
};
transfer.describeServer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A system-assigned unique identifier for an SFTP server.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Server — (map)

        An array containing the properties of the server with the ServerID you specified.

        • Arnrequired — (String)

          Specifies the unique Amazon Resource Name (ARN) for the server to be described.

        • EndpointDetails — (map)

          The virtual private cloud (VPC) endpoint settings that you configured for your SFTP server.

          • VpcEndpointId — (String)

            The ID of the VPC endpoint.

        • EndpointType — (String)

          The type of endpoint that your SFTP server is connected to. If your SFTP server is connected to a VPC endpoint, your server isn't accessible over the public internet.

          Possible values include:
          • "PUBLIC"
          • "VPC_ENDPOINT"
        • HostKeyFingerprint — (String)

          This value contains the Message-Digest Algorithm (MD5) hash of the server's host key. This value is equivalent to the output of ssh-keygen -l -E md5 -f my-new-server-key command.

        • IdentityProviderDetails — (map)

          Specifies information to call a customer-supplied authentication API. This field is not populated when the IdentityProviderType of the server is SERVICE_MANAGED>.

          • Url — (String)

            The IdentityProviderDetail parameter contains the location of the service endpoint used to authenticate users.

          • InvocationRole — (String)

            The Role parameter provides the type of InvocationRole used to authenticate the user account.

        • IdentityProviderType — (String)

          This property defines the mode of authentication method enabled for this service. A value of SERVICE_MANAGED, means that you are using this Server to store and access SFTP user credentials within the service. A value of API_GATEWAY indicates that you have integrated an API Gateway endpoint that will be invoked for authenticating your user into the service.

          Possible values include:
          • "SERVICE_MANAGED"
          • "API_GATEWAY"
        • LoggingRole — (String)

          This property is an AWS Identity and Access Management (IAM) entity that allows the server to turn on Amazon CloudWatch logging for Amazon S3 events. When set, user activity can be view in your CloudWatch logs.

        • ServerId — (String)

          This property is a unique system assigned identifier for the SFTP server that you instantiate.

        • State — (String)

          The condition of the SFTP server for the server that was described. A value of ONLINE indicates that the server can accept jobs and transfer files. A State value of OFFLINE means that the server cannot perform file transfer operations.

          The states of STARTING and STOPPING indicated that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of START_FAILED or STOP_FAILED can indicate an error condition.

          Possible values include:
          • "OFFLINE"
          • "ONLINE"
          • "STARTING"
          • "STOPPING"
          • "START_FAILED"
          • "STOP_FAILED"
        • Tags — (Array<map>)

          This property contains the key-value pairs that you can use to search for and group servers that were assigned to the server that was described.

          • Keyrequired — (String)

            The name assigned to the tag that you create.

          • Valuerequired — (String)

            This property contains one or more values that you assigned to the key name you create.

        • UserCount — (Integer)

          The number of users that are assigned to the SFTP server you specified with the ServerId.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeUser(params = {}, callback) ⇒ AWS.Request

Describes the user assigned to a specific server, as identified by its ServerId property.

The response from this call returns the properties of the user associated with the ServerId value that was specified.

Service Reference:

Examples:

Calling the describeUser operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  UserName: 'STRING_VALUE' /* required */
};
transfer.describeUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A system-assigned unique identifier for an SFTP server that has this user assigned.

    • UserName — (String)

      The name of the user assigned to one or more servers. User names are part of the sign-in credentials to use the AWS Transfer service and perform file transfer tasks.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ServerId — (String)

        A system-assigned unique identifier for an SFTP server that has this user assigned.

      • User — (map)

        An array containing the properties of the user account for the ServerID value that you specified.

        • Arnrequired — (String)

          This property contains the unique Amazon Resource Name (ARN) for the user that was requested to be described.

        • HomeDirectory — (String)

          This property specifies the landing directory (or folder) which is the location that files are written to or read from in an Amazon S3 bucket for the described user. An example would be: /bucket_name/home/username .

        • Policy — (String)

          Specifies the name of the policy in use for the described user.

        • Role — (String)

          This property specifies the IAM role that controls your user's access to your Amazon S3 bucket. The policies attached to this role will determine the level of access you want to provide your users when transferring files into and out of your Amazon S3 bucket or buckets. The IAM role should also contain a trust relationship that allows the SFTP server to access your resources when servicing your SFTP user's transfer requests.

        • SshPublicKeys — (Array<map>)

          This property contains the public key portion of the Secure Shell (SSH) keys stored for the described user.

          • DateImportedrequired — (Date)

            The date that the public key was added to the user account.

          • SshPublicKeyBodyrequired — (String)

            The content of the SSH public key as specified by the PublicKeyId.

          • SshPublicKeyIdrequired — (String)

            The SshPublicKeyId parameter contains the identifier of the public key.

        • Tags — (Array<map>)

          This property contains the key-value pairs for the user requested. Tag can be used to search for and group users for a variety of purposes.

          • Keyrequired — (String)

            The name assigned to the tag that you create.

          • Valuerequired — (String)

            This property contains one or more values that you assigned to the key name you create.

        • UserName — (String)

          This property is the name of the user that was requested to be described. User names are used for authentication purposes. This is the string that will be used by your user when they log in to your SFTP server.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

importSshPublicKey(params = {}, callback) ⇒ AWS.Request

Adds a Secure Shell (SSH) public key to a user account identified by a UserName value assigned to a specific server, identified by ServerId.

The response returns the UserName value, the ServerId value, and the name of the SshPublicKeyId.

Service Reference:

Examples:

Calling the importSshPublicKey operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  SshPublicKeyBody: 'STRING_VALUE', /* required */
  UserName: 'STRING_VALUE' /* required */
};
transfer.importSshPublicKey(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A system-assigned unique identifier for an SFTP server.

    • SshPublicKeyBody — (String)

      The public key portion of an SSH key pair.

    • UserName — (String)

      The name of the user account that is assigned to one or more servers.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ServerId — (String)

        A system-assigned unique identifier for an SFTP server.

      • SshPublicKeyId — (String)

        This identifier is the name given to a public key by the system that was imported.

      • UserName — (String)

        A user name assigned to the ServerID value that you specified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listServers(params = {}, callback) ⇒ AWS.Request

Lists the Secure File Transfer Protocol (SFTP) servers that are associated with your AWS account.

Service Reference:

Examples:

Calling the listServers operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
transfer.listServers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      Specifies the number of servers to return as a response to the ListServers query.

    • NextToken — (String)

      When additional results are obtained from the ListServers command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional servers.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String)

        When you can get additional results from the ListServers operation, a NextToken parameter is returned in the output. In a following command, you can pass in the NextToken parameter to continue listing additional servers.

      • Servers — (Array<map>)

        An array of servers that were listed.

        • Arnrequired — (String)

          The unique Amazon Resource Name (ARN) for the server to be listed.

        • IdentityProviderType — (String)

          The authentication method used to validate a user for the server that was specified. listed. This can include Secure Shell (SSH), user name and password combinations, or your own custom authentication method. Valid values include SERVICE_MANAGED or API_GATEWAY.

          Possible values include:
          • "SERVICE_MANAGED"
          • "API_GATEWAY"
        • EndpointType — (String)

          The type of VPC endpoint that your SFTP server is connected to. If your SFTP server is connected to a VPC endpoint, your server isn't accessible over the public internet.

          Possible values include:
          • "PUBLIC"
          • "VPC_ENDPOINT"
        • LoggingRole — (String)

          The AWS Identity and Access Management entity that allows the server to turn on Amazon CloudWatch logging.

        • ServerId — (String)

          This value is the unique system assigned identifier for the SFTP servers that were listed.

        • State — (String)

          This property describes the condition of the SFTP server for the server that was described. A value of ONLINE> indicates that the server can accept jobs and transfer files. A State value of OFFLINE means that the server cannot perform file transfer operations.

          The states of STARTING and STOPPING indicated that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of START_FAILED or STOP_FAILED can indicate an error condition.

          Possible values include:
          • "OFFLINE"
          • "ONLINE"
          • "STARTING"
          • "STOPPING"
          • "START_FAILED"
          • "STOP_FAILED"
        • UserCount — (Integer)

          This property is a numeric value that indicates the number of users that are assigned to the SFTP server you specified with the ServerId.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Lists all of the tags associated with the Amazon Resource Number (ARN) you specify. The resource can be a user, server, or role.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  Arn: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
transfer.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Arn — (String)

      Requests the tags associated with a particular Amazon Resource Name (ARN). An ARN is an identifier for a specific AWS resource, such as a server, user, or role.

    • MaxResults — (Integer)

      Specifies the number of tags to return as a response to the ListTagsForResource request.

    • NextToken — (String)

      When you request additional results from the ListTagsForResource call, a NextToken parameter is returned in the input. You can then pass in a subsequent command the NextToken parameter to continue listing additional tags.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Arn — (String)

        This value is the ARN you specified to list the tags of.

      • NextToken — (String)

        When you can get additional results from the ListTagsForResource call, a NextToken parameter is returned in the output. You can then pass in a subsequent command the NextToken parameter to continue listing additional tags.

      • Tags — (Array<map>)

        Key-value pairs that are assigned to a resource, usually for the purpose of grouping and searching for items. Tags are metadata that you define that you can use for any purpose.

        • Keyrequired — (String)

          The name assigned to the tag that you create.

        • Valuerequired — (String)

          This property contains one or more values that you assigned to the key name you create.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listUsers(params = {}, callback) ⇒ AWS.Request

Lists the users for the server that you specify by passing the ServerId parameter.

Service Reference:

Examples:

Calling the listUsers operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
transfer.listUsers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      Specifies the number of users to return as a response to the ListUsers request.

    • NextToken — (String)

      When you can get additional results from the ListUsers call, a NextToken parameter is returned in the output. You can then pass in a subsequent command the NextToken parameter to continue listing additional users.

    • ServerId — (String)

      A system-assigned unique identifier for a Secure File Transfer Protocol (SFTP) server that has users are assigned to it.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • NextToken — (String)

        When you can get additional results from the ListUsers call, a NextToken parameter is returned in the output. You can then pass in a subsequent command the NextToken parameter to continue listing additional users.

      • ServerId — (String)

        A system-assigned unique identifier for an SFTP server that the users are assigned to.

      • Users — (Array<map>)

        Returns the user accounts and their properties for the ServerId value that you specify.

        • Arnrequired — (String)

          This property is the unique Amazon Resource Name (ARN) for the user that you wish to learn about.

        • HomeDirectory — (String)

          This value specifies the location that files are written to or read from an Amazon S3 bucket for the user you specify by their ARN.

        • Role — (String)

          The role in use by this user. A role is an AWS Identity and Access Management (IAM) entity that in this case allows the SFTP server to act on a user's behalf. It allows the server to inherit the trust relationship that enables that user to perform file operations to their Amazon S3 bucket.

        • SshPublicKeyCount — (Integer)

          This value is the number of SSH public keys stored for the user you specified.

        • UserName — (String)

          The name of the user whose ARN was specified. User names are used for authentication purposes.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startServer(params = {}, callback) ⇒ AWS.Request

Changes the state of a Secure File Transfer Protocol (SFTP) server from OFFLINE to ONLINE. It has no impact on an SFTP server that is already ONLINE. An ONLINE server can accept and process file transfer jobs.

The state of STARTING indicates that the server is in an intermediate state, either not fully able to respond, or not fully online. The values of START_FAILED can indicate an error condition.

No response is returned from this call.

Service Reference:

Examples:

Calling the startServer operation

var params = {
  ServerId: 'STRING_VALUE' /* required */
};
transfer.startServer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A system-assigned unique identifier for an SFTP server that you start.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

stopServer(params = {}, callback) ⇒ AWS.Request

Changes the state of an SFTP server from ONLINE to OFFLINE. An OFFLINE server cannot accept and process file transfer jobs. Information tied to your server such as server and user properties are not affected by stopping your server. Stopping a server will not reduce or impact your Secure File Transfer Protocol (SFTP) endpoint billing.

The states of STOPPING indicates that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of STOP_FAILED can indicate an error condition.

No response is returned from this call.

Service Reference:

Examples:

Calling the stopServer operation

var params = {
  ServerId: 'STRING_VALUE' /* required */
};
transfer.stopServer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A system-assigned unique identifier for an SFTP server that you stopped.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.

There is no response returned from this call.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  Arn: 'STRING_VALUE', /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
transfer.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Arn — (String)

      An Amazon Resource Name (ARN) for a specific AWS resource, such as a server, user, or role.

    • Tags — (Array<map>)

      Key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to user accounts for any purpose.

      • Keyrequired — (String)

        The name assigned to the tag that you create.

      • Valuerequired — (String)

        This property contains one or more values that you assigned to the key name you create.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

testIdentityProvider(params = {}, callback) ⇒ AWS.Request

If the IdentityProviderType of the server is API_Gateway, tests whether your API Gateway is set up successfully. We highly recommend that you call this method to test your authentication method as soon as you create your server. By doing so, you can troubleshoot issues with the API Gateway integration to ensure that your users can successfully use the service.

Service Reference:

Examples:

Calling the testIdentityProvider operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  UserName: 'STRING_VALUE', /* required */
  UserPassword: 'STRING_VALUE'
};
transfer.testIdentityProvider(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ServerId — (String)

      A system assigned identifier for a specific server. That server's user authentication method is tested with a user name and password.

    • UserName — (String)

      This request parameter is name of the user account to be tested.

    • UserPassword — (String)

      The password of the user account to be tested.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Message — (String)

        The result of the authorization test as a message.

      • StatusCode — (Integer)

        The HTTP status code that is the response from your API Gateway.

      • Url — (String)

        The endpoint of the service used to authenticate a user.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.

No response is returned from this call.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  Arn: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
transfer.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Arn — (String)

      This is the value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.

    • TagKeys — (Array<String>)

      TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateServer(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateServer operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  EndpointDetails: {
    VpcEndpointId: 'STRING_VALUE'
  },
  EndpointType: PUBLIC | VPC_ENDPOINT,
  HostKey: 'STRING_VALUE',
  IdentityProviderDetails: {
    InvocationRole: 'STRING_VALUE',
    Url: 'STRING_VALUE'
  },
  LoggingRole: 'STRING_VALUE'
};
transfer.updateServer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • EndpointDetails — (map)

      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.

      • VpcEndpointId — (String)

        The ID of the VPC endpoint.

    • EndpointType — (String)

      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.

      Possible values include:
      • "PUBLIC"
      • "VPC_ENDPOINT"
    • HostKey — (String)

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

      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 change-host-key in the AWS SFTP User Guide.

    • IdentityProviderDetails — (map)

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

      • Url — (String)

        The IdentityProviderDetail parameter contains the location of the service endpoint used to authenticate users.

      • InvocationRole — (String)

        The Role parameter provides the type of InvocationRole used to authenticate the user account.

    • LoggingRole — (String)

      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.

    • ServerId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ServerId — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateUser(params = {}, callback) ⇒ AWS.Request

Assigns new properties to a user. Parameters you pass modify any or all of the following: the home directory, role, and policy for the UserName and ServerId you specify.

The response returns the ServerId and the UserName for the updated user.

Service Reference:

Examples:

Calling the updateUser operation

var params = {
  ServerId: 'STRING_VALUE', /* required */
  UserName: 'STRING_VALUE', /* required */
  HomeDirectory: 'STRING_VALUE',
  Policy: 'STRING_VALUE',
  Role: 'STRING_VALUE'
};
transfer.updateUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • HomeDirectory — (String)

      The HomeDirectory parameter specifies the landing directory (folder) for a user when they log in to the server using their client. An example would be: /home/username .

    • Policy — (String)

      Allows you to supply a scope-down policy for your user so you can use the same AWS Identity and Access Management (IAM) role across multiple users. The policy scopes down users access to portions of your Amazon S3 bucket. Variables you can use inside this policy include ${Transfer:UserName}, ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

    • Role — (String)

      The IAM role that controls your user's access to your Amazon S3 bucket. The policies attached to this role will determine the level of access you want to provide your users when transferring files into and out of your Amazon S3 bucket or buckets. The IAM role should also contain a trust relationship that allows the Secure File Transfer Protocol (SFTP) server to access your resources when servicing your SFTP user's transfer requests.

    • ServerId — (String)

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

    • UserName — (String)

      A unique string that identifies a user and is associated with a server as specified by the ServerId. This is the string that will be used by your user when they log in to your SFTP server. This user name is a minimum of 3 and a maximum of 32 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore, and hyphen. The user name can't start with a hyphen.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ServerId — (String)

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

      • UserName — (String)

        The unique identifier for a user that is assigned to the SFTP server instance that was specified in the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.