File: get_object_acl.rb

package info (click to toggle)
ruby-fog-aliyun 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 720 kB
  • sloc: ruby: 5,804; makefile: 6; sh: 3
file content (30 lines) | stat: -rw-r--r-- 956 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module Fog
  module Aliyun
    class Storage
      class Real

        # Get access control list for an S3 object
        #
        # @param bucket_name [String] name of bucket containing object
        # @param object_name [String] name of object to get access control list for
        # @param options [Hash]
        # @option options versionId [String] specify a particular version to retrieve

        def get_object_acl(bucket_name, object_name, options = {})
          unless bucket_name
            raise ArgumentError.new('bucket_name is required')
          end
          unless object_name
            raise ArgumentError.new('object_name is required')
          end

          # At present, sdk does not support versionId
          # if version_id = options.delete('versionId')
          #   query['versionId'] = version_id
          # end
          @oss_protocol.get_object_acl(bucket_name, object_name)
        end
      end
    end
  end
end