Skip to content

test_migration

test_migration(
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    replication_group_id: Optional[String] = None,
    customer_node_endpoint_list: Optional[CustomerNodeEndpointList] = None,
) -> TestMigrationResponse

Async API to test connection between source and target replication group.

Parameters:

  • replication_group_id (Optional[String], default: None ) –

    The ID of the replication group to which data is to be migrated.

  • customer_node_endpoint_list (Optional[CustomerNodeEndpointList], default: None ) –

    List of endpoints from which data should be migrated. List should have only one element.

Raises:

Source code in docs_src/capo_elasticache/_services/elasti_cache.py
def test_migration(
    self,
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    replication_group_id: Optional["capo_elasticache.types.string.String"] = None,
    customer_node_endpoint_list: Optional[
        "capo_elasticache.types.customer_node_endpoint_list.CustomerNodeEndpointList"
    ] = None,
) -> "capo_elasticache.types.test_migration_response.TestMigrationResponse":
    """<p> Async API to test connection between source and target replication group. </p>

    Args:
        replication_group_id: <p> The ID of the replication group to which data is to be migrated. </p>
        customer_node_endpoint_list: <p> List of endpoints from which data should be migrated. List should have only one element. </p>

    Raises:
        capo_elasticache.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
        capo_elasticache.errors.invalid_replication_group_state_fault.InvalidReplicationGroupStateFault: <p>The requested replication group is not in the <code>available</code> state.</p>
        capo_elasticache.errors.replication_group_already_under_migration_fault.ReplicationGroupAlreadyUnderMigrationFault: <p>The targeted replication group is not available. </p>
        capo_elasticache.errors.replication_group_not_found_fault.ReplicationGroupNotFoundFault: <p>The specified replication group does not exist.</p>
        capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elasticache.types.test_migration_message.TestMigrationMessage]",
    ) -> OperationResponse[
        "capo_elasticache.types.test_migration_response.TestMigrationResponse"
    ]:
        import capo_elasticache._operations.amazon_elasti_cache_v9.test_migration

        output, http_response = (
            capo_elasticache._operations.amazon_elasti_cache_v9.test_migration.test_migration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("TestMigration")
    )
    input_: capo_elasticache.types.test_migration_message.TestMigrationMessage = {}
    if replication_group_id is not None:
        input_["replication_group_id"] = replication_group_id
    if customer_node_endpoint_list is not None:
        input_["customer_node_endpoint_list"] = customer_node_endpoint_list

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