Sha256: 48e10b4630d9ffc01cd54a928f599c59da11e547a8efffa2ec58664ed76c75ba

Contents?: true

Size: 693 Bytes

Versions: 21

Compression:

Stored size: 693 Bytes

Contents

require 'fog/core/collection'
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
          options['maxitems'] ||= max_items
          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 Excon::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/models/dns/zones.rb
fog-aws-0.1.0 lib/fog/aws/models/dns/zones.rb
fog-aws-0.0.8 lib/fog/aws/models/dns/zones.rb
fog-aws-0.0.7 lib/fog/aws/models/dns/zones.rb
fog-aws-0.0.6 lib/fog/aws/models/dns/zones.rb
fog-aws-0.0.5 lib/fog/aws/models/dns/zones.rb
fog-1.26.0 lib/fog/aws/models/dns/zones.rb
fog-1.25.0 lib/fog/aws/models/dns/zones.rb
nsidc-fog-1.24.1 lib/fog/aws/models/dns/zones.rb
fog-1.24.0 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.11 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.10 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.9 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.8 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.7 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.6 lib/fog/aws/models/dns/zones.rb
fog-1.23.0 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.4 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.3 lib/fog/aws/models/dns/zones.rb
ns-fog-1.22.2 lib/fog/aws/models/dns/zones.rb