lib/cloudstrap/amazon/ec2.rb in cloudstrap-0.30.12.pre vs lib/cloudstrap/amazon/ec2.rb in cloudstrap-0.31.1.pre
- old
+ new
@@ -23,9 +23,19 @@
Contract String => Bool
def enable_dns_support(vpc_id)
call_api(:modify_vpc_attribute, vpc_id: vpc_id, enable_dns_support: { value: true }).successful?
end
+ Contract String => Bool
+ def vpc_supports_dns_hostnames?(vpc_id)
+ call_api(:describe_vpc_attribute, vpc_id: vpc_id, attribute: "enableDnsHostnames").enable_dns_hostnames.value
+ end
+
+ Contract String => Bool
+ def enable_dns_hostnames(vpc_id)
+ call_api(:modify_vpc_attribute, vpc_id: vpc_id, enable_dns_hostnames: { value: true }).successful?
+ end
+
Contract None => ArrayOf[::Aws::EC2::Types::Subnet]
def subnets
@subnets ||= subnets!
end