You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.
Class: AWS::EC2::DHCPOptionsCollection
- Inherits:
-
Collection
- Object
- Collection
- AWS::EC2::DHCPOptionsCollection
- Includes:
- Core::Collection::Simple, TaggedCollection
- Defined in:
- lib/aws/ec2/dhcp_options_collection.rb
Instance Method Summary collapse
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Methods included from TaggedCollection
#tagged, #tagged_values, #with_tag
Methods included from FilteredCollection
Instance Method Details
#[](dhcp_options_id) ⇒ DHCPOptions
67 68 69 |
# File 'lib/aws/ec2/dhcp_options_collection.rb', line 67 def [] DHCPOptions.new(, :config => config) end |
#create(options = {}) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/aws/ec2/dhcp_options_collection.rb', line 44 def create = {} configurations = [] .each_pair do |opt,values| opt = opt.to_s.gsub(/_/, '-') values = values.is_a?(Array) ? values : [values] configurations << { :key => opt, :values => values.map(&:to_s) } end client_opts = {} client_opts[:dhcp_configurations] = configurations resp = client.(client_opts) DHCPOptions.new_from(:create_dhcp_options, resp., resp.., :config => config) end |