def create_event_subscription(options={})
response = Excon::Response.new
name = options.delete('SubscriptionName')
arn = options.delete('SnsTopicArn')
if self.data[:event_subscriptions][name]
raise Fog::AWS::RDS::IdentifierTaken.new("SubscriptionAlreadyExist => Subscription already exists")
end
subscription = {
'CustSubscriptionId' => name,
'EventCategories' => options['EventCategories'] || [],
'SourceType' => options['SourceType'],
'Enabled' => options.fetch(:enabled, "true"),
'Status' => 'creating',
'CreationTime' => Time.now,
'SnsTopicArn' => arn,
}
self.data[:event_subscriptions][name] = subscription
response.body = {
"ResponseMetaData" => {"RequestId" => Fog::AWS::Mock.request_id},
"CreateEventSubscriptionResult" => { "EventSubscription" => subscription }
}
response
end