delete_replication_group
async
¶
delete_replication_group(
*,
config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
replication_group_id: Optional[String] = None,
retain_primary_cluster: Optional[BooleanOptional] = None,
final_snapshot_identifier: Optional[String] = None,
) -> DeleteReplicationGroupResult
Deletes an existing replication group. By default, this operation deletes the entire replication group, including the primary/primaries and all of the read replicas. If the replication group has only one primary, you can optionally delete only the read replicas, while retaining the primary by setting RetainPrimaryCluster=true.
When you receive a successful response from this operation, Amazon ElastiCache immediately begins deleting the selected resources; you cannot cancel or revert this operation.
-
CreateSnapshotpermission is required to create a final snapshot. Without this permission, the API call will fail with anAccess Deniedexception. -
This operation is valid for Redis OSS only.
Parameters:
-
replication_group_id(Optional[String], default:None) –The identifier for the cluster to be deleted. This parameter is not case sensitive.
-
retain_primary_cluster(Optional[BooleanOptional], default:None) –If set to
true, all of the read replicas are deleted, but the primary node is retained. -
final_snapshot_identifier(Optional[String], default:None) –The name of a final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster, rather than one of the replicas; this is to ensure that it captures the freshest data. After the final snapshot is taken, the replication group is immediately deleted.
Raises:
-
InvalidParameterCombinationException–Two or more incompatible parameters were specified.
-
InvalidParameterValueException–The value for a parameter is invalid.
-
InvalidReplicationGroupStateFault–The requested replication group is not in the
availablestate. -
ReplicationGroupNotFoundFault–The specified replication group does not exist.
-
SnapshotAlreadyExistsFault–You already have a snapshot with the given name.
-
SnapshotFeatureNotSupportedFault–You attempted one of the following operations:
-
Creating a snapshot of a Valkey or Redis OSS cluster running on a
cache.t1.microcache node. -
Creating a snapshot of a cluster that is running Memcached rather than Valkey or Redis OSS.
Neither of these are supported by ElastiCache.
-
-
SnapshotQuotaExceededFault–The request cannot be processed because it would exceed the maximum number of snapshots.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
DeleteReplicationGroup Deletes the Amazon ElastiCache replication group my-redis-rg.
>>> await client.delete_replication_group(replication_group_id='my-redis-rg', retain_primary_cluster=False)
Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 | |