class Chef::Resource::AwsDhcpOptions

DHCP options for use by VPCs.

If you specify nothing, the DHCP options set will use 'AmazonProvidedDNS' for its domain name servers and all other values will be empty.

API documentation for the AWS Ruby SDK for DHCP Options (and the object returned from `aws_object` can be found here:

Public Instance Methods

aws_object() click to toggle source
# File lib/chef/resource/aws_dhcp_options.rb, line 54
def aws_object
  driver, id = get_driver_and_id
  ec2_resource = ::Aws::EC2::Resource.new(driver.ec2)
  result = ec2_resource.dhcp_options(id) if id
  result && exists?(result) ? result : nil
end
exists?(result) click to toggle source
# File lib/chef/resource/aws_dhcp_options.rb, line 61
def exists?(result)
  return true if result.data
rescue ::Aws::EC2::Errors::InvalidDhcpOptionIDNotFound
  false
end