AWS Glue

2024/09/19 - AWS Glue - 1 new api methods

Changes  This change is for releasing TestConnection api SDK model

TestConnection (new) Link ΒΆ

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

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',
            'SecretArn': 'string',
            'OAuth2Properties': {
                'OAuth2GrantType': 'AUTHORIZATION_CODE'|'CLIENT_CREDENTIALS'|'JWT_BEARER',
                'OAuth2ClientApplication': {
                    'UserManagedClientApplicationClientId': 'string',
                    'AWSManagedClientApplicationReference': 'string'
                },
                'TokenUrl': 'string',
                'TokenUrlParametersMap': {
                    'string': 'string'
                },
                'AuthorizationCodeProperties': {
                    'AuthorizationCode': 'string',
                    'RedirectUri': 'string'
                }
            }
        }
    }
)
type ConnectionName

string

param ConnectionName

Optional. The name of the connection to test. If only name is provided, the operation will get the connection and use that for testing.

type TestConnectionInput

dict

param TestConnectionInput

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 or SALESFORCE 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 ) or JDBC_CONNECTION_URL .

    • Required: All of ( USERNAME , PASSWORD ) or SECRET_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.

    • SecretArn (string) --

      The secret manager ARN to store credentials 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 , or CLIENT_CREDENTIALS .

      • OAuth2ClientApplication (dict) --

        The client application type in the CreateConnection request. For example, AWS_MANAGED or USER_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.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --