TestIdentityProvider - AWS Transfer Family

TestIdentityProvider

If the IdentityProviderType of a file transfer protocol-enabled server is API_Gateway, tests whether your API Gateway is set up successfully. We highly recommend that you call this operation 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", "ServerProtocol": "string", "SourceIp": "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 file transfer protocol-enabled server. That server's user authentication method is tested with a user name and password.

Type: String

Length Constraints: Fixed length of 19.

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

Required: Yes

ServerProtocol

The type of file transfer protocol to be tested.

The available protocols are:

  • Secure Shell (SSH) File Transfer Protocol (SFTP)

  • File Transfer Protocol Secure (FTPS)

  • File Transfer Protocol (FTP)

Type: String

Valid Values: SFTP | FTP | FTPS

Required: No

SourceIp

The source IP address of the user account to be tested.

Type: String

Length Constraints: Maximum length of 32.

Pattern: ^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$

Required: No

UserName

The name of the user account to be tested.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 32.

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

Length Constraints: Maximum length of 2048.

Required: No

Response Syntax

{ "Message": "string", "Response": "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

A message that indicates whether the test was successful or not.

Type: String

Response

The response that is returned from your API Gateway.

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

Length Constraints: Maximum length of 255.

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 Family 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 Family service.

HTTP Status Code: 400

ServiceUnavailableException

The request has failed because the AWS Transfer Family 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 with the AWS Transfer Family service.

Sample Request

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

Example

Sample Response

"Message": "", "StatusCode": "200" "Response": ""{\"Role\": \"arn:aws:iam::123456789012:role/SFTP_role\",\"HomeDirectory\": \"/bucket_name/home/mydirectory\",\"PublicKeys\": \"[ssh-rsa-key]\"}"" "Url": "myauthenticationserver.com",

See Also

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