Skip to content

test_connection

test_connection(
    replication_instance_arn: String,
    endpoint_arn: String,
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
) -> TestConnectionResponse

Tests the connection between the replication instance and the endpoint.

Parameters:

  • replication_instance_arn (String) –

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

  • endpoint_arn (String) –

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

Raises:

Examples:

Test conection Tests the connection between the replication instance and the endpoint.

>>> client.test_connection(replication_instance_arn='arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ', endpoint_arn='arn:aws:dms:us-east-1:123456789012:endpoint:RAAR3R22XSH46S3PWLC3NJAWKM')
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
def test_connection(
    self,
    replication_instance_arn: "capo_database_migration_service.types.string.String",
    endpoint_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.test_connection_response.TestConnectionResponse":
    """<p>Tests the connection between the replication instance and the endpoint.</p>

    Args:
        replication_instance_arn: <p>The Amazon Resource Name (ARN) of the replication instance.</p>
        endpoint_arn: <p>The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.</p>

    Raises:
        capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
        capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
        capo_database_migration_service.errors.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>DMS cannot access the KMS key.</p>
        capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
        capo_database_migration_service.errors.resource_quota_exceeded_fault.ResourceQuotaExceededFault: <p>The quota for this resource quota has been exceeded.</p>
        capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Test conection
        Tests the connection between the replication instance and the endpoint.

        >>> client.test_connection(replication_instance_arn='arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ', endpoint_arn='arn:aws:dms:us-east-1:123456789012:endpoint:RAAR3R22XSH46S3PWLC3NJAWKM')
    """

    def _handler(
        req: "OperationRequest[capo_database_migration_service.types.test_connection_message.TestConnectionMessage]",
    ) -> OperationResponse[
        "capo_database_migration_service.types.test_connection_response.TestConnectionResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.test_connection

        output, http_response = (
            capo_database_migration_service._operations.amazon_dm_sv20160101.test_connection.test_connection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("TestConnection")
    )
    input_: capo_database_migration_service.types.test_connection_message.TestConnectionMessage = {
        "replication_instance_arn": replication_instance_arn,
        "endpoint_arn": endpoint_arn,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output