Module: Aliyun::Oss::Client::Buckets
- Included in:
- BucketsService
- Defined in:
- lib/aliyun/oss/client/buckets.rb
Instance Method Summary collapse
-
#create(*args) ⇒ true
Create bucket.
-
#delete(*args) ⇒ true
Delete bucket.
-
#list(options = {}) ⇒ Array<Aliyun::Oss::Struct::Bucket>
List buckets.
Instance Method Details
#create(*args) ⇒ true
Create bucket
30 31 32 |
# File 'lib/aliyun/oss/client/buckets.rb', line 30 def create(*args) !!client.bucket_create(*args) end |
#delete(*args) ⇒ true
Delete bucket
42 43 44 |
# File 'lib/aliyun/oss/client/buckets.rb', line 42 def delete(*args) !!client.bucket_delete(*args) end |
#list(options = {}) ⇒ Array<Aliyun::Oss::Struct::Bucket>
List buckets
13 14 15 16 17 18 19 20 |
# File 'lib/aliyun/oss/client/buckets.rb', line 13 def list( = {}) result = client.list_buckets().parsed_response bucket_keys = %w(ListAllMyBucketsResult Buckets Bucket) Utils.wrap(Utils.dig_value(result, *bucket_keys)).map do |bucket_hash| build_bucket(bucket_hash, client) end end |