47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/fog/aws/requests/rds/modify_db_instance.rb', line 47
def modify_db_instance(db_name, apply_immediately, options={})
response = Excon::Response.new
if self.data[:servers][db_name]
if self.data[:servers][db_name]["DBInstanceStatus"] != "available"
raise Fog::AWS::RDS::NotFound.new("DBInstance #{db_name} not available for modification")
else
self.data[:modify_time] = Time.now
self.data[:servers][db_name]["PendingModifiedValues"].merge!(options) self.data[:servers][db_name]["DBInstanceStatus"] = "modifying"
response.status = 200
response.body = {
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
"ModifyDBInstanceResult" => { "DBInstance" => self.data[:servers][db_name] }
}
response
end
else
raise Fog::AWS::RDS::NotFound.new("DBInstance #{db_name} not found")
end
end
|