def create_hosted_zone(name, options = {})
optional_tags = ''
if options[:caller_ref]
optional_tags+= "<CallerReference>#{options[:caller_ref]}</CallerReference>"
else
caller_ref = "ref-#{rand(1000000).to_s}"
optional_tags+= "<CallerReference>#{caller_ref}</CallerReference>"
end
if options[:comment]
optional_tags+= "<HostedZoneConfig><Comment>#{options[:comment]}</Comment></HostedZoneConfig>"
end
request({
:body => %Q{<?xml version="1.0" encoding="UTF-8"?><CreateHostedZoneRequest xmlns="https://route53.amazonaws.com/doc/2010-10-01/"><Name>#{name}</Name>#{optional_tags}</CreateHostedZoneRequest>},
:parser => Fog::Parsers::DNS::AWS::CreateHostedZone.new,
:expects => 201,
:method => 'POST',
:path => "hostedzone"
})
end