Glue / Client / test_connection
test_connection#
- Glue.Client.test_connection(**kwargs)#
Tests a connection to a service to validate the service credentials that you provide.
You can either provide an existing connection name or a
TestConnectionInput
for testing a non-existing connection input. Providing both at the same time will cause an error.If the action is successful, the service sends back an HTTP 200 response.
See also: AWS API Documentation
Request Syntax
response = client.test_connection( ConnectionName='string', TestConnectionInput={ 'ConnectionType': 'JDBC'|'SFTP'|'MONGODB'|'KAFKA'|'NETWORK'|'MARKETPLACE'|'CUSTOM'|'SALESFORCE'|'VIEW_VALIDATION_REDSHIFT'|'VIEW_VALIDATION_ATHENA', 'ConnectionProperties': { 'string': 'string' }, 'AuthenticationConfiguration': { 'AuthenticationType': 'BASIC'|'OAUTH2'|'CUSTOM', 'OAuth2Properties': { 'OAuth2GrantType': 'AUTHORIZATION_CODE'|'CLIENT_CREDENTIALS'|'JWT_BEARER', 'OAuth2ClientApplication': { 'UserManagedClientApplicationClientId': 'string', 'AWSManagedClientApplicationReference': 'string' }, 'TokenUrl': 'string', 'TokenUrlParametersMap': { 'string': 'string' }, 'AuthorizationCodeProperties': { 'AuthorizationCode': 'string', 'RedirectUri': 'string' } }, 'SecretArn': 'string' } } )
- Parameters:
ConnectionName (string) – Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing.
TestConnectionInput (dict) –
A structure that is used to specify testing a connection to a service.
ConnectionType (string) – [REQUIRED]
The type of connection to test. This operation is only available for the
JDBC
orSALESFORCE
connection types.ConnectionProperties (dict) – [REQUIRED]
The key-value pairs that define parameters for the connection.
JDBC connections use the following connection properties:
Required: All of (
HOST
,PORT
,JDBC_ENGINE
) orJDBC_CONNECTION_URL
.Required: All of (
USERNAME
,PASSWORD
) orSECRET_ID
.Optional:
JDBC_ENFORCE_SSL
,CUSTOM_JDBC_CERT
,CUSTOM_JDBC_CERT_STRING
,SKIP_CUSTOM_JDBC_CERT_VALIDATION
. These parameters are used to configure SSL with JDBC.
SALESFORCE connections require the
AuthenticationConfiguration
member to be configured.(string) –
(string) –
AuthenticationConfiguration (dict) –
A structure containing the authentication configuration in the TestConnection request. Required for a connection to Salesforce using OAuth authentication.
AuthenticationType (string) –
A structure containing the authentication configuration in the CreateConnection request.
OAuth2Properties (dict) –
The properties for OAuth2 authentication in the CreateConnection request.
OAuth2GrantType (string) –
The OAuth2 grant type in the CreateConnection request. For example,
AUTHORIZATION_CODE
,JWT_BEARER
, orCLIENT_CREDENTIALS
.OAuth2ClientApplication (dict) –
The client application type in the CreateConnection request. For example,
AWS_MANAGED
orUSER_MANAGED
.UserManagedClientApplicationClientId (string) –
The client application clientID if the ClientAppType is
USER_MANAGED
.AWSManagedClientApplicationReference (string) –
The reference to the SaaS-side client app that is Amazon Web Services managed.
TokenUrl (string) –
The URL of the provider’s authentication server, to exchange an authorization code for an access token.
TokenUrlParametersMap (dict) –
A map of parameters that are added to the token
GET
request.(string) –
(string) –
AuthorizationCodeProperties (dict) –
The set of properties required for the the OAuth2
AUTHORIZATION_CODE
grant type.AuthorizationCode (string) –
An authorization code to be used in the third leg of the
AUTHORIZATION_CODE
grant workflow. This is a single-use code which becomes invalid once exchanged for an access token, thus it is acceptable to have this value as a request parameter.RedirectUri (string) –
The redirect URI where the user gets redirected to by authorization server when issuing an authorization code. The URI is subsequently used when the authorization code is exchanged for an access token.
SecretArn (string) –
The secret manager ARN to store credentials in the CreateConnection request.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
Glue.Client.exceptions.InvalidInputException
Glue.Client.exceptions.OperationTimeoutException
Glue.Client.exceptions.ResourceNumberLimitExceededException
Glue.Client.exceptions.GlueEncryptionException
Glue.Client.exceptions.FederationSourceException
Glue.Client.exceptions.AccessDeniedException
Glue.Client.exceptions.EntityNotFoundException
Glue.Client.exceptions.ConflictException
Glue.Client.exceptions.InternalServiceException