AWS Transfer for SFTP
User Guide

TestIdentityProvider

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.

Request Syntax

{ "ServerId": "string", "UserName": "string", "UserPassword": "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.

ServerId

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

Type: String

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

Required: Yes

UserName

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

Type: String

Pattern: ^[a-zA-Z0-9_][a-zA-Z0-9_-]{2,31}$

Required: Yes

UserPassword

The password of the user account to be tested.

Type: String

Required: No

Response Syntax

{ "Message": "string", "StatusCode": number, "Url": "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.

Message

The result of the authorization test as a message.

Type: String

StatusCode

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

Type: Integer

Url

The endpoint of the service used to authenticate a user.

Type: String

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 request returns a message from an identity provider that a user name and password is a valid identity to use the AWS Transfer for SFTP service.

Sample Request

{ "ServerID": "s-01234567890abcdef", "UserName": "sftp_user" "UserPassword": "MyPassword-1" }

Example

Sample Response

"Message": "Good to Go", "StatusCode": "200" "Url": "myauthenticationserver.com",

See Also

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