Completes the migration of data.
Parameters:
-
replication_group_id
(Optional[String], default:
None
)
–
The ID of the replication group to which data is being migrated.
-
serverless_cache_name
(Optional[String], default:
None
)
–
The name of the serverless cache to which data is being migrated.
-
force
(Optional[Boolean], default:
None
)
–
Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.
Raises:
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
| def complete_migration(
self,
*,
config_overrides: Optional[ElastiCacheClientConfig] = None,
replication_group_id: Optional["capo_elasticache.types.string.String"] = None,
serverless_cache_name: Optional["capo_elasticache.types.string.String"] = None,
force: Optional["capo_elasticache.types.boolean.Boolean"] = None,
) -> "capo_elasticache.types.complete_migration_response.CompleteMigrationResponse":
"""<p>Completes the migration of data.</p>
Args:
replication_group_id: <p>The ID of the replication group to which data is being migrated.</p>
serverless_cache_name: <p>The name of the serverless cache to which data is being migrated.</p>
force: <p>Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.</p>
Raises:
capo_elasticache.errors.invalid_cache_cluster_state_fault.InvalidCacheClusterStateFault: <p>The requested cluster is not in the <code>available</code> state.</p>
capo_elasticache.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
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.invalid_serverless_cache_state_fault.InvalidServerlessCacheStateFault: <p>The account for these credentials is not currently active.</p>
capo_elasticache.errors.migration_health_fault.MigrationHealthFault: <p>The migration is not healthy. Check the events for this serverless cache for more details. For <code>CompleteMigration</code>, set <code>Force</code> to true to bypass this check.</p>
capo_elasticache.errors.replication_group_not_found_fault.ReplicationGroupNotFoundFault: <p>The specified replication group does not exist.</p>
capo_elasticache.errors.replication_group_not_under_migration_fault.ReplicationGroupNotUnderMigrationFault: <p>The designated replication group is not available for data migration.</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.complete_migration_message.CompleteMigrationMessage]",
) -> OperationResponse[
"capo_elasticache.types.complete_migration_response.CompleteMigrationResponse"
]:
import capo_elasticache._operations.amazon_elasti_cache_v9.complete_migration
output, http_response = (
capo_elasticache._operations.amazon_elasti_cache_v9.complete_migration.complete_migration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CompleteMigration")
)
input_: capo_elasticache.types.complete_migration_message.CompleteMigrationMessage = {}
if replication_group_id is not None:
input_["replication_group_id"] = replication_group_id
if serverless_cache_name is not None:
input_["serverless_cache_name"] = serverless_cache_name
if force is not None:
input_["force"] = force
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|