Sha256: dfc34a6d315eea7174f687f9266d6bc637521c26204e20e91b26233bc8513d51

Contents?: true

Size: 702 Bytes

Versions: 36

Compression:

Stored size: 702 Bytes

Contents

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

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

        model Fog::AWS::DNS::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::AWS::DNS::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
fog-aws-3.29.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.28.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.27.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.26.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.25.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.24.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.23.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.22.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.21.1 lib/fog/aws/models/dns/zones.rb
fog-aws-3.21.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.20.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.19.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.18.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.17.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.16.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.15.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.14.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.13.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.12.0 lib/fog/aws/models/dns/zones.rb
fog-aws-3.11.0 lib/fog/aws/models/dns/zones.rb