Class Fog::CDN::AWS::Real
In: lib/fog/aws/cdn.rb
lib/fog/aws/requests/cdn/get_invalidation_list.rb
lib/fog/aws/requests/cdn/post_streaming_distribution.rb
lib/fog/aws/requests/cdn/get_distribution.rb
lib/fog/aws/requests/cdn/delete_distribution.rb
lib/fog/aws/requests/cdn/get_streaming_distribution.rb
lib/fog/aws/requests/cdn/post_invalidation.rb
lib/fog/aws/requests/cdn/get_distribution_list.rb
lib/fog/aws/requests/cdn/get_invalidation.rb
lib/fog/aws/requests/cdn/delete_streaming_distribution.rb
lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb
lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb
lib/fog/aws/requests/cdn/post_distribution.rb
lib/fog/aws/requests/cdn/put_distribution_config.rb
Parent: Object

Methods

Included Modules

Fog::AWS::CredentialFetcher::ConnectionMethods

Public Class methods

Initialize connection to Cloudfront

Notes

options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection

Examples

  cdn = Fog::AWS::CDN.new(
    :aws_access_key_id => your_aws_access_key_id,
    :aws_secret_access_key => your_aws_secret_access_key
  )

Parameters

  • options<~Hash> - config arguments for connection. Defaults to {}.

Returns

  • cdn object with connection to aws.

Public Instance methods

Delete a distribution from CloudFront.

@param distribution_id [String] Id of distribution to delete. @param etag [String] etag of that distribution from earlier get or put

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

Delete a streaming distribution from CloudFront.

@param [String] distribution_id Id of distribution to delete. @param [String] etag Etag of that distribution from earlier get or put

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

Get information about a distribution from CloudFront.

@param distribution_id [String] Id of distribution.

@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'].

    * 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 docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetDistribution.html

List information about distributions in CloudFront.

@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.

@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.

@see docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListDistributions.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 docs.amazonwebservices.com/AmazonCloudFront/2010-11-01/APIReference/GetInvalidation.html

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.

@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 docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListInvalidation.html

Get information about a streaming distribution from CloudFront.

@param distribution_id [String] Id of distribution.

@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 docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/GetStreamingDistribution.html

List information about distributions in CloudFront.

@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.

@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.

@see docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/ListStreamingDistributions.html

Create a new distribution in CloudFront.

@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.
  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'].
  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.

@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 docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html

List information about distributions in CloudFront.

@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.

@see docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html

Create a new streaming distribution in CloudFront.

@param options [Hash] Config for distribution.

  REQUIRED:
  * 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/'.

@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 docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateStreamingDistribution.html

Update a distribution in CloudFront.

@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'.
    * 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'].
  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.

@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 docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html

Update a streaming distribution in CloudFront.

@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'.
  OPTIONAL:

@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/'

@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 docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/PutStreamingDistribution.html

[Validate]