Module: Cloudfront::Distribution::StreamingDistribution

Includes:
Distribution
Included in:
Cloudfront
Defined in:
lib/cloudfront/distribution/streaming_distribution.rb

Instance Method Summary collapse

Instance Method Details

#streaming_distribution_create(distribution) ⇒ Faraday::Response

Creates a streaming distribution.

Parameters:

Returns:

  • (Faraday::Response)

    the response from cloudfront



16
17
18
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 16

def streaming_distribution_create(distribution)
  distribution_create(STREAMING_DISTRIBUTION_URL, distribution)
end

#streaming_distribution_delete(distribution_id) ⇒ Faraday::Response

Deletes a streaming distribution.

Parameters:

  • distribution_id (String)

    The id of the distribution to be deleted.

Returns:

  • (Faraday::Response)

    the response from cloudfront



71
72
73
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 71

def streaming_distribution_delete(distribution_id)
  distribution_delete(STREAMING_DISTRIBUTION_URL, distribution_id)
end

#streaming_distribution_disable(distribution_id) ⇒ Faraday::Response

Disables a streaming distribution.

Parameters:

  • distribution_id (String)

    The id of the distribution to be disabled.

Returns:

  • (Faraday::Response)

    the response from cloudfront



64
65
66
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 64

def streaming_distribution_disable(distribution_id)
  distribution_disable(STREAMING_DISTRIBUTION_URL, distribution_id)
end

#streaming_distribution_enable(distribution_id) ⇒ Faraday::Response

Enables a streaming distribution.

Parameters:

  • distribution_id (String)

    The id of the distribution to be enabled.

Returns:

  • (Faraday::Response)

    the response from cloudfront



57
58
59
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 57

def streaming_distribution_enable(distribution_id)
  distribution_enable(STREAMING_DISTRIBUTION_URL, distribution_id)
end

#streaming_distribution_get(distribution_id) ⇒ Faraday::Response

Gets the streaming distribution information.

Parameters:

  • distribution_id (String)

    The id of the distribution to be returned.

Returns:

  • (Faraday::Response)

    the response from cloudfront



31
32
33
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 31

def streaming_distribution_get(distribution_id)
  distribution_get(STREAMING_DISTRIBUTION_URL, distribution_id)
end

#streaming_distribution_get_config(distribution_id) ⇒ Faraday::Response

Returns the streaming distribution configuration.

Parameters:

  • distribution_id (String)

    The id of the distribution to be returned.

Returns:

  • (Faraday::Response)

    the response from cloudfront



38
39
40
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 38

def streaming_distribution_get_config(distribution_id)
  distribution_get_config(STREAMING_DISTRIBUTION_URL, distribution_id)
end

#streaming_distribution_list(max_items = 0, marker = "") ⇒ Faraday::Response

Lists all the streaming distributions.

Parameters:

  • max_items (int) (defaults to: 0)

    the max items to be retrieved

  • marker (String) (defaults to: "")

    The distribution id from which begins the list.

Returns:

  • (Faraday::Response)

    the response from cloudfront



24
25
26
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 24

def streaming_distribution_list(max_items = 0, marker = "")
  distribution_list(STREAMING_DISTRIBUTION_URL, max_items, marker)
end

#streaming_distribution_put_config(distribution_id, distribution, etag) ⇒ Faraday::Response

Puts the streaming distribution configuration. To put a distribution config we must follow a certain process defined in docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToUpdateDistribution.html

Parameters:

  • distribution_id (String)

    The id of the distribution.

  • distribution (Cloudfront::Helpers::Distribution)

    a distribution configuration wrapper

  • etag (String)

    The etag.

Returns:

  • (Faraday::Response)

    the response from cloudfront



50
51
52
# File 'lib/cloudfront/distribution/streaming_distribution.rb', line 50

def streaming_distribution_put_config(distribution_id, distribution, etag)
  distribution_put_config(STREAMING_DISTRIBUTION_URL, distribution_id, distribution, etag)
end