Parent

Class/Module Index [+]

Quicksearch

Fog::Compute::AWS::DhcpOption

Public Class Methods

new(attributes={}) click to toggle source
# File lib/fog/aws/models/compute/dhcp_option.rb, line 13
def initialize(attributes={})
  super
end

Public Instance Methods

associate(vpc_id) click to toggle source

Associates an existing dhcp configration set with a VPC

dhcp_option.attach(dopt-id, vpc-id)

Returns

True or false depending on the result

# File lib/fog/aws/models/compute/dhcp_option.rb, line 25
def associate(vpc_id)
  requires :id
  service.attach_dhcp_option(id, vpc_id)
  #reload
end
destroy() click to toggle source

Removes an existing dhcp configuration set

dhcp_option.destroy

Returns

True or false depending on the result

# File lib/fog/aws/models/compute/dhcp_option.rb, line 40
def destroy
  requires :id
  service.delete_dhcp_options(id)
  true
end
save() click to toggle source

Create a dhcp configuration set

>> g = AWS.dhcp_options.new()
>> g.save

Returns:

requestId and a dhcpOptions object

# File lib/fog/aws/models/compute/dhcp_option.rb, line 56
def save
  requires :dhcp_configuration_set
  data = service.create_dhcp_options(dhcp_configuration_set).body['dhcpOptionsSet'].first
  new_attributes = data.reject {|key,value| key == 'requestId'}
  merge_attributes(new_attributes)
  true

  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.