Sha256: 16c933e7ac99f4fcce20f97934b65eced965df0a18e25729e18a8aee29b2750c

Contents?: true

Size: 1.09 KB

Versions: 7

Compression:

Stored size: 1.09 KB

Contents

module Fog
  module AWS
    class DNS
      class Real

        require 'fog/dns/parsers/aws/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

7 entries across 7 versions & 2 rubygems

Version Path
fog-0.5.1 lib/fog/dns/requests/aws/get_change.rb
fog-0.5.0 lib/fog/dns/requests/aws/get_change.rb
phpfog-fog-0.4.1.3 lib/fog/dns/requests/aws/get_change.rb
phpfog-fog-0.4.1.2 lib/fog/dns/requests/aws/get_change.rb
phpfog-fog-0.4.1.1 lib/fog/dns/requests/aws/get_change.rb
phpfog-fog-0.4.1 lib/fog/dns/requests/aws/get_change.rb
fog-0.4.1 lib/fog/dns/requests/aws/get_change.rb