Sha256: b6c122d6ea68087be02838aab8c4364f4a1349c4c9888f3631d93ff5734ec11b

Contents?: true

Size: 821 Bytes

Versions: 12

Compression:

Stored size: 821 Bytes

Contents

# frozen_string_literal: true

module Fog
  module Storage
    class Aliyun
      class Real
        # Delete an existing container
        #
        # ==== Parameters
        # * container<~String> - Name of container to delete
        # * options
        #
        def delete_container(container, options = {})
          bucket = options[:bucket]
          bucket ||= @aliyun_oss_bucket
          location = get_bucket_location(bucket)
          endpoint = 'http://' + location + '.aliyuncs.com'
          object = container + '/'
          resource = bucket + '/' + object

          request(
            expects: 204,
            method: 'DELETE',
            path: object,
            bucket: bucket,
            resource: resource,
            endpoint: endpoint
          )
        end
      end
    end
  end
end

Version data entries

12 entries across 10 versions & 2 rubygems

Version Path
fog-aliyun-0.3.10 lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.9 lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.8 lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.7 lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.6 lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.5 lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.4 lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.3 lib/fog/aliyun/requests/storage/delete_container.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/requests/storage/delete_container.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/requests/storage/delete_container.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/requests/storage/delete_container.rb
fog-aliyun-0.3.2 lib/fog/aliyun/requests/storage/delete_container.rb