test_identity_provider
¶
test_identity_provider(
server_id: ServerId,
user_name: UserName,
*,
config_overrides: Optional[TransferClientConfig] = None,
server_protocol: Optional[Protocol] = None,
source_ip: Optional[SourceIp] = None,
user_password: Optional[UserPassword] = None,
) -> TestIdentityProviderResponse
If the IdentityProviderType of a file transfer protocol-enabled server is AWS_DIRECTORY_SERVICE or API_Gateway, tests whether your identity provider 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 identity provider integration to ensure that your users can successfully use the service.
The ServerId and UserName parameters are required. The ServerProtocol, SourceIp, and UserPassword are all optional.
Note the following:
-
You cannot use
TestIdentityProviderif theIdentityProviderTypeof your server isSERVICE_MANAGED. -
TestIdentityProviderdoes not work with keys: it only accepts passwords. -
TestIdentityProvidercan test the password operation for a custom Identity Provider that handles keys and passwords. -
If you provide any incorrect values for any parameters, the
Responsefield is empty. -
If you provide a server ID for a server that uses service-managed users, you get an error:
An error occurred (InvalidRequestException) when calling the TestIdentityProvider operation: s-server-ID not configured for external auth -
If you enter a Server ID for the
--server-idparameter that does not identify an actual Transfer server, you receive the following error:An error occurred (ResourceNotFoundException) when calling the TestIdentityProvider operation: Unknown server.It is possible your sever is in a different region. You can specify a region by adding the following:
--region region-code, such as--region us-east-2to specify a server in US East (Ohio).
Parameters:
-
server_id(ServerId) –A system-assigned identifier for a specific server. That server's user authentication method is tested with a user name and password.
-
server_protocol(Optional[Protocol], default:None) –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)
-
Applicability Statement 2 (AS2)
-
-
source_ip(Optional[SourceIp], default:None) –The source IP address of the account to be tested.
-
user_name(UserName) –The name of the account to be tested.
-
user_password(Optional[UserPassword], default:None) –The password of the account to be tested.
Raises:
-
InternalServiceError–This exception is thrown when an error occurs in the Transfer Family service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
ResourceNotFoundException–This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
-
ServiceUnavailableException–The request has failed because the Amazon Web ServicesTransfer Family service is not available.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transfer/_services/transfer.py
1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 | |