2010-11-01 20:44:14 -04:00
|
|
|
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,
|
2010-11-02 14:17:09 -04:00
|
|
|
:headers => { 'If-Match' => etag },
|
2010-11-01 20:44:14 -04:00
|
|
|
:idempotent => true,
|
|
|
|
:method => 'DELETE',
|
|
|
|
:path => "/distribution/#{distribution_id}"
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|