Sha256: 8de6173ac08de56abf4d0d688c0b7045996674f7ecc98340c5e778e801f771c5

Contents?: true

Size: 1.14 KB

Versions: 16

Compression:

Stored size: 1.14 KB

Contents

module Fog
  module DNS
    class AWS
      class Real

        require 'fog/aws/parsers/dns/delete_hosted_zone'

        # Delete a hosted zone
        #
        # ==== Parameters
        # * zone_id<~String> - 
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'ChangeInfo'<~Hash> -
        #       * 'Id'<~String> The ID of the request
        #       * 'Status'<~String> The current state of the hosted zone
        #       * 'SubmittedAt'<~String> The date and time the change was made
        #   * status<~Integer> - 200 when successful
        def delete_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::DeleteHostedZone.new,
            :method     => 'DELETE',
            :path       => "hostedzone/#{zone_id}"
          })

        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/delete_hosted_zone.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
fog-1.1.2 lib/fog/aws/requests/dns/delete_hosted_zone.rb
fog_tractical-1.1.4 lib/fog/aws/requests/dns/delete_hosted_zone.rb
fog_tractical-1.1.3 lib/fog/aws/requests/dns/delete_hosted_zone.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
fog-1.1.1 lib/fog/aws/requests/dns/delete_hosted_zone.rb
fog-1.1.0 lib/fog/aws/requests/dns/delete_hosted_zone.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
tag-fog-1.0.1 lib/fog/aws/requests/dns/delete_hosted_zone.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/requests/dns/delete_hosted_zone.rb
fog-1.0.0 lib/fog/aws/requests/dns/delete_hosted_zone.rb