Bugfix: Allow stop_db_instance for compatible engines
From the RDS documentation:
You can stop and start a DB instance whether it is configured for a single Availability Zone or for Multi-AZ, for database engines that support Multi-AZ deployments. You can't stop an Amazon RDS for SQL Server DB instance in a Multi-AZ configuration.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html#USER_StopInstance.Limitations
This commit is contained in:
parent
07c33105e5
commit
4dc46a697d
2 changed files with 33 additions and 3 deletions
|
|
@ -865,7 +865,10 @@ class RDS2Backend(BaseBackend):
|
|||
def stop_database(self, db_instance_identifier, db_snapshot_identifier=None):
|
||||
database = self.describe_databases(db_instance_identifier)[0]
|
||||
# todo: certain rds types not allowed to be stopped at this time.
|
||||
if database.is_replica or database.multi_az:
|
||||
# https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html#USER_StopInstance.Limitations
|
||||
if database.is_replica or (
|
||||
database.multi_az and database.engine.lower().startswith("sqlserver")
|
||||
):
|
||||
# todo: more db types not supported by stop/start instance api
|
||||
raise InvalidDBClusterStateFaultError(db_instance_identifier)
|
||||
if database.status != "available":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue