34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/fog/aws/requests/rds/create_db_parameter_group.rb', line 34
def create_db_parameter_group(group_name, group_family, description)
response = Excon::Response.new
if self.data[:parameter_groups] and self.data[:parameter_groups][group_name]
raise Fog::AWS::RDS::IdentifierTaken.new("Parameter group #{group_name} already exists")
end
data = {
'DBParameterGroupName' => group_name,
'DBParameterGroupFamily' => group_family.downcase,
'Description' => description
}
self.data[:parameter_groups][group_name] = data
response.body = {
"ResponseMetadata"=>{ "RequestId"=> Fog::AWS::Mock.request_id },
"CreateDBParameterGroupResult"=> {"DBParameterGroup"=> data}
}
response.status = 200
response
end
|