Skip to content

stop_migration

stop_migration(
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    serverless_cache_name: Optional[String] = None,
) -> StopMigrationResponse

Stops an ongoing data sync between the source and the serverless cache. The migration remains open and the data sync can be restarted. This operation is valid only while the migration is syncing; during cutover it returns InvalidServerlessCacheStateFault.

Parameters:

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

    The name of the serverless cache for which to stop the data sync.

Raises:

Source code in docs_src/capo_elasticache/_services/elasti_cache.py
def stop_migration(
    self,
    *,
    config_overrides: Optional[ElastiCacheClientConfig] = None,
    serverless_cache_name: Optional["capo_elasticache.types.string.String"] = None,
) -> "capo_elasticache.types.stop_migration_response.StopMigrationResponse":
    """<p>Stops an ongoing data sync between the source and the serverless cache. The migration remains open and the data sync can be restarted. This operation is valid only while the migration is syncing; during cutover it returns <code>InvalidServerlessCacheStateFault</code>.</p>

    Args:
        serverless_cache_name: <p>The name of the serverless cache for which to stop the data sync.</p>

    Raises:
        capo_elasticache.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
        capo_elasticache.errors.invalid_serverless_cache_state_fault.InvalidServerlessCacheStateFault: <p>The account for these credentials is not currently active.</p>
        capo_elasticache.errors.serverless_cache_not_found_fault.ServerlessCacheNotFoundFault: <p>The serverless cache was not found or does not exist.</p>
        capo_elasticache.errors.serverless_cache_not_under_migration_fault.ServerlessCacheNotUnderMigrationFault: <p>The serverless cache is not currently under migration.</p>
        capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elasticache.types.stop_migration_request.StopMigrationRequest]",
    ) -> OperationResponse[
        "capo_elasticache.types.stop_migration_response.StopMigrationResponse"
    ]:
        import capo_elasticache._operations.amazon_elasti_cache_v9.stop_migration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopMigration")
    )
    input_: capo_elasticache.types.stop_migration_request.StopMigrationRequest = {}
    if serverless_cache_name is not None:
        input_["serverless_cache_name"] = serverless_cache_name

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