diff --git a/lib/fog/aws/requests/dns/create_hosted_zone.rb b/lib/fog/aws/requests/dns/create_hosted_zone.rb
index 838bf92da..34595c3c9 100644
--- a/lib/fog/aws/requests/dns/create_hosted_zone.rb
+++ b/lib/fog/aws/requests/dns/create_hosted_zone.rb
@@ -12,6 +12,8 @@ module Fog
# * caller_ref<~String> - unique string that identifies the request & allows failed
# calls to be retried without the risk of executing the operation twice
# * comment<~String> -
+ # * vpc_id<~String> - specify both a VPC's ID and its region to create a private zone for that VPC
+ # * vpc_region<~String> - specify both a VPC's ID and its region to create a private zone for that VPC
#
# ==== Returns
# * response<~Excon::Response>:
@@ -40,6 +42,9 @@ module Fog
if options[:comment]
optional_tags += "#{options[:comment]}"
end
+ if options[:vpc_id] and options[:vpc_region]
+ optional_tags += "#{options[:vpc_id]}#{options[:vpc_region]}"
+ end
request({
:body => %Q{#{name}#{optional_tags}},
@@ -50,33 +55,6 @@ module Fog
})
end
end
-
- def create_hosted_zone_private(name, vpc, options = {})
- optional_tags = ''
- if options[:caller_ref]
- optional_tags += "#{options[:caller_ref]}"
- else
- #make sure we have a unique call reference
- caller_ref = "ref-#{rand(1000000).to_s}"
- optional_tags += "#{caller_ref}"
- end
- if options[:comment]
- optional_tags += "#{options[:comment]}"
- end
- if vpc[:VPCId] and vpc[:VPCRegion]
- optional_tags += "#{vpc[:VPCId]}#{vpc[:VPCRegion]}"
- else
- raise "Must specify VPCId and VPCRegion for private zone."
- end
-
- request({
- :body => %Q{#{name}#{optional_tags}},
- :parser => Fog::Parsers::DNS::AWS::CreateHostedZone.new,
- :expects => 201,
- :method => 'POST',
- :path => "hostedzone"
- })
- end
class Mock
require 'time'