DatabaseMigrationService / Client / test_connection

test_connection#

DatabaseMigrationService.Client.test_connection(**kwargs)#

Tests the connection between the replication instance and the endpoint.

See also: AWS API Documentation

Request Syntax

response = client.test_connection(
    ReplicationInstanceArn='string',
    EndpointArn='string'
)
Parameters:
  • ReplicationInstanceArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the replication instance.

  • EndpointArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.

Return type:

dict

Returns:

Response Syntax

{
    'Connection': {
        'ReplicationInstanceArn': 'string',
        'EndpointArn': 'string',
        'Status': 'string',
        'LastFailureMessage': 'string',
        'EndpointIdentifier': 'string',
        'ReplicationInstanceIdentifier': 'string'
    }
}

Response Structure

  • (dict) –

    • Connection (dict) –

      The connection tested.

      • ReplicationInstanceArn (string) –

        The ARN of the replication instance.

      • EndpointArn (string) –

        The ARN string that uniquely identifies the endpoint.

      • Status (string) –

        The connection status. This parameter can return one of the following values:

        • "successful"

        • "testing"

        • "failed"

        • "deleting"

      • LastFailureMessage (string) –

        The error message when the connection last failed.

      • EndpointIdentifier (string) –

        The identifier of the endpoint. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can’t end with a hyphen or contain two consecutive hyphens.

      • ReplicationInstanceIdentifier (string) –

        The replication instance identifier. This parameter is stored as a lowercase string.

Exceptions

  • DatabaseMigrationService.Client.exceptions.ResourceNotFoundFault

  • DatabaseMigrationService.Client.exceptions.InvalidResourceStateFault

  • DatabaseMigrationService.Client.exceptions.KMSKeyNotAccessibleFault

  • DatabaseMigrationService.Client.exceptions.ResourceQuotaExceededFault

  • DatabaseMigrationService.Client.exceptions.AccessDeniedFault

Examples

Tests the connection between the replication instance and the endpoint.

response = client.test_connection(
    EndpointArn='arn:aws:dms:us-east-1:123456789012:endpoint:RAAR3R22XSH46S3PWLC3NJAWKM',
    ReplicationInstanceArn='arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ',
)

print(response)

Expected Output:

{
    'Connection': {
    },
    'ResponseMetadata': {
        '...': '...',
    },
}