Sha256: b3c9feca7eaa2d39525c7c581079314ea3c8ab8e6b8772d99c18dc81d385f32a

Contents?: true

Size: 944 Bytes

Versions: 6

Compression:

Stored size: 944 Bytes

Contents

module Fog
  module Rackspace
    class CDN
      class Real

        # modify CDN properties for a container
        #
        # ==== Parameters
        # * name<~String> - Name for container, should be < 256 bytes and must not contain '/'
        # # options<~Hash>:
        #   * 'X-CDN-Enabled'<~Boolean> - cdn status for container
        #   * 'X-CDN-URI'<~String> - cdn url for this container
        #   * 'X-TTL'<~String> - integer seconds before data expires, defaults to 86400 (1 day), in 3600..259200
        #   * 'X-Log-Retention'<~Boolean> - ?
        #   * 'X-User-Agent-ACL'<~String> - ?
        #   * 'X-Referrer-ACL'<~String> - ?
        def post_container(name, options = {})
          response = request(
            :expects  => [201, 202],
            :headers  => options,
            :method   => 'POST',
            :path     => CGI.escape(name)
          )
          response
        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/cdn/requests/rackspace/post_container.rb
fog-0.8.1 lib/fog/cdn/requests/rackspace/post_container.rb
fog-0.8.0 lib/fog/cdn/requests/rackspace/post_container.rb
fog-0.7.2 lib/fog/cdn/requests/rackspace/post_container.rb
fog-0.7.1 lib/fog/cdn/requests/rackspace/post_container.rb
fog-0.7.0 lib/fog/cdn/requests/rackspace/post_container.rb