Sha256: 6884d90641dd09bf6706905eef769e2a9005500738e59239aa13ca93465d417e

Contents?: true

Size: 1.22 KB

Versions: 13

Compression:

Stored size: 1.22 KB

Contents

module Fog
  module DNS
    class Rage4
      class Real
        # Updates existing records in bulk
        # ==== Parameters
        # * zone_id <~Integer> Need to specify the zone id
        # * options <~Hash> Options should contain the body for the post
        #                   in the following format.
        #                   data = [{:id=><record_id>, :priority=>2}, {:id=><record_id>, :priority=>2}]
        #                   options => { :body => data.to_json }
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #      * 'status'<~Boolean>
        #      * 'id'<~Integer>
        #      * 'error'<~String>

# https://secure.rage4.com//rapi/SetRecordState/<zone_id>/

        def bulk_update_records(zone_id, options = {})
          path = "/rapi/SetRecordState/#{zone_id}"
          body = options[:body] if options[:body].present?

          request(
                  :expects  => 200,
                  :method   => 'POST',
                  :body     => body,
                  :path     => path,
                  :headers => {
                    'Content-Type' => "application/json; charset=UTF-8",
                  },
          )
        end
      end
    end
  end
end

Version data entries

13 entries across 11 versions & 3 rubygems

Version Path
fog-2.3.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-ifeel-2.2.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-2.2.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-2.1.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/rage4/requests/dns/bulk_update_records.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/rage4/requests/dns/bulk_update_records.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-1.42.1 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-2.0.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-1.42.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-1.41.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-1.40.0 lib/fog/rage4/requests/dns/bulk_update_records.rb
fog-1.39.0 lib/fog/rage4/requests/dns/bulk_update_records.rb