Sha256: 53feb7d8fd92b3f6da4c12af051eba7cb10d4caa871bca241de8450698c570fe

Contents?: true

Size: 682 Bytes

Versions: 4

Compression:

Stored size: 682 Bytes

Contents

# frozen_string_literal: true

module Fog
  module Aliyun
    class Storage
      class Real
        # Create a new container
        #
        # ==== Parameters
        # * name<~String> - Name for container
        #
        def put_container(name, options = {})
          bucket = options[:bucket]
          bucket ||= @aliyun_oss_bucket

          path = name + '/'
          resource = bucket + '/' + name + '/'
          request(
            expects: [200, 203],
            method: 'PUT',
            path: path,
            bucket: bucket,
            resource: resource,
            location: get_bucket_location(bucket)
          )
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-aliyun-0.3.15 lib/fog/aliyun/requests/storage/put_container.rb
fog-aliyun-0.3.13 lib/fog/aliyun/requests/storage/put_container.rb
fog-aliyun-0.3.12 lib/fog/aliyun/requests/storage/put_container.rb
fog-aliyun-0.3.11 lib/fog/aliyun/requests/storage/put_container.rb