diff --git a/lib/fog/aws/requests/cdn/delete_distribution.rb b/lib/fog/aws/requests/cdn/delete_distribution.rb index 389b94008..43f7501db 100644 --- a/lib/fog/aws/requests/cdn/delete_distribution.rb +++ b/lib/fog/aws/requests/cdn/delete_distribution.rb @@ -3,15 +3,13 @@ module Fog 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, diff --git a/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb b/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb index 36ccf8c08..e5def6876 100644 --- a/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb +++ b/lib/fog/aws/requests/cdn/delete_streaming_distribution.rb @@ -3,15 +3,13 @@ module Fog 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, diff --git a/lib/fog/aws/requests/cdn/get_distribution.rb b/lib/fog/aws/requests/cdn/get_distribution.rb index e9c4e0f7c..61f423659 100644 --- a/lib/fog/aws/requests/cdn/get_distribution.rb +++ b/lib/fog/aws/requests/cdn/get_distribution.rb @@ -5,42 +5,39 @@ module Fog 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, diff --git a/lib/fog/aws/requests/cdn/get_distribution_list.rb b/lib/fog/aws/requests/cdn/get_distribution_list.rb index de8aee9a6..570008f03 100644 --- a/lib/fog/aws/requests/cdn/get_distribution_list.rb +++ b/lib/fog/aws/requests/cdn/get_distribution_list.rb @@ -5,43 +5,39 @@ module Fog 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, diff --git a/lib/fog/aws/requests/cdn/get_invalidation.rb b/lib/fog/aws/requests/cdn/get_invalidation.rb index 97beeb043..57e242ff5 100644 --- a/lib/fog/aws/requests/cdn/get_invalidation.rb +++ b/lib/fog/aws/requests/cdn/get_invalidation.rb @@ -5,19 +5,21 @@ module Fog 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, diff --git a/lib/fog/aws/requests/cdn/get_invalidation_list.rb b/lib/fog/aws/requests/cdn/get_invalidation_list.rb index a662d37e7..52ce4adde 100644 --- a/lib/fog/aws/requests/cdn/get_invalidation_list.rb +++ b/lib/fog/aws/requests/cdn/get_invalidation_list.rb @@ -5,25 +5,23 @@ module Fog 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({ diff --git a/lib/fog/aws/requests/cdn/get_streaming_distribution.rb b/lib/fog/aws/requests/cdn/get_streaming_distribution.rb index 96572c431..d7f9ebd30 100644 --- a/lib/fog/aws/requests/cdn/get_streaming_distribution.rb +++ b/lib/fog/aws/requests/cdn/get_streaming_distribution.rb @@ -5,35 +5,32 @@ module Fog 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, diff --git a/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb b/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb index fe7ed399c..dd9aa0e35 100644 --- a/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb +++ b/lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb @@ -5,43 +5,39 @@ module Fog require 'fog/aws/parsers/cdn/get_streaming_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) - # * 'StreamingDistributionSummary'<~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). + # * StreamingDistributionSummary [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/ListStreamingDistributions.html - + # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListStreamingDistributions.html + def get_streaming_distribution_list(options = {}) request({ :expects => 200, diff --git a/lib/fog/aws/requests/cdn/post_distribution.rb b/lib/fog/aws/requests/cdn/post_distribution.rb index db86c1f38..a995addfc 100644 --- a/lib/fog/aws/requests/cdn/post_distribution.rb +++ b/lib/fog/aws/requests/cdn/post_distribution.rb @@ -5,54 +5,52 @@ module Fog require 'fog/aws/parsers/cdn/distribution' - # create a new distribution in CloudFront + # Create a new distribution in CloudFront. # - # ==== Parameters - # * options<~Hash> - config for distribution. Defaults to {}. + # @param options [Hash] Config for distribution. + # # REQUIRED: - # * 'S3Origin'<~Hash>: - # * 'DNSName'<~String> - origin to associate with distribution, ie 'mybucket.s3.amazonaws.com' - # * 'OriginAccessIdentity'<~String> - Optional: Used when serving private content + # * 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> - Optional HTTP port of origin, in [80, 443] or (1024...65535), defaults to 80 - # * 'HTTPSPort'<~Integer> - Optional HTTPS port of origin, in [80, 443] or (1024...65535), defaults to 443 - # * '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] Optional HTTP port of origin, in [80, 443] or (1024...65535), defaults to 80. + # * HTTPSPort [Integer] Optional HTTPS port of origin, in [80, 443] or (1024...65535), defaults to 443. + # * OriginProtocolPolicy [String] Policy on using http vs https, in ['http-only', 'match-viewer']. # OPTIONAL: - # * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s - # * 'Comment'<~String> - Optional comment about distribution - # * 'CNAME'<~Array> - Optional array of strings to set as CNAMEs - # * 'DefaultRootObject'<~String> - Optional default object to return for '/' - # * 'Enabled'<~Boolean> - Whether or not distribution should accept requests, defaults to true - # * 'Logging'<~Hash>: Optional logging config - # * 'Bucket'<~String> - Bucket to store logs in, ie 'mylogs.s3.amazonaws.com' - # * 'Prefix'<~String> - Optional prefix for log filenames, ie 'myprefix/' - # * 'OriginAccessIdentity'<~String> - Used for serving private content, in format 'origin-access-identity/cloudfront/ID' - # * 'RequiredProtocols'<~String> - Optional, set to 'https' to force https connections - # * 'TrustedSigners'<~Array> - Optional grant of rights to up to 5 aws accounts to generate signed URLs for private content, elements are either 'Self' for your own account or an AWS Account Number + # * CallerReference [String] Used to prevent replay, defaults to Time.now.to_i.to_s. + # * Comment [String] Optional comment about distribution. + # * CNAME [Array] Optional array of strings to set as CNAMEs. + # * DefaultRootObject [String] Optional default object to return for '/'. + # * Enabled [Boolean] Whether or not distribution should accept requests, defaults to true. + # * Logging [Hash]: Optional logging config. + # * Bucket [String] Bucket to store logs in, ie 'mylogs.s3.amazonaws.com'. + # * Prefix [String] Optional prefix for log filenames, ie 'myprefix/'. + # * OriginAccessIdentity [String] Used for serving private content, in format 'origin-access-identity/cloudfront/ID'. + # * RequiredProtocols [String] Optional, set to 'https' to force https connections. + # * TrustedSigners [Array] Optional grant of rights to up to 5 aws accounts to generate signed URLs for private content, elements are either 'Self' for your own account or an AWS Account Number. # - # ==== Returns - # * response<~Excon::Response>: - # * body<~Hash>: - # * 'DomainName'<~String>: Domain name of distribution - # * '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 - # * '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]: + # * DomainName [String] - Domain name of distribution. + # * 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. + # * 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/CreateDistribution.html - + # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html + def post_distribution(options = {}) options['CallerReference'] = Time.now.to_i.to_s data = '' diff --git a/lib/fog/aws/requests/cdn/post_invalidation.rb b/lib/fog/aws/requests/cdn/post_invalidation.rb index 4ec436750..9bcda0f86 100644 --- a/lib/fog/aws/requests/cdn/post_invalidation.rb +++ b/lib/fog/aws/requests/cdn/post_invalidation.rb @@ -5,27 +5,23 @@ module Fog require 'fog/aws/parsers/cdn/post_invalidation' - # List information about distributions in CloudFront + # List information about distributions in CloudFront. # - # ==== Parameters - # * distribution_id<~String> - Id of distribution for invalidations - # * paths<~Array> - Array of string paths to objects to invalidate - # * caller_reference<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s + # @param distribution_id [String] Id of distribution for invalidations. + # @param paths [Array] Array of string paths to objects to invalidate. + # @param caller_reference [String] Used to prevent replay, defaults to Time.now.to_i.to_s. # + # @return [Excon::Response] + # * body [Hash]: + # * Id [String] - Id of invalidation. + # * Status [String] - Status of invalidation. + # * CreateTime [Integer] - Time of invalidation creation. + # * InvalidationBatch [Array]: + # * Path [Array] - Array of strings of objects to invalidate. + # * CallerReference [String] - Used to prevent replay, defaults to Time.now.to_i.to_s. # - # ==== Returns - # * response<~Excon::Response>: - # * body<~Hash>: - # * 'Id'<~String> - Id of invalidation - # * 'Status'<~String> - Status of invalidation - # * 'CreateTime'<~Integer> - Time of invalidation creation - # * 'InvalidationBatch'<~Array>: - # * 'Path'<~Array> - Array of strings of objects to invalidate - # * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s - # - # ==== See Also - # http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html - + # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html + def post_invalidation(distribution_id, paths, caller_reference = Time.now.to_i.to_s) body = '' body << "" diff --git a/lib/fog/aws/requests/cdn/post_streaming_distribution.rb b/lib/fog/aws/requests/cdn/post_streaming_distribution.rb index ff8e9a9e0..6b7aeca43 100644 --- a/lib/fog/aws/requests/cdn/post_streaming_distribution.rb +++ b/lib/fog/aws/requests/cdn/post_streaming_distribution.rb @@ -5,41 +5,39 @@ module Fog require 'fog/aws/parsers/cdn/streaming_distribution' - # create a new streaming distribution in CloudFront + # Create a new streaming distribution in CloudFront. # - # ==== Parameters - # * options<~Hash> - config for distribution. Defaults to {}. + # @param options [Hash] Config for distribution. + # # REQUIRED: - # * 'S3Origin'<~Hash>: - # * 'DNSName'<~String> - origin to associate with distribution, ie 'mybucket.s3.amazonaws.com' + # * S3Origin [Hash]: + # * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'. # OPTIONAL: - # * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s - # * 'Comment'<~String> - Optional comment about distribution - # * 'CNAME'<~Array> - Optional array of strings to set as CNAMEs - # * 'Enabled'<~Boolean> - Whether or not distribution should accept requests, defaults to true - # * 'Logging'<~Hash>: Optional logging config - # * 'Bucket'<~String> - Bucket to store logs in, ie 'mylogs.s3.amazonaws.com' - # * 'Prefix'<~String> - Optional prefix for log filenames, ie 'myprefix/' + # * CallerReference [String] Used to prevent replay, defaults to Time.now.to_i.to_s. + # * Comment [String] Optional comment about distribution. + # * CNAME [Array] Optional array of strings to set as CNAMEs. + # * Enabled [Boolean] Whether or not distribution should accept requests, defaults to true. + # * Logging [Hash]: Optional logging config. + # * Bucket [String] Bucket to store logs in, ie 'mylogs.s3.amazonaws.com'. + # * Prefix [String] Optional prefix for log filenames, ie 'myprefix/'. # - # ==== Returns - # * response<~Excon::Response>: - # * body<~Hash>: - # * 'Id'<~String> - Id of distribution - # * 'Status'<~String> - Status of distribution - # * 'LastModifiedTime'<~String> - Timestamp of last modification of distribution - # * 'DomainName'<~String>: Domain name 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 - # * 'Logging'<~Hash>: - # * 'Bucket'<~String> - bucket logs are stored in - # * 'Prefix'<~String> - prefix logs are stored with + # @return [Excon::Response] + # * body[Hash]: + # * Id [String] - Id of distribution. + # * Status'[String] - Status of distribution. + # * LastModifiedTime [String] - Timestamp of last modification of distribution. + # * DomainName [String] - Domain name 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. + # * Logging [Hash]: + # * Bucket [String] - Bucket logs are stored in. + # * Prefix [String] - Prefix logs are stored with. # - # ==== See Also - # http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateStreamingDistribution.html - + # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateStreamingDistribution.html + def post_streaming_distribution(options = {}) options['CallerReference'] = Time.now.to_i.to_s data = '' diff --git a/lib/fog/aws/requests/cdn/put_distribution_config.rb b/lib/fog/aws/requests/cdn/put_distribution_config.rb index daa897da9..6794b7351 100644 --- a/lib/fog/aws/requests/cdn/put_distribution_config.rb +++ b/lib/fog/aws/requests/cdn/put_distribution_config.rb @@ -5,55 +5,53 @@ module Fog require 'fog/aws/parsers/cdn/distribution' - # update a distribution in CloudFront + # Update a distribution in CloudFront. # - # ==== Parameters - # * distribution_id<~String> - Id of distribution to update config for - # * options<~Hash> - config for distribution. Defaults to {}. + # @parm distribution_id [String] Id of distribution to update config for. + # @param options [Hash] Config for distribution. + # # REQUIRED: - # * 'S3Origin'<~Hash>: - # * 'DNSName'<~String> - origin to associate with distribution, ie 'mybucket.s3.amazonaws.com' - # * 'OriginAccessIdentity'<~String> - Optional: Used when serving private content + # * 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']. # OPTIONAL: - # * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s - # * 'Comment'<~String> - Optional comment about distribution - # * 'CNAME'<~Array> - Optional array of strings to set as CNAMEs - # * 'DefaultRootObject'<~String> - Optional default object to return for '/' - # * 'Enabled'<~Boolean> - Whether or not distribution should accept requests, defaults to true - # * 'Logging'<~Hash>: Optional logging config - # * 'Bucket'<~String> - Bucket to store logs in, ie 'mylogs.s3.amazonaws.com' - # * 'Prefix'<~String> - Optional prefix for log filenames, ie 'myprefix/' - # * 'OriginAccessIdentity'<~String> - Used for serving private content, in format 'origin-access-identity/cloudfront/ID' - # * 'RequiredProtocols'<~String> - Optional, set to 'https' to force https connections - # * 'TrustedSigners'<~Array> - Optional grant of rights to up to 5 aws accounts to generate signed URLs for private content, elements are either 'Self' for your own account or an AWS Account Number + # * CallerReference [String] Used to prevent replay, defaults to Time.now.to_i.to_s. + # * Comment [String] Optional comment about distribution. + # * CNAME [Array] Optional array of strings to set as CNAMEs. + # * DefaultRootObject [String] Optional default object to return for '/'. + # * Enabled [Boolean] Whether or not distribution should accept requests, defaults to true. + # * Logging [Hash]: Optional logging config. + # * Bucket [String] Bucket to store logs in, ie 'mylogs.s3.amazonaws.com'. + # * Prefix [String] Optional prefix for log filenames, ie 'myprefix/'. + # * OriginAccessIdentity [String] Used for serving private content, in format 'origin-access-identity/cloudfront/ID'. + # * RequiredProtocols [String] Optional, set to 'https' to force https connections. + # * TrustedSigners [Array] Optional grant of rights to up to 5 aws accounts to generate signed URLs for private content, elements are either 'Self' for your own account or an AWS Account Number. # - # ==== Returns - # * response<~Excon::Response>: - # * body<~Hash>: - # * 'DomainName'<~String>: Domain name of distribution - # * '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 - # * '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]: + # * DomainName [String]: Domain name of distribution. + # * 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. + # * 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/CreateDistribution.html - + # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html + def put_distribution_config(distribution_id, etag, options = {}) data = '' data << "" diff --git a/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb b/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb index 77dde681c..952cd502d 100644 --- a/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb +++ b/lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb @@ -5,44 +5,42 @@ module Fog require 'fog/aws/parsers/cdn/streaming_distribution' - # update a streaming distribution in CloudFront + # Update a streaming distribution in CloudFront. # - # ==== Parameters - # * distribution_id<~String> - Id of distribution to update config for - # * options<~Hash> - config for distribution. Defaults to {}. + # @param distribution_id [String] - Id of distribution to update config for. + # @param options [Hash] - Config for distribution. + # # REQUIRED: - # * 'S3Origin'<~Hash>: - # * 'DNSName'<~String> - origin to associate with distribution, ie 'mybucket.s3.amazonaws.com' + # * S3Origin [Hash]: + # * DNSName [String] Origin to associate with distribution, ie 'mybucket.s3.amazonaws.com'. # OPTIONAL: - # * 'CallerReference'<~String> - Used to prevent replay, defaults to Time.now.to_i.to_s - # * 'Comment'<~String> - Optional comment about distribution - # * 'CNAME'<~Array> - Optional array of strings to set as CNAMEs - # * 'Enabled'<~Boolean> - Whether or not distribution should accept requests, defaults to true - # * 'Logging'<~Hash>: Optional logging config - # * 'Bucket'<~String> - Bucket to store logs in, ie 'mylogs.s3.amazonaws.com' - # * 'Prefix'<~String> - Optional prefix for log filenames, ie 'myprefix/' + # @option options CallerReference [String] Used to prevent replay, defaults to Time.now.to_i.to_s + # @option options Comment [String] Optional comment about distribution + # @option options CNAME [Array] Optional array of strings to set as CNAMEs + # @option options Enabled [Boolean] Whether or not distribution should accept requests, defaults to true + # @option options Logging [Hash]: Optional logging config + # * Bucket [String] Bucket to store logs in, ie 'mylogs.s3.amazonaws.com' + # * Prefix String] Optional prefix for log filenames, ie 'myprefix/' # - # ==== Returns - # * response<~Excon::Response>: - # * body<~Hash>: - # * 'DomainName'<~String>: Domain name of distribution - # * '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 - # * '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]: + # * DomainName [String] - Domain name of distribution. + # * 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. + # * 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/PutStreamingDistribution.html - + # @see http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/PutStreamingDistribution.html + def put_streaming_distribution_config(distribution_id, etag, options = {}) data = '' data << ""