Class: Fog::CDN::AWS::StreamingDistribution

Inherits:
Model
  • Object
show all
Includes:
DistributionHelper
Defined in:
lib/fog/aws/models/cdn/streaming_distribution.rb

Constant Summary collapse

CONFIG =

items part of DistributionConfig

[ :caller_reference, :cname, :comment, :enabled, :logging ]

Instance Method Summary collapse

Methods included from DistributionHelper

#custom_origin?, #destroy, #disable, #disabled?, #enable, #enabled?, #ready?

Constructor Details

#initialize(new_attributes = {}) ⇒ StreamingDistribution

Returns a new instance of StreamingDistribution.



27
28
29
# File 'lib/fog/aws/models/cdn/streaming_distribution.rb', line 27

def initialize(new_attributes = {})
  super(distribution_config_to_attributes(new_attributes))
end

Instance Method Details

#saveObject



31
32
33
34
35
36
37
38
# File 'lib/fog/aws/models/cdn/streaming_distribution.rb', line 31

def save
  requires_one :s3_origin
  options = attributes_to_options
  response = identity ? put_distribution_config(identity, etag, options) : post_distribution(options)
  etag = response.headers['ETag']
  merge_attributes(response.body)
  true
end