1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/cdn/requests/aws/delete_distribution.rb
2011-02-09 16:31:57 -08:00

28 lines
770 B
Ruby

module Fog
module AWS
class CDN
class Real
# Delete a distribution from CloudFront
#
# ==== Parameters
# * distribution_id<~String> - Id of distribution to delete
# * etag<~String> - etag of that distribution from earlier get or put
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteDistribution.html
def delete_distribution(distribution_id, etag)
request({
:expects => 204,
:headers => { 'If-Match' => etag },
:idempotent => true,
:method => 'DELETE',
:path => "/distribution/#{distribution_id}"
})
end
end
end
end
end