Sha256: 2744e89d72f5730f0dacc14d6ffd477899b2229e0aa8c02f3f1d5ff816b69fe0

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

module Fog
  module AWS
    class DNS
      class Real

        require 'fog/aws/parsers/dns/get_change'

        # returns the current state of a change request
        #
        # ==== Parameters
        # * change_id<~String>
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'Id'<~String>
        #     * 'Status'<~String>
        #     * 'SubmittedAt'<~String>
        #   * status<~Integer> - 200 when successful
        def get_change(change_id)

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

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

        end

      end


      class Mock

        def get_change(change_id)
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-0.4.0 lib/fog/aws/requests/dns/get_change.rb
fog-0.3.34 lib/fog/aws/requests/dns/get_change.rb
fog-0.3.33 lib/fog/aws/requests/dns/get_change.rb
fog-0.3.32 lib/fog/aws/requests/dns/get_change.rb