mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
commit
9137c4d1f1
3 changed files with 5 additions and 3 deletions
|
@ -294,7 +294,7 @@ module Fog
|
|||
end
|
||||
else
|
||||
raise case match[:code]
|
||||
when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound', 'SubscriptionNotFound'
|
||||
when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound', 'SubscriptionNotFound', 'DBClusterNotFoundFault'
|
||||
Fog::AWS::RDS::NotFound.slurp(error, match[:message])
|
||||
when 'DBParameterGroupAlreadyExists'
|
||||
Fog::AWS::RDS::IdentifierTaken.slurp(error, match[:message])
|
||||
|
|
|
@ -26,7 +26,7 @@ module Fog
|
|||
def create_db_snapshot(identifier, name)
|
||||
response = Excon::Response.new
|
||||
if data[:snapshots][name]
|
||||
raise Fog::AWS::RDS::IndentifierTaken.new
|
||||
raise Fog::AWS::RDS::IdentifierTaken.new
|
||||
end
|
||||
|
||||
server_data = data[:servers][identifier]
|
||||
|
|
|
@ -37,8 +37,10 @@ module Fog
|
|||
unless skip_snapshot
|
||||
if server_set["ReadReplicaSourceDBInstanceIdentifier"]
|
||||
raise Fog::AWS::RDS::Error.new("InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a replica instance")
|
||||
elsif server_set["DBClusterIdentifier"]
|
||||
elsif server_set["DBClusterIdentifier"] && snapshot_identifier # for cluster instances, you must pass in skip_snapshot = false, but not specify a snapshot identifier
|
||||
raise Fog::AWS::RDS::Error.new("InvalidParameterCombination => FinalDBSnapshotIdentifier can not be specified when deleting a cluster instance")
|
||||
elsif server_set["DBClusterIdentifier"] && !snapshot_identifier && !skip_snapshot
|
||||
#no-op
|
||||
else
|
||||
create_db_snapshot(identifier, snapshot_identifier)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue