Sha256: 35806bb920d80d89bdbf0c681987fa6f1fe4abc5a468861900e49ed54d2b227f

Contents?: true

Size: 702 Bytes

Versions: 29

Compression:

Stored size: 702 Bytes

Contents

require 'fog/aws/models/dns/zone'

module Fog
  module DNS
    class AWS
      class Zones < Fog::Collection
        attribute :marker,    :aliases => 'Marker'
        attribute :max_items, :aliases => 'MaxItems'

        model Fog::DNS::AWS::Zone

        def all(options = {})
          options[:marker]   ||= marker unless marker.nil?
          options[:maxitems] ||= max_items unless max_items.nil?
          data = service.list_hosted_zones(options).body['HostedZones']
          load(data)
        end

        def get(zone_id)
          data = service.get_hosted_zone(zone_id).body
          new(data)
        rescue Fog::DNS::AWS::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

29 entries across 27 versions & 3 rubygems

Version Path
fog-aws-3.1.0 lib/fog/aws/models/dns/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/lib/fog/aws/models/dns/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/lib/fog/aws/models/dns/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aws-2.0.1/lib/fog/aws/models/dns/zones.rb
fog-aws-3.0.0 lib/fog/aws/models/dns/zones.rb
fog-aws-2.0.1 lib/fog/aws/models/dns/zones.rb
fog-aws-2.0.0 lib/fog/aws/models/dns/zones.rb
fog-aws-1.4.1 lib/fog/aws/models/dns/zones.rb
fog-aws-1.4.0 lib/fog/aws/models/dns/zones.rb
fog-aws-1.3.0 lib/fog/aws/models/dns/zones.rb
fog-aws-1.2.1 lib/fog/aws/models/dns/zones.rb
fog-aws-1.2.0 lib/fog/aws/models/dns/zones.rb
fog-aws-1.1.0 lib/fog/aws/models/dns/zones.rb
fog-aws-1.0.0 lib/fog/aws/models/dns/zones.rb
fog-aws-0.13.0 lib/fog/aws/models/dns/zones.rb
fog-aws-0.12.0 lib/fog/aws/models/dns/zones.rb
fog-aws-0.11.0 lib/fog/aws/models/dns/zones.rb
fog-aws-0.10.0 lib/fog/aws/models/dns/zones.rb
fog-aws-0.9.4 lib/fog/aws/models/dns/zones.rb
fog-aws-0.9.3 lib/fog/aws/models/dns/zones.rb