2014-12-30 17:25:09 -05:00
|
|
|
require 'fog/core/collection'
|
|
|
|
require 'fog/aws/models/cdn/distribution'
|
|
|
|
require 'fog/aws/models/cdn/distributions_helper'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module CDN
|
2015-01-02 12:34:40 -05:00
|
|
|
class AWS
|
2014-12-30 17:25:09 -05:00
|
|
|
class Distributions < Fog::Collection
|
|
|
|
include Fog::CDN::AWS::DistributionsHelper
|
|
|
|
|
|
|
|
model Fog::CDN::AWS::Distribution
|
|
|
|
|
|
|
|
attribute :marker, :aliases => 'Marker'
|
|
|
|
attribute :max_items, :aliases => 'MaxItems'
|
|
|
|
attribute :is_truncated, :aliases => 'IsTruncated'
|
|
|
|
|
|
|
|
def get_distribution(dist_id)
|
|
|
|
service.get_distribution(dist_id)
|
|
|
|
end
|
|
|
|
|
|
|
|
def list_distributions(options = {})
|
|
|
|
service.get_distribution_list(options)
|
|
|
|
end
|
|
|
|
|
|
|
|
alias_method :each_distribution_this_page, :each
|
|
|
|
alias_method :each, :each_distribution
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|