Skip to content

Commit

Permalink
Merge pull request fog#1649 from westonplatter/master
Browse files Browse the repository at this point in the history
reformatted AWS CDN and CloudFormating to YARD docs
  • Loading branch information
geemus committed Mar 11, 2013
2 parents d899545 + eb9b31e commit 28ab6e9
Show file tree
Hide file tree
Showing 21 changed files with 407 additions and 463 deletions.
12 changes: 5 additions & 7 deletions lib/fog/aws/requests/cdn/delete_distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ module CDN
class AWS
class Real

# Delete a distribution from CloudFront
# 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
# @param distribution_id [String] Id of distribution to delete.
# @param etag [String] etag of that distribution from earlier get or put
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteDistribution.html

# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteDistribution.html

def delete_distribution(distribution_id, etag)
request({
:expects => 204,
Expand Down
12 changes: 5 additions & 7 deletions lib/fog/aws/requests/cdn/delete_streaming_distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ module CDN
class AWS
class Real

# Delete a streaming distribution from CloudFront
# Delete a streaming distribution from CloudFront.
#
# ==== Parameters
# * distribution_id<~String> - Id of distribution to delete
# * etag<~String> - etag of that distribution from earlier get or put
# @param distribution_id [String] Id of distribution to delete.
# @parma etag [String] Etag of that distribution from earlier get or put
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteStreamingDistribution.html

# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/DeleteStreamingDistribution.html

def delete_streaming_distribution(distribution_id, etag)
request({
:expects => 204,
Expand Down
59 changes: 28 additions & 31 deletions lib/fog/aws/requests/cdn/get_distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,39 @@ class Real

require 'fog/aws/parsers/cdn/distribution'

# Get information about a distribution from CloudFront
# Get information about a distribution from CloudFront.
#
# ==== Parameters
# * distribution_id<~String> - id of distribution
# @param distribution_id [String] Id of distribution.
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'S3Origin'<~Hash>:
# * 'DNSName'<~String> - origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'
# * 'OriginAccessIdentity'<~String> - Optional: Used when serving private content
# @return [Excon::Response]
# * body [Hash]:
# * S3Origin [Hash]:
# * DNSName [String] - Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'.
# * OriginAccessIdentity [String] - Optional: Used when serving private content.
# or
# * 'CustomOrigin'<~Hash>:
# * 'DNSName'<~String> - origin to associate with distribution, ie 'www.example.com'
# * 'HTTPPort'<~Integer> - HTTP port of origin, in [80, 443] or (1024...65535)
# * 'HTTPSPort'<~Integer> - HTTPS port of origin, in [80, 443] or (1024...65535)
# * 'OriginProtocolPolicy'<~String> - Policy on using http vs https, in ['http-only', 'match-viewer']
# * CustomOrigin [Hash]:
# * DNSName [String] - Origin to associate with distribution, ie 'www.example.com'.
# * HTTPPort [Integer] - HTTP port of origin, in [80, 443] or (1024...65535).
# * HTTPSPort [Integer] - HTTPS port of origin, in [80, 443] or (1024...65535).
# * OriginProtocolPolicy [String] - Policy on using http vs https, in ['http-only', 'match-viewer'].
#
# * 'Id'<~String> - Id of distribution
# * 'LastModifiedTime'<~String> - Timestamp of last modification of distribution
# * 'Status'<~String> - Status of distribution
# * 'DistributionConfig'<~Array>:
# * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s
# * 'CNAME'<~Array> - array of associated cnames
# * 'Comment'<~String> - comment associated with distribution
# * 'Enabled'<~Boolean> - whether or not distribution is enabled
# * 'InProgressInvalidationBatches'<~Integer> - number of invalidation batches in progress
# * 'Logging'<~Hash>:
# * 'Bucket'<~String> - bucket logs are stored in
# * 'Prefix'<~String> - prefix logs are stored with
# * 'Origin'<~String> - s3 origin bucket
# * 'TrustedSigners'<~Array> - trusted signers
# * Id [String] Id of distribution.
# * LastModifiedTime [String] - Timestamp of last modification of distribution.
# * Status [String] - Status of distribution.
# * DistributionConfig [Array]:
# * CallerReference [String] - Used to prevent replay, defaults to Time.now.to_i.to_s.
# * CNAME [Array] - Array of associated cnames.
# * Comment [String] - Comment associated with distribution.
# * Enabled [Boolean] - Whether or not distribution is enabled.
# * InProgressInvalidationBatches [Integer] - Number of invalidation batches in progress.
# * Logging [Hash]:
# * Bucket [String] - Bucket logs are stored in.
# * Prefix [String] - Prefix logs are stored with.
# * Origin [String] - S3 origin bucket.
# * TrustedSigners [Array] - Trusted signers.
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetDistribution.html

# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetDistribution.html

def get_distribution(distribution_id)
request({
:expects => 200,
Expand Down
62 changes: 29 additions & 33 deletions lib/fog/aws/requests/cdn/get_distribution_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,39 @@ class Real

require 'fog/aws/parsers/cdn/get_distribution_list'

# List information about distributions in CloudFront
# List information about distributions in CloudFront.
#
# ==== Parameters
# * options<~Hash> - config arguments for list. Defaults to {}.
# * 'Marker'<~String> - limits object keys to only those that appear
# lexicographically after its value.
# * 'MaxItems'<~Integer> - limits number of object keys returned
# @param options [Hash] Config arguments for list.
# @option options Marker [String] Limits object keys to only those that appear lexicographically after its value.
# @option options MaxItems [Integer] Limits number of object keys returned.
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'IsTruncated'<~Boolean> - Whether or not the listing is truncated
# * 'Marker'<~String> - Marker specified for query
# * 'MaxItems'<~Integer> - Maximum number of keys specified for query
# * 'NextMarker'<~String> - Marker to specify for next page (id of last result of current page)
# * 'DistributionSummary'<~Array>:
# * 'S3Origin'<~Hash>:
# * 'DNSName'<~String> - origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'
# * 'OriginAccessIdentity'<~String> - Optional: Used when serving private content
# @return [Excon::Response]
# * body [Hash]:
# * IsTruncated [Boolean] - Whether or not the listing is truncated.
# * Marker [String] Marker specified for query.
# * MaxItems [Integer] - Maximum number of keys specified for query.
# * NextMarker [String] - Marker to specify for next page (id of last result of current page).
# * DistributionSummary [Array]:
# * S3Origin [Hash]:
# * DNSName [String] - Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'.
# * OriginAccessIdentity [String] - Optional: Used when serving private content.
# or
# * 'CustomOrigin'<~Hash>:
# * 'DNSName'<~String> - origin to associate with distribution, ie 'www.example.com'
# * 'HTTPPort'<~Integer> - HTTP port of origin, in [80, 443] or (1024...65535)
# * 'HTTPSPort'<~Integer> - HTTPS port of origin, in [80, 443] or (1024...65535)
# * 'OriginProtocolPolicy'<~String> - Policy on using http vs https, in ['http-only', 'match-viewer']
# * 'Comment'<~String> - comment associated with distribution
# * 'CNAME'<~Array> - array of associated cnames
# * 'Enabled'<~Boolean> - whether or not distribution is enabled
# * 'Id'<~String> - Id of distribution
# * 'LastModifiedTime'<~String> - Timestamp of last modification of distribution
# * 'Origin'<~String> - s3 origin bucket
# * 'Status'<~String> - Status of distribution
# * 'TrustedSigners'<~Array> - trusted signers
# * CustomOrigin [Hash]:
# * DNSName [String] - Origin to associate with distribution, ie 'www.example.com'.
# * HTTPPort [Integer] - HTTP port of origin, in [80, 443] or (1024...65535).
# * HTTPSPort [Integer] - HTTPS port of origin, in [80, 443] or (1024...65535).
# * OriginProtocolPolicy [String] - Policy on using http vs https, in ['http-only', 'match-viewer'].
# * Comment [String] - Comment associated with distribution.
# * CNAME [Array] - Array of associated cnames.
# * Enabled [Boolean] - Whether or not distribution is enabled.
# * Id [String] - Id of distribution.
# * LastModifiedTime [String] - Timestamp of last modification of distribution.
# * Origin [String] - S3 origin bucket.
# * Status [String] - Status of distribution.
# * TrustedSigners [Array] - Trusted signers.
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListDistributions.html

# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListDistributions.html
#
def get_distribution_list(options = {})
request({
:expects => 200,
Expand Down
28 changes: 15 additions & 13 deletions lib/fog/aws/requests/cdn/get_invalidation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ class Real

require 'fog/aws/parsers/cdn/get_invalidation'

# ==== Parameters
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'Id'<~String> - Invalidation id
# * 'Status'<~String>
# * 'CreateTime'<~String>
# * 'InvalidationBatch'<~Array>:
# * 'Path'<~String>
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/2010-11-01/APIReference/GetInvalidation.html

# Get invalidation.
#
# @param distribution_id [String] Distribution id.
# @param invalidation_id [String] Invalidation id.
#
# @return [Excon::Response]
# * body [Hash]:
# * Id [String] - Invalidation id.
# * Status [String]
# * CreateTime [String]
# * InvalidationBatch [Array]:
# * Path [String]
#
# @see http://docs.amazonwebservices.com/AmazonCloudFront/2010-11-01/APIReference/GetInvalidation.html

def get_invalidation(distribution_id, invalidation_id)
request({
:expects => 200,
Expand Down
32 changes: 15 additions & 17 deletions lib/fog/aws/requests/cdn/get_invalidation_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,23 @@ class Real

require 'fog/aws/parsers/cdn/get_invalidation_list'

# ==== Parameters
# * options<~Hash> - config arguments for list. Defaults to {}.
# * 'Marker'<~String> - limits object keys to only those that appear
# lexicographically after its value.
# * 'MaxItems'<~Integer> - limits number of object keys returned
# Get invalidation list.
#
# @param options [Hash] Config arguments for list.
# @option options Marker [String] Limits object keys to only those that appear lexicographically after its value.
# @option options MaxItems [Integer] Limits number of object keys returned.
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'IsTruncated'<~Boolean> - Whether or not the listing is truncated
# * 'Marker'<~String> - Marker specified for query
# * 'MaxItems'<~Integer> - Maximum number of keys specified for query
# * 'NextMarker'<~String> - Marker to specify for next page (id of last result of current page)
# * 'InvalidationSummary'<~Array>:
# * 'Id'<~String>:
# * 'Status'<~String>:
# @return [Excon::Response]
# * body [Hash]:
# * IsTruncated [Boolean] - Whether or not the listing is truncated.
# * Marker [String] - Marker specified for query.
# * MaxItems [Integer] - Maximum number of keys specified for query.
# * NextMarker [String] - Marker to specify for next page (id of last result of current page).
# * InvalidationSummary [Array]:
# * Id [String]
# * Status [String]
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListInvalidation.html
# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListInvalidation.html

def get_invalidation_list(distribution_id, options = {})
request({
Expand Down
49 changes: 23 additions & 26 deletions lib/fog/aws/requests/cdn/get_streaming_distribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,32 @@ class Real

require 'fog/aws/parsers/cdn/streaming_distribution'

# Get information about a streaming distribution from CloudFront
# Get information about a streaming distribution from CloudFront.
#
# ==== Parameters
# * distribution_id<~String> - id of distribution
# @param distribution_id [String] Id of distribution.
#
# ==== Returns
# * response<~Excon::Response>:
# * body<~Hash>:
# * 'S3Origin'<~Hash>:
# * 'DNSName'<~String> - origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'
# * 'OriginAccessIdentity'<~String> - Optional: Used when serving private content
# * 'Id'<~String> - Id of distribution
# * 'LastModifiedTime'<~String> - Timestamp of last modification of distribution
# * 'Status'<~String> - Status of distribution
# * 'StreamingDistributionConfig'<~Array>:
# * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s
# * 'CNAME'<~Array> - array of associated cnames
# * 'Comment'<~String> - comment associated with distribution
# * 'Enabled'<~Boolean> - whether or not distribution is enabled
# * 'InProgressInvalidationBatches'<~Integer> - number of invalidation batches in progress
# * 'Logging'<~Hash>:
# * 'Bucket'<~String> - bucket logs are stored in
# * 'Prefix'<~String> - prefix logs are stored with
# * 'Origin'<~String> - s3 origin bucket
# * 'TrustedSigners'<~Array> - trusted signers
# @return [Excon::Response]
# * body [Hash]:
# * S3Origin [Hash]:
# * DNSName [String] - Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'.
# * OriginAccessIdentity [String] - Optional: Used when serving private content.
# * Id [String] - Id of distribution.
# * LastModifiedTime [String] - Timestamp of last modification of distribution.
# * Status [String] - Status of distribution.
# * StreamingDistributionConfig [Array]:
# * CallerReference [String] - Used to prevent replay, defaults to Time.now.to_i.to_s.
# * CNAME [Array] - Array of associated cnames.
# * Comment [String] - Comment associated with distribution.
# * Enabled [Boolean] - Whether or not distribution is enabled.
# * InProgressInvalidationBatches [Integer] - Number of invalidation batches in progress.
# * Logging [Hash]:
# * Bucket [String] - Bucket logs are stored in.
# * Prefix [String] - Prefix logs are stored with.
# * Origin [String] - S3 origin bucket.
# * TrustedSigners [Array] - Trusted signers.
#
# ==== See Also
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetStreamingDistribution.html

# @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetStreamingDistribution.html

def get_streaming_distribution(distribution_id)
request({
:expects => 200,
Expand Down
Loading

0 comments on commit 28ab6e9

Please sign in to comment.