Class: RightScale::CloudApi::AWS::CF::Manager

Inherits:
CloudApi::Manager
  • Object
show all
Defined in:
lib/cloud/aws/cf/manager.rb

Overview

Amazon Cloud Front (CF) compatible manager (thread safe)

Examples:

require "right_aws_api"

cf = RightScale::CloudApi::AWS::CF::Manager::new(key, secret, 'https://cloudfront.amazonaws.com')

cf.GetDistributionList('MaxItems' => 2) #=>
  {"DistributionList"=>
    {"IsTruncated"=>"true",
     "NextMarker"=>"E20O0ZWO4WRF3I",
     "Marker"=>nil,
     "MaxItems"=>"2",
     "DistributionSummary"=>
      [{"Status"=>"Deployed",
        "Comment"=>"test",
        "Enabled"=>"true",
        "LastModifiedTime"=>"2008-10-23T15:17:24.447Z",
        "CNAME"=>["c1.test.com", "c2.test.com"],
        "Id"=>"E2FLHADADBK2P9",
        "DomainName"=>"d2kia27jveea52.cloudfront.net",
        "S3Origin"=>{"DNSName"=>"aws-test.s3.amazonaws.com"}},
       {"Status"=>"Deployed",
        "Comment"=>
         "Distribution created for the blog demo, can be deleted anytime.",
        "Enabled"=>"false",
        "LastModifiedTime"=>"2009-04-20T07:05:37.257Z",
        "CNAME"=>"blog-demo.rightscale.com",
        "Id"=>"E20O0ZWO4WRF3I",
        "DomainName"=>"dc5eg4un365fp.cloudfront.net",
        "S3Origin"=>{"DNSName"=>"aws-test.s3.amazonaws.com"}}],
     "@xmlns"=>"http://cloudfront.amazonaws.com/doc/2010-11-01/"}}
cf.GetDistribution('DistributionId' => 'E2FLHADADBK2P9') #=> 
  {"Distribution"=>
      {"Status"=>"Deployed",
      "LastModifiedTime"=>"2008-10-23T15:17:24.447Z",
      "InProgressInvalidationBatches"=>"0",
      "Id"=>"E2FLHADADBK2P9",
      "DistributionConfig"=>
        {"Comment"=>"test",
        "Enabled"=>"true",
        "CallerReference"=>"200810231517246798821075",
        "CNAME"=>["c1.test.com", "c2.test.com"],
        "S3Origin"=>{"DNSName"=>"aws-test.s3.amazonaws.com"}},
      "DomainName"=>"d2kia27jveea52.cloudfront.net",
      "@xmlns"=>"http://cloudfront.amazonaws.com/doc/2010-11-01/"}}

See Also: