stop_db_instance
¶
stop_db_instance(
*,
config_overrides: Optional[RDSClientConfig] = None,
db_instance_identifier: Optional[String] = None,
db_snapshot_identifier: Optional[String] = None,
) -> StopDBInstanceResult
Stops an Amazon RDS DB instance temporarily. When you stop a DB instance, Amazon RDS retains the DB instance's metadata, including its endpoint, DB parameter group, and option group membership. Amazon RDS also retains the transaction logs so you can do a point-in-time restore if necessary. The instance restarts automatically after 7 days.
For more information, see Stopping an Amazon RDS DB Instance Temporarily in the Amazon RDS User Guide.
This command doesn't apply to RDS Custom, Aurora MySQL, and Aurora PostgreSQL. For Aurora clusters, use StopDBCluster instead.
Parameters:
-
db_instance_identifier(Optional[String], default:None) –The user-supplied instance identifier.
-
db_snapshot_identifier(Optional[String], default:None) –The user-supplied instance identifier of the DB Snapshot created immediately before the DB instance is stopped.
Raises:
-
DBInstanceNotFoundFault–DBInstanceIdentifierdoesn't refer to an existing DB instance. -
DBSnapshotAlreadyExistsFault–DBSnapshotIdentifieris already used by an existing snapshot. -
InvalidDBClusterStateFault–The requested operation can't be performed while the cluster is in this state.
-
InvalidDBInstanceStateFault–The DB instance isn't in a valid state.
-
SnapshotQuotaExceededFault–The request would result in the user exceeding the allowed number of DB snapshots.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To stop a DB instance The following example stops the specified DB instance.
Source code in docs_src/capo_rds/_services/rds.py
15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 | |