Sha256: 7c6606c2dce4357d6cf88b2cdb1f9b3e3783ee871273cae17ab530477c79966d

Contents?: true

Size: 1.76 KB

Versions: 16

Compression:

Stored size: 1.76 KB

Contents

module Fog
  module DNS
    class AWS
      class Real

        require 'fog/aws/parsers/dns/list_resource_record_sets'

        # list your resource record sets
        #
        # ==== Parameters
        # * zone_id<~String> - 
        # * options<~Hash>
        #   * type<~String> - 
        #   * name<~String> -
        #   * max_items<~Integer> - 
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'ResourceRecordSet'<~Array>:
        #       * 'Name'<~String> - 
        #       * 'Type'<~String> - 
        #       * 'TTL'<~Integer> - 
        #       * 'ResourceRecords'<~Array>
        #         * 'Value'<~String> - 
        #     * 'IsTruncated'<~String> - 
        #     * 'MaxItems'<~String> - 
        #     * 'NextRecordName'<~String>
        #     * 'NexRecordType'<~String>
        #   * status<~Integer> - 201 when successful
        def list_resource_record_sets(zone_id, options = {})

          # 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/', '')

          parameters = {}
          options.each { |option, value|
            case option
            when :type, :name
              parameters[option]= "#{value}"
            when :max_items
              parameters['maxitems']= "#{value}"
            end
          }
          
          request({
            :query => parameters,
            :parser     => Fog::Parsers::DNS::AWS::ListResourceRecordSets.new,
            :expects    => 200,
            :method     => 'GET',
            :path       => "hostedzone/#{zone_id}/rrset"
          })

        end

      end
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
fog-1.1.2 lib/fog/aws/requests/dns/list_resource_record_sets.rb
fog_tractical-1.1.4 lib/fog/aws/requests/dns/list_resource_record_sets.rb
fog_tractical-1.1.3 lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
fog-1.1.1 lib/fog/aws/requests/dns/list_resource_record_sets.rb
fog-1.1.0 lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
tag-fog-1.0.1 lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/list_resource_record_sets.rb
fog-1.0.0 lib/fog/aws/requests/dns/list_resource_record_sets.rb