stop_db_instance
async
¶
stop_db_instance(
*,
config_overrides: Optional[AsyncRDSClientConfig] = 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/async_rds.py
15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 | |