Remove a secondary cluster from the Global datastore using the Global datastore name. The secondary cluster will no longer receive updates from the primary cluster, but will remain as a standalone cluster in that Amazon region.
Parameters:
-
global_replication_group_id
(Optional[String], default:
None
)
–
The name of the Global datastore
-
replication_group_id
(Optional[String], default:
None
)
–
The name of the secondary cluster you wish to remove from the Global datastore
-
replication_group_region
(Optional[String], default:
None
)
–
The Amazon region of secondary cluster you wish to remove from the Global datastore
Raises:
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
| def disassociate_global_replication_group(
self,
*,
config_overrides: Optional[ElastiCacheClientConfig] = None,
global_replication_group_id: Optional[
"capo_elasticache.types.string.String"
] = None,
replication_group_id: Optional["capo_elasticache.types.string.String"] = None,
replication_group_region: Optional[
"capo_elasticache.types.string.String"
] = None,
) -> "capo_elasticache.types.disassociate_global_replication_group_result.DisassociateGlobalReplicationGroupResult":
"""<p>Remove a secondary cluster from the Global datastore using the Global datastore name. The secondary cluster will no longer receive updates from the primary cluster, but will remain as a standalone cluster in that Amazon region.</p>
Args:
global_replication_group_id: <p>The name of the Global datastore</p>
replication_group_id: <p>The name of the secondary cluster you wish to remove from the Global datastore</p>
replication_group_region: <p>The Amazon region of secondary cluster you wish to remove from the Global datastore</p>
Raises:
capo_elasticache.errors.global_replication_group_not_found_fault.GlobalReplicationGroupNotFoundFault: <p>The Global datastore does not exist</p>
capo_elasticache.errors.invalid_global_replication_group_state_fault.InvalidGlobalReplicationGroupStateFault: <p>The Global datastore is not available or in primary-only 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.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_elasticache.types.disassociate_global_replication_group_message.DisassociateGlobalReplicationGroupMessage]",
) -> OperationResponse[
"capo_elasticache.types.disassociate_global_replication_group_result.DisassociateGlobalReplicationGroupResult"
]:
import capo_elasticache._operations.amazon_elasti_cache_v9.disassociate_global_replication_group
output, http_response = (
capo_elasticache._operations.amazon_elasti_cache_v9.disassociate_global_replication_group.disassociate_global_replication_group(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateGlobalReplicationGroup")
)
input_: capo_elasticache.types.disassociate_global_replication_group_message.DisassociateGlobalReplicationGroupMessage = {}
if global_replication_group_id is not None:
input_["global_replication_group_id"] = global_replication_group_id
if replication_group_id is not None:
input_["replication_group_id"] = replication_group_id
if replication_group_region is not None:
input_["replication_group_region"] = replication_group_region
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|