Sha256: ef847aea0d63c26a7ac8159ec047d152c7ceabff263d93388b9e2f9c75ca1938

Contents?: true

Size: 1.17 KB

Versions: 9

Compression:

Stored size: 1.17 KB

Contents

module Fog
  module DNS
    class AWS
      class Real

        require 'fog/aws/parsers/dns/get_hosted_zone'

        # retrieve information about a hosted zone
        #
        # ==== Parameters
        # * zone_id<~String> - The ID of the hosted zone
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'HostedZone'<~Hash>:
        #       * 'Id'<~String> -
        #       * 'Name'<~String> -
        #       * 'CallerReference'<~String>
        #       * 'Comment'<~String> -
        #     * 'NameServers'<~Array>
        #       * 'NameServer'<~String>
        #   * status<~Integer> - 201 when successful
        def get_hosted_zone(zone_id)

          # AWS methods return zone_ids that looks like '/hostedzone/id'.  Let the caller either use
          # that form or just the actual id (which is what this request needs)
          zone_id = zone_id.sub('/hostedzone/', '')

          request({
            :expects => 200,
            :parser  => Fog::Parsers::DNS::AWS::GetHostedZone.new,
            :method  => 'GET',
            :path    => "hostedzone/#{zone_id}"
          })

        end

      end
    end
  end
end

Version data entries

9 entries across 9 versions & 5 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/get_hosted_zone.rb
michiels-fog-1.3.1 lib/fog/aws/requests/dns/get_hosted_zone.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/aws/requests/dns/get_hosted_zone.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/get_hosted_zone.rb
fog-1.3.1 lib/fog/aws/requests/dns/get_hosted_zone.rb
fog-1.3.0 lib/fog/aws/requests/dns/get_hosted_zone.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/get_hosted_zone.rb
fog-1.2.0 lib/fog/aws/requests/dns/get_hosted_zone.rb
ktheory-fog-1.1.2 lib/fog/aws/requests/dns/get_hosted_zone.rb